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.
...
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # cd ~/labconf/ans_setup_mrp/ root@hpc-admin # ./pre-setup.sh root@hpc-admin # ansible-playbook mrp_setup.yml -vvvv -u root |
Ansible will start MrProvisioner automatically, so you should be able to just open the URL on your browser (assuming you have a route to the machine's IP):
...
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # cd ~/labconf/ans_setup_jenkins root@hpc-admin # ansible-playbook configure-jenkins.yml -vvvv -u root |
Ansible will start Jenkins automatically, so you should be able to just open the URL on your browser (assuming you have a route to the machine's IP):
...
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"
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
...
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # ansible-playbook -vvvv -u root jenkins.yml |
This also works to update once there are changed. This playbook will create the nodes, jobs, users, ssh keys, etc.
...
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # ansible-playbouok -vvvv -u root mrp.yml root@hpc-admin # ansible-playbouok -vvvv -u root 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_jenkins root@hpc-admin # git fetch -a & git pull root@hpc-admin # ansible-playbook -vvvv -u root jenkins.yml |