This page describes a typical deployment workflow where a sample "primary" SBC Edge Portfolio configuration is to be applied or copied onto hundreds or thousands of SBC Edge Portfolio nodes. This can be very desirable when system administrators are trying to deploy numerous SBC Edge Portfolio systems in a network sharing the exact same configuration for all resources other than the system specific information.

Note: This is only applicable for SBC Edge Portfolio nodes sharing the same hardware configuration and release version.

The following steps outline the deployment scenario:

  1. Bootstrap the node. This step is the initial set up of the node using the WebUI. This step will create the admin user that can be used for performing the REST APIs.
    1. If any additional routes need to be setup for performing REST requests, they can be configured after the initial setup through the WebUI.
    2. If a specific user needs to be created for running the REST requests, it can be added after the initial setup through the WebUI.
  2. Login with the REST user from the REST client.
  3. Import the primary configuration file using the REST API. 
    If the request is successful, the node will reboot.
  4. Login from the REST client again.
    This is necessary the previous session was destroyed when the node rebooted as part of Step 3.
  5. Perform REST API requests to do any other system specific configuration on any resource.

Sample Code to Perform Deployment Workflow

For sample code, refer to REST API - Authentication.

How to Use the Session Token for Import Configuration Request

POST on System Resource (/rest/system?action=importconfig) Using the Session Token
// init cURL handle
$curlHandle = curl_init();

$cookieHeader = '';
// previously extracted cookies in $cookieArr (above), is used to add the
// session token in HTTP request header for subsequent REST call
foreach ($cookieArr as $key=>$value) {
    $cookieHeader .= "$key=$value; ";
}
if (!empty($cookieHeader)) {
    curl_setopt($curlHandle, CURLOPT_COOKIE, $cookieHeader);
}

// set other relevant HTTP option as shows in above section _Setting up the HTTP Options_
$headerArr = array('Accept: ' . $this->acceptType, 'Expect: 100-continue');
$requestBody = array('Filename'=>'@'.$fileName);
curl_setopt($this->curlHandle, CURLOPT_POST, true);
curl_setopt($this->curlHandle, CURLOPT_HTTPHEADER, $headerArr);
curl_setopt($this->curlHandle, CURLOPT_POSTFIELDS, $requestBody);

// Sonus SBC 1000/2000 REST system resource URL
$systemResource = "https://ux_host_or_ipaddress/rest/system?action=importconfig";

// set the system resource url in curl
curl_setopt($curlHandle, CURLOPT_URL, $systemResource );

// exec the HTTP/REST request
$response = curl_exec($curlHandle);


Unknown macro: {multi-excerpt-include}