glance: registry & api fixes
This commit is contained in:
parent
e76198138a
commit
604943fea7
14
example.py
14
example.py
@ -48,7 +48,7 @@ def deploy():
|
||||
|
||||
glance_config = resource.create('glance_config', 'resources/glance_config/', {'ip': '', 'ssh_key': '', 'ssh_user': '', 'keystone_ip': '', 'keystone_port': '', 'config_dir': {}, 'api_port': '', 'registry_port': '', 'mysql_ip': '', 'mysql_db': '', 'mysql_user': '', 'mysql_password': '', 'keystone_admin_user': '', 'keystone_admin_password': '', 'keystone_admin_tenant': ''})
|
||||
glance_api_container = resource.create('glance_api_container', 'resources/glance_api_service/', {'image': 'cgenie/centos-rdo-glance-api', 'ports': [{'value': [{'value': 9292}]}], 'host_binds': [], 'volume_binds': [], 'db_password': '', 'keystone_password': '', 'keystone_admin_token': '', 'keystone_host': '', 'ip': '', 'ssh_key': '', 'ssh_user': ''})
|
||||
glance_registry_container = resource.create('glance_registry_container', 'resources/glance_registry_service/', {'image': 'cgenie/centos-rdo-glance-registry', 'ports': [{'value': [{'value': 9191}]}], 'host_binds': [], 'volume_binds': [], 'db_host': '', 'db_root_password': '', 'db_password': '', 'db_name': '', 'db_user': '', 'keystone_password': '', 'keystone_admin_token': '', 'keystone_host': '', 'ip': '', 'ssh_key': '', 'ssh_user': ''})
|
||||
glance_registry_container = resource.create('glance_registry_container', 'resources/glance_registry_service/', {'image': 'cgenie/centos-rdo-glance-registry', 'ports': [{'value': [{'value': 9191}]}], 'host_binds': [], 'volume_binds': [], 'db_host': '', 'db_root_password': '', 'db_password': '', 'db_name': '', 'db_user': '', 'keystone_admin_tenant': '', 'keystone_password': '', 'keystone_user': '', 'keystone_admin_token': '', 'keystone_host': '', 'ip': '', 'ssh_key': '', 'ssh_user': ''})
|
||||
|
||||
|
||||
####
|
||||
@ -125,7 +125,7 @@ def deploy():
|
||||
signals.connect(mariadb_service1, glance_registry_container, {'ip': 'db_host'})
|
||||
signals.connect(glance_db, glance_registry_container, {'db_name': 'db_name', 'login_password': 'db_root_password'})
|
||||
signals.connect(glance_db_user, glance_registry_container, {'new_user_name': 'db_user', 'new_user_password': 'db_password'})
|
||||
signals.connect(glance_keystone_user, glance_registry_container, {'user_password': 'keystone_password'})
|
||||
signals.connect(glance_keystone_user, glance_registry_container, {'tenant_name': 'keystone_admin_tenant', 'user_name': 'keystone_user', 'user_password': 'keystone_password'})
|
||||
signals.connect(glance_keystone_user, glance_registry_container, {'login_token': 'keystone_admin_token'})
|
||||
signals.connect(haproxy_config, glance_registry_container, {'ip': 'keystone_host'})
|
||||
|
||||
@ -206,11 +206,11 @@ def undeploy():
|
||||
resources = map(resource.wrap_resource, db.get_list('resource'))
|
||||
resources = {r.name: r for r in resources}
|
||||
|
||||
actions.resource_action(resources['glance_registry_container'], 'run')
|
||||
actions.resource_action(resources['glance_api_container'], 'run')
|
||||
actions.resource_action(resources['glance_config'], 'run')
|
||||
actions.resource_action(resources['glance_db_user'], 'run')
|
||||
actions.resource_action(resources['glance_db'], 'run')
|
||||
actions.resource_action(resources['glance_registry_container'], 'remove')
|
||||
actions.resource_action(resources['glance_api_container'], 'remove')
|
||||
actions.resource_action(resources['glance_config'], 'remove')
|
||||
actions.resource_action(resources['glance_db_user'], 'remove')
|
||||
actions.resource_action(resources['glance_db'], 'remove')
|
||||
actions.resource_action(resources['haproxy_service'], 'remove')
|
||||
actions.resource_action(resources['haproxy_config'], 'remove')
|
||||
actions.resource_action(resources['keystone_service2'], 'remove')
|
||||
|
@ -3,6 +3,7 @@
|
||||
sudo: yes
|
||||
tasks:
|
||||
- docker:
|
||||
command: /bin/bash -c "glance-manage db_sync && /usr/bin/glance-api"
|
||||
name: {{ name }}
|
||||
image: {{ image }}
|
||||
state: running
|
||||
@ -25,9 +26,3 @@
|
||||
- {{ bind['value']['src'] }}:{{ bind['value']['dst'] }}:{{ bind['value'].get('mode', 'ro') }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
env:
|
||||
GLANCE_DB_PASSWORD: {{ db_password }}
|
||||
GLANCE_KEYSTONE_PASSWORD: {{ keystone_password }}
|
||||
KEYSTONE_ADMIN_SERVICE_HOST: {{ keystone_host }}
|
||||
KEYSTONE_ADMIN_TOKEN: {{ keystone_admin_token }}
|
||||
KEYSTONE_PUBLIC_SERVICE_HOST: {{ keystone_host }}
|
||||
|
5
resources/glance_config/actions/remove.yml
Normal file
5
resources/glance_config/actions/remove.yml
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
- hosts: [{{ ip }}]
|
||||
sudo: yes
|
||||
tasks:
|
||||
- shell: echo 'removed'
|
@ -3,6 +3,7 @@
|
||||
sudo: yes
|
||||
tasks:
|
||||
- docker:
|
||||
command: /bin/bash -c "glance-manage db_sync && /usr/bin/keystone-registry"
|
||||
name: {{ name }}
|
||||
image: {{ image }}
|
||||
state: running
|
||||
@ -25,13 +26,3 @@
|
||||
- {{ bind['value']['src'] }}:{{ bind['value']['dst'] }}:{{ bind['value'].get('mode', 'ro') }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
env:
|
||||
DB_ROOT_PASSWORD: {{ db_root_password }}
|
||||
GLANCE_DB_PASSWORD: {{ db_password }}
|
||||
GLANCE_DB_NAME: {{ db_name }}
|
||||
GLANCE_DB_USER: {{ db_user }}
|
||||
GLANCE_KEYSTONE_PASSWORD: {{ keystone_password }}
|
||||
KEYSTONE_ADMIN_SERVICE_HOST: {{ keystone_host }}
|
||||
KEYSTONE_ADMIN_TOKEN: {{ keystone_admin_token }}
|
||||
KEYSTONE_PUBLIC_SERVICE_HOST: {{ keystone_host }}
|
||||
MARIADB_SERVICE_HOST: {{ db_host }}
|
||||
|
@ -42,6 +42,12 @@ input:
|
||||
keystone_admin_token:
|
||||
schema: str!
|
||||
value:
|
||||
keystone_admin_tenant:
|
||||
schema: str!
|
||||
value:
|
||||
keystone_user:
|
||||
schema: str!
|
||||
value:
|
||||
keystone_password:
|
||||
schema: str!
|
||||
value:
|
||||
|
Loading…
Reference in New Issue
Block a user