In this section:
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:
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.
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 REST API command for accessing/showing/listing instantiation data such as meta-data and user-data. For details, refer to the REST API Reference Guide.
The Metadata information is auto populated from the internal Metadata server in AWS.
/opt/sonus/conf/metaData.json
If the CERole parameter is Active/Standby, it represents HA userdata format.
{ "CERole" : "<ACTIVE | STANDBY>", "ReverseNatPkt0" : "<True | False>", "ReverseNatPkt1" : "<True | False>", "ALT_Mgt0_00" : "LOGICAL_MGMT_IP", "ALT_Pkt0_00" : "VIP1", "ALT_Pkt1_00" : "VIP2", "CEName" : "<CEName>", "SystemName" : "<SystemName>", "PeerCEName" : "<PeerCEName>", "PeerCEHa0IPv4Address" : "<PeerCEHa0IPv4Address>", "SbcPersonalityType" : "isbc", "SbcMgmtMode" : "centralized", "EnableSudoLinuxadmin" : "False", "IAM_ROLE" : "<AWS IAM Role Name>", "AdminSshKey" : "<public key>", "ThirdPartyCpuAlloc" : "<vcpu>", "ThirdPartyMemAlloc" : "<mb>" }
{ "CERole" : "ACTIVE", "ReverseNatPkt0" : "False", "ReverseNatPkt1" : "False", "ALT_Mgt0_00" : "LOGICAL_MGMT_IP", "ALT_Pkt0_00" : "VIP1", "ALT_Pkt1_00" : "VIP2", "CEName" : "vsbc1", "SystemName" : "vsbcSystem", "NodeName" : "SD-test-HA-510A654", "PeerCEName" : "vsbc2", "PeerCEHa0IPv4Address" : "10.54.20.133", "SbcPersonalityType" : "isbc", "SbcMgmtMode" : "centralized", "EnableSudoLinuxadmin" : "False", "IAM_ROLE" : "SWe", "AdminSshKey" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCJnrFMr/RXJD3rVLMLdkJBYau+lWQ+F55Xj+KjunVBtw/zXURV38QIQ1zCw/GDO2CZTSyehUeiV0pi2moUs0ZiK6/TdWTzcOP3RCUhNI26sBFv/Tk5MdaojSqUc2NMpS/c1ESCmaUMBv4F7PfeHt0f3PqpUsxvKeNQQuEZyXjFEwAUdbkCMEptgaroYwuEz4SpFCfNBh0obUSoX5FNiNO/OyXcR8poVH0UhFim0Rdneo7VEH5FeqdkdGyZcTFs7A7aWpBRY3N8KUwklmNSWdDZ9//epEwgaF3m5U7XMd4M9zHURF1uQ/Nc+aiyVId9Mje2EU+nh6npaw/tEOPUiC1v", "ThirdPartyCpuAlloc" : "0", "ThirdPartyMemAlloc" : "0" }
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>" }
{ "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" }
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 NAME VALUE -------------------------------------------------- IF0.Port Mgt0 IF1.GWV4 10.10.11.1 IF1.IPV4 10.10.11.57 IF1.Port Ha0 IF2.Port Pkt0 IF3.Port Pkt0 IF4.Port Pkt1 IF5.GWV4 10.54.226.193 IF5.IPV4 10.54.226.242 IF5.Port Pkt1 IF1.PrefixV4 24 IF4.PrefixV4 26 IF5.PrefixV4 26 PKT1_V01_ALT_IP_01.IP 10.54.226.179 PKT1_V02_ALT_IP_01.IP 10.54.226.243 PKT0_V01_ALT_IP_01.IFName IF2 PKT0_V02_ALT_IP_01.IFName IF3 PKT1_V01_ALT_IP_01.IFName IF4 PKT1_V02_ALT_IP_01.IFName IF5 LOGICAL_MGMT_IP.IFName IF0
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