diff --git a/resources/glance_config/actions/run.yml b/resources/glance_config/actions/run.yml index 9fa7207..b119575 100644 --- a/resources/glance_config/actions/run.yml +++ b/resources/glance_config/actions/run.yml @@ -7,6 +7,7 @@ keystone_port: {{ keystone_port }} keystone_admin_user: {{ keystone_admin_user }} keystone_admin_password: {{ keystone_admin_password }} + keystone_admin_port: {{ keystone_admin_port }} keystone_admin_tenant: {{ keystone_admin_tenant }} mysql_ip: {{ mysql_ip }} mysql_db: {{ mysql_db }} diff --git a/resources/glance_config/meta.yaml b/resources/glance_config/meta.yaml index 01f6638..d2a4c94 100644 --- a/resources/glance_config/meta.yaml +++ b/resources/glance_config/meta.yaml @@ -33,6 +33,9 @@ input: keystone_admin_password: schema: str! value: password1234 + keystone_admin_port: + schema: int! + value: keystone_admin_tenant: schema: str! value: service_admins diff --git a/resources/glance_config/templates/exports b/resources/glance_config/templates/exports index c617e27..d9d35bc 100644 --- a/resources/glance_config/templates/exports +++ b/resources/glance_config/templates/exports @@ -1,4 +1,4 @@ export OS_TENANT_NAME={{ keystone_admin_tenant }} export OS_USERNAME={{ keystone_admin_user }} export OS_PASSWORD={{ keystone_admin_password }} -export OS_AUTH_URL=http://{{ keystone_ip }}:35357/v2.0 \ No newline at end of file +export OS_AUTH_URL=http://{{ keystone_ip }}:{{ keystone_admin_port }}/v2.0 \ No newline at end of file diff --git a/resources/glance_config/templates/glance-api-paste.ini b/resources/glance_config/templates/glance-api-paste.ini index ad2c8b5..0366796 100644 --- a/resources/glance_config/templates/glance-api-paste.ini +++ b/resources/glance_config/templates/glance-api-paste.ini @@ -67,7 +67,7 @@ paste.filter_factory = glance.api.middleware.context:UnauthenticatedContextMiddl [filter:authtoken] paste.filter_factory = keystonemiddleware.auth_token:filter_factory -identity_uri = http://{{ keystone_ip }}:35357 +identity_uri = http://{{ keystone_ip }}:{{ keystone_admin_port }} admin_user = {{ keystone_admin_user }} admin_tenant_name = {{ keystone_admin_tenant }} admin_password = {{ keystone_admin_password }} diff --git a/resources/glance_config/templates/glance-api.conf b/resources/glance_config/templates/glance-api.conf index 70e508b..9e379fb 100644 --- a/resources/glance_config/templates/glance-api.conf +++ b/resources/glance_config/templates/glance-api.conf @@ -15,11 +15,11 @@ image_cache_dir = /var/lib/glance/image-cache/ [database] connection = mysql://{{ mysql_user }}:{{ mysql_password }}@{{ mysql_ip }}/{{ mysql_db }} -backend = sqlalchemy +backend = mysql [keystone_authtoken] auth_uri = http://{{ keystone_ip }}:{{ keystone_port }}/v2.0 -identity_uri = http://{{ keystone_ip }}:35357 +identity_uri = http://{{ keystone_ip }}:{{ keystone_admin_port }} admin_tenant_name = {{ keystone_admin_tenant }} admin_user = {{ keystone_admin_user }} admin_password = {{ keystone_admin_password }} diff --git a/resources/glance_config/templates/glance-registry-paste.ini b/resources/glance_config/templates/glance-registry-paste.ini index d46db77..0199480 100644 --- a/resources/glance_config/templates/glance-registry-paste.ini +++ b/resources/glance_config/templates/glance-registry-paste.ini @@ -24,7 +24,7 @@ paste.filter_factory = glance.api.middleware.context:UnauthenticatedContextMiddl [filter:authtoken] paste.filter_factory = keystonemiddleware.auth_token:filter_factory -identity_uri = http://{{ keystone_ip }}:35357 +identity_uri = http://{{ keystone_ip }}:{{ keystone_admin_port }} admin_user = {{ keystone_admin_user }} admin_tenant_name = {{ keystone_admin_tenant }} admin_password = {{ keystone_admin_password }} diff --git a/resources/glance_config/templates/glance-registry.conf b/resources/glance_config/templates/glance-registry.conf index c55bc7a..7efe994 100644 --- a/resources/glance_config/templates/glance-registry.conf +++ b/resources/glance_config/templates/glance-registry.conf @@ -7,12 +7,12 @@ api_limit_max = 1000 limit_param_default = 25 [database] -backend = sqlalchemy +backend = mysql connection = mysql://{{ mysql_user }}:{{ mysql_password }}@{{ mysql_ip }}/{{ mysql_db }} [keystone_authtoken] auth_uri = http://{{ keystone_ip }}:{{ keystone_port }}/v2.0 -identity_uri = http://{{ keystone_ip }}:35357 +identity_uri = http://{{ keystone_ip }}:{{ keystone_admin_port }} admin_tenant_name = {{ keystone_admin_tenant }} admin_user = {{ keystone_admin_user }} admin_password = {{ keystone_admin_password }} diff --git a/resources/glance_registry_service/actions/run.yml b/resources/glance_registry_service/actions/run.yml index 0235203..51b208b 100644 --- a/resources/glance_registry_service/actions/run.yml +++ b/resources/glance_registry_service/actions/run.yml @@ -3,7 +3,8 @@ sudo: yes tasks: - docker: - command: /bin/bash -c "glance-manage db_sync && /usr/bin/keystone-registry" + #command: /bin/bash -c "glance-manage db_sync && /usr/bin/glance-registry" + command: /usr/bin/glance-registry name: {{ name }} image: {{ image }} state: running diff --git a/resources/keystone_role/actions/run.yml b/resources/keystone_role/actions/run.yml index 8896008..4d3df76 100644 --- a/resources/keystone_role/actions/run.yml +++ b/resources/keystone_role/actions/run.yml @@ -1,5 +1,7 @@ - hosts: [{{ ip }}] sudo: yes tasks: + - name: install python-keystoneclient + shell: pip install python-keystoneclient - name: keystone role keystone_user: endpoint=http://{{keystone_host}}:{{keystone_port}}/v2.0/ token={{admin_token}} user={{user_name}} tenant={{tenant_name}} role={{role_name}} state=present diff --git a/resources/keystone_service_endpoint/actions/remove.yaml b/resources/keystone_service_endpoint/actions/remove.yaml index b15fe77..0b30ff4 100644 --- a/resources/keystone_service_endpoint/actions/remove.yaml +++ b/resources/keystone_service_endpoint/actions/remove.yaml @@ -1 +1,5 @@ #todo +- hosts: [{{ ip }}] + sudo: yes + tasks: + - shell: echo 1 diff --git a/resources/keystone_tenant/actions/run.yml b/resources/keystone_tenant/actions/run.yml index 5122a7d..1cf2597 100644 --- a/resources/keystone_tenant/actions/run.yml +++ b/resources/keystone_tenant/actions/run.yml @@ -1,5 +1,7 @@ - hosts: [{{ ip }}] sudo: yes tasks: + - name: install python-keystoneclient + shell: pip install python-keystoneclient - name: keystone tenant keystone_user: endpoint=http://{{keystone_host}}:{{keystone_port}}/v2.0/ token={{admin_token}} tenant={{tenant_name}} state=present diff --git a/resources/keystone_user/actions/run.yml b/resources/keystone_user/actions/run.yml index 2deae25..eb3c374 100644 --- a/resources/keystone_user/actions/run.yml +++ b/resources/keystone_user/actions/run.yml @@ -3,4 +3,5 @@ tasks: - name: install python-keystoneclient shell: pip install python-keystoneclient + - name: keystone user keystone_user: endpoint=http://{{ keystone_host }}:{{ keystone_port }}/v2.0/ token={{ admin_token }} user={{ user_name }} password={{ user_password }} tenant={{ tenant_name }} state=present diff --git a/resources/keystone_user/meta.yaml b/resources/keystone_user/meta.yaml index 32b4ce2..edaa75d 100644 --- a/resources/keystone_user/meta.yaml +++ b/resources/keystone_user/meta.yaml @@ -5,15 +5,12 @@ input: keystone_host: schema: str! value: - keystone_admin_port: + keystone_port: schema: int! value: admin_token: schema: str! value: - role_name: - schema: str! - value: user_name: schema: str! value: