summaryrefslogtreecommitdiffstats
path: root/roles/openstack-stack/templates
diff options
context:
space:
mode:
authorEric Sauer <etsauer@gmail.com>2017-04-27 16:58:41 -0400
committerØystein Bedin <oybed@users.noreply.github.com>2017-04-27 14:58:41 -0600
commit7304ed4611192f6daa88f84d8b47d3e76514a03b (patch)
tree836fd0ada358fdbd047476f72d8f23b2eb095b95 /roles/openstack-stack/templates
parentc90d5323afc575246df2f50e9125069f3c12e81e (diff)
downloadopenshift-7304ed4611192f6daa88f84d8b47d3e76514a03b.tar.gz
openshift-7304ed4611192f6daa88f84d8b47d3e76514a03b.tar.bz2
openshift-7304ed4611192f6daa88f84d8b47d3e76514a03b.tar.xz
openshift-7304ed4611192f6daa88f84d8b47d3e76514a03b.zip
First attempt at a simple multi-master support (#39)
* First attempt at a simple multi-master support * Removing unneeded inventory * adding default number of masters and lower number of nodes
Diffstat (limited to 'roles/openstack-stack/templates')
-rw-r--r--roles/openstack-stack/templates/heat_stack.yaml.j269
1 files changed, 69 insertions, 0 deletions
diff --git a/roles/openstack-stack/templates/heat_stack.yaml.j2 b/roles/openstack-stack/templates/heat_stack.yaml.j2
index bc9547f66..c367aabe7 100644
--- a/roles/openstack-stack/templates/heat_stack.yaml.j2
+++ b/roles/openstack-stack/templates/heat_stack.yaml.j2
@@ -342,6 +342,31 @@ resources:
port_range_min: 53
port_range_max: 53
remote_ip_prefix: {{ node_ingress_cidr }}
+{% if num_masters is greaterthan 1 %}
+ lb-secgrp:
+ type: OS::Neutron::SecurityGroup
+ properties:
+ name: openshift-ansible-{{ stack_name }}-lb-secgrp
+ description: Security group for {{ stack_name }} cluster Load Balancer
+ rules:
+ - direction: ingress
+ protocol: tcp
+ port_range_min: 22
+ port_range_max: 22
+ remote_ip_prefix: {{ ssh_ingress_cidr }}
+ - direction: ingress
+ protocol: tcp
+ port_range_min: {{ openshift_master_api_port | default(8443) }}
+ port_range_max: {{ openshift_master_api_port | default(8443) }}
+ remote_ip_prefix: {{ lb_ingress_cidr }}
+ {% if openshift_master_console_port is defined and openshift_master_console_port is not equalto openshift_master_api_port %}
+ - direction: ingress
+ protocol: tcp
+ port_range_min: {{ openshift_master_console_port | default(8443) }}
+ port_range_max: {{ openshift_master_console_port | default(8443) }}
+ remote_ip_prefix: {{ lb_ingress_cidr }}
+ {% endif %}
+{% endif %}
etcd:
type: OS::Heat::ResourceGroup
@@ -382,6 +407,47 @@ resources:
depends_on:
- interface
+{% if num_masters is greaterthan 1 %}
+ loadbalancer:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: 1
+ resource_def:
+ type: server.yaml
+ properties:
+ name:
+ str_replace:
+ template: k8s_type-%index%.cluster_id
+ params:
+ cluster_id: {{ stack_name }}
+ k8s_type: lb
+ cluster_env: {{ dns_domain }}
+ cluster_id: {{ stack_name }}
+ group:
+ str_replace:
+ template: k8s_type.cluster_id
+ params:
+ k8s_type: lb
+ cluster_id: {{ stack_name }}
+ type: lb
+ image: {{ openstack_image }}
+ flavor: {{ lb_flavor }}
+ key_name: {{ ssh_public_key }}
+ net: { get_resource: net }
+ subnet: { get_resource: subnet }
+ secgrp:
+ - { get_resource: lb-secgrp }
+ floating_network: {{ external_network }}
+ net_name:
+ str_replace:
+ template: openshift-ansible-cluster_id-net
+ params:
+ cluster_id: {{ stack_name }}
+ volume_size: 5
+ depends_on:
+ - interface
+{% endif %}
+
masters:
type: OS::Heat::ResourceGroup
properties:
@@ -412,6 +478,9 @@ resources:
secgrp:
- { get_resource: master-secgrp }
- { get_resource: node-secgrp }
+{% if num_etcd is equalto 0 %}
+ - { get_resource: etcd-secgrp }
+{% endif %}
floating_network: {{ external_network }}
net_name:
str_replace: