Commit d23a4822 authored by beierl's avatar beierl
Browse files

Fix network interfaces



Changes cloud-init so that interfaces are not brought up before
netplan apply.  This allows netplan to start the dhcp client.

Added network packets to monitoring section.

Signed-off-by: default avatarbeierl <mbeierl@vmware.com>
parent bfe6df69
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
additionalParamsForVnf:
-  member-vnf-index: '1'
   additionalParams:
     spgw_ip: '10.0.6.15'
     hss_ip: '10.0.6.20'
     password: 'osm4us'

      spgw_ip: 10.0.6.15
      hss_ip: 10.0.6.20
# Optional - can set an ssh password, or omit it for ssh key auth only
      password: ''
vnf:
-  member-vnf-index: '1'
   internal-vld:
+47 −43
Original line number Diff line number Diff line
@@ -6,9 +6,11 @@ nsd:nsd-catalog:
      description: Generated by OSM package generator
      vendor: OSM_VNFONB_TF
      version: '1.0'
#######################################################################################################################
      constituent-vnfd:
      -  member-vnf-index: 1
         vnfd-id-ref: vEPC_vnfd
#######################################################################################################################
      vld:
      -  id: management
         name: management
@@ -23,6 +25,7 @@ nsd:nsd-catalog:
         -  member-vnf-index-ref: 1
            vnfd-id-ref: vEPC_vnfd
            vnfd-connection-point-ref: hss-mgmt
#######################################################################################################################
      -  id: s1
         name: s1
         short-name: s1
@@ -33,6 +36,7 @@ nsd:nsd-catalog:
            vnfd-id-ref: vEPC_vnfd
            vnfd-connection-point-ref: spgwmme-s1
            ip-address: 192.168.0.11
#######################################################################################################################
      -  id: sgi
         name: sgi
         short-name: sgi
+0 −1
Original line number Diff line number Diff line
@@ -14,5 +14,4 @@ write_files:
                    dhcp4: true
    path: /etc/netplan/51-additional-interfaces.yaml
runcmd:
-   /sbin/ip link set ens4 up
-   /usr/sbin/netplan apply
+0 −3
Original line number Diff line number Diff line
@@ -18,7 +18,4 @@ write_files:
                    dhcp4: true
    path: /etc/netplan/51-additional-interfaces.yaml
runcmd:
-   /sbin/ip link set ens4 up
-   /sbin/ip link set ens5 up
-   /sbin/ip link set ens6 up
-   /usr/sbin/netplan apply
+199 −181
Original line number Diff line number Diff line
@@ -6,9 +6,10 @@ vnfd:vnfd-catalog:
      description: Generated by OSM package generator
      vendor: OSM_VNFONB_TF
      version: '1.0'
#######################################################################################################################
      mgmt-interface:
         cp: spgwmme-mgmt

#######################################################################################################################
      vdu:
      -  id: spgwmme
         name: spgwmme
@@ -22,17 +23,17 @@ vnfd:vnfd-catalog:
            vcpu-count: 2
            memory-mb: 4096
            storage-gb: 10
            image: 'nextepc-spgwmme-base'
         image: nextepc-spgwmme-base
         interface:
         -  name: eth0
            type: EXTERNAL
            virtual-interface:
#               type: SRIOV
               type: PARAVIRT
            external-connection-point-ref: spgwmme-mgmt
         -  name: eth1
            type: EXTERNAL
            virtual-interface:
#                    type: SRIOV
               type: PARAVIRT
            external-connection-point-ref: spgwmme-s1
         -  name: eth2
@@ -51,11 +52,15 @@ vnfd:vnfd-catalog:
            name: spgwmme-s6a
            type: VPORT
         monitoring-param:
            - id: "spgw_cpu_util"
              nfvi-metric: "cpu_utilization"
            - id: "spgw_memory_util"
              nfvi-metric: "average_memory_utilization"

         -  id: spgw_cpu_util
            nfvi-metric: cpu_utilization
         -  id: spgw_memory_util
            nfvi-metric: average_memory_utilization
         -  id: spgw_packets_received
            nfvi-metric: packets_received
         -  id: spgw_packets_sent
            nfvi-metric: packets_sent
#######################################################################################################################
      -  id: hss
         name: hss
         description: hss
@@ -65,7 +70,7 @@ vnfd:vnfd-catalog:
            vcpu-count: 1
            memory-mb: 2048
            storage-gb: 10
            image: 'nextepc-hss-base'
         image: nextepc-hss-base
         interface:
         -  name: eth0
            type: EXTERNAL
@@ -83,6 +88,9 @@ vnfd:vnfd-catalog:
            name: hss-s6a
            type: VPORT
         vdu-configuration:
            config-access:
               ssh-access:
                  required: true
            initial-config-primitive:
            -  seq: '1'
               name: config
@@ -106,8 +114,7 @@ vnfd:vnfd-catalog:
               name: restart-hss
            juju:
               charm: hsscharm


#######################################################################################################################
      internal-vld:
      -  id: s6a
         ip-profile-ref: s6a
@@ -115,7 +122,7 @@ vnfd:vnfd-catalog:
         -  id-ref: spgwmme-s6a
         -  id-ref: hss-s6a
         name: s6a

#######################################################################################################################
      ip-profiles:
      -  name: s6a
         description: s6a network
@@ -124,16 +131,17 @@ vnfd:vnfd-catalog:
            subnet-address: 10.0.6.0/24
            dhcp-params:
               enabled: true


#######################################################################################################################
      connection-point:
      -  name: spgwmme-mgmt
      -  name: spgwmme-s1
      -  name: spgwmme-sgi
      -  name: hss-mgmt


#######################################################################################################################
      vnf-configuration:
         config-access:
            ssh-access:
               required: true
         initial-config-primitive:
         -  seq: '1'
            name: config
@@ -160,25 +168,35 @@ vnfd:vnfd-catalog:
            parameter:
            -  name: external-prefix
               data-type: STRING
                    default-value: '8.8.8.8/32'
               default-value: 8.8.8.8/32
            -  name: next-hop
               data-type: STRING
                    default-value: '192.168.2.1'
               default-value: 192.168.2.1
         juju:
            charm: spgwcharm


#######################################################################################################################
      monitoring-param:
        -   id: "spgw_cpu_util"
            name: "spgw_cpu_util"
      -  id: spgw_cpu_util
         name: spgw_cpu_util
         aggregation-type: AVERAGE
         vdu-monitoring-param:
            vdu-ref: spgwmme
            vdu-monitoring-param-ref: spgw_cpu_util
      -  id: spgw_memory_util
         name: spgw_memory_util
         aggregation-type: AVERAGE
         vdu-monitoring-param:
            vdu-ref: spgwmme
            vdu-monitoring-param-ref: spgw_memory_util
      -  id: spgw_packets_received
         name: spgw_packets_received
         aggregation-type: AVERAGE
         vdu-monitoring-param:
              vdu-ref: "spgwmme"
              vdu-monitoring-param-ref: "spgw_cpu_util"
        -   id: "spgw_memory_util"
            name: "spgw_memory_util"
            vdu-ref: spgwmme
            vdu-monitoring-param-ref: spgw_packets_received
      -  id: spgw_packets_sent
         name: spgw_packets_sent
         aggregation-type: AVERAGE
         vdu-monitoring-param:
              vdu-ref: "spgwmme"
              vdu-monitoring-param-ref: "spgw_memory_util"
            vdu-ref: spgwmme
            vdu-monitoring-param-ref: spgw_packets_sent