GrowSense is open source and available for anyone to use and contribute to. Follow this guide to use it in a garden or farm, or for development purposes.
All source code is stored in the GitHub repository
The automatic clone and setup script is recommended for most situations.
Use either wget or curl (depending on what is installed on your system) to download and launch the setup scripts.
wget
wget -O - https://raw.githubusercontent.com/GreenSense/Index/master/setup-from-github.sh | sh
cd GreenSense/Index
curl
curl https://raw.githubusercontent.com/GreenSense/Index/master/setup-from-github.sh | sh -s
cd GreenSense/Index
The code can be manually cloned and initialized if necessary.
Note: The automatic setup script above is recommended for most situations.
git clone --recursive https://github.com/GreenSense/Index.git GreenSense/Index
cd GreenSense/Index
sudo sh prepare.sh
sh init.sh
The GreenSense source code and projects can be configured remotely on a networked garden computer.
Follow the networking guides to set up a networked garden computer with remote SSH access.
Once connected remotely via SSH to the garden computer you can continue with the guide below.
Open a command terminal on a linux computer (if you don't already have one open):
ALT+CTRL+T
sudo apt update && sudo apt -y upgrade
Note: This may take a long time to complete.
The garden computer is now upgraded with the latest linux system software but the computer needs to be rebooted.
Reboot the computer so upgrades can take effect:
sudo reboot
Enter the password when prompted and press ENTER
If you're using SSH to connect to the garden computer then the SSH connection will be closed as it reboots
If you're working on the computer that the hardware is attached to then just wait for it to reboot, then open a new terminal window once it has.
If you're working via SSH then ping the garden computer to see when it comes back online:
ping [hostname]
ping garden
There may be no response for some time, just wait as the garden computer reboots.
Once the ping command starts returning results then the garden computer is back online.
When you see a similar output press CTRL+C to exit back to the terminal prompt.
If working remotely via SSH then log back in to the garden computer:
ssh j@[hostname]
ssh j@garden
Enter your password when prompted and press ENTER.
Note: The number at the top right after "LTS" indicates the kernel header version. If the number is 4.* or above then the kernel headers are up to date should support docker.
Create a workspace directory for the source code to be cloned into:
mkdir workspace
Move to the workspace directory:
cd workspace
Set up the GrowSense index from the GitHub repository:
wget
wget -O - https://raw.githubusercontent.com/GreenSense/Index/master/setup-from-github.sh | sh
curl
curl https://raw.githubusercontent.com/GreenSense/Index/master/setup-from-github.sh | sh -s
Notes:
Move into the GreenSense index base directory:
cd GreenSense/Index
Use this terminal for commands provided throughout the walkthroughs.
Make sure the working directory is ~/workspace/GreenSense/Index unless shown otherwise.
The source code can be edited by anyone who has permissions to the GitHub repository. Use the discussion page to request permissions.
Set up the source code:
curl https://raw.githubusercontent.com/GreenSense/Index/master/setup-from-github.sh | sh -s
cd GreenSense/Index
Switch to the 'dev' branch:
git checkout dev
Pull any new changes:
git pull origin dev
Edit the code:
Commit the code:
git commit -am "[Comment]"
Push the code:
git push origin dev
View the test results:
The GreenSense projects are set up with continuous integration, testing, and deployment.
Continuous integration is configured for the following projects:
When code is pushed to the 'dev' branch of any GreenSense project repository the following automated processes are triggered automatically:
Automated Software Tests
Automated Hardware Tests
Automatic Deployment/Update