Commit 3192d8fc authored by Swann Perarnau's avatar Swann Perarnau
Browse files

[feature] Add CI playbook

Playbook to use with ./chi-appliance configure to setup a CI
infrastructure on top of Chameleon nodes.

This playbook:
 - installs gitlab-runner
 - adds role to install or run ci on aml

I'm reluctant to add CI tokens in plaintext inside the infra repo.
Instead, ansible-vault is used to keep them encrypted.
parent 697c2963
---
- hosts: all
vars_files:
- vars/ci-tokens.yaml
roles:
- common
- { role: ci-runner, become: yes }
- { role: aml, ci: true, install: false}
- name: add ci configuration
blockinfile:
dest: /etc/gitlab-runner/config.toml
block: "{{ lookup('template', 'config.gitlab.etc.j2') }}"
marker: "# {mark} ANSIBLE MANAGED BLOCK FOR aml"
- name: add aml dependencies
package:
name: "{{ item }}"
state: present
with_items:
- numactl-devel
- hwloc-devel
- name: fetch aml repository
git:
repo: https://xgitlab.cels.anl.gov/argo/aml.git
dest: /argo/aml.git
update: yes
- name: compile aml
shell: ./autogen.sh && ./configure --prefix=/usr && make && make install
args:
chdir: /argo/aml.git
- { include: dependencies.yaml, become: yes }
- { include: install.yaml, become: yes, when: install }
- { include: ci.yaml, become: yes, when: ci }
[[runners]]
name = "CHI/AUTO/aml"
url = "https://xgitlab.cels.anl.gov/"
token = "{{ aml_ci_token }}"
executor = "shell"
[runners.cache]
$ANSIBLE_VAULT;1.1;AES256
39616266613961346337313335393565343662326439326265663631316266363235653661323466
3365656134326137343030363161363735663364333939360a393034386438323862333663633439
37363763393963663866326166623837303032363665316131646361396338343334663938343430
6561613939396438620a373234633238393735646334386539393962643930613830366563316263
64323834386537663134336266386237316261626264323561333965333066623531613336613734
36643361363564626333613132313063373636323935343165333936386631613565313764386330
306166333231373532343265386266383861
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment