In the AWS environment, Userdata is populated automatically by the template when SWe instances are launched. Metadata is populated automatically by the Life Cycle Agent (LCA) from the information obtained from the AWS internal Metadata server. The Metadata and the Userdata are populated in the standard JSON format (.json file).

The SBC SWe instances are launched on AWS with CFN templates provided by Ribbon. The LCA performs the following:

  • LCA is part of the AMI and starts automatically when SWe instance is booted.
  • Orchestrates the initial configuration and activation of the SBC SWe instance.    
  • Once the SWe instance boots up, Cloud-init retrieves Metadata and Userdata information associated with this instance from the internal Metadata server and provides it to the LCA.

  • LCA validates the Userdata content populated. Based on the information obtained from the Metadata and the Userdata from the internal Metadata server, LCA populates the instance specific Metadata which will then be converted into Metavars which is processed by the application.
Note

Configuring the SBC instances on AWS is similar to configuring SBC on OpenStack. For complete CLI configuration, refer to CLI Reference Guide.

For AWS and OpenStack, there is now a common RESTCONF API command for accessing/showing/listing instantiation data such as meta-data and user-data. For details, refer to the RESTCONF API Reference Guide.


Metadata

The Metadata information is auto populated from the internal Metadata server in AWS.

  • When LCA boots up, it queries the metadata from the AWS server
  • The metadata is copied at this location by LCA: /opt/sonus/conf/metaData.json 

Userdata

Format of Userdata for HA

If the CERole parameter is Active/Standby, it represents HA userdata format. 

{
    "ALT_Mgt0_00": "LOGICAL_MGMT_IP",
    "ALT_Pkt0_00": "VIP1",
    "ALT_Pkt1_00": "VIP2",
    "AdminSshKey": "<public key>",
    "CEName": "<CEName>",
    "CERole": "<ACTIVE | STANDBY>",
    "ClusterIp": "<cluster IP>",
    "EnableCloudWatchMetrics": "<True | False>",
    "HFE": "<HFE IP>",
    "IAM_ROLE": "<AWS IAM Role Name>",
    "NodeName": "<node name>",
    "PeerCEHa0IPv4Address": "<PeerCEHa0IPv4Address>",
    "PeerCEName": "<PeerCEName>",
    "ReverseNatPkt0": "<True | False>",
    "ReverseNatPkt1": "<True | False>",
    "SbcHaMode": "1to1",
    "SbcPersonalityType": "isbc",
    "SortHfeEip": "True",
    "SystemName": "<SystemName>",
    "TemplateName": "AWS_HA_template.json",
    "TemplateVersion": "<template version>",
    "ThirdPartyCpuAlloc": "<vcpu>",
    "ThirdPartyMemAlloc": "<mb>"
    "UseAnonymizationFeature": "<True | False>",
}


Example of Userdata for HA

{
    "ALT_Mgt0_00": "LOGICAL_MGMT_IP",
    "ALT_Pkt0_00": "VIP1",
    "ALT_Pkt1_00": "VIP2",
    "AdminSshKey": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCJnrFMr/RXJD3rVLMLdkJBYau+lWQ+F55Xj+KjunVBtw/zXURV38QIQ1zCw/GDO2CZTSyehUeiV0pi2moUs0ZiK6/TdWTzcOP3RCUhNI26sBFv/Tk5MdaojSqUc2NMpS/c1ESCmaUMBv4F7PfeHt0f3PqpUsxvKeNQQuEZyXjFEwAUdbkCMEptgaroYwuEz4SpFCfNBh0obUSoX5FNiNO/OyXcR8poVH0UhFim0Rdneo7VEH5FeqdkdGyZcTFs7A7aWpBRY3N8KUwklmNSWdDZ9//epEwgaF3m5U7XMd4M9zHURF1uQ/Nc+aiyVId9Mje2EU+nh6npaw/tEOPUiC1v",
    "CEName": "vsbc1",
    "CERole": "ACTIVE",
    "ClusterIp": "172.31.11.123",
    "EnableCloudWatchMetrics": "False",
    "HFE": "172.31.10.19",
    "IAM_ROLE": "SWe",
    "NodeName": "testnode",
    "PeerCEHa0IPv4Address": "172.31.11.123",
    "PeerCEName": "vsbc2",
    "ReverseNatPkt0": "True",
    "ReverseNatPkt1": "False",
    "SbcHaMode": "1to1",
    "SbcPersonalityType": "isbc",
    "SortHfeEip": "True",
    "SystemName": "vsbcSystem",
    "TemplateName": "AWS_HA_template.json",
    "TemplateVersion": "V09.01.00R001",
    "ThirdPartyCpuAlloc": "0",
    "ThirdPartyMemAlloc": "0",
    "UseAnonymizationFeature": "False"
}


Format of Userdata for Standalone

If the CERole parameter is missing, it represents standalone userdata format.

{
 "ReverseNatPkt0" : "<True | False>",
 "ReverseNatPkt1" : "<True | False>",
 "SbcPersonalityType" : "isbc",
 "CEName" : "<CEName>",
 "SystemName" : "<SystemName>",
 "ThirdPartyCpuAlloc" : "0",
 "ThirdPartyMemAlloc" : "0",
 "AdminSshKey"          : "<public key>"
}


Example of Userdata for Standalone

{
 "ReverseNatPkt0" : "False",
 "ReverseNatPkt1" : "False",
 "SbcPersonalityType" : "isbc",
 "SystemName" : "vsbcSystem",
 "CEName" : "vsbc1",
 "ThirdPartyCpuAlloc" : "0",
 "ThirdPartyMemAlloc" : "0",
 "AdminSshKey"          : "ssh-rsa   AAAAB3NzaC1yc2EAAAADAQABAAABAQCJnrFMr/RXJD3rVLMLdkJBYau+lWQ+F55Xj+KjunVBtw/zXURV38QIQ1zCw/GDO2CZTSyehUeiV0pi2moUs0ZiK6/TdWTzcOP3RCUhNI26sBFv/Tk5MdaojSqUc2NMpS/c1ESCmaUMBv4F7PfeHt0f3PqpUsxvKeNQQuEZyXjFEwAUdbkCMEptgaroYwuEz4SpFCfNBh0obUSoX5FNiNO/OyXcR8poVH0UhFim0Rdneo7VEH5FeqdkdGyZcTFs7A7aWpBRY3N8KUwklmNSWdDZ9//epEwgaF3m5U7XMd4M9zHURF1uQ/Nc+aiyVId9Mje2EU+nh6npaw/tEOPUiC1v"
 
}

Userdata Parameter Description

ParameterLengthFormatDescription

CERole 

N/A

Active

Assigned role of SBC instance.

Allowed Value:

  • Active
  • Standby
ReverseNatPkt0 / ReverseNatPkt1

N/A

True/False

Reverse NAT flag for Pkt0 and Pkt1.

Values:

  • True: To consider FIPV4 entity using value provided in the dictionary
  • False (default): To configure FIPV4 using SMM rules, and ignore the FIPV4 value provided here.

CEName

64

vsbc1

Specifies the actual CE name of the SBC instance. For more information, refer to System and Instance Naming in SBC SWe N:1 and Cloud-Based Systems.

CEName Requirements:

  • Must start with an alphabetic character.
  • Only contain alphabetic characters and/or numbers. No special characters.
  • Cannot exceed 64 characters in length

SystemName

26

vsbcSystem

Specifies the actual system name of the SBC instance. For more information, refer to System and Instance Naming in SBC SWe N:1 and Cloud-Based Systems.

System Requirements:

  • Must start with an alphabetic character.
  • Only contain alphabetic characters and/or numbers. No special characters.
  • Cannot exceed 26 characters in length.
Node Name64

SD-AWS-HA-510A654

Specifies a unique name for the instance in a node.

PeerCEName

64

vsbc2

Specifies the name of the peer SBC node. For more information, refer to System and Instance Naming in SBC SWe N:1 and Cloud-Based Systems.

Peer CEName Requirements:

  • Must start with an alphabetic character.
  • Only contain alphabetic characters and/or numbers. No special characters.
  • Cannot exceed 64 characters in length.

PeerCEHa0IPv4Address

N/A

10.1.0.3

Specifies the IPv4 address of the HA port for the peer SBC node. This parameter is applicable only in case of instance is launched in HA mode.

Meta Variables

Interface related information (contents of Interface and ALT IP definition) provided in userdata and/or metadata is flattened down into key-value pairs, which would be used for CLI configuration.

MetaVariable dictionary is populated in the file /opt/sonus/instanceMetaVar.json and the corresponding XML file is injected into the CDB, is located at /opt/sonus/sbx/lca/sonusMetaVariables.xml

The IP address is obtained from DHCP query for respective interface. The IP address, Gateway address, Subnet prefix is directly populated in the /opt/sonus/sbx/lca/sonusMetaVariables.xml file.

The metaVariables can be viewed from the CLI command as shown below : 

> show table system metaVariable 
CE NAME              NAME                    VALUE
----------------------------------------------------------------
vsbc1-172.31.11.218  IF0.GWV4                172.31.10.1
vsbc1-172.31.11.218  IF0.IPV4                172.31.10.87
vsbc1-172.31.11.218  IF0.Port                Mgt0
vsbc1-172.31.11.218  IF0.RNat                True
vsbc1-172.31.11.218  IF1.GWV4                172.31.11.1
vsbc1-172.31.11.218  IF1.IPV4                172.31.11.218
vsbc1-172.31.11.218  IF1.Port                Ha0
vsbc1-172.31.11.218  IF1.RNat                True
vsbc1-172.31.11.218  IF2.GWV4                172.31.109.1
vsbc1-172.31.11.218  IF2.IPV4                172.31.109.80
vsbc1-172.31.11.218  IF2.Port                Pkt0
vsbc1-172.31.11.218  IF2.RNat                True
vsbc1-172.31.11.218  IF3.GWV4                172.31.13.1
vsbc1-172.31.11.218  IF3.IPV4                172.31.13.22
vsbc1-172.31.11.218  IF3.Port                Pkt1
vsbc1-172.31.11.218  IF3.RNat                False
vsbc1-172.31.11.218  IF0.FIPV4               34.193.205.253
vsbc1-172.31.11.218  IF0.PrefixV4            24
vsbc1-172.31.11.218  IF1.PrefixV4            24
vsbc1-172.31.11.218  IF2.PrefixV4            24
vsbc1-172.31.11.218  IF3.PrefixV4            24
vsbc1-172.31.11.218  HFE_IF2.FIPV4           54.157.128.249
vsbc1-172.31.11.218  HFE_IF2.IFName          IF_HFE
vsbc1-172.31.11.218  LOGICAL_MGMT_IP.IP      172.31.10.101
vsbc1-172.31.11.218  secondaryIPList.Mgt0    ['172.31.10.101']
vsbc1-172.31.11.218  secondaryIPList.Pkt0    ['172.31.109.80']
vsbc1-172.31.11.218  secondaryIPList.Pkt1    ['172.31.13.22']
vsbc1-172.31.11.218  LOGICAL_MGMT_IP.FIPV4   54.88.217.30
vsbc1-172.31.11.218  LOGICAL_MGMT_IP.IFName  IF0
vsbc2-172.31.11.123  IF0.GWV4                172.31.10.1
vsbc2-172.31.11.123  IF0.IPV4                172.31.10.158
vsbc2-172.31.11.123  IF0.Port                Mgt0
vsbc2-172.31.11.123  IF0.RNat                True
vsbc2-172.31.11.123  IF1.GWV4                172.31.11.1
vsbc2-172.31.11.123  IF1.IPV4                172.31.11.123
vsbc2-172.31.11.123  IF1.Port                Ha0
vsbc2-172.31.11.123  IF1.RNat                True
vsbc2-172.31.11.123  IF2.GWV4                172.31.109.1
vsbc2-172.31.11.123  IF2.IPV4                172.31.109.80
vsbc2-172.31.11.123  IF2.Port                Pkt0
vsbc2-172.31.11.123  IF2.RNat                True
vsbc2-172.31.11.123  IF3.GWV4                172.31.13.1
vsbc2-172.31.11.123  IF3.IPV4                172.31.13.22
vsbc2-172.31.11.123  IF3.Port                Pkt1
vsbc2-172.31.11.123  IF3.RNat                False
vsbc2-172.31.11.123  IF0.FIPV4               34.204.106.230
vsbc2-172.31.11.123  IF0.PrefixV4            24
vsbc2-172.31.11.123  IF1.PrefixV4            24
vsbc2-172.31.11.123  IF2.PrefixV4            24
vsbc2-172.31.11.123  IF3.PrefixV4            24
vsbc2-172.31.11.123  HFE_IF2.FIPV4           54.157.128.249
vsbc2-172.31.11.123  HFE_IF2.IFName          IF_HFE
vsbc2-172.31.11.123  LOGICAL_MGMT_IP.IP      172.31.10.101
vsbc2-172.31.11.123  secondaryIPList.Mgt0    ['172.31.10.101']
vsbc2-172.31.11.123  secondaryIPList.Pkt0    ['172.31.109.80']
vsbc2-172.31.11.123  secondaryIPList.Pkt1    ['172.31.13.22']
vsbc2-172.31.11.123  LOGICAL_MGMT_IP.FIPV4   54.88.217.30
vsbc2-172.31.11.123  LOGICAL_MGMT_IP.IFName  IF0


Note

When using Cloudformation Templates to create the SBC setup and the number of secondary IPs selected for an interface is greater than the number of Elastic IPs, the secondary IPs that have an Elastic IP attached are not given priority in the ordering. Instead, the SBC simply orders the secondary IPs based on the numeric value. This means that the metavariable table may look incorrect; however, it is a true representation of which Elastic IP is attached to which secondary IP.

Sample configurations using metaVariables are shown below.

set addressContext default ipInterfaceGroup LIG1 ipInterface LIG1_V4 ipVarV4 IF2.IPV4 prefixVarV4 IF2.PrefixV4 vlanTagVar IF5.VlanId portName pkt0 state enabled mode inService

set addressContext default ipInterfaceGroup LIG2 ipInterface LIG2_V4 ipVarV4 IF3.IPV4 prefixVarV4 IF3.PrefixV4 ipPublicVarV4 IF3.FIPV4 portName pkt1 state enabled mode inService

set addressContext default zone ZONE_AS sipSigPort 3 ipInterfaceGroup LIG2 ipVarV4 IF3.IPV4 ipPublicVarV4 IF3.FIPV4 state enabled