| # ============LICENSE_START======================================================= |
| # Copyright (C) 2019 The Nordix Foundation. All rights reserved. |
| # ================================================================================ |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| # |
| # SPDX-License-Identifier: Apache-2.0 |
| # ============LICENSE_END========================================================= |
| |
| heat_template_version: 2017-02-24 |
| |
| description: Kubespray cluster template to deploy ONAP |
| |
| parameters: |
| # parameters for k8s master instances |
| no_of_master_nodes: |
| type: number |
| label: No of k8s master nodes |
| description: Number of master nodes in k8s cluster |
| |
| master_image: |
| type: string |
| label: Image name or ID |
| description: Image to use for k8s master instances |
| |
| master_flavor: |
| type: string |
| label: Flavor |
| description: Flavor to use for k8s master instances |
| |
| master_volume_size: |
| type: string |
| label: Volume |
| description: Volume size to use for k8s master instances |
| |
| # parameters for k8s worker instances |
| no_of_worker_nodes: |
| type: number |
| label: No of k8s worker nodes |
| description: Number of worker nodes in k8s cluster |
| |
| worker_image: |
| type: string |
| label: Image name or ID |
| description: Image to use for k8s worker instances |
| |
| worker_flavor: |
| type: string |
| label: Flavor |
| description: Flavor to use for k8s worker instances |
| |
| worker_volume_size: |
| type: string |
| label: Volume |
| description: Size of the volume to use for k8s worker instances |
| |
| keypair: |
| type: string |
| label: Key name |
| description: Keypair to use for the instances |
| |
| private_network: |
| type: string |
| label: Private network name or ID |
| description: Network to attach instances to |
| |
| resources: |
| name_nonce: |
| type: OS::Heat::RandomString |
| properties: |
| length: 8 |
| sequence: lowercase |
| |
| master_nodes: |
| type: OS::Heat::ResourceGroup |
| properties: |
| count: { get_param: no_of_master_nodes } |
| resource_def: |
| type: heat-server.yaml |
| properties: |
| instance_name: |
| str_replace: |
| template: master%index%-$NONCE |
| params: |
| $NONCE: { get_resource: name_nonce } |
| image: { get_param: master_image } |
| flavor: { get_param: master_flavor } |
| keypair: { get_param: keypair } |
| volume_name: |
| str_replace: |
| template: volume-master%index%-$NONCE |
| params: |
| $NONCE: { get_resource: name_nonce } |
| volume_size: { get_param: master_volume_size } |
| private_network: { get_param: private_network } |
| |
| worker_nodes: |
| type: OS::Heat::ResourceGroup |
| properties: |
| count: { get_param: no_of_worker_nodes } |
| resource_def: |
| type: heat-server.yaml |
| properties: |
| instance_name: |
| str_replace: |
| template: worker%index%-$NONCE |
| params: |
| $NONCE: { get_resource: name_nonce } |
| image: { get_param: worker_image } |
| flavor: { get_param: worker_flavor } |
| keypair: { get_param: keypair } |
| volume_name: |
| str_replace: |
| template: volume-worker%index%-$NONCE |
| params: |
| $NONCE: { get_resource: name_nonce } |
| volume_size: { get_param: worker_volume_size } |
| private_network: { get_param: private_network } |
| |
| outputs: |
| master_ip: |
| value: {get_attr: [master_nodes, instance_ip]} |
| worker_ip: |
| value: {get_attr: [worker_nodes, instance_ip]} |
| |
| # vim: set ts=2 sw=2 expandtab: |