Installing Licenses with the License Tool
The license tool enables you to install and retrieve license information through a command line interface (CLI).
The license installation tool uses the following syntax:
./license_install_util.sh -i license-id -p license-path -t tenant-name - -sitefile site-list-path - -install_license - -get_license_info - -service
firewall | utm | nat
Table 1 describes the arguments and variables for the tool.
Table 1: Keywords and Variables for the License Tool
Arguments and Variables | Function | Requirement |
---|---|---|
-i license-id | Specifies the identifier of the license. | Mandatory for license installation |
-p license-path | Specifies the path to the license file. | Mandatory for license installation |
-t tenant-name | Specifies the name of the customer in Contrail Service Orchestration. |
|
- -sitefile site-list-path | Specifies the path to a text file that contains a list of comma- or newline-separated sites in Contrail Service Orchestration. | Use for operations concerning multiple customers or a subset of sites for a single customer. |
- -install_license | Installs licenses. | Requires either the -t or the sitefile option |
- -get_license_info | Extracts licenses information | Requires either the -t or the sitefile option |
- -service firewall | utm | nat | Specifies the network function for the license. | Mandatory if the site hosts multiple VNFs |
- Accessing and Setting Up the License Tool
- Installing a License on All Sites for One Customer
- Installing a License for a Specific Service on All Sites for One Customer
- Installing a License on One or More Sites for Multiple Tenants
- Installing a License for a Specific Service on One or More Sites for Multiple Tenants
- Viewing License Information for One Customer’s Sites
- Viewing License Information for One or More Sites
Accessing and Setting Up the License Tool
You run the license tool on the installer VM.
To access and set up the license tool:
- Log in to the installer VM as root.
- Access the directory
that contains the installer. For example, if the name of the installer
directory is
csoVersion
root@host:~/# cd csoVersion
- Specify the following environment variables:
- OS_AUTH_URL—URL of the OpenStack Keystone that authorizes Contrail Service Orchestration, including the IP address of the OpenStack Keystone host, port 35357 and the OpenStack version
- OS_USERNAME—Username for Contrail Service Orchestration
- OS_PASSWORD—Password for Contrail Service Orchestration
- OS_TENANT_NAME—OpenStack tenant name, admin
- TSSM_IP—IP address of the central microservices host
- Regional IP—IP address of the regional microservices host
For example:
root@host:~/#export OS_AUTH_URL=http://192.0.2.0:35357/v2.0
root@host:~/#export OS_USERNAME=cspadmin
root@host:~/#export OS_PASSWORD=passw0rd
root@host:~/#export OS_TENANT_NAME=admin
root@host:~/#export TSSM_IP=192.2.0.1
root@host:~/#export REGION_IP=192.0.2.2
Installing a License on All Sites for One Customer
To install a license on all sites for one customer:
- Run the tool with the following options (see Table 1).
./license_install_util.sh -i license-id -p license-path -t tenant-name - -install_license
For example:
root@host:~/#./license_install_util.sh -i JUNOS000001 -p licenses/vsrx-utm-license.txt -t test-customer - -install_license
Total Sites: 2 Site count for successful license install: 2 Site count for failed license install: 0
- (Optional) Review the
license_install_results.log
for detailed results.***License Install Status *** Response:SUCCESS Site: jd8-site-1 vSRX IP: 10.102.82.36 License Info: license": [ { "license_id": "JUNOS000001", "install_status": success } ] Response:SUCCESS Site: jd8-site-2 vSRX IP: 10.102.82.2 License Info: license": [ { "license_id": "JUNOS000001", "install_status": success } ]
- If there is a problem with the license installation, review
the
license_install.log
file for troubleshooting information.
Installing a License for a Specific Service on All Sites for One Customer
If you use more than one VNF at a site, you must specify the service when you install the license.
To install a license on all sites for a specific customer:
- Run the tool with the following options (see Table 1).
./license_install_util.sh -i license-id -p license-path -t tenant-name -s service-name - -install_license
For example:
root@host:~/#./license_install_util.sh -i JUNOS000001 -p licenses/vsrx-utm-license.txt -t test-customer -s firewall - -install_license
Total Sites: 2 Site count for successful license install: 2 Site count forfailed license install: 0
- (Optional) Review the
license_install_results.log
for detailed results. - If there is a problem with the license installation, review
the
license_install.log
file for debugging information.
Installing a License on One or More Sites for Multiple Tenants
To install a license on one or more sites:
- Create a text file of site names, separated by commas or newline characters.
- Run the tool with the following options (see Table 1).
./license_install_util.sh -i license-id -p license-path - -sitefile site-file-name - -install_license
For example:
root@host:~/#./license_install_util.sh -i JUNOS000001 -p licenses/vsrx-utm-license.txt - - sitefile sites.txt
Total Sites: 2 Site count for successful license install: 2 Site count for failed license install: 0
- (Optional) Review the
license_install_results.log
for detailed results. - If there is a problem with the license installation, review
the
license_install.log
file for debugging information.
Installing a License for a Specific Service on One or More Sites for Multiple Tenants
To install a license on one or more sites:
- Create a text file of site names, separated by commas or newline characters.
- Run the tool with the following options (see Table 1).
./license_install_util.sh -i license-id -p license-path - -sitefile site-list-path - -install_license
For example:
root@host:~/#./license_install_util.sh -i JUNOS000001 -p licenses/vsrx-utm-license.txt - -sitefile sites.txt - -service utm
Total Sites: 2 Site count for successful license install: 2 Site count for failed license install: 0
- (Optional) Review the
license_install_results.log
for detailed results. - If there is a problem with the license installation, review
the
license_install.log
file for debugging information.
Viewing License Information for One Customer’s Sites
To view license information for one customer’s sites:
- Run the tool with the following options (see Table 1).
./license_install_util.sh -i license-id -p license-path -t tenant-name - -get_license_info
For example:
root@host:~/#./license_install_util.sh -i JUNOS000001 -p licenses/vsrx-utm-license.txt -t test-tenant - -get_license_info
root@host:~/#./license_install_util.sh -i JUNOS000001 -p licenses/vsrx-utm-license.txt - -sitefile sites.txt - -get_license_info
Total Sites: 2 Site count for successful license info retrieval: 2 Site count for failed license info retrieval: 0 Refer license_install_results.log for detailed results, license_install.log for debug logs.
- (Optional) Review the
license_install_results.log
for detailed results.***License Information *** Site: jd8-site-1 vSRX IP: 10.102.82.36 License Info: license": [ { "license_id": " JUNOS000001", "install_status": success } ] Site: jd8-site-2 vSRX IP: 10.102.82.2 License Info: license": [ { "license_id": " JUNOS000001", "install_status": success } ]
- If there is a problem with operation, review the
license_install.log
file for debugging information.
Viewing License Information for One or More Sites
To view license information for one or more sites:
- Create a text file of site names, separated by commas or newline characters.
- Run the tool with the following options (see Table 1).
./license_install_util.sh -i license-id -p license-path - -sitefile site-list-path - -get_license_info
For example:
root@host:~/#./license_install_util.sh -i JUNOS000001 -p licenses/vsrx-utm-license.txt - -sitefile sites.txt - -get_license_info
Total Sites: 2 Site count for successful license info retrieval: 2 Site count for failed license info retrieval: 0 Refer license_install_results.log for detailed results, license_install.log for debug logs.
- (Optional) Review the
license_install_results.log
for detailed results.***License Information *** Site: jd8-site-1 vSRX IP: 10.102.82.36 License Info: license": [ { "license_id": " JUNOS000001", "install_status": success } ] Site: jd8-site-2 vSRX IP: 10.102.82.2 License Info: license": [ { "license_id": " JUNOS000001", "install_status": success } ]
- If there is a problem with operation, review the
license_install.log
file for debugging information.