Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

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 Jenkins Jobs

...

Create the authorisation files

Then, you You need to find your API token in Jenkins. That's done by clicking on your username (top right corner) > Configure > API Token > Show API Token.

This will show your user ID and token. That token is what below is referenced as APITOKEN.

hpc_lab_jenkins/vars/jenkins_cred.yml.secret:
No Format
user: user@linaro.org
password: APITOKEN{TOKEN}
url: http://10.40.0.12:8080

NOTE: The API TOKEN is the one from the admin user, not regular users.

Also, you need a token for Mr-Provisioner, to upload the preseeds. If you haven't got one yet, create it on the UI by clicking on your username's link (top right) > Tokens > "+". This will create a token.

Create a new file and copy the token hash into it.

hpc_lab_jenkins/vars/mrp_creds.yml.secret:
No Format
mr_provisioner_auth_token: {TOKEN}

Run the playbook

Code Block
bash
bash
root@hpc-admin # ansible-playbook -vvv -u root hpc_jobs_deploy.yml

...

The file server VM setup job handles the user creation + SSH keys copy, but this will move to the hpc_lab_jenkins repo.

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
bash
bash
root@hpc-admin # cd hpc_lab_jenkins
root@hpc-admin # git fetch -a & git pull
root@hpc-admin # ansible-playbook -vvv -u root hpc_jobs_deploy.yml

...