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. # Build and install a docker image for keystone.
--- ---
- name: Make persistent directories - name: Make build and persistent directories
file: file:
path: /srv/keystone/fernet-keys path: "{{ item }}"
state: directory state: directory
mode: 0777 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. - name: install service file.
template: template:
@ -25,7 +43,6 @@
/usr/bin/docker run --rm /usr/bin/docker run --rm
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }} --add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}
-v /srv/keystone/fernet-keys:/etc/keystone/fernet-keys -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 }} hpc/keystone keystone-manage {{ item }}
with_items: with_items:
- db_sync - db_sync
@ -43,7 +60,6 @@
/usr/bin/docker run --rm /usr/bin/docker run --rm
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }} --add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }}
-v /srv/keystone/fernet-keys:/etc/keystone/fernet-keys -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 hpc/keystone bash /etc/bootstrap.sh
- name: make sure service is started - name: make sure service is started

View File

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