This document is specific to the London RedCentric lab, but should evolve to a more generic setup once we have more labs. For now, there are some hard-coded logic in the wiki as well as the scripts, to make sure we can reproduce at least the one lab we have. Once we have more labs, we'll work to automate that using configuration files, command line options, etc.
...
Warning: This script will restart your network. It has been tested remotely (via SSH), but you may want to have a physical terminal nearby just in case.
Setting up the VMs
With the network Warning: This script will set the /etc/ansible/hosts file to reflect the HPC Lab's IP layout. Please edit file to reflect your own topology.
Setting up the VMs
With the network in place, you can create the VMs.
...
You may get two warnings when you log in to Jenkins, which can be corrected on the Global Security screen:
- ERROR in config.xml: Jenkins may complain "version 1.1" is not supported, only 1.0. Editing
/var/lib/jenkins/config.xml
and changing that on the first line seems to work. - Agent to master security subsystem is currently off: Go to Security Settings and check the box saying "Enable Agent → Master Access Control"
- Jenkins instance uses deprecated protocols: JNLP3-connect: Go to Security Settings > Agents and clear the box "Java Web Start Agent Protocol/3" in "Agent Protocols"
- SSH HOST KEY VERIFIERS ARE NOT CONFIGURED FOR ALL SSH SLAVES: They are (host key verification), but Jenkins wants you to mark that manually, by entering all slaves' configuration and hitting "Save".
Themes: Install the Simple Theme Plugin and choose one from the list by updating the theme URL in the general settings.
Save the configuration and you should be all set.
Installing the Jenkins Jobs
...
The Jenkins playbook is a requirement for the other two: MrP and FS.
Create Mr-Provisioner users account
You need to create the Jenkins account by hand in Mr-Provisioner, Warning: If you only want to install the services, and do not have (access, since it requires sudo) /etc/ansible/hosts configured, use this command :
To populate the hosts, please refer to the doc, and define a group named "jenkins".
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # ansible-playbook -i hosts -v -u root jenkins.yml |
Create Mr-Provisioner users account
You need to create the Jenkins account by hand in Mr-Provisioner, add the SSH keys and generate the token. This requirement will be dropped when bug 102 is fixed.
...
Code Block | ||||
---|---|---|---|---|
| ||||
jslave_tokens:
- jslave: d05ohpc
token: APITOKEN
- jslave: qdcohpc
token: APITOKEN
- jslave: d03bench
token: APITOKEN
- jslave: d05bench
token: APITOKEN
- jslave: qdcbench
token: APITOKEN
- jslave: tx2bench
token: APITOKEN |
...
qdcbench
token: APITOKEN
- jslave: tx2bench
token: APITOKEN |
Run Mr-Provisioner and File System playbooks
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # ansible-playbook -v -u root mrp.yml
root@hpc-admin # ansible-playbook -v -u root fs.yml |
Warning: If you want to not depend on /etc/ansible/hosts, populate a hosts file with three groups : "jenkins", "provisioner", "fileserver" and use the command :
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # ansible-playbook -v -u root -i hosts mrp.yml root@hpc-admin # ansible-playbook -v -u root -i hosts fs.yml |
Updating Jenkins Jobs
Once the jobs are installed and working, on every change pertaining the Jenkins configuration, you just need to update the repo and run the same playbook again:
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # cd hpc_lab_setup root@hpc-admin # git fetch -a & git fetch -a & git pull pull root@hpc-admin # ansible-playbook -v -u root jobs.yml |
Warning: If you want to not depend on /etc/ansible/hosts, populate a hosts file with this groups : "jenkins" and use the command :
root@hpc-admin # ansible-playbook -v -u root -i hosts jobs.yml