Skip to content
Snippets Groups Projects
Commit abdb64b9 authored by Arie Peterson's avatar Arie Peterson
Browse files

Merge branch 'keycloak_pw' into 'master'

Set keycloak pw from bootstrap script

Closes #51

See merge request openappstack/bootstrap!26
parents 6c478e93 0eae37ac
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@
# Ignore files created during CI using test/ci-bootstrap.py
/test/group_vars/
/test/secrets/
/test/inventory.yml
# Etc
......
......@@ -30,7 +30,8 @@ bootstrap:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
# - mkdir -p --mode 700 ~/.ssh
- ANSIBLE_HOST_KEY_CHECKING=False python3 -u ./ci-bootstrap.py --create_droplet --terminate
- ANSIBLE_HOST_KEY_CHECKING=False python3 -u ./ci-bootstrap.py --create_droplet
- python3 -c "import cosmos; cosmos.terminate_droplets_by_name(\"^ci-${CI_JOB_ID}\$\")"
artifacts:
paths:
- ansible/rke.log
......
......@@ -6,3 +6,4 @@ domain: "example.com"
admin_email: "admin@example.com"
# Label of this deployment.
release_name: "test"
keycloak_password: "{{ lookup('password', './secrets/keycloak_admin_password') }}"
......@@ -6,6 +6,7 @@
docker run --rm -i \
--hostname=control \
-e KEYCLOAK_PASSWORD="$KEYCLOAK_PASSWORD" \
-v /oas:/oas \
-v /oas/control/local:/control/local \
-v /oas/config/ssh_known_hosts:/etc/ssh/ssh_known_hosts \
......
......@@ -53,6 +53,8 @@
- debug: var=configFiles.stdout
- name: Apply helmfiles
environment:
- KEYCLOAK_PASSWORD: "{{ keycloak_password }}"
command: 'oas_control /usr/local/bin/control applyHelmfiles'
register: applyHelmfiles
- debug: var=applyHelmfiles.stdout
......
../ansible/bootstrap.yml
\ No newline at end of file
......@@ -121,7 +121,7 @@ if __name__ == "__main__":
name='ci-' + instance_id,
ssh_key_id=args.ssh_key_id,
region='ams1',
size=2048,
size=4096,
disk=8,
image=18)
id = droplet['droplet']['id']
......@@ -189,7 +189,7 @@ if __name__ == "__main__":
# Bootstrap
# playbook path here is relative to private_data_dir/project, see
# https://ansible-runner.readthedocs.io/en/latest/intro.html#inputdir
playbook='../ansible/bootstrap.yml'
playbook='./bootstrap.yml'
ansible_playbook_cmd = 'ansible-playbook %s' % playbook
log.info('Running %s', ansible_playbook_cmd)
......
../ansible/roles
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment