Skip to content

Latest commit

 

History

History
79 lines (62 loc) · 4.67 KB

File metadata and controls

79 lines (62 loc) · 4.67 KB

Running the FarmData2 Development Environment Locally

The FarmData2 Development Environment can be run locally on your machine. This approach will require that you install some dependencies on your machine.

Install Help

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.

Dependencies

Running a FarmData2 Development Environment locally requires that you install the following dependencies:

  1. Docker Desktop
  2. 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.

Creating a FarmData2 Development Environment Locally

Use the following steps to create a FarmData2 Development Environment on your local machine:

  1. Check that Docker Desktop is running.
  2. Fork the upstream FarmData2 repository in GitHub.
  3. Click the green "Code" button and copy the HTTPS URL of your fork. This URL should have your GitHub username in it.
  4. In a terminal on your local machine (use a WSL terminal if on Windows):
    1. Clone your fork of the FarmData2 repository:
      • git clone <URL>
    2. Use ls to see the directory that was created for your clone of your fork of the FarmData2 repository.
    3. cd into your FarmData2 repository directory.
    4. Run the command:
      • bin/fd2-up.bash
      • When running on Windows (WSL) or Linux, this script must make some changes to your local machine configuration. 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.bash.
  5. When running bin/fd2-up.bash your terminal will display information about starting the FarmData2 Development Environment. This will take about 2-5 minutes.
  6. Wait for the message "FarmData2 Development Environment started" to appear in your terminal.
  7. Connect to the FarmData2 Development Environment by using one of the following methods:
    • Connect by using your web browser by visiting:
      • http://localhost:6109 and then clicking the "Connect" button on the page that appears. See the Connect Using Your Web Browser section for more information.
    • Connect to:
  8. Follow the directions to Setup the FarmData2 Development Environment.

Stopping a FarmData2 Development Environment Locally

To stop a running FarmData2 Development Environment on your local machine:

  1. In a terminal on your local machine (use a WSL terminal if on Windows):
    1. cd into your FarmData2 repository directory.
    2. Run the command:
      • bin/fd2-down.bash

Restarting a FarmData2 Development Environment Locally

The FarmData2 Development Environment will restart much faster that the first time.

  1. Check that Docker Desktop is running.
  2. In a terminal on your local machine (use a WSL terminal if on Windows):
    1. cd into your FarmData2 repository directory.
    2. Run the command:
      • bin/fd2-up.bash
  3. Wait for the message "FarmData2 Development Environment started" to appear in your terminal.
  4. Connect to the FarmData2 Development Environment:
    • Using your web browser by visiting:
      • http://localhost:6901
    • Or by using a VNC client and connecting to:
      • localhost:5901
  5. When you are done working:
    1. Push the branch you are working on to your GitHub as a backup.
    2. Stop the FarmData2 Development Environment