Compare commits

..

No commits in common. "482333215afed755fe64582656bcca453f6886e4" and "d42d1495e94b504e0fc60a784ecc1ca00c185850" have entirely different histories.

2 changed files with 21 additions and 6 deletions

View File

@ -1,10 +1,28 @@
# Build and install a docker image for keystone.
---
- name: Make persistent directories
- name: Make build and persistent directories
file:
path: /srv/keystone/fernet-keys
path: "{{ item }}"
state: directory
mode: 0777
with_items:
- /srv/keystone
- /srv/keystone/fernet-keys
- name: install Dockerfile
copy:
src: files/
dest: /srv/keystone
- name: keystone credentials file
template:
src: templates/admin-openrc.sh
dest: /srv/keystone
- name: build keystone image
docker_image:
path: /srv/keystone
name: hpc/keystone
- name: install service file.
template:
@ -25,7 +43,6 @@
/usr/bin/docker run --rm
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}
-v /srv/keystone/fernet-keys:/etc/keystone/fernet-keys
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}"
hpc/keystone keystone-manage {{ item }}
with_items:
- db_sync
@ -43,7 +60,6 @@
/usr/bin/docker run --rm
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}
-v /srv/keystone/fernet-keys:/etc/keystone/fernet-keys
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}"
hpc/keystone bash /etc/bootstrap.sh
- name: make sure service is started

View File

@ -8,8 +8,7 @@ TimeoutStartSec=0
Restart=always
ExecStartPre=-/usr/bin/docker rm -f %n
ExecStart=/usr/bin/docker run --name %n \
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }} \
-e "KEYSTONE_HOST={{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }}" \
--add-host=mariadb:172.23.41.2 \
-p 5000:5000 -p 35357:35357 \
-v /srv/keystone/fernet-keys:/etc/keystone/fernet-keys \
hpc/keystone