|
| 1 | +heat_template_version: 2016-10-14 |
| 2 | + |
| 3 | +description: > |
| 4 | + A template which provides a creates a loadbalancer using neutron's LBaaS. |
| 5 | +
|
| 6 | +parameters: |
| 7 | + |
| 8 | + # What version of OpenShift Container Platform to install |
| 9 | + # This value is used to select the RPM repo for the OCP release to install |
| 10 | + ocp_version: |
| 11 | + type: string |
| 12 | + description: > |
| 13 | + The version of OpenShift Container Platform to deploy |
| 14 | +
|
| 15 | + key_name: |
| 16 | + description: > |
| 17 | + A pre-submitted SSH key to access the VM hosts |
| 18 | + type: string |
| 19 | + constraints: |
| 20 | + - custom_constraint: nova.keypair |
| 21 | + |
| 22 | + image: |
| 23 | + type: string |
| 24 | + default: '' |
| 25 | + |
| 26 | + flavor: |
| 27 | + description: > |
| 28 | + Define the hardware characteristics for the VMs: CPU, Memory, base disk |
| 29 | + type: string |
| 30 | + constraints: |
| 31 | + - custom_constraint: nova.flavor |
| 32 | + |
| 33 | + hostname: |
| 34 | + description: > |
| 35 | + The load balancer hostname portion of the FQDN |
| 36 | + type: string |
| 37 | + constraints: |
| 38 | + - allowed_pattern: '[a-z0-9\-\.]*' |
| 39 | + description: Hostname must contain only characters [a-z0-9\-\.]. |
| 40 | + |
| 41 | + stack_name: |
| 42 | + description: Top level stack name. |
| 43 | + type: string |
| 44 | + |
| 45 | + domain_name: |
| 46 | + description: > |
| 47 | + All VMs will be placed in this domain |
| 48 | + type: string |
| 49 | + |
| 50 | + app_subdomain: |
| 51 | + type: string |
| 52 | + |
| 53 | + rhn_username: |
| 54 | + description: > |
| 55 | + A valid user with entitlements to RHEL and OpenShift software repos |
| 56 | + type: string |
| 57 | + |
| 58 | + rhn_password: |
| 59 | + description: > |
| 60 | + The password for the RHN user |
| 61 | + type: string |
| 62 | + hidden: true |
| 63 | + |
| 64 | + # Red Hat satellite subscription parameters |
| 65 | + sat6_hostname: |
| 66 | + type: string |
| 67 | + description: > |
| 68 | + The hostname of the Satellite 6 server which will provide software updates |
| 69 | + default: '' |
| 70 | + |
| 71 | + sat6_organization: |
| 72 | + type: string |
| 73 | + description: > |
| 74 | + An organization string provided by Sat6 to group subscriptions |
| 75 | + default: '' |
| 76 | + |
| 77 | + sat6_activationkey: |
| 78 | + type: string |
| 79 | + description: > |
| 80 | + An activation key string provided by Sat6 to enable subscriptions |
| 81 | +
|
| 82 | + rhn_pool: |
| 83 | + description: > |
| 84 | + A subscription pool containing the RHEL and OpenShift software repos |
| 85 | + OPTIONAL |
| 86 | + type: string |
| 87 | + hidden: true |
| 88 | + |
| 89 | + extra_rhn_pools: |
| 90 | + type: comma_delimited_list |
| 91 | + description: List of rhn pools which will be installed on each node. |
| 92 | + default: '' |
| 93 | + |
| 94 | + ssh_user: |
| 95 | + description: > |
| 96 | + The user for SSH access to the VM hosts |
| 97 | + type: string |
| 98 | + |
| 99 | + ansible_public_key: |
| 100 | + description: > |
| 101 | + The SSH public key that Ansible will use to access master and node hosts |
| 102 | + This will be placed on each VM host in /root/.ssh/authorized_keys |
| 103 | + type: string |
| 104 | + |
| 105 | + fixed_subnet: |
| 106 | + description: > |
| 107 | + The name or ID of the internal IPv4 space |
| 108 | + type: string |
| 109 | + constraints: |
| 110 | + - custom_constraint: neutron.subnet |
| 111 | + |
| 112 | + member_count: |
| 113 | + type: number |
| 114 | + |
| 115 | + members: |
| 116 | + type: comma_delimited_list |
| 117 | + |
| 118 | + member_ips: |
| 119 | + type: comma_delimited_list |
| 120 | + |
| 121 | + master_hostname: |
| 122 | + type: string |
| 123 | + |
| 124 | + floatingip_id: |
| 125 | + type: string |
| 126 | + |
| 127 | + floatingip: |
| 128 | + type: string |
| 129 | + |
| 130 | + fixed_network: |
| 131 | + description: > |
| 132 | + The name or ID of the internal network |
| 133 | + type: string |
| 134 | + constraints: |
| 135 | + - custom_constraint: neutron.network |
| 136 | + |
| 137 | + fixed_subnet: |
| 138 | + description: > |
| 139 | + The name or ID of the internal IPv4 space |
| 140 | + type: string |
| 141 | + constraints: |
| 142 | + - custom_constraint: neutron.subnet |
| 143 | + |
| 144 | + extra_repository_urls: |
| 145 | + type: comma_delimited_list |
| 146 | + description: List of repository URLs which will be installed on each node. |
| 147 | + default: '' |
| 148 | + |
| 149 | + extra_docker_repository_urls: |
| 150 | + type: comma_delimited_list |
| 151 | + description: List of docker repository URLs which will be installed on each node, if a repo is insecure use '#insecure' suffix. |
| 152 | + default: '' |
| 153 | + |
| 154 | + stack_name: |
| 155 | + type: string |
| 156 | + default: '' |
| 157 | + |
| 158 | + bastion_node: |
| 159 | + type: string |
| 160 | + description: > |
| 161 | + The name or ID of the bastion instance. |
| 162 | + default: '' |
| 163 | + |
| 164 | + dns_servers: |
| 165 | + type: comma_delimited_list |
| 166 | + description: address of dns nameservers reachable in your environment |
| 167 | + |
| 168 | + dns_update_key: |
| 169 | + type: string |
| 170 | + hidden: true |
| 171 | + |
| 172 | + ca_cert: |
| 173 | + type: string |
| 174 | + description: Certificate Authority Certificate to be added to trust chain |
| 175 | + |
| 176 | +resources: |
| 177 | + lb: |
| 178 | + type: OS::Neutron::LBaaS::LoadBalancer |
| 179 | + properties: |
| 180 | + vip_subnet: {get_param: fixed_subnet} |
| 181 | + |
| 182 | + lb_listener: |
| 183 | + type: OS::Neutron::LBaaS::Listener |
| 184 | + properties: |
| 185 | + protocol: HTTPS |
| 186 | + protocol_port: 8443 |
| 187 | + loadbalancer: {get_resource: lb} |
| 188 | + |
| 189 | + lb_pool: |
| 190 | + type: OS::Neutron::LBaaS::Pool |
| 191 | + properties: |
| 192 | + name: lb_pool |
| 193 | + description: Load balancer for OpenShift hosts. |
| 194 | + protocol: HTTPS |
| 195 | + listener: {get_resource: lb_listener} |
| 196 | + lb_algorithm: ROUND_ROBIN |
| 197 | + session_persistence: |
| 198 | + type: SOURCE_IP |
| 199 | + |
| 200 | + lb_members: |
| 201 | + type: OS::Heat::ResourceGroup |
| 202 | + properties: |
| 203 | + count: {get_param: member_count} |
| 204 | + resource_def: |
| 205 | + type: loadbalancer_neutron_v2_member.yaml |
| 206 | + properties: |
| 207 | + addresses: {get_param: member_ips} |
| 208 | + index: "%index%" |
| 209 | + pool: {get_resource: lb_pool} |
| 210 | + protocol_port: 8443 |
| 211 | + subnet: {get_param: fixed_subnet} |
| 212 | + |
| 213 | + lb_monitor: |
| 214 | + type: OS::Neutron::LBaaS::HealthMonitor |
| 215 | + properties: |
| 216 | + type: TCP |
| 217 | + delay: 15 |
| 218 | + max_retries: 5 |
| 219 | + timeout: 10 |
| 220 | + pool: {get_resource: lb_pool} |
| 221 | + |
| 222 | + floating_ip_assoc: |
| 223 | + type: OS::Neutron::FloatingIPAssociation |
| 224 | + properties: |
| 225 | + port_id: {get_attr: [lb, vip_port_id]} |
| 226 | + floatingip_id: {get_param: floatingip_id} |
| 227 | + |
| 228 | +outputs: |
| 229 | + console_url: |
| 230 | + description: URL of the OpenShift web console |
| 231 | + value: |
| 232 | + str_replace: |
| 233 | + template: "https://%stack_name%-%hostname%.%domainname%:8443/console/" |
| 234 | + params: |
| 235 | + '%stack_name%': {get_param: stack_name} |
| 236 | + '%hostname%': {get_param: hostname} |
| 237 | + '%domainname%': {get_param: domain_name} |
| 238 | + |
| 239 | + api_url: |
| 240 | + description: URL entrypoint to the OpenShift API |
| 241 | + value: |
| 242 | + str_replace: |
| 243 | + template: "https://%stack_name%-%hostname%.%domainname%:8443/" |
| 244 | + params: |
| 245 | + '%stack_name%': {get_param: stack_name} |
| 246 | + '%hostname%': {get_param: hostname} |
| 247 | + '%domainname%': {get_param: domain_name} |
| 248 | + |
| 249 | + hostname: |
| 250 | + description: Loadbalancer hostname |
| 251 | + value: |
| 252 | + str_replace: |
| 253 | + template: "%stack_name%-%hostname%.%domainname%" |
| 254 | + params: |
| 255 | + '%stack_name%': {get_param: stack_name} |
| 256 | + '%hostname%': {get_param: hostname} |
| 257 | + '%domainname%': {get_param: domain_name} |
0 commit comments