diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b50bb69c7e5b6017674226c5673c14a7e282b97..b511596b470f4126c6a30ee6fb0e22b170e4d25d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -65,5 +65,5 @@ clean: only: - schedules script: - - sudo scripts/test/fixture.sh destroy -f src/test/clmctest/rspec.json + - sudo scripts/test/fixture.sh destroy -f src/test/clmctest/rspec.json -r $CI_PROJECT_DIR when: always diff --git a/README.md b/README.md index 3a99361f29da50ae484a367087c293cfaf68fbc7..b39e2db123b9c49b88432be506f6412a66b91b4c 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,41 @@ pytest -s --pyargs clmctest.monitoring #### CI Testing -A vagrant VM is setup on givry in the directory `/home/mjb/flame-clmc` + +A lxd container is setup on givry called `clmc-ci`. The container is priviledged and allows for nested containers. The container was created using the following commands + +``` +lxc launch ubuntu:18.04 clmc-ci -c security.privileged=true -c security.nesting=true +lxc network attach br_ci clmc-ci eth0 +lxc config device set clmc-ci eth0 ipv4.address 10.0.3.15 +``` + +the container is then started and LXD initialised + +``` +lxc start clmc-ci +lxc exec clmc-ci -- bash +lxc init +``` + +Follow the interactive prompts, use the defaults apart from the storage pool type, use `dir` type + +Configure ip table persistence + +``` +echo iptables-persistent iptables-persistent/autosave_v4 boolean true | sudo debconf-set-selections +echo iptables-persistent iptables-persistent/autosave_v6 boolean true | sudo debconf-set-selections +apt-get -y install iptables-persistent +``` + +The install git runner file was just copied to the container from a tmp director + +``` +cp /tmp/install-git-runner.sh /var/lib/lxd/containers/clmc-ci/rootfs/tmp +chmod 755 /var/lib/lxd/containers/clmc-ci/rootfs/tmp +``` + + The VM is started using a libvirt vagrant file through the following command: