Previously the keystone image was build here

But we since switched to separate repo's for the dockerfiles.
These are built with jenkins.
This commit is contained in:
Egon Rijpkema 2017-07-24 12:17:50 +02:00
parent d42d1495e9
commit b727857dae
2 changed files with 6 additions and 21 deletions

View File

@ -1,28 +1,10 @@
# Build and install a docker image for keystone. # Build and install a docker image for keystone.
--- ---
- name: Make build and persistent directories - name: Make persistent directories
file: file:
path: "{{ item }}" path: /srv/keystone/fernet-keys
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:
@ -43,6 +25,7 @@
/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
@ -60,6 +43,7 @@
/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,7 +8,8 @@ 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:172.23.41.2 \ --add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }} \
-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