When setting up a raspberry pi and you do not know the IP adress, the device should be available at
raspberrypi.local
. A freshly installed pi can be accessed via WiFi only if the network setup was done while flashing the SD card or via SSH over ethernet.
For the latter option usesudo raspi-configafter following step 1.
ssh USERNAME@XXX.XXX.XXX.XXsudo apt-get updatesudo apt install git -yyou can use HTTPS (with personal access token) or SSH
- generate Personal Tokem
- https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
git clone https://github.com/pns-solutions/Plant-Nutrient-Control.gituse the token as password
git clone git@github.com:pns-solutions/Plant-Nutrient-Control.gitif you don't have an ssh-key, follow the guide in the additional information section
cd Plant-Nutrient-Control
chmod +x ./scripts/install-docker.sh && chmod +x ./scripts/start-docker.sh && chmod +x ./scripts/build-docker.sh && chmod +x ./scripts/addCronTab.sh./scripts/install-docker.shYou will probably be asked to allow the installation of additional packages. Accept by entering 'Y'.
After this script is finished, the system will restart. Wait a minute to reconnect via SSH. Then go again into the cloned repository (
cd Plant-Nutrient-Control
)../scripts/start-docker.sh./scripts/addCronTab.sh./scripts/build-docker.shIf there were no problems, your system should run now. Otherwise, use the manuel installation in the additional information section
- apt-get (update it before you start with the installation)
- git
- docker (installed and running)
ssh USERNAME@XXX.XXX.XXX.XXyou can use SSH (preferred) or HTTPS
git clone git@github.com:pns-solutions/Plant-Nutrient-Control.gitif you don't have an ssh-key, follow the guide in the additional information section
git clone https://github.com/pns-solutions/Plant-Nutrient-Control.gitcd Plant-Nutrient-Control
chmod +x ./scripts/build-docker.sh./scripts/build-docker.shIf there were not problems, your system should run now. Otherwise, use the manuel installation in the additional information section
cd Plant-Nutrient-Control
docker-compose up -d --force-recreate
Your application should now be accessible from the following locations:
- Application:
192.168.xxx.xx:8080
- Elasticsearch:
192.168.xxx.xx:9200
| Will take a few minutes to start after docker compose completes successfully.- Kibana:
192.168.xxx.xx:5601
| Will take a few seconds to start after docker compose completes successfully.- Grafana:
192.168.xxx.xx:3030
| admin:admin (initial)- NodeRed:
192.168.xxx.xx:1880
- MQTT:
192.168.xxx.xx:8883
| Does not display HTTPS results. Try a NodeRed flow.
- menu
- import
- local
- select: dataFaker.json
- import
- go to the left menu and hover over the plus sign
- select import
- upload the dashboard json file
- location:
grafana/default-dashboards/
- select load
ssh USERNAME@XXX.XXX.XXX.XXsudo apt-get updateinstall docker
curl -fsSL https://get.docker.com -o get-docker.shsudo sh get-docker.shadding your user to the docker group
sudo usermod -a -G docker $USER
restart pi:
sudo rebootinstall docker compose
sudo apt-get install docker-composestart docker
sudo systemctl enable docker # Auto-start on bootsudo systemctl start docker # Start right now
go to the cloned repository (on your server)
cd /DockerSetup
run the following commands:
docker-compose build && docker-compose up -d
docker exec -it webapplication sh -c "mkdir -p logs && chmod 755 logs"docker exec -it webapplication sh -c "cd assets/composer && composer update && composer install"docker exec -d webapplication sh -c "cd scripts && chmod 755 restartSensorController.sh && ./restartSensorController.sh"
ssh-keygen -t rsa
- enter
- password
- repeat password
- get ssh key:
cat ~/.ssh/id_rsa.pub
- copy key to clipboard
- go to GitHub
- you profile icon -> setting
- SSH and GPG keys
- new SSH key
- add the key from ssh