Add Glance client metadata to create Octavia amphora image
- Add admin_identity to create resources from admin user
- Add glance.client.init that makes sure the client is enabled
- Add Glance client metadata for an Octavia amphora image
- Add mine function to retrieve owner ID for a created image
Related prod: PROD-11910
Change-Id: I051f499ca304d270e87b4fe35bddce32e09742f1
diff --git a/glance/client/image/octavia.yml b/glance/client/image/octavia.yml
new file mode 100644
index 0000000..de81f7f
--- /dev/null
+++ b/glance/client/image/octavia.yml
@@ -0,0 +1,29 @@
+classes:
+- system.glance.client
+parameters:
+ _param:
+ amphora_image_url: "https://artifactory.mirantis.com/binary-prod-local/mirantis/openstack/octavia/images/ocata/amphora-x64-haproxy.qcow2"
+ amphora_image_name: "amphora-x64-haproxy"
+ glance:
+ client:
+ identity:
+ admin_identity:
+ endpoint_type: internalURL
+ image:
+ amphora-x64-haproxy:
+ name: ${_param:amphora_image_name}
+ location: ${_param:amphora_image_url}
+ import_from_format: 'qcow2'
+ container_format: 'bare'
+ disk_format: 'qcow2'
+ tags:
+ - 'amphora'
+ visibility: public
+ wait_timeout: 1000
+ salt:
+ minion:
+ mine:
+ module:
+ glanceng.get_image_owner_id:
+ - ${_param:amphora_image_name}
+ - 'admin_identity'
diff --git a/glance/client/init.yml b/glance/client/init.yml
new file mode 100644
index 0000000..305f9ba
--- /dev/null
+++ b/glance/client/init.yml
@@ -0,0 +1,4 @@
+parameters:
+ glance:
+ client:
+ enabled: true
diff --git a/keystone/client/core.yml b/keystone/client/core.yml
index 0614f40..2b608ac 100644
--- a/keystone/client/core.yml
+++ b/keystone/client/core.yml
@@ -29,4 +29,11 @@
is_admin: true
password: ${_param:keystone_admin_password}
email: ${_param:admin_email}
-
+ admin_identity:
+ admin:
+ user: admin
+ password: ${_param:keystone_admin_password}
+ project: admin
+ host: ${_param:keystone_service_host}
+ port: 5000
+ region_name: ${_param:openstack_region}
diff --git a/keystone/client/single.yml b/keystone/client/single.yml
index 6d7a4c6..77e22c1 100644
--- a/keystone/client/single.yml
+++ b/keystone/client/single.yml
@@ -38,3 +38,11 @@
is_admin: true
password: ${_param:keystone_admin_password}
email: ${_param:admin_email}
+ admin_identity:
+ admin:
+ user: admin
+ password: ${_param:keystone_admin_password}
+ project: admin
+ host: ${_param:keystone_service_host}
+ port: 5000
+ region_name: ${_param:openstack_region}