Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Announcement: Try the Ask AI chatbot for answers to your technical questions about Juniper products and solutions.

close
external-header-nav
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Installing the NorthStar Controller in Standalone Mode Using a HEAT Template

date_range 18-Nov-23

This topic describes installing a standalone NorthStar Controller in an OpenStack environment using a HEAT template. These instructions assume you are using one of the provided HEAT templates.

Launch the Stack

Perform the following steps to launch the stack.

  1. Create a stack from the HEAT template file using the heat stack-create command.

    content_copy zoom_out_map
    # heat stack-create stack-name -f heat-template-name --parameters 
    customer_name=instance-name;app_image=centos6-image-name;junosvm_image=
    junosvm-image-name;public_network=public-network-uuid;key_name=
    keypair-name;app_flavor=app-vm-flavor;junosvm_flavor=junosvm-flavor

Obtain the Stack Attributes

  1. Ensure that the stack creation is complete by examining the output of the heat stack-show command.

    content_copy zoom_out_map
    # heat stack-show stack-name | grep stack_status
  2. Obtain the UUID of the NorthStar Controller VM and the JunosVM instances by executing the resource-list command.

    content_copy zoom_out_map
    # heat resource-list stack-name | grep ::Server
  3. Using the UUIDs obtained from the resource-list command output, obtain the associated IP addresses by executing the interface-list command for each UUID.

    content_copy zoom_out_map
    # nova interface-list uuid
  4. Once the NorthStar Controller VM finishes its booting process, you should be able to ping its public IP address.

    Note:

    You can use the nova console-log command to monitor the booting status.

    At this point, the NorthStar Controller VM is remotely accessible, but the JunosVM is not because it does not support DHCP. Once the NorthStar Controller RPM bundle installation is completed, the JunosVM can be remotely accessed.

  5. Connect to the NorthStar Controller VM using SSH.

    If you are using a different SSH key from the one that is defined in the HEAT template, the default credentials are root/northstar and centos/northstar.

Resize the Image

The CentOS 6 official cloud image does not resize correctly for the selected OpenStack flavor. This results in the NorthStar Controller VM filesystem size being set at 8G instead of the size that is actually specified by the flavor. Using the following procedure, you can adjust your filesystem to be in sync with the allocated disk size. Alternatively, you can hold off on the resizing procedure until after you complete the NorthStar Controller RPM bundle installation. There is a resize-vm script inside /opt/northstar/utils/.

CAUTION:

The fdisk command can have undesirable effects if used inappropriately. We recommend that you consult with your system administrator before proceeding with this workaround, especially if you are unfamiliar with the fdisk command.

  1. Determine whether the size of the VM is correct. If it is correct, you do not need to proceed with resizing.

    content_copy zoom_out_map
    # ssh centos@App_Public_IPv4
    Warning: Permanently added '172.25.158.161' (RSA) to the list of known hosts.
    
    [centos@app_instance ~]$ df -h
    Filesystem      Size  Used Avail Use% Mounted on
    /dev/vda1       7.8G  646M  6.8G   9% /
    tmpfs           1.9G     0  1.9G   0% /dev/shm
  2. Use the fdisk command to recreate the partition.

    content_copy zoom_out_map
    # ssh centos@App_Public_IPv4
    Warning: Permanently added '172.25.158.161' (RSA) to the list of known hosts.
    
    [user@demo-northstar-app centos]# fdisk /dev/vda
    
    WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
            switch off the mode (command 'c') and change display units to
            sectors (command 'u').
    
    Command (m for help): c
    DOS Compatibility flag is not set
    
    Command (m for help): u
    Changing display/entry units to sectors
    
    Command (m for help): p
    
    Disk /dev/vda: 85.9 GB, 85899345920 bytes
    255 heads, 63 sectors/track, 10443 cylinders, total 167772160 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00050c05
    
    Device Boot      Start         End      Blocks   Id  System
    /dev/vda1   *        2048    16777215     8387584   83  Linux
    
    Command (m for help): d
    Selected partition 1
    
    Command (m for help): n
    Command action
    e   extended
    p   primary partition (1-4)
    p
    Partition number (1-4): 1
    First sector (2048-167772159, default 2048):
    Using default value 2048
    Last sector, +sectors or +size{K,M,G} (2048-167772159, default 167772159):
    Using default value 167772159
    
    Command (m for help): w
    The partition table has been altered!
    
    Calling ioctl() to re-read partition table.
    
    WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
    The kernel still uses the old table. The new table will be used at
    the next reboot or after you run partprobe(8) or kpartx(8)
    Syncing disks.
    [user@demo-northstar-app centos]#
    
  3. Reboot the VM to apply the partition changes.

    content_copy zoom_out_map
    [user@app_instance centos]# reboot
    
    Broadcast message from centos@app_instance
        (/dev/pts/0) at 14:54 ...
    
    The system is going down for reboot NOW!
    
  4. Wait until the NorthStar Controller VM has returned to an up state.

  5. Reconnect to the VM using SSH.

  6. Check the partition size again to verify that the partition was resized.

  7. If the partition size is still incorrect, use the resize2fs command to adjust the filesystem.

    content_copy zoom_out_map
    # resize2fs /dev/vda1

Install the NorthStar Controller RPM Bundle

Install the NorthStar Controller RPM bundle for an OpenStack environment as described in Installing the NorthStar Controller. The procedure uses the rpm and install-vm.sh commands.

Configure the JunosVM

For security reasons, the JunosVM does not come with a default configuration. Use the following procedure to manually configure the JunosVM using the OpenStack novnc client.

  1. Obtain the novnc client URL.

    content_copy zoom_out_map
    # nova get-vnc-console JunosVM-ID novnc
  2. Configure the JunosVM as you would in a fresh install of the Junos OS.

  3. Copy the root user of the NorthStar Controller VM SSH public key to the JunosVM. This allows configuration from the NorthStar Controller VM to the JunosVM using an ssh-key based connection.

  4. On the NorthStar Controller VM, run the net_setup.py script, and select option B to complete the configuration of the JunosVM. Once complete, you should be able to remotely ping the JunosVM IP address.

Configure SSH Key Exchange

Use the following procedure to configure SSH key exchange between the NorthStar Controller VM and the JunosVM.

  1. Log in to the NorthStar Controller server and display the contents of the id_rsa.pub file by executing the concatenate command.

    content_copy zoom_out_map
    $cat /opt/pcs/.ssh/id_rsa.pub

    You will need the ssh-rsa string from the output.

  2. Log in to the JunosVM and replace the ssh-rsa string with the one from the id_rsa.pub file by executing the following commands.

    content_copy zoom_out_map
    ssh northstar@JunosVM-ip
    configure
    set system login user northstar authenication ssh-rsa replacement-string
    commit
    exit
  3. On the NorthStar Controller server, update the known hosts file by executing the following commands.

    content_copy zoom_out_map
    $su - pcs
    $ssh -o UserKnownHostsFile=/opt/pcs/.ssh/known_hosts -i /opt/pcs/.ssh/id_rsa northstar@JunosVM-ip
    exit
    exit
external-footer-nav