- Go to https://openstack.cern.ch/project/instances/.
- Launch a CC7 x86_64 m2.large machine.
- ssh as root to the machine from lxplus(e.g. [amlevin@lxplus085 ~]$ ssh root@amlevin8)
- yum -y install emacs wget
- locmap --enable cvmfs
- locmap --configure cvmfs
- emacs -nw crontab.txt
- add the line ** * * * * ls /cvmfs/cms.cern.ch/cmsset_default.sh >& /dev/null
- crontab crontab.txt
- curl -sSL https://get.docker.com/ | sh
- service docker start
- mkdir cmspkuewk-container
- cd cmspkuewk-container
- wget https://raw.githubusercontent.com/clelange/cmssw-docker/master/cc7-cms/Dockerfile
- emacs -nw Dockerfile
- remove the line starting with "RUN groupadd -g 1000" and all lines below it
- docker build .
- docker tag {hexidecimal number reported at the end of the previous step} cmspkuewk-image
- docker run -d --name gitlab-runner --restart always -v /srv/gitlab-runner/config:/etc/gitlab-runner -v /var/run/docker.sock:/var/run/docker.sock -v /afs:/afs -v /cvmfs:/cvmfs gitlab/gitlab-runner:latest
- docker exec -it gitlab-runner gitlab-runner register
- emacs -nw /srv/gitlab-runner/config/config.toml
- add the line under [runners.docker]: pull_policy = "if-not-present"
- change volumes = ["/cache"] to volumes = ["/cache","/afs:/afs","/cvmfs:/cvmfs"]
References:
https://docs.gitlab.com/runner/install/docker.html
https://awesome-workshop.github.io/gitlab-cms/
https://gist.github.com/sashabaranov/defccee8795619025d83f466b0ec4e35