Introduce OpenShiftGlusterNodeVars heat param
Removes conflict on OpenShiftGlobalVariables param that was overwritten by the openshift-cns.yaml environment file. The default options for CNS as now moved into the extraconfig/services/openshift-cns.yaml template and can be overwritten by setting the OpenShiftGlusterNodeVars heat parameter. Change-Id: I43052662e913a02945f22e9f541a45ce2d9d828c
This commit is contained in:
parent
a04ceaa407
commit
bd5dddb58d
|
@ -1,7 +1,2 @@
|
||||||
resource_registry:
|
resource_registry:
|
||||||
OS::TripleO::Services::OpenShift::GlusterFS: ../extraconfig/services/openshift-cns.yaml
|
OS::TripleO::Services::OpenShift::GlusterFS: ../extraconfig/services/openshift-cns.yaml
|
||||||
|
|
||||||
parameter_defaults:
|
|
||||||
OpenShiftGlobalVariables:
|
|
||||||
openshift_storage_glusterfs_namespace: glusterfs
|
|
||||||
openshift_storage_glusterfs_name: storage
|
|
||||||
|
|
|
@ -32,6 +32,10 @@ parameters:
|
||||||
description: Mapping of service endpoint -> protocol. Typically set
|
description: Mapping of service endpoint -> protocol. Typically set
|
||||||
via parameter_defaults in the resource registry.
|
via parameter_defaults in the resource registry.
|
||||||
type: json
|
type: json
|
||||||
|
OpenShiftGlusterNodeVars:
|
||||||
|
default: {}
|
||||||
|
description: OpenShift node vars specific for the gluster nodes
|
||||||
|
type: json
|
||||||
OpenShiftGlusterDisks:
|
OpenShiftGlusterDisks:
|
||||||
default:
|
default:
|
||||||
- /dev/vdb
|
- /dev/vdb
|
||||||
|
@ -107,45 +111,52 @@ outputs:
|
||||||
set_fact:
|
set_fact:
|
||||||
openshift_gluster_disks: {get_attr: [RoleParametersValue, value, OpenShiftGlusterDisks]}
|
openshift_gluster_disks: {get_attr: [RoleParametersValue, value, OpenShiftGlusterDisks]}
|
||||||
|
|
||||||
- name: set openshift images vars fact
|
- name: set openshift gluster global vars fact
|
||||||
set_fact:
|
set_fact:
|
||||||
openshift_gluster_images:
|
openshift_gluster_global_vars:
|
||||||
openshift_storage_glusterfs_image:
|
map_merge:
|
||||||
yaql:
|
- {get_param: OpenShiftGlusterNodeVars}
|
||||||
expression:
|
- openshift_storage_glusterfs_image:
|
||||||
$.data.image.rightSplit(":", 1)[0]
|
yaql:
|
||||||
data:
|
expression:
|
||||||
image: {get_param: DockerOpenShiftGlusterFSImage}
|
$.data.image.rightSplit(":", 1)[0]
|
||||||
openshift_storage_glusterfs_version:
|
data:
|
||||||
yaql:
|
image: {get_param: DockerOpenShiftGlusterFSImage}
|
||||||
expression:
|
openshift_storage_glusterfs_version:
|
||||||
$.data.image.rightSplit(":", 1)[1]
|
yaql:
|
||||||
data:
|
expression:
|
||||||
image: {get_param: DockerOpenShiftGlusterFSImage}
|
$.data.image.rightSplit(":", 1)[1]
|
||||||
openshift_storage_glusterfs_block_image:
|
data:
|
||||||
yaql:
|
image: {get_param: DockerOpenShiftGlusterFSImage}
|
||||||
expression:
|
openshift_storage_glusterfs_block_image:
|
||||||
$.data.image.rightSplit(":", 1)[0]
|
yaql:
|
||||||
data:
|
expression:
|
||||||
image: {get_param: DockerOpenShiftGlusterFSBlockImage}
|
$.data.image.rightSplit(":", 1)[0]
|
||||||
openshift_storage_glusterfs_block_version:
|
data:
|
||||||
yaql:
|
image: {get_param: DockerOpenShiftGlusterFSBlockImage}
|
||||||
expression:
|
openshift_storage_glusterfs_block_version:
|
||||||
$.data.image.rightSplit(":", 1)[1]
|
yaql:
|
||||||
data:
|
expression:
|
||||||
image: {get_param: DockerOpenShiftGlusterFSBlockImage}
|
$.data.image.rightSplit(":", 1)[1]
|
||||||
openshift_storage_glusterfs_heketi_image:
|
data:
|
||||||
yaql:
|
image: {get_param: DockerOpenShiftGlusterFSBlockImage}
|
||||||
expression:
|
openshift_storage_glusterfs_heketi_image:
|
||||||
$.data.image.rightSplit(":", 1)[0]
|
yaql:
|
||||||
data:
|
expression:
|
||||||
image: {get_param: DockerOpenShiftGlusterFSHeketiImage}
|
$.data.image.rightSplit(":", 1)[0]
|
||||||
openshift_storage_glusterfs_heketi_version:
|
data:
|
||||||
yaql:
|
image: {get_param: DockerOpenShiftGlusterFSHeketiImage}
|
||||||
expression:
|
openshift_storage_glusterfs_heketi_version:
|
||||||
$.data.image.rightSplit(":", 1)[1]
|
yaql:
|
||||||
data:
|
expression:
|
||||||
image: {get_param: DockerOpenShiftGlusterFSHeketiImage}
|
$.data.image.rightSplit(":", 1)[1]
|
||||||
|
data:
|
||||||
|
image: {get_param: DockerOpenShiftGlusterFSHeketiImage}
|
||||||
|
|
||||||
|
- name: generate openshift gluster global vars
|
||||||
|
copy:
|
||||||
|
dest: "{{playbook_dir}}/openshift/global_gluster_vars.yml"
|
||||||
|
content: "{{openshift_gluster_global_vars|to_nice_yaml}}"
|
||||||
|
|
||||||
- name: generate openshift inventory for openshift_glusterfs service
|
- name: generate openshift inventory for openshift_glusterfs service
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
@ -188,6 +199,3 @@ outputs:
|
||||||
ansible_become: true
|
ansible_become: true
|
||||||
openshift_schedulable: true
|
openshift_schedulable: true
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
vars:
|
|
||||||
{{openshift_gluster_images | to_nice_yaml() | indent(4) }}
|
|
||||||
|
|
|
@ -425,6 +425,9 @@ outputs:
|
||||||
-i '{{playbook_dir}}/openshift/inventory'
|
-i '{{playbook_dir}}/openshift/inventory'
|
||||||
--extra-vars '@{{playbook_dir}}/openshift/global_defaults.yml'
|
--extra-vars '@{{playbook_dir}}/openshift/global_defaults.yml'
|
||||||
--extra-vars '@{{playbook_dir}}/openshift/global_vars.yml'
|
--extra-vars '@{{playbook_dir}}/openshift/global_vars.yml'
|
||||||
|
{% if groups['openshift_glusterfs'] | default([]) %}
|
||||||
|
--extra-vars '@{{playbook_dir}}/openshift/global_gluster_vars.yml'
|
||||||
|
{% endif %}
|
||||||
'{{playbook_dir}}/openshift/playbook.yml'
|
'{{playbook_dir}}/openshift/playbook.yml'
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
- name: print openshift command
|
- name: print openshift command
|
||||||
|
|
Loading…
Reference in New Issue