B VNF Metadata and Userdata Example
The Heat templates provided by Oracle support the Newton and Pike releases. The following information may be useful for users who wish to implement their own orchestration template files for a different Openstack release.
For information about the OpenStack metadata and userdata files, see the OpenStack documentation.
Note:
When using the Heat template with the Newton or Pike releases, customers do not create, modify, delete, or interact with the OpenStack metadata and userdata files.Metadata JSON Schema
{
"meta": {
"bootparams.console": {
"type": "string"
},
"bootparams.gateway": {
"type": "string"
},
"bootparams.hostname": {
"type": "string"
},
"bootparams.ip0": {
"type": "string"
},
"bootparams.ip6": {
"type": "string"
},
"bootparams.ip6gateway": {
"type": "string"
},
"bootparams.netmask0": {
"type": "string"
},
"bootparams.vlan": {
"type": "string"
},
"cores.dos": {
"type": "string"
},
"cores.forwarding": {
"type": "string"
},
"cores.transcoding": {
"type": "string"
},
"cores.useSibling": {
"type": "string"
},
"entitlements.FEATURE_ACCOUNTING": {
"type": "string"
},
"entitlements.FEATURE_ADMIN_SECURITY": {
"type": "string"
},
"entitlements.FEATURE_BFD": {
"type": "string"
},
"entitlements.FEATURE_IPV6": {
"type": "string"
},
"entitlements.FEATURE_IWF": {
"type": "string"
},
"entitlements.FEATURE_QOS": {
"type": "string"
},
"entitlements.FEATURE_R226": {
"type": "string"
},
"entitlements.FEATURE_SAG": {
"type": "string"
},
"entitlements.FEATURE_SESSION_RECORDING": {
"type": "string"
},
"entitlements.Policy Server": {
"type": "string"
},
"entitlements.Product Type": {
"type": "string"
},
"entitlements.Routing": {
"type": "string"
},
"entitlements.capacity": {
"type": "string"
},
"entitlements.xcode-amr-cap": {
"type": "string"
},
"entitlements.xcode-amrwb-cap": {
"type": "string"
},
"entitlements.xcode-evs-cap": {
"type": "string"
},
"entitlements.xcode-opus-cap": {
"type": "string"
},
"entitlements.xcode-silk-cap": {
"type": "string"
},
"format.disk": {
"type": "string"
},
"license.key1": {
"type": "string"
},
"mactab.s0p0": {
"type": "string"
},
"mactab.s0p1": {
"type": "string"
},
"mactab.s1p0": {
"type": "string"
},
"mactab.s1p1": {
"type": "string"
},
"mactab.wancom0": {
"type": "string"
},
"mactab.wancom1": {
"type": "string"
},
"mactab.wancom2": {
"type": "string"
},
"partitions.app": {
"type": "string"
},
"partitions.cpp": {
"type": "string"
},
"passwords.adminPass": {
"type": "string"
},
"passwords.userPass": {
"type": "string"
}
},
"type": "object"
}
Example of meta_data.json
{
"admin_pass": "QqTUH3eFqAY8",
"availability_zone": "nova",
"devices": [],
"hostname": "sbc-vm.novalocal",
"launch_index": 0,
"meta": {
"bootparams.console": "VGA",
"bootparams.gateway": "10.1.1.1",
"bootparams.hostname": "sbc-vm",
"bootparams.ip0": "10.1.1.2",
"bootparams.ip6": "3fff:ac4:8001::ac4:a523/64",
"bootparams.ip6gateway": "3fff:ac4:8001::ac4:8001",
"bootparams.netmask0": "255.255.225.0",
"bootparams.vlan": "0",
"cores.dos": "1",
"cores.forwarding": "1",
"cores.transcoding": "0",
"cores.useSibling": "disabled",
"entitlements.FEATURE_ACCOUNTING": "enabled",
"entitlements.FEATURE_ADMIN_SECURITY": "disabled",
"entitlements.FEATURE_BFD": "disabled",
"entitlements.FEATURE_IPV6": "disabled",
"entitlements.FEATURE_IWF": "disabled",
"entitlements.FEATURE_QOS": "disabled",
"entitlements.FEATURE_R226": "disabled",
"entitlements.FEATURE_SAG": "disabled",
"entitlements.FEATURE_SESSION_RECORDING": "disabled",
"entitlements.Policy Server": "disabled",
"entitlements.Product Type": "Session Border Controller",
"entitlements.Routing": "disabled",
"entitlements.capacity": "10000",
"entitlements.xcode-amr-cap": "0",
"entitlements.xcode-amrwb-cap": "0",
"entitlements.xcode-evs-cap": "0",
"entitlements.xcode-opus-cap": "0",
"entitlements.xcode-silk-cap": "0",
"format.disk": "true",
"license.key1": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0123456789ABCDE",
"license.key2": "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz0123456789ABCDE",
"mactab.s0p0": "fa:16:3f:15:8f:30",
"mactab.s0p1": "none",
"mactab.s1p0": "fa:16:3f:11:ee:4c",
"mactab.s1p1": "none",
"mactab.wancom0": "fa:16:3f:2d:13:94",
"mactab.wancom1": "none",
"mactab.wancom2": "none",
"partitions.app": "50%",
"partitions.cpp": "40%",
"passwords.adminPass": "b44dda1dadd351948fcace1856ed97366e679239",
"passwords.userPass": "b44dda1dadd351948fcace1856ed97366e679239"
},
"name": "sbc-vm",
"network_config": {
"content_path": "/content/0000",
"name": "network_config"
},
"project_id": "cf6ffe0ffaa1430497597d8756d61cf0",
"random_seed": "0YSCvaLjZDKp2rNV67ZBI3iMuYaBiULOGQKndRlzXN3IkI8XIctZo4U5iKD81g2auJCBGeAJSeEpA+RgfUcqTY+NvTbQdX8rQDV3meB6kOr0QAQgotGk9Xtnix8rAhQW2iEUkJXG1mOl0MUzGp5Pfg40gwbqlwKjj3t1WMpgOCFfODUAu4d/n2MSKjXuJh1Xz6eSdBMJsvJ6QQlOXPut/VPNXx628=",
"uuid": "71a99c78-9518-4581-88b2-15c6bd6e19f7"
}
Metadata Parameters
Table B-1 Supported Metadata Objects
Metadata Key | Description |
---|---|
bootparams.console | The console to which the bootparams print. |
bootparams.hostname | The VM's hostname.
For HA, the primary and secondary hostnames must be unique. |
bootparams.netmask0 | The IPv4 netmask for wancom0. Derived from the Netmask of the OpenStack network connected to the wancom0 interface. |
bootparams.gateway | The IPv4 default gateway for wancom0. |
bootparams.ip0 | The IPv4 address for wancom0. |
bootparams.vlans | Set this value only if the VM needs to aware of the VLAN ID for wancom0. |
bootparams.ip6 | The IPv6 address with prefix for wancom0. Derived
from the Newtron Port allocated for wancom0. Use CIDR notation, for
example, 2001:DB8::1/48 .
|
bootparams.ip6gateway | The IPv6 gateway address. Leave blank if not using IPv6. |
mactab.wancom0 mactab.wancom1 mactab.wancom2 mactab.s0p0 mactab.s1p0 mactab.s0p1 mactab.s1p1 |
The MAC address for each interface. Derived from the network port allocated for each interface. Required to map vNICs to their corresponding roles as management and media interfaces. |
passwords.userPass passwords.adminPass |
SHA1 hashes for the user and admin accounts. |
entitlements.Product Type | Allows you to configure the product. For example:
|
entitlements.<entitlement-name> | Allows you to set the entitlements for this instance.
For example:
Ignored
if Product Type is not set. |
cores.dos cores.forwarding cores.transcoding |
Number of cores to assign to DOS, Forwarding, and Transcoding. |
cores.useSibling | If SMT topology is exposed by the hypervisor, you can enable sibling cores for datapath usage. Disabled by default. |
license.key1 license.key2 license.key<n> |
The set of license keys. |
partitions.<name1> partitions.<name2> partitions.<name3> partitions.<name4> |
Data disk partitions to be created during
deployment. The maximum number of partitions are 4, and the value
should be the percentage of the disk to be allocated. For example:
|
format.disk | Set to "true" to enable formatting the SBC's system-disk and data-disk. Parameter is valid only if the partitions have been specified. Set to "false" to format only the data-disk. |
User Data Tokens
Table B-2 User Data Tokens
S. No | Token Name | Token value |
---|---|---|
1 | ${hostname} | Target hostname of the VM |
2 | ${forwardingCores} | Number of forwarding cores |
3 | ${dosCores} | Number of DoS cores |
4 | ${transcodingCores} | Number of transcoding cores |
5 | ${useSiblingCoreDatapath} | Enable or disable sibling cores for datapath usage |
6 | ${snmpCommunityName} | SNMP community name |
7 | ${snmpIpAddress} | SNMP IP address in dot-decimal notation |
8 | ${ntpServer1} | First NTP IP address in dot-decimal notation |
9 | ${ntpServer2} | Second NTP IP address in dot-decimal notation |
Example Configuration
The example configuration shows the tokens that will be replaced during
the deployment of a virtual SBC. Tokens use
the syntax ${token-name}
.
<config lastObjectId='11' schemaVersion='ECZ9.0.0/0' versionStr='ECZ9.0.0 GA (Build 59)'>
<systemConfig hostname='${hostname}'
descr=''
location=''
sysContact=''
sysName=''
sysLocation=''
acp-tls-profile=''
enableSnmp='enabled'
snmpAuth='disabled'
slogNotification='disabled'
enableSnmpMonitor='disabled'
enableEnvMonitor='disabled'
enableMblkTracking='disabled'
enableL2MissReport='enabled'
slogHistLen='1'
slogLevel='WARNING'
systemLogLevel='WARNING'
processLogLevel='NOTICE'
logIpAddr='0.0.0.0'
logPort='0'
callTrace='disabled'
internalTrace='disabled'
logFilter='all'
defaultGW=''
reboot='enabled'
reboot-exceptions=''
telnet-timeout='0'
console-timeout='0'
remote-control='enabled'
cliAudit='enabled'
sourcerouting='disabled'
cliMore='disabled'
cliMoreHeight='24'
debug-timeout='0'
trapEventLifeTime='0'
idsSyslogFacility='-1'
options=''
defaultGWv6=''
ipv6Mtu='1500'
ipv4Mtu='1500'
ipv6Support='enabled'
cleanupTimeOfDay='00:00'
snmpEngineIDSuffix=''
snmpAgentMode='v1v2'
dpdkForwardCores='${forwardingCores}'
dpdkDosCores='${dosCores}'
dpdkXcodeCores='${transcodingCores}'
siblingCoreDpdkUsage='${useSiblingCoreDatapath}'
lastModifiedBy='admin@console'
lastModifiedDate='2018-01-16 17:46:11' objectId='1'>
<collectConfig sampleInt='5'
pushInt='15'
mode='disabled'
startTime='0'
endTime='0'
redCollectPort='0'
redNumTrans='1000'
redSyncStartTime='5000'
redSyncCompTime='1000'
pushSuccessTrapEnabledState='disabled'/>
<commMonitor state='disabled'
sbcGrpId='0'
tlsProfile=''
enableQos='enabled'
interimQoSUpdate='disabled'/>
</systemConfig>
<snmpCommunity communityName='${snmpCommunityName}'
accessMode='READ-ONLY'
lastModifiedBy='admin@10.196.0.194'
lastModifiedDate='2018-01-24 22:40:59' objectId='7'>
<key>${snmpCommunityName}</key>
<ipAddresses addr='${snmpIpAddress}' numBits='0'/>
</snmpCommunity>
<ntpConfig lastModifiedBy='admin@10.196.0.18'
lastModifiedDate='2018-03-28 16:55:15' objectId='11'>
<servers name='${ntpServer1}'/>
<servers name='${ntpServer2}'/>
</ntpConfig>
</config>