Skip to content

Latest commit

 

History

History
58 lines (52 loc) · 1.47 KB

README.md

File metadata and controls

58 lines (52 loc) · 1.47 KB

BugSwarm Spawner

A docker image that contain all required packages in provision.sh and can spawn pipeline jobs.

Building the Spawner

  1. Build the spawner using docker
    $ cd spawner
    $ docker build -t bugswarm-spawner .

Starting the Spawner Container

There are two ways to run the spawner.

Run Docker Inside Docker

  1. Run the container with --privileged mode.
    $ docker run --privileged -it bugswarm-spawner
  2. Start docker daemon and build and run the database container.
    $ sudo dockerd &
    $ cd database
    $ docker build -t bugswarm-db .
    $ cd ..
    $ docker run -tid -p 27017:27017 -p 5000:5000 bugswarm-db
    (not tested)

Run Docker on Host

  1. Run the container with /var/run/docker.sock mounted and network set to host.
    $ docker run -v /var/run/docker.sock:/var/run/docker.sock \
    	-v /var/lib/docker:/var/lib/docker --net=host -it bugswarm-spawner
  2. Add user to docker group and re-login.
    $ DOCKER_GID=`stat -c %g /var/run/docker.sock`
    $ sudo groupadd -g $DOCKER_GID docker_host
    $ sudo usermod -aG $DOCKER_GID bugswarm
    $ sudo su bugswarm
  3. Make sure bugswarm-db is built and set up on the host.

Setting up environment

  1. Inside the container, pull the git repository
    $ git pull
  2. Add the credentials file
    $ cat > bugswarm/common/credentials.py
  3. Re-run ./provision.sh
    $ ./provision.sh
  4. Continue with any other commands (e.g. ./run_reproduce_project.sh)