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 # vim /etc/network/interfaces # auto enp0s25 # iface enp0s25 inet dhcp auto br0 iface br0 inet static address 10.50.0.2 netmask 255.255.0.0 gateway 10.50.0.1 dns-nameservers 10.50.0.1 bridge_ports enp0s25 bridge_stp off bridge_maxwait 0 bridge_fd 0 root@hpc-admin # systemctl restart networking |
Then create 2 VMs : one for MrP, one for Jenkins.
NOTE: FOR THE PRESEED, use the one attached to JIRA issue HPC-115 the one entitled "preseed_replace_SSHPUBKEY.cfg" and be sure to replace it, as else it won't add your sshkey to the root user.
Code Block |
---|
user@hpc-admin $ sed -i "s/SSHROOTPUB/$(sed 's:/:\\/:g' /home/user/.ssh/id_rsa.pub)/" preseed_replace_SSHPUBKEY.cfg
user@hpc-admin $ mv preseed_replace_SSHPUBKEY.cfg preseed.cfg |
NOTE: The pressed NEEDS to be called "preseed.cfg" else the virt-install WILL NOT take it.
...
With the network in place, you can clone the HPC Lab Conf repository (you must be allowed and have your key in the private repo):
Code Block | ||
---|---|---|
| ||
root@hpc-admin # git clone ssh://git@dev-private-git.linaro.org/hpc/labconf.git
root@hpc-admin # cd labconf/kvm |
Then create the Jenkins VM:
Code Block |
---|
root@hpc-admin # ./jenkins_virt-install --virt-type kvm \ --name jenkins-hpc \ --memory 16384 \ --vcpus 4 \ --disk size=500 \ --os-variant debian9 \ --network bridge=br0 \ --graphics none \ --initrd-inject=preseed.cfg \ --location http://cdn-fastly.deb.debian.org/debian/dists/stretch/main/installer-amd64/ \ --extra-args "console=ttyS0,115200n8 serial" _install.sh |
TODO: Write a mrp_virt_install.sh and a preseed_mrp.cfg a above, with the virt-install command below
Code Block | ||||
---|---|---|---|---|
| ||||
root@hpc-admin # virt-install --virt-type kvm \ --name mrp-hpc \ --memory 4096 \ --vcpus 2 \ --disk size=20 \ --os-variant debian9 \ --network bridge=br0 \ --graphics none \ --initrd-inject=preseed.cfg \ --location http://cdn-fastly.deb.debian.org/debian/dists/stretch/main/installer-amd64/ \ --extra-args "console=ttyS0,115200n8 serial" |
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.
Installing the Jenkins service
...
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
...