In this section:

Overview

Note

Cloud-init provides an alternative method to running Initial Setup on the SBC SWe Lite. For details on running Initial setup, refer to Running Initial Setup on SBC SWe Lite.

The cloud-init function is supported on all SWe Lite platforms.

The SBC SWe Lite supports the cloud-init function, which allows public clouds (such as Azure and AWS) to support automation. The cloud-init functionality allows the SBC SWe Lite to automatically deploy within an orchestrated environment. Cloud-init enables the user_data file to send the initial setup information to the VM, which creates SBC SWe Lite instances in an orchestrated manner.

Note

Both the user_data and user-data file formats are supported.

Note

The cloud-init function

  • only triggers when no user logins are configured in the system. The cloud-init function does not impact an already configured system.
  • attempts to configure the system with the supported data sources until the initial system is configured with either the cloud-init mechanism or through the WebUI. This function adds a 10 to 15 second delay at boot time.

The SBC SWe Lite supports only the config-drive and metadata server data sources. When the system initially boots, the SBC SWe Lite searches for block devices (such as a CDROM, hard drive, USB device) with the label config-2.

If the SBC SWe Lite finds a block device with the correct label, it attempts to mount with either the vfat or iso9660 file system. The SBC SWe Lite will also process the following files and directories from the config-drive:

  • openstack/
    • 2012-08-10/ or latest/
      • meta_data.json
      • user_data (not mandatory)
    • content/
      • 0000 (referenced content files) 
      • 0001
  • ec2  
    • latest/
      • meta_data.json (not mandatory)

If the SBC SWe Lite does not find a block device with the correct label, it attempts auto configuration on mgt0 and performs a REST query to the metadata server at the 169.254.169.254 IP address.

To create a config-drive image, you must configure the user_data file in the ISO image (see Creating a Config-drive Image). The user_data file contains the initial configuration data that the VNF uses for auto configuration.

Note

The ISO file is only required for the initial boot of the SBC SWe Lite.

Creating a Config-drive Image

During the SBC SWe Lite installation, use the cloud-init function to create a config-drive image.

To Create a Config-drive Image

Use one of the following procedures to create a config-drive image.

Using the cloud-localds Command

    1. Log into either the KVM Hypervisor, VMware, or Hyper-V host.
    2. Enter the following command from the clout-utils package (Linux). This creates an ISO image, which includes the contents of the user_data file.

      Note

      It is optional to enter the MACAddress information of the interface objects (mgt0, pkt0, pkt1, pkt2, and pkt3).

      If you provide this information, the cloud-init function performs the interface mapping based on the supplied MAC addresses. If you do not provide this information, the interface mapping is performed using the default PCI order.

      You must include the MACAddress information to perform interface mapping.

      cloud-localds vendorconfig.iso user_data
    3. After you create the ISO file, enter the following commands to attach it to either the KVM Hypervisor, VMware, or Hyper-V.

      Note

      Alter the vendorconfig.iso filename so it identifies the vendor and VNF name.

       <disk type="file" device="cdrom">
            <driver name="qemu" type="raw" cache="none" />
            <source file="/var/third-party/vendorname/vendorconfig.iso" />
            <readonly />
            <target dev="vdc" />
        </disk>
      
    4. Boot the SBC SWe Lite. The SBC SWe Lite performs auto configuration, and then opens the main GUI.

Creating the ISO Image Manually

Note

Use this procedure if you cannot use the cloud-utils package.

  1. Log into either the KVM Hypervisor, VMware, or Hyper-V host.
  2. Enter the following commands to navigate to the appropriate directory.

    mkdir config_drive
    mkdir /config_drive/openstack
    mkdir /config_drive/openstack/<creation date>
    cd /config_drive/openstack/
    ln –s <creation date> latest
    
  3. Enter the following information in the meta_data.json file.

    {
        <uuid>: <instance12345.mydomain.com>
    }
    
  4. Enter the following information in the user_data file.

    Note

    It is optional to enter the MACAddress information of the interface objects (mgt0, pkt0, pkt1, pkt2, and pkt3).

    If you provide this information, the cloud-init function performs the interface mapping based on the supplied MAC addresses. If you do not provide this information, the interface mapping is performed using the default PCI order.

    You must include the MACAddress information to perform interface mapping.

    {
             
        "setup": {
                "admin_account": {
                    "adminUserName": "admin",
                    "adminUserPassword": "admin"
                },
                "rest_account": {
                    "restUserName": "rest_user",
                    "restUserPassword": "rest_password"
                },
                "netconfig_account": {
                    "netconfigUserPassword": "netconfig_password"
                },
                "dns": {
                    "primaryDNSServerIP":"125.62.150.2",
                    "secondaryDNSServerIP":"125.62.150.3",
                    "hostName": "SWELite-123",
                    "domainName": "rbbn.com"
                },
                "syslog": {
                    "ServerAddress":"1.1.1.1"
     
                },
                "ntp":{
                    "Ntp1ServerName":"10.253.6.92",
                    "IsNtp1AuthEnabled":"1",
                    "Ntp1ServerKeyId":"10",
                    "Ntp1ServerKey":10
                },
                "mgt0": {
                    "adminIPAddress": "10.21.150.3",
                    "adminNetmask": "255.255.128.0",
                    "gatewayAddress": "10.21.128.1",
                    "MACAddress": "52:54:00:51:2E:4C",
                    "ifIpAddrAssignMethod": "0"
                },
                "pkt0": {
                    "applicationIPV4Address": "192.168.21.2",
                    "applicationIPV4Netmask": "255.255.255.0",
                    "MACAddress": "52:54:00:51:47:4D",
                    "ifIpAddrAssignMethod": "0",
                    "NextHopIP1": "192.168.21.1"
                },
                "pkt1": {
                    "eth2IPV4Address":"192.168.22.2",
                    "eth2IPV4Netmask":"255.255.255.0",
                    "MACAddress": "52:54:00:51:BA:4E",
                    "NextHopIP2": "192.168.22.1"
                },
                "pkt2": {
                    "eth3IPV4Address":"192.168.3.2",
                    "eth3IPV4Netmask":"255.255.255.0",
                    "MACAddress": "00:11:22:33:44:58",
                    "NextHopIP3": "192.168.3.1"
                },
                "pkt3": {
                    "eth4IPV4Address":"192.168.4.2",
                    "eth4IPV4Netmask":"255.255.255.0",
                    "MACAddress": "00:11:22:33:44:59",
                    "NextHopIP4": "192.168.4.1"
                }
            }
    }

    Modified: for 8.0.3



    Note

    Only Release 8.0.3 and later support the netconfig_account configuration.

  5. Enter the following command to save the ISO file.

    mkisofs -R -V config-2 -o vendorconfig.iso /config_drive
  6. After you create the ISO file, enter the following commands to attach it to either the KVM Hypervisor, VMware, or Hyper-V.

    Note

    Alter the vendorconfig.iso filename so it identifies the vendor and VNF name.

     <disk type="file" device="cdrom">
          <driver name="qemu" type="raw" cache="none" />
          <source file="/var/third-party/vendorname/vendorconfig.iso" />
          <readonly />
          <target dev="vdc" />
      </disk>
  7. Boot the SBC SWe Lite. The SBC SWe Lite performs auto configuration, and then opens the main WebUI.