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.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
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
For this step, make sure you are in the
scion
repository root. To install the required dependencies, run:./env/deps
(Optional) If you want to run applications via docker, install
docker
anddocker-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 thedocker
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 thedocker
group is seen by the shell session.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.To start the infrastructure we just generated, run:
./scion.sh run
To stop the infrastructure, run:
./scion.sh stop
Finally, check that unit tests run correctly:
./scion.sh test
(Optional) If you already have some code you wish to contribute upstream, you can also run the linters locally with:
./scion.sh lint