Adding Citrix ADC CPX Instances to Citrix ADM
You must add the Citrix ADC CPX instances installed on a Docker host to Citrix Application Delivery Management (ADM) software if you want to manage and monitor these instances.
You can add instances either while setting up ADM for the first time or later.
To add instances, you must create an instance profile and specify either the host name or IP address of each instance, or a range of IP addresses. This instance profile contains the user name and password of the instances that you want to add to Citrix ADM. For each instance type, a default profile is available. For example, the
ns-root-profile is the default profile for Citrix ADC instances. This profile is defined by the default ADC administrator credentials. If you have changed the default admin credentials of your instances, you can define custom instance profiles for those instances. If you change the credentials of an instance after the instance is discovered, you must edit the instance profile or create a profile, and then rediscover the instance.
Make sure that you have:
- Installed the Citrix ADM software on Citrix XenServer. For more information, see Citrix ADM Documentation.
- Installed the Citrix ADC CPX instances on a Docker host.
To add Citrix ADC CPX instances to ADM:
In a web browser, type the IP address of the Citrix Application Delivery Management (for example,
In the User Name and Password fields, enter the administrator credentials. The default administrator credentials are nsroot and nsroot.
Navigate to Networks > Instances > Citrix ADC and click CPX tab.
Click Add to add new CPX instances in Citrix ADM.
The Add Citrix ADC CPX page opens. Enter the values for the following parameters:
- You can add CPX instances by providing either the reachable IP address of the CPX instance or the IP address of the Docker container where the CPX instance is hosted.
- Select the profile of the CPX instance.
- Select the site where the instances are to be deployed.
- Select the agent.
As an option, you can enter the key-value pair to the instance. Adding a key-value pair makes it easy for you to search for the instance later.
If you want to rediscover an instance, choose Networks > Instances > Citrix ADC > CPX, select the instance you want to rediscover, and then from the Select Action drop-down list, click Rediscover.
Adding Citrix ADC CPX instances to Citrix ADM using environment variables
You can also add the Citrix ADC CPX instances to Citrix ADM using environment variables. To add instances, you must configure the following environment variables for the Citrix ADC CPX instance.
NS_MGMT_SERVER- ADM IP address/FQDN
HOST- Node IP address
NS_HTTP_PORT- Mapped HTTP port on node
NS_HTTPS_PORT- Mapped HTTPS port on node
NS_SSH_PORT- Mapped SSH port on node
NS_SNMP_PORT- Mapped SNMP port on node
NS_ROUTABLE- (Citrix ADC CPX pod IP address is not routable from outside.)
NS_MGMT_USER– ADM username
NS_MGMT_PASS– ADM password
The following is an example
docker run command for adding a Citrix ADC CPX instance to Citrix ADM.
docker run -dt --privileged=true -p 9080:9080 -p 9443:9443 -p 9022:22 -p 9161:161 -e EULA=yes -e NS_MGMT_SERVER=abc-mgmt-server.com -e HOST=10.1.1.1 -e NS_HTTP_PORT=9080 -e NS_HTTPS_PORT=9443 -e NS_SSH_PORT=9022 -e NS_SNMP_PORT=9161 -e NS_ROUTABLE=0 --ulimit core=-1 –name test cpx:latest <!--NeedCopy-->
Adding Citrix ADC CPX instances to Citrix ADM using Kubernetes ConfigMaps
Citrix ADC CPX supports registration with Citrix ADM by using volume mounted files through Kubernetes ConfigMaps. To enable this way of registration, Citrix ADC CPX requires some environment variables which are to be specified along with some volume mounted files through ConfigMaps and Secrets.
The following are the required environment variables and their description:
NS_HTTP_PORT- Specifies mapped HTTP port on node.
NS_HTTPS_PORT- Specifies mapped HTTPS port on node.
NS_SSH_PORT- Specifies mapped SSH port on node.
NS_SNMP_PORT- Specifies mapped SNMP port on node.
Apart from the listed environment variables, Citrix ADC CPX requires information about the ADM agent with which it has to register. This information contains ADM agent’s IP address or FQDN details and credentials. Citrix ADC CPX acquires this information from the volume mounted files. A ConfigMap containing the IP address or FQDN is mounted as a file in the file-system of the Citrix ADC CPX instance. A Kubernetes secret containing credentials for the ADM agent is also mounted as a file in the Citrix ADC CPX instance’s file-system. With all the information required for registration, Citrix ADC CPX attempts to register with the ADM agent.
The following is an example of a Citrix ADC CPX YAML file snippet with the ConfigMap and Secret mounted as files:
… env: - name: "EULA" value: "yes" - name: "NS_HTTP_PORT" value: "9080" - name: "NS_HTTPS_PORT" value: "9443" - name: "NS_SSH_PORT" value: "22" - name: "NS_SNMP_PORT" value: "161" - name: "KUBERNETES_TASK_ID" value: "" … volumeMounts: … - mountPath: /var/adminfo/server/ name: adm-agent-config - mountPath: /var/adminfo/credentials/ name: adm-agent-user … volumes: … - name: adm-agent-config configMap: name: adm-agent-config - name: adm-agent-user secret: secretName: adm-secret
In the preceding example, a ConfigMap named
adm-agent-config and a secret
adm-agent-user are consumed. The following is an example for creating the required ConfigMap and Secret.
ConfigMap: The ConfigMap is created from a file named
adm_reg_envs. The file requires the IP address or FQDN of the ADM agent in the following format:
In the preceding format, the
adm-agent is the FQDN of the ADM agent to which the Citrix ADC CPX instance needs to be registered.
Use the following command to create a ConfigMap:
kubectl create configmap adm-agent-config --from-file=adm_reg_envs
Note: The file name must have the
adm_reg_envs variable and it must be mounted to the path:
Secret: Use the following command to create a Kubernetes secret. In the following command,
user123 is the user name of the ADM agent and
pass123 is the password.
kubectl create secret generic adm-secret --from-literal=NS_MGMT_USER=user123 --from-literal=NS_MGMT_PASS=pass123
A Citrix ADC CPX instance can be deployed in a Kubernetes cluster with the required environment variables and volume mounted files even before deploying the ADM agent in the cluster. If you deploy a Citrix ADC CPX instance before deploying the ADM agent, Citrix ADC CPX keeps on trying to get registered until the ADM agent is deployed. Once the ADM agent is deployed, the Citrix ADC CPX instance uses the configuration data provided through the environment variables and volume mounted files to register with the ADM agent. It helps you to avoid the redeployment of Citrix ADC CPX with the configuration information.
A Citrix ADC CPX instance, that is already registered with an ADM agent, can dynamically change the registration to another ADM agent after a change in the configuration. For this, you can update configuration information in the ConfigMap and the Secret for the already deployed Citrix ADC CPX. You must update the file from which the ConfigMap is created with the IP address or FQDN of the new ADM agent and delete the old ConfigMap and, then create a new ConfigMap. Similarly, the existing secret must be deleted and a new secret must be created with the credentials for the new ADM agent.