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.
...
Install Debian as you normally would for a server, do care to install the ssh server and to plan for enough space for the Jenkins logs (a bare minimum of 500Go for the Jenkins VM is desirable)
...
.
...
The first step is to checkout our private configuration repository (you'll need to be in the hpc-sig-admin LDAP group):
Code Block | ||
---|---|---|
| ||
root@hpc-admin # git clone ssh://git@dev-private-git.linaro.org/hpc/labconf.git
|
Two other repositories are necessary for now, but we'll move them into labconf soon:
Code Block | ||
---|---|---|
| ||
root@hpc-admin # git clone https://github.com/BaptisteGerondeau/ans_setup_jenkins.git
root@hpc-admin # git clone https://github.com/BaptisteGerondeau/infra-automation.git && cd infra_automation/ansible |
Once the repos are checked out, update the system and install the required packages:
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # cd ~/labconf/packages
root@hpc-admin # ./install_packages.sh |
You now have a working
...
bare-metal server running
...
Debian 9 with all the appropriate utilities and tools.
Network Configuration
For the VMs to work on the two network interfaces of the host, we need to create a bridge in each and assign the required static IPs, as well as enabling IP forward and creating the SSH keys and setting up Ansible's host file.
...
Code Block | ||
---|---|---|
| ||
root@hpc-admin # cd ~/labconf/network
root@hpc-admin # ./network_setup.sh <IF0> <IF1> |
...
Code Block |
---|
root@hpc-admin # cd ~/labconf/kvm
root@hpc-admin # ./jenkins_virt_install.sh |
...
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # cd ~/labconf/kvm
root@hpc-admin # ./mrp_virt_install.sh |
For both MrProvisioner and Jenkins, the preseed will setup statis IPs (10.50.0.3 and 10.50.0.4 respectively), and they should be visible from the wider network, including the host. This is done to simplify VM migration and a potential new installation on a different server.
...
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # cp -r ~/labconf/roles/ ~/ans_set_jenkins/ |
Then run Ansible and wait until it exists with no errors:
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # cd ~/ans_setup_jenkins && ansible-playbook configure-jenkins.yml -vvv -u root |
...
You may get two warnings when you log in to Jenkins, which can be corrected on the Global Security screen:
- Agent to master security subsystem is currently off: Check the box saying "Enable Agent → Master Access Control"
- Jenkins instance uses deprecated protocols: JNLP3-connect: Uncheck the box "Java Web Start Agent Protocol/3" in "Agent Protocols"
Save the configuration and you should be all set.
Installing the MrP service
...
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # cd ~/infra_automation/ansible
root@hpc-admin # ansible-playbook playbooks/infra-server.yml -vvv -u root |
...