Skip to content

Latest commit

 

History

History
71 lines (46 loc) · 2.59 KB

setup.rst

File metadata and controls

71 lines (46 loc) · 2.59 KB

Setting up the development environment

  1. Make sure that you are using a clean and recently updated Ubuntu 18.04. This environment assumes you're running as a non-root user with sudo access.

  2. We use Bazel for both building and testing. To set up the development environment, please install Bazel version 1.2.0:

    sudo apt-get install g++ unzip zip
    wget https://github.com/bazelbuild/bazel/releases/download/1.2.0/bazel-1.2.0-installer-linux-x86_64.sh
    bash ./bazel-1.2.0-installer-linux-x86_64.sh --user
    rm ./bazel-1.2.0-installer-linux-x86_64.sh
  3. Next, clone the SCION repository into the appropriate directory inside your workspace. In the commands below, replace ${WORKSPACE} with the directory in which you want to set up the project:

    cd ${WORKSPACE}
    git clone https://github.com/scionproto/scion
    cd scion
  4. For this step, make sure you are in the scion repository root. To install the required dependencies, run:

    ./env/deps
  5. (Optional) If you want to run applications via docker, install docker and docker-compose. Please follow the instructions for docker-ce <https://docs.docker.com/install/linux/docker-ce/ubuntu/> and docker-compose <https://docs.docker.com/compose/install/>. Then, add your user to the docker group: sudo usermod -a -G docker ${LOGNAME}, where ${LOGNAME} is replaced with your user name. Log out and log back in so that your membership of the docker group is seen by the shell session.

  6. SCION networks are composed of many different applications. To simplify testing, we provide a tool that generates test topologies. To generate the files required by the default topology (see doc/fig/default_topo.png for a diagram of this topology), run:

    ./scion.sh topology

    The above command creates the gen directory, which contains configuration files and cryptographic material for multiple SCION ASes and ISDs.

  7. To start the infrastructure we just generated, run:

    ./scion.sh run
  8. To stop the infrastructure, run:

    ./scion.sh stop
  9. Finally, check that unit tests run correctly:

    ./scion.sh test
  10. (Optional) If you already have some code you wish to contribute upstream, you can also run the linters locally with:

    ./scion.sh lint