Activating a license on the controller

To activate a license on the controller, you must add the license key. If the controller has no licenses listed, enter the license key for the HPE VAN SDN Ctrl Base SW w/50–node E-LTU before you add any other license keys.

There are several ways to activate a license on the controller:

Adding and activating a license using the controller UI

Use the following procedure to add and activate a license using the controller UI.

  1. In the controller UI, from the navigation menu, select Licenses.

  2. On the Licenses screen, enter the license key you acquired in Registering your license and obtaining a license key in the text box next to the Add button.

    Entering the key in the field enables the Add button.

    Enter the License Key

    Enter the License Key
  3. To activate the license, click the Add button.

    The active license is displayed in the table, below the Install ID, and the Add button is no longer available.

    Active License Displayed on License screen

    Active License Displayed on License screen

Activating a license using a script or playbook

As an alternative to using the controller UI to activate the license, you can use either a post install configuration script run locally on the controller or you can use a playbook run remotely from the SDN toolkit VM. For information on other post install configuration options using the script or playbook, see the HPE VAN SDN Controller Installation Guide chapter on post install configuration.

The post install configuration Python script is run on the local controller machine. The script is /opt/sdn/scripts/postinstall/config_sdn.py. You can run it interactively or you can use a configuration file to enter the inputs for activating the license. The default configuration file is /opt/sdn/scripts/ansible/config_sdn.conf or you can create a custom configuration file for use with the script.

The post install configuration playbook is run on the SDN toolkit VM. The playbook is /home/sdn/scripts/ansible/config_sdn.yml. The playbook uses the configuration file to define the inputs and uses the hosts file to identify the controller where you want to activate the license. On the SDN toolkit VM, the default configuration file is /home/sdn/scripts/ansible/config_sdn.conf or you can create a custom configuration file for use with the playbook.

To run the config_sdn.py script to activate the controller license:

  1. To use the script you must ssh to the controller system. For example, ssh sdn@1.1.1.1 (then enter the ssh password).

  2. You can run the script either interactively or with a configuration file as follows:

    • If you are running the script interactively without a configuration file, enter the option for add license on the command line: python config_sdn.py -L. You will be prompted to enter the license key.

    • If you are using the configuration file to enter inputs for the script, edit the config_sdn.conf file or create a custom configuration file. In the [general] section enter the controller IP, user name and (optionally) password. If you don’t enter a password in the configuration file, you will be prompted to enter the password when you run the script. In the [scripts] section set addlicense=true. In the [addlicense] section enter the license key. Then run the script with the following command:

      python config_sdn.py -f ../ansible/config_sdn.conf (or whatever the custom configuration file name is)

  3. Respond to any prompts as the script runs.

To run the config_sdn.yml playbook to activate the license on one or more controllers:

  1. The playbook must be run from the SDN toolkit VM, so access that system. The playbook is located at /home/sdn/scripts/ansible/config_sdn.yml.

  2. Edit the config_sdn.conf file or create a custom configuration file. In the [general] section enter the user name. In the [scripts] section set addlicense=true. In the [addlicense] section enter the license key. If you are activating the license on more than one controller, create additional configuration files, each with the correct license key.

  3. Edit the hosts file to specify the controller you want to activate the license on. The hosts file is located on the SDN toolkit VM in the /home/sdn/scripts/ansible directory. You specify the IP address of the controller you want to configure and the user and password needed to ssh to the controller, by editing the [hpsdn_post_config] section of the hosts file. The following is an example of the [hpsdn_post_config] section of the hosts file:

    [hpsdn_post_config]

    192.0.123.5 ansible_ssh_user=user ansible_ssh_pass=password

    #xxx.xxx.xxx ansible_ssh_user=<username> ansible_ssh_pass=<password>

    Enter the following:

    • Enter the IP address of the controller you want to configure. You must be able to connect to the controller IP from the SDN toolkit VM when running the playbook so the controller systems must be up. If the IP address you enter is not valid or cannot be connected to, a fail connection error is returned and the playbook exits without doing the configuration.

    • Enter the username and password needed to ssh to the controller system.

  4. Run the playbook: ansible-playbook config_sdn.yml -i hosts.

  5. Enter the login password when prompted.

  6. At the next prompt, enter the path to the configuration file you want to use with this run of the playbook.

  7. Check for errors and messages as the playbook runs.