Skip to content

Latest commit

 

History

History
113 lines (82 loc) · 4.82 KB

setting-up.md

File metadata and controls

113 lines (82 loc) · 4.82 KB

Setting up a development environment

This is a step-by-step guide for setting up a development environment on your local machine. Using this environment, you can contribute to the project by working on features, enhancements, bug fixes, etc.

All the instructions in this document work for Linux, OS X, and Windows, with the following pointers:

  • Replace ./gradlew to gradlew.bat if you are using Windows.
  • All the commands are assumed to be run from the root project folder, unless specified otherwise.
  • When a version is specified for any tool, install that version instead of the latest version available.

If you encounter any problems during the setup process, please refer to our troubleshooting guide before posting a help request in our issue tracker.

Step 1: Obtain your own copy of the repository

  1. Install Git.

    1. (Optional but recommended) Install Sourcetree or other similar Git client.
  2. Fork our repo at https://github.com/TEAMMATES/teammates. Clone the fork to your hard disk.

  3. Add a remote name (e.g upstream) for your copy of the main repo. Fetch the remote-tracking branches from the main repo to keep it in sync with your copy.

    git remote add upstream https://github.com/TEAMMATES/teammates.git
    git fetch upstream

    Verification: Use the command git branch -r and the following lines should be part of the output:

     upstream/master
     upstream/release
    
  4. Set your master branch to track the main repo's master branch.

    git checkout master
    git branch -u upstream/master

More information can be found at this documentation.

Step 2: Install necessary tools and languages

These tools are necessary regardless of whether you are developing front-end or back-end:

  1. Install JDK 1.8.

  2. Install Python 2.7.

  3. Install Google Cloud SDK (minimum version 222.0.0). Follow the directions given here. Note that you do not need to initialize the SDK.

    # Run the following command at the Google Cloud SDK directory
    
    # Linux/OS X
    ./install.sh --path-update true
    
    # Windows
    install.bat --path-update true

    If you are installing in Red Hat, CentOS, Fedora, Debian or Ubuntu, refer to the quick start of Google Cloud SDK for Debian/Ubuntu or Red Hat/CentOS/Fedora respectively.

    Verification: Run a gcloud command (e.g. gcloud version) in order to verify that you can access the SDK from the command line.

  4. Run the following command to install App Engine Java SDK bundled with the Cloud SDK:

    # Linux/OS X/Windows
    gcloud -q components install app-engine-java
    
    # Red Hat/CentOS/Fedora
    sudo yum install google-cloud-sdk-app-engine-java
    
    # Debian/Ubuntu
    sudo apt-get install google-cloud-sdk-app-engine-java

    Verification: Run gcloud version and there should be an entry on app-engine-java.

If you want to develop front-end, you need to install the following:

  1. Install Node.js (minimum version 8.9.4).
  2. (Optional but highly recommended) Install Angular CLI version 6 globally.
    npm install -g @angular/cli@6
    Verification: Run ng and you should see a list of available Angular CLI commands.

Step 3: Set up project-specific settings and dependencies

  1. Run this command to create the main config files (these are not under revision control because their contents vary from developer to developer):

    ./gradlew createConfigs

    Verification: The file named gradle.properties should be added to the project root directory.

  2. Modify the following config file:

    • gradle.properties
      If you want to use a JDK other than the one specified in your PATH variable, add the value to the variable org.gradle.java.home.
  3. Run this command to download the necessary tools for front-end development (if you are going to be involved):

    npm install

    Verification: A folder named node_modules should be added to the project root directory.

Step 4: Set up an IDE (Recommended)

You are encouraged, but not required, to use an IDE to assist development tasks.

We currently support two IDEs: Eclipse IDE and IntelliJ IDEA. Support requests related to other IDEs will not be entertained.

Refer to this document if you wish to set up an IDE for developing TEAMMATES.

Step 5: Start developing

If you have followed every step correctly, your development environment should be set up successfully.

Proceed to the development routine as outlined in this document.