487e0617d6
In the event you have different disks in nodes assigned to each role you may need to pass role specific parameters, e.g like: parameter_defaults: OpenShiftMasterParameters: OpenShiftGlusterDisks: - /dev/vdc OpenShiftWorkerParameters: OpenShiftGlusterDisks: - /dev/vdd To enable that we create an inventory file per role, and pass the directory of files to ansible. Change-Id: I8b4d8698405ffb004b081e1f097f300216edfa77
95 lines
3.5 KiB
YAML
95 lines
3.5 KiB
YAML
heat_template_version: rocky
|
|
|
|
description: External tasks definition for OpenShift
|
|
|
|
parameters:
|
|
RoleNetIpMap:
|
|
default: {}
|
|
type: json
|
|
ServiceData:
|
|
default: {}
|
|
description: Dictionary packing service data
|
|
type: json
|
|
ServiceNetMap:
|
|
default: {}
|
|
description: Mapping of service_name -> network name. Typically set
|
|
via parameter_defaults in the resource registry. This
|
|
mapping overrides those in ServiceNetMapDefaults.
|
|
type: json
|
|
DefaultPasswords:
|
|
default: {}
|
|
type: json
|
|
RoleName:
|
|
default: ''
|
|
description: Role name on which the service is applied
|
|
type: string
|
|
RoleParameters:
|
|
default: {}
|
|
description: Parameters specific to the role
|
|
type: json
|
|
EndpointMap:
|
|
default: {}
|
|
description: Mapping of service endpoint -> protocol. Typically set
|
|
via parameter_defaults in the resource registry.
|
|
type: json
|
|
|
|
outputs:
|
|
role_data:
|
|
description: Role data for the Openshift Service
|
|
value:
|
|
# This service template essentially tags the nodes that we want
|
|
# as workers. The actual installation is performed in
|
|
# openshift-master service template.
|
|
service_name: openshift_worker
|
|
config_settings:
|
|
tripleo.openshift_worker.firewall_rules:
|
|
'200 openshift-worker kubelet':
|
|
dport:
|
|
- 10250
|
|
- 10255
|
|
proto: tcp
|
|
'200 openshift-worker external services':
|
|
dport: '30000-32767'
|
|
upgrade_tasks: []
|
|
step_config: ''
|
|
external_deploy_tasks:
|
|
- name: openshift_worker step 1
|
|
when: step == '1'
|
|
block:
|
|
- name: create openshift temp dirs
|
|
file:
|
|
path: "{{item}}"
|
|
state: directory
|
|
with_items:
|
|
- "{{playbook_dir}}/openshift/inventory"
|
|
|
|
- name: generate openshift inventory for openshift_worker service
|
|
copy:
|
|
dest:
|
|
str_replace:
|
|
template: "{{playbook_dir}}/openshift/inventory/ROLENAME_openshift_worker.yml"
|
|
params:
|
|
ROLENAME: {get_param: RoleName}
|
|
content:
|
|
str_replace:
|
|
params:
|
|
ROLENAME: {get_param: RoleName}
|
|
template: |
|
|
nodes:
|
|
hosts:
|
|
{% for host in groups['ROLENAME'] -%}
|
|
{{ hostvars.raw_get(host)['ansible_hostname'] }}:
|
|
ansible_user: {{ hostvars.raw_get(host)['ansible_user'] | default(hostvars.raw_get(host)['ansible_ssh_user']) | default('root') }}
|
|
ansible_host: {{ hostvars.raw_get(host)['ansible_host'] | default(host) }}
|
|
ansible_become: true
|
|
etcd_ip: {{hostvars.raw_get(host)['ctlplane_ip']}}
|
|
openshift_ip: {{hostvars.raw_get(host)['ctlplane_ip']}}
|
|
openshift_public_ip: {{hostvars.raw_get(host)['ctlplane_ip']}}
|
|
openshift_hostname: {{hostvars.raw_get(host)['ctlplane_ip']}}
|
|
openshift_public_hostname: {{hostvars.raw_get(host)['ctlplane_ip']}}
|
|
openshift_schedulable: true
|
|
openshift_node_labels:
|
|
region: 'infra'
|
|
zone: 'default'
|
|
{% endfor %}
|