aboutsummaryrefslogtreecommitdiffstats
path: root/docs/architecture/architecture.rst
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2020-10-22 15:17:35 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-22 15:17:35 +0000
commit1ab809dc66569ae9db7fb94b861c0852d095428d (patch)
tree47852eaca7a371cadf5c08ce93c86825fdd26dec /docs/architecture/architecture.rst
parent66ee1cc378b5a93a4ca225fe5bf31729cf762ffd (diff)
parenta239fb97ca9149240ba794d9cd67973c3946d85a (diff)
Merge "Remove static declaration"
Diffstat (limited to 'docs/architecture/architecture.rst')
0 files changed, 0 insertions, 0 deletions
a id='n114' href='#n114'>114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
heat_template_version: 2013-05-23

##########################################################
#
#  Changes from MSO 
#  - Updated per ECOMP Feedback
#  
#
##########################################################

description: This stack creates two ECA OAM VM and one ARB VM

parameters:
  vnf_id:
    type: string
    description: Unique ID for this VNF instance
    default: This_is_ths_MMSC-ECA_id
  eca_names:
    type: comma_delimited_list
    label: oam servers names
    description: the names of the OAM1,OAM2 VM instances
  arb_names:
    type: comma_delimited_list
    label: arbiter server names
    description: the names of the arbiter VM instances
  oam_image_name:
    type: string
    label: image name
    description: the OAM image name
  oam_flavor:
    type: string
    label: flavor name
    description: OAM flavor name
  arbiter_flavor:
    type: string
    label: flavor name
    description: arbiter flavor name
  availability_zone_0:
    type: string
    label: availabilityzone name
    description: availabilityzone name
  oam_net_name:
    type: string
    label: oam network name
    description: the name of the oam network
  eca_mgmt_net_name:
    type: string
    label: internal network name
    description: the name of the internal network
  eca_oam_ips:
    type: comma_delimited_list
    label: oam network ips
    description: the ips of oam networks for eca VM
  eca_oam_gateway:
    type: string
    label: oam1 oam gateway
    description: the ip of oam gateway
  eca_eca_mgmt_ips:
    type: comma_delimited_list
    label: eca_mgmt network ips for eca VM
    description: internal eca_mgmt network ips for eca VM
  arb_oam_ips:
    type: comma_delimited_list
    label: oam network ips for arb VM
    description: oam network ips for eca VM
  arb_eca_mgmt_ips:
    type: comma_delimited_list
    label: eca_mgmt network ips 
    description:  internal eca_mgmt network ips for arb VM
  eca_oam_gateway:
    type: string
    label: oam network gateway
    description: oam network gateway
  security_group_name:
    type: string
    label: security group name
    description: the name of security group
  oam_volume_size:
    type: number
    label: volume size
    description: the size of the OAM volume
  arb_volume_size:
    type: number
    label: volume size
    description: the size of the ARB volume
  swift_eca_url:
    type: string
    label: Swift URL
    description: Base URL for eca swift object store
  ECA_OAM_volume_type:
    type: string
    label: eca oam vm volume type
    description: the name of the target volume backend
  ARB_volume_type:
    type: string
    label: arb vm volume type
    description: the name of the target volume backend

resources:
  oam1_instance:
    type: OS::Nova::Server
    properties:
      name: {get_param: [eca_names, 0]}
      image: {get_param: oam_image_name}
      flavor: {get_param: oam_flavor}
      availability_zone: {get_param: availability_zone_0}
      networks:
        - port: {get_resource: oam1_int_port}
        - port: {get_resource: oam1_mgmt_port}
      metadata:
        vnf_id: { get_param: vnf_id }  
      user_data:
        str_replace:
          template: |
            #!/bin/bash
            sed -i s/HOSTNAME.*/"HOSTNAME=oam1_hostname"/g /etc/sysconfig/network
            eth1_ip_address='oam1_mgt_ip'
            eth1_gateway='oam_gateway'
            for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
              if [ "$interface" != "lo" ]; then
                DEVICE_NAME=$interface
                interface_ip_var="${DEVICE_NAME}_ip_address"
                gateway_var="${DEVICE_NAME}_gateway"
                var_name="$interface_ip_var"
                var_gateway="$gateway_var"
                if [ ! -z ${!var_name} ]; then
                  IPADDR=${!var_name}
                  BOOTPROTO="static"
                  GATEWAY=${!var_gateway}
                  IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
                  printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
                else
                  if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
                    echo "Configuring $DEVICE_NAME to use DHCP"
                    IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
                    IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
                    printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
                  fi
                fi
                ifdown $DEVICE_NAME
                ifup $DEVICE_NAME
                printf "$DEVICE_NAME\n" >> /tmp/network_config
              fi
            done
            mkdir /etc/puppet/files/roles/transcoder
            mkdir /etc/puppet/files/roles/oam_primary
            curl swift_url/etc/puppet/manifests/roles/oam_primary.pp > /etc/puppet/manifests/roles/oam_primary.pp
            curl swift_url/etc/puppet/manifests/roles/transcoder.pp > /etc/puppet/manifests/roles/transcoder.pp
            curl swift_url/etc/puppet/files/roles/oam_primary/config.yaml > /etc/puppet/files/roles/oam_primary/config.yaml
            curl swift_url/etc/puppet/files/roles/transcoder/config.yaml > /etc/puppet/files/roles/transcoder/config.yaml
            curl swift_url/etc/puppet/files/roles/transcoder/hpm.conf > /etc/puppet/files/roles/transcoder/hpm.conf
            curl swift_url/etc/puppet/files/roles/transcoder/trx.conf > /etc/puppet/files/roles/transcoder/trx.conf
            curl swift_url/etc/puppet/files/roles/transcoder/plugins-mo.conf > /etc/puppet/files/roles/transcoder/plugins-mo.conf
            curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
            curl swift_url/etc/puppet/manifests/site.pp > /etc/puppet/manifests/site.pp
            curl swift_url/scripts/van-init-replicaset > /usr/sbin/van-init-replicaset
            van-role oam_primary > /root/startup-van-role.out
            curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes 
            fdisk /dev/vdb < /root/fdisk-keystrokes 
            curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
            chmod 755 /root/os-conf-cinder-vol
            /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
          params:
            oam1_mgt_ip: {get_param: [eca_oam_ips, 0] }
            oam_gateway: {get_param: eca_oam_gateway }
            oam1_hostname: {get_param: [eca_names, 0]}
            swift_url: {get_param: swift_eca_url}

  oam1_mgmt_port:
    type: OS::Neutron::Port
    properties:
      network: {get_param: oam_net_name}
      fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 0]}}]
      security_groups: [{get_param: security_group_name}]
      replacement_policy: AUTO

  oam1_int_port:
    type: OS::Neutron::Port
    properties:
      network: {get_param: eca_mgmt_net_name}
      fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 0]}}]
      security_groups: [{get_param: security_group_name}]
      replacement_policy: AUTO

  oam1_volume:
    type: OS::Cinder::Volume
    properties:
      size: {get_param: oam_volume_size}
      volume_type: {get_param: ECA_OAM_volume_type}

  oam1_volume_attachment:
    type: OS::Cinder::VolumeAttachment
    properties:
      volume_id: {get_resource: oam1_volume}
      instance_uuid: {get_resource: oam1_instance}

  oam2_instance:
    type: OS::Nova::Server
    properties:
      name: {get_param: [eca_names, 1]}
      image: {get_param: oam_image_name}
      flavor: {get_param: oam_flavor}
      availability_zone: {get_param: availability_zone_0}
      networks:
        - port: {get_resource: oam2_int_port}
        - port: {get_resource: oam2_mgmt_port}
      metadata:
        vnf_id: { get_param: vnf_id }
      user_data:
        str_replace:
          template: |
            #!/bin/bash
            sed -i s/HOSTNAME.*/"HOSTNAME=oam2_hostname"/g /etc/sysconfig/network
            eth1_ip_address='oam2_mgt_ip'
            eth1_gateway='oam_gateway'
            for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
              if [ "$interface" != "lo" ]; then
                DEVICE_NAME=$interface
                interface_ip_var="${DEVICE_NAME}_ip_address"
                gateway_var="${DEVICE_NAME}_gateway"
                var_name="$interface_ip_var"
                var_gateway="$gateway_var"
                if [ ! -z ${!var_name} ]; then
                  IPADDR=${!var_name}
                  BOOTPROTO="static"
                  GATEWAY=${!var_gateway}
                  IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
                  printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
                else
                  if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
                    echo "Configuring $DEVICE_NAME to use DHCP"
                    IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
                    IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
                    printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
                  fi
                fi
                ifdown $DEVICE_NAME
                ifup $DEVICE_NAME
                printf "$DEVICE_NAME\n" >> /tmp/network_config
              fi
            done
            curl swift_url/etc/puppet/manifests/roles/oam_secondary.pp > /etc/puppet/manifests/roles/oam_secondary.pp
            curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
            curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
            van-role oam_secondary > /root/startup-van-role.out
            curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes 
            fdisk /dev/vdb < /root/fdisk-keystrokes 
            curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
            chmod 755 /root/os-conf-cinder-vol
            /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
            
          params:
            oam2_mgt_ip: {get_param: [eca_oam_ips, 1] }
            oam2_hostname: {get_param: [eca_names, 1]}
            swift_url: {get_param: swift_eca_url}
            oam_gateway: {get_param: eca_oam_gateway }

  oam2_mgmt_port:
    type: OS::Neutron::Port
    properties:
      network: {get_param: oam_net_name}
      fixed_ips: [{"ip_address": {get_param: [eca_oam_ips, 1]}}]
      security_groups: [{get_param: security_group_name}]
      replacement_policy: AUTO

  oam2_int_port:
    type: OS::Neutron::Port
    properties:
      network: {get_param: eca_mgmt_net_name}
      fixed_ips: [{"ip_address": {get_param: [eca_eca_mgmt_ips, 1]}}]
      security_groups: [{get_param: security_group_name}]
      replacement_policy: AUTO

  oam2_volume:
    type: OS::Cinder::Volume
    properties:
      size: {get_param: oam_volume_size}
      volume_type: {get_param: ECA_OAM_volume_type}

  oam2_volume_attachment:
    type: OS::Cinder::VolumeAttachment
    properties:
      volume_id: {get_resource: oam2_volume}
      instance_uuid: {get_resource: oam2_instance}

  arb_instance:
    type: OS::Nova::Server
    properties:
      name: {get_param: [arb_names, 0]}
      image: {get_param: oam_image_name}
      flavor: {get_param: arbiter_flavor}
      availability_zone: {get_param: availability_zone_0}
      networks:
        - port: {get_resource: arb_int_port}
        - port: {get_resource: arb_mgmt_port}
      metadata:
        vnf_id: { get_param: vnf_id }
      user_data:
        str_replace:
          template: |
            #!/bin/bash
            sed -i s/HOSTNAME.*/"HOSTNAME=arb_hostname"/g /etc/sysconfig/network
            eth1_ip_address='arb_mgt_ip'
            eth1_gateway='oam_gateway'
            for interface in $(ip addr show|perl -nle 's/\d:\s([a-z0-9]*?):/print $1/e') ; do
              if [ "$interface" != "lo" ]; then
                DEVICE_NAME=$interface
                interface_ip_var="${DEVICE_NAME}_ip_address"
                gateway_var="${DEVICE_NAME}_gateway"
                var_name="$interface_ip_var"
                var_gateway="$gateway_var"
                if [ ! -z ${!var_name} ]; then
                  IPADDR=${!var_name}
                  BOOTPROTO="static"
                  GATEWAY=${!var_gateway}
                  IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes\nUSERCTL=no"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=$BOOTPROTO"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nIPADDR=$IPADDR"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nNETMASK=255.255.255.0"
                  IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nGATEWAY=$GATEWAY"
                  printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
                else
                  if [ ! -f /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME ]; then
                    echo "Configuring $DEVICE_NAME to use DHCP"
                    IFCFG_TEMPLATE="DEVICE=$DEVICE_NAME\nNM_CONTROLLED=no\nONBOOT=yes"
                    IFCFG_TEMPLATE="$IFCFG_TEMPLATE\nBOOTPROTO=dhcp\nUSERCTL=no"
                    printf $IFCFG_TEMPLATE > /etc/sysconfig/network-scripts/ifcfg-$DEVICE_NAME
                  fi
                fi
                ifdown $DEVICE_NAME
                ifup $DEVICE_NAME
                printf "$DEVICE_NAME\n" >> /tmp/network_config
              fi
            done
            curl swift_url/etc/puppet/manifests/roles/oam_arbiter.pp > /etc/puppet/manifests/roles/oam_arbiter.pp
            curl swift_url/etc/puppet/files/global/config.yaml > /etc/puppet/files/global/config.yaml
            curl swift_url/etc/puppet/files/global/11-customer.conf > /etc/puppet/files/global/11-customer.conf
            van-role oam_arbiter > /root/startup-van-role.out
            curl swift_url/scripts/fdisk-keystrokes > /root/fdisk-keystrokes 
            fdisk /dev/vdb < /root/fdisk-keystrokes 
            curl swift_url/scripts/os-conf-cinder-vol > /root/os-conf-cinder-vol
            chmod 755 /root/os-conf-cinder-vol
            /root/os-conf-cinder-vol 2>> /tmp/cinder_volume.log
          params:
            arb_mgt_ip: {get_param: [arb_oam_ips, 0] }
            arb_hostname: {get_param: [arb_names, 0]}
            swift_url: {get_param: swift_eca_url}
            oam_gateway: {get_param: eca_oam_gateway }

  arb_mgmt_port:
    type: OS::Neutron::Port
    properties:
      network: {get_param: oam_net_name}
      fixed_ips: [{"ip_address": {get_param: [arb_oam_ips, 0]}}]
      security_groups: [{get_param: security_group_name}]
      replacement_policy: AUTO

  arb_int_port:
    type: OS::Neutron::Port
    properties:
      network: {get_param: eca_mgmt_net_name}
      fixed_ips: [{"ip_address": {get_param: [arb_eca_mgmt_ips, 0]}}]
      security_groups: [{get_param: security_group_name}]
      replacement_policy: AUTO

  arb_volume:
    type: OS::Cinder::Volume
    properties:
      size: {get_param: arb_volume_size}
      volume_type: {get_param: ARB_volume_type}
  arb_volume_attachment:
    type: OS::Cinder::VolumeAttachment
    properties:
      volume_id: {get_resource: arb_volume}
      instance_uuid: {get_resource: arb_instance}