The FarmData2 Development Environment can be run locally on your machine. This approach will require that you install some dependencies on your machine.
If you run into problems during the install visit the dedicated install stream on the FarmData2 Zulip chat. Use the search feature to see of others have had and solved the problem you are experiencing. If you do not find a solution, post a summary of your problem and the community will help.
Running a FarmData2 Development Environment locally requires that you install the following dependencies:
- Docker Desktop
- For Windows:
- use the _WSL 2 backend_.
- be sure to not to miss the step that directs you to instructions to "Turn on the WSL 2 feature on Windows."
- be sure to Enable Docker support in WSL 2 distributions as described on the Docker Desktop WSL 2 backend on Windows page.
- For Windows:
- git
- Most systems now come with git pre-installed.
- Open a terminal on your local machine (use a WSL terminal if on Windows) and used the following command:
git --version
- If git is not installed, visit git Downloads to install git.
- For Windows, you will need to install the Linux version of git within WSL rather than the Windows version of git.
- Tiger VNC Viewer
- For Windows, download and run the
vncviewer64.1.13.0.exefile. - For Mac, download and open the
TigerVNC.1.13.0.dmgfile and then copy the "TigerVNC Viewer" to your Applications folder. - Note: Newer versions of the Tiger VNC Viewer might work, but have not been tested.
- For Windows, download and run the
Use the following steps to create a FarmData2 Development Environment on your local machine:
- Check that Docker Desktop is running.
- Fork the upstream FarmData2 repository in GitHub.
- Click the green "Code" button and copy the HTTPS URL of your fork. This URL should have your GitHub username in it.
- In a terminal on your local machine (use a WSL terminal if on Windows):
- Clone your fork of the FarmData2 repository:
git clone <URL>
- Use
lsto see the directory that was created for your clone of your fork of the FarmData2 repository. cdinto your FarmData2 repository directory.- Run the command:
bin/fd2-up.bash- When running on Windows (WSL) or Linux, this script must make some changes to your WSL instance. To do so it will prompt you for your admin/root password. If you want to see what the script it doing before running it examine the source code in
bin/fd2-up.bashandbin/fd2-up.linux.bash.
- Clone your fork of the FarmData2 repository:
- When running
bin/fd2-up.bashyour terminal will display information about starting the FarmData2 Development Environment. This will take 5-10 minutes depending upon your internet speed. - Wait for the message "FarmData2 Development Environment started" to appear in your terminal.
- Launch the VNC Viewer and to connect to
localhost:5901. - Follow the directions to Setup the FarmData2 Development Environment.
- See the Working in the FarmData2 Development Environment document for more information about working in the FarmData2 Developer Environment.
To stop a running FarmData2 Development Environment on your local machine:
- In a terminal on your local machine (use a WSL terminal if on Windows):
cdinto your FarmData2 repository directory.- Run the command:
bin/fd2-down.bash
The FarmData2 Development Environment will restart much faster that the first time.
- Check that Docker Desktop is running.
- In a terminal on your local machine (use a WSL terminal if on Windows):
cdinto your FarmData2 repository directory.- Run the command:
bin/fd2-up.bash
- Wait for the message "FarmData2 Development Environment started" to appear in your terminal.
- Connect to the FarmData2 Development Environment by using one of the following methods:
- Use a web browser to visit
http://localhost:6109and click the "Connect" button on the page that is displayed. - Use a VNC client to connect to
localhost:5901.
- Use a web browser to visit
- When you are done working:
- Push the branch you are working on to your GitHub as a backup.
- Stop the FarmData2 Development Environment