aboutsummaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/resources/resource-examples/public-ns/vgw0/gateway.yaml
blob: 2d72a1c183fde4f7677c2eb3cf763db6288c919c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
##########################################################################
#
#==================LICENSE_START==========================================
#
#
# Copyright 2017 Huawei Technologies Co., Ltd. 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.
#
#==================LICENSE_END============================================

heat_template_version: 2013-05-23

description: Heat template to deploy CCVPN gateway instance

##############
#            #
# PARAMETERS #
#            #
##############

parameters:
  gateway_name:
    type: string
    label: name
    description: name to be used for compute instance
  gateway_image_name:
    type: string
    label: Image name or ID
    description: Image to be used for compute instance
  gateway_flavor_name:
    type: string
    label: Flavor
    description: Type of instance (flavor) to be used
  private_net_id:
    type: string
    label: Private oam network name or ID
    description: Private network that enables remote connection to VNF
#  private_subnet_wan_id:
#    type: string
#    label: Private wan sub-network name or ID
#    description: Private wan sub-network that enables remote connection to VNF
  private_subnet_lan_id:
    type: string
    label: Private lan sub-network name or ID
    description: Private lan sub-network that enables remote connection to VNF
  gateway_private_ip_lan:
    type: string
    label: gateway lan private IP address
    description: Private IP address that is assigned to the gateway lan port
  vnf_id:
    type: string
    label: VNF ID
    description: The VNF ID is provided by ECOMP
  vf_module_id:
    type: string
    label: VF module id
    description: the vf module id is provided by ECOMP
#############
#           #
# RESOURCES #
#           #
#############

resources:
# For the floating IP in Public cloud , floating_network_id is not needed
  gateway_oam_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: { get_param: private_net_id}
      port_id: { get_resource: gateway_private_lan_port}

  #gateway_private_wan_port:
  #  type: OS::Neutron::Port
  #  properties:
  #    network: { get_param: private_net_id }
  #    fixed_ips: [{"subnet": { get_param: private_subnet_wan_id }}]

  gateway_private_lan_port:
    type: OS::Neutron::Port
    properties:
      network: { get_param: private_net_id }
      fixed_ips: [{"subnet": { get_param: private_subnet_lan_id }, "ip_address": { get_param: gateway_private_ip_lan }}]

  gateway_instacne:
    type: OS::Nova::Server
    properties:
      image: { get_param: gateway_image_name }
      flavor: { get_param: gateway_flavor_name }
      name: { get_param: gateway_name }
      networks:
        #- port: { get_resource: gateway_private_wan_port }
        - port: { get_resource: gateway_private_lan_port }
      metadata: { vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }}
      user_data: |
            #!/bin/bash
            docker start msb_consul
            docker start msb_discovery
            docker start msb_internal_apigateway
      #user_data_format:  HEAT_CFNTOOLS/RAW