From db24c19b1c5187450020d67042f8ec77a5409392 Mon Sep 17 00:00:00 2001 From: MJB <mjb@it-innovation.soton.ac.uk> Date: Mon, 13 Aug 2018 23:30:20 +0100 Subject: [PATCH] #88 updates to readme and fixes for nested lxd --- .gitlab-ci.yml | 2 +- README.md | 36 +++++++++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1b50bb6..b511596 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 3a99361..b39e2db 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: -- GitLab