summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/openstack/openshift-cluster/files/heat_stack.yaml103
-rw-r--r--playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml9
-rw-r--r--playbooks/openstack/openshift-cluster/launch.yml4
3 files changed, 105 insertions, 11 deletions
diff --git a/playbooks/openstack/openshift-cluster/files/heat_stack.yaml b/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
index a15ec749c..d53884e0d 100644
--- a/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
+++ b/playbooks/openstack/openshift-cluster/files/heat_stack.yaml
@@ -16,8 +16,13 @@ parameters:
num_nodes:
type: number
- label: Number of nodes
- description: Number of nodes
+ label: Number of compute nodes
+ description: Number of compute nodes
+
+ num_infra:
+ type: number
+ label: Number of infrastructure nodes
+ description: Number of infrastructure nodes
cidr:
type: string
@@ -55,7 +60,12 @@ parameters:
node_image:
type: string
label: Node image
- description: Name of the image for the node servers
+ description: Name of the image for the compute node servers
+
+ infra_image:
+ type: string
+ label: Infra image
+ description: Name of the image for the infra node servers
master_flavor:
type: string
@@ -65,7 +75,12 @@ parameters:
node_flavor:
type: string
label: Node flavor
- description: Flavor of the node servers
+ description: Flavor of the compute node servers
+
+ infra_flavor:
+ type: string
+ label: Infra flavor
+ description: Flavor of the infra node servers
outputs:
@@ -83,15 +98,27 @@ outputs:
node_names:
description: Name of the nodes
- value: { get_attr: [ nodes, name ] }
+ value: { get_attr: [ compute_nodes, name ] }
node_ips:
description: IPs of the nodes
- value: { get_attr: [ nodes, private_ip ] }
+ value: { get_attr: [ compute_nodes, private_ip ] }
node_floating_ips:
description: Floating IPs of the nodes
- value: { get_attr: [ nodes, floating_ip ] }
+ value: { get_attr: [ compute_nodes, floating_ip ] }
+
+ infra_names:
+ description: Name of the nodes
+ value: { get_attr: [ infra_nodes, name ] }
+
+ infra_ips:
+ description: IPs of the nodes
+ value: { get_attr: [ infra_nodes, private_ip ] }
+
+ infra_floating_ips:
+ description: Floating IPs of the nodes
+ value: { get_attr: [ infra_nodes, floating_ip ] }
resources:
@@ -218,6 +245,29 @@ resources:
remote_mode: remote_group_id
remote_group_id: { get_resource: master-secgrp }
+ infra-secgrp:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ name:
+ str_replace:
+ template: openshift-ansible-cluster_id-infra-secgrp
+ params:
+ cluster_id: { get_param: cluster_id }
+ description:
+ str_replace:
+ template: Security group for cluster_id OpenShift infrastructure cluster nodes
+ params:
+ cluster_id: { get_param: cluster_id }
+ rules:
+ - direction: ingress
+ protocol: tcp
+ port_range_min: 80
+ port_range_max: 80
+ - direction: ingress
+ protocol: tcp
+ port_range_min: 443
+ port_range_max: 443
+
masters:
type: OS::Heat::ResourceGroup
properties:
@@ -248,7 +298,7 @@ resources:
cluster_id: { get_param: cluster_id }
depends_on: interface
- nodes:
+ compute_nodes:
type: OS::Heat::ResourceGroup
properties:
count: { get_param: num_nodes }
@@ -257,12 +307,14 @@ resources:
properties:
name:
str_replace:
- template: cluster_id-k8s_type-%index%
+ template: cluster_id-k8s_type-sub_host_type-%index%
params:
cluster_id: { get_param: cluster_id }
k8s_type: node
+ sub_host_type: compute
cluster_id: { get_param: cluster_id }
type: node
+ subtype: compute
image: { get_param: node_image }
flavor: { get_param: node_flavor }
key_name: { get_resource: keypair }
@@ -277,3 +329,36 @@ resources:
params:
cluster_id: { get_param: cluster_id }
depends_on: interface
+
+ infra_nodes:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: num_infra }
+ resource_def:
+ type: heat_stack_server.yaml
+ properties:
+ name:
+ str_replace:
+ template: cluster_id-k8s_type-sub_host_type-%index%
+ params:
+ cluster_id: { get_param: cluster_id }
+ k8s_type: node
+ sub_host_type: infra
+ cluster_id: { get_param: cluster_id }
+ type: node
+ subtype: infra
+ image: { get_param: infra_image }
+ flavor: { get_param: infra_flavor }
+ key_name: { get_resource: keypair }
+ net: { get_resource: net }
+ subnet: { get_resource: subnet }
+ secgrp:
+ - { get_resource: node-secgrp }
+ - { get_resource: infra-secgrp }
+ floating_network: { get_param: external_net }
+ net_name:
+ str_replace:
+ template: openshift-ansible-cluster_id-net
+ params:
+ cluster_id: { get_param: cluster_id }
+ depends_on: interface
diff --git a/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml b/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
index 55f64211a..9dcab3e60 100644
--- a/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
+++ b/playbooks/openstack/openshift-cluster/files/heat_stack_server.yaml
@@ -19,6 +19,12 @@ parameters:
label: Type
description: Type master or node
+ subtype:
+ type: string
+ label: Sub-type
+ description: Sub-type compute or infra for nodes, default otherwise
+ default: default
+
key_name:
type: string
label: Key name
@@ -102,11 +108,12 @@ resources:
env: { get_param: cluster_id }
host-type: { get_param: type }
env-host-type:
- str_template:
+ str_replace:
template: cluster_id-openshift-type
params:
cluster_id: { get_param: cluster_id }
type: { get_param: type }
+ sub-host-type: { get_param: subtype }
port:
type: OS::Neutron::Port
diff --git a/playbooks/openstack/openshift-cluster/launch.yml b/playbooks/openstack/openshift-cluster/launch.yml
index d41448dc0..d36bdbf26 100644
--- a/playbooks/openstack/openshift-cluster/launch.yml
+++ b/playbooks/openstack/openshift-cluster/launch.yml
@@ -90,7 +90,7 @@
ansible_ssh_host: '{{ item[2] }}'
ansible_ssh_user: "{{ deployment_vars[deployment_type].ssh_user }}"
ansible_sudo: "{{ deployment_vars[deployment_type].sudo }}"
- groups: 'tag_env_{{ cluster_id }}, tag_host-type_node, tag_env-host-type_{{ cluster_id }}-openshift-node, tag_sub-host-type_node'
+ groups: 'tag_env_{{ cluster_id }}, tag_host-type_node, tag_env-host-type_{{ cluster_id }}-openshift-node, tag_sub-host-type_compute'
with_together:
- parsed_outputs.node_names
- parsed_outputs.node_ips
@@ -115,6 +115,7 @@
with_flattened:
- parsed_outputs.master_floating_ips
- parsed_outputs.node_floating_ips
+ - parsed_outputs.infra_floating_ips
- name: Wait for user setup
command: 'ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o ConnectTimeout=10 -o UserKnownHostsFile=/dev/null {{ deployment_vars[deployment_type].ssh_user }}@{{ item }} echo {{ deployment_vars[deployment_type].ssh_user }} user is setup'
@@ -125,6 +126,7 @@
with_flattened:
- parsed_outputs.master_floating_ips
- parsed_outputs.node_floating_ips
+ - parsed_outputs.infra_floating_ips
- include: update.yml