Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Setting Up YANG-Based Orchestration of GNFs

 

Starting from Junos OS Release 17.4R1, Junos node slicing supports YANG-based abstraction to orchestrate guest network functions (GNFs), using single touchpoint.

In the single touchpoint method, a software-defined networking (SDN) controller (for example, OpenDaylight or ODL), communicates with the base system (BSYS)—that is, the BSYS acts as the single touchpoint. The BSYS receives the RPC requests from the ODL controller, parses the RPC and then forwards the adequate RPC to the JDM (based on scripts available at the BSYS). On getting the response from the JDM, the BSYS parses and forwards the response back to ODL.

Note

Junos node slicing also supports GNF life cycle management using the dual touchpoint method. In this method, ODL sends RPCs to, and receive responses from, JDM and BSYS separately. To enable dual touchpoint, you need to mount both BSYS and Juniper Device Manager (JDM) on ODL.

To enable single touchpoint, you need to perform the following steps.

Installing YANG Package on BSYS

In the node slicing setup, two servers (referred to as Server0 and Server1) are connected to an MX series router (or the BSYS). On the BSYS, you need to install the YANG package to enable communication between the BSYS and the JDM.

To install the YANG package on the BSYS, use the following command:

root@router> request system software add /var/tmp/junos-node-slicing-x86-32-17.4.tgz
Note

You need to install the same package on the backup Routing Engine as well.

After successful installation, you can find the YANG Package contents at the following location:

root@router:/opt/yang-pkg/junos-node-slicing

You can verify the package installation status on both the Routing Engines of the BSYS, using the following command:

root@router> show system yang package

Sharing the SSH Identities Between BSYS and JDM

To synchronize configurations between the BSYS and the JDM (on server0 and server1), the SSH identities need to be shared between the BSYS and the JDM. It is mandatory to share the authorization keys for passwordless authentication from BSYS to JDM.

Note
  • Ensure that server0 and server1 are up and running.

  • Ensure that you replace the jdm-server0-ip and jdm-server1-ip with proper IP addresses.

Do the following operation on BSYS for JDM on server0 and server1:

  1. Go to the BSYS shell.
    root@router> start shell
  2. Issue the following commands:
    root@router:~ # ssh-keygen -t rsa
    root@router:~ # ssh root@jdm-server0-ip mkdir -p .ssh
    root@router:~ # cat .ssh/id_rsa.pub | ssh root@jdm-server0-ip ’cat >> .ssh/authorized_keys’
    root@router:~ # ssh root@jdm-server0-ip “chmod 700 .ssh; chmod 640 .ssh/authorized_keys”
    root@router:~ # ssh-keygen -t rsa
    root@router:~ # ssh root@jdm-server1-ip mkdir -p .ssh
    root@router:~ # cat .ssh/id_rsa.pub | ssh root@jdm-server1-ip ’cat >> .ssh/authorized_keys’
    root@router:~ # ssh root@jdm-server1-ip “chmod 700 .ssh; chmod 640 .ssh/authorized_keys”

Configuring the BSYS to Communicate with JDM

Note

This is a one-time setup.

To complete the single touchpoint setup, you need to set the BSYS to communicate with the JDM. This enables the BSYS to service the RPC requests from ODL.

To enable the BSYS to communicate with the JDM, issue the following commands on the BSYS.

root@router# set jdm-configuration:jdm jdm-management server0 jdm-server0-ip-addr
root@router# set jdm-configuration:jdm jdm-management server1 jdm-server1-ip-addr
root@router# set system scripts commit file jdm-config-check.slax
root@router# set event-options policy JNS events UI_COMMIT_COMPLETED
root@router# set event-options policy JNS then event-script jdm-config-commit.slax
root@router# set event-options event-script file jdm-config-commit.slax
root@router# commit and-quit

Supported XML RPCs: YANG-Based Abstraction of GNFs

Table 1 lists the key GNF management tasks, along with the XML RPCs that are used to perform those tasks.

Note
  • In the single touchpoint method, use the XML with the prefix jdm- , as seen in Table 1 (for example, <rpc><jdm-get-route-information/></rpc>).

  • In the dual touchpoint method, use the XML without the jdm- prefix (for example, <rpc><get-route-information/></rpc>).

Table 1: Supported XML RPCs to Manage GNFs

Task

RPC

Add Junos OS package for a GNF.

<rpc>
	<jdm-request-virtual-network-functions>
		<vnf-name>
			GNF-NAME
		</vnf-name>
		<add-image>
			IMAGE-PATH
		</add-image>
		<all-servers/>
	</jdm-request-virtual-network-functions>
</rpc>

Delete Junos OS package of a GNF.

<rpc>
	<jdm-request-virtual-network-functions>
		<vnf-name>
			GNF-NAME
		</vnf-name>
		<delete-image/>
		<server0/>
	</jdm-request-virtual-network-functions>
</rpc>

Show information about a specific GNF.

<rpc>
	<jdm-get-virtual-network-functions>
		<vnf-name>
			GNF-NAME
		</vnf-name>
		<server1/>
	</jdm-get-virtual-network-functions>
</rpc>

Stop a GNF.

<rpc>
	<jdm-request-virtual-network-functions>
		<vnf-name>
			GNF-NAME
		</vnf-name>
		<stop/>
	</jdm-request-virtual-network-functions>
</rpc>

Start a GNF.

<rpc>
	<jdm-request-virtual-network-functions>
		<vnf-name>
			GNF-NAME
		</vnf-name>
		<start/>
	</jdm-request-virtual-network-functions>
</rpc>

Restart a GNF.

<rpc>
	<jdm-request-virtual-network-functions>
		<vnf-name>
			GNF-NAME
		</vnf-name>
		<restart/>
	</jdm-request-virtual-network-functions>
</rpc>

Get information about the JDM software.

<rpc>
	<jdm-get-software-information/>
</rpc>

Get route information.

<rpc>
	<jdm-get-route-information/>
</rpc>

Get information about JDM server connections.

<rpc>
	<jdm-get-server-connections/>
</rpc>

Get the list of JDM bridges.

<rpc>
	<jdm-get-bridges-list/>
</rpc>

Get information about JDM interfaces.

<rpc>
	<jdm-get-interface-information/>
</rpc>

Get list of GNFs.

<rpc>
	<jdm-get-inventory-software-vnf-information/>
</rpc>

Get the GNF visibility details.

<rpc>
	<jdm-get-visibility-vnf-information/>
</rpc>

Disabling the YANG-based Orchestration of GNFs

If you want to disable the YANG-based orchestration of GNFs, delete the YANG package. Also, in case of a software upgrade, you need to delete the existing package and install the latest one.

To delete the YANG package:

  1. Issue the following commands on the BSYS:
    root@router# delete jdm-configuration-jdm
    root@router# delete system scripts commit file jdm-config-check.slax
    root@router# delete event-options policy JNS events UI_COMMIT_COMPLETED
    root@router# delete event-options policy JNS then event-script jdm-config-commit.slax
    root@router# delete event-options event-script file jdm-config-commit.slax
    root@router# commit and-quit
  2. Issue the following command on both the master and backup Routing Engines:
    root@router> request system software delete junos-node-slicing