Skip to content

1. Productize your xApp

When the developers are happy with a version of the xApp, they can prepare it for production mode. This means that we won’t use the developer mode options in the xApp Helm Chart, which will result in the xApp starting immediately on deployment, as opposed to creating a sandbox which the developer mode does. Also, this means we can prepare the Docker image using the Dockerfile instead of Dockerfile.dev.

1.1 Prepare your xApp

We assume you have already cloned the xApp Framework Git repository, and have edited your code and helm chart using the xApp Dev Environment and workflows in the Development Workflows section or creating your own xApp Development Environment from section Build your own xApp Dev Env. We will now first prepare everything for productizing the xApp.

The python files that you have developed should be readily available. This includes the mandatory xapp_main.py which is the main python file to start the xApp.

1.2 Build xApp Core Docker image

Use the Dockerfile (not the Dockerfile.dev) from the example folder of the xApp Framework. Edit it so that it copies over all your files into the xApp Core Docker image. Finally issue the build command:

sudo docker build -t my-xapp:1.0.0 --build-arg username=<GITHUB_USERNAME> --build-arg token=<GITHUB_TOKEN> -f Dockerfile .

NOTE: The . at the end specifies the Docker build context, hence it should point to where you python files are located.

1.3 (Optional) Make xApp Core Docker image globally available

When you build the xApp Core Docker image, it will be available on the dRAX host machine. However, if you decide to install the xApp on another dRAX instance, you will have to:

  • Either move the xApp Core Docker image to the new machine OR
  • Upload the xApp Core Docker image to a Docker image repository, such as Dockerhub to make it globally available

We provide a guide on how to do so in the section on Pushing to Dockerhub.

1.4 Prepare xApp Helm Chart

Next, we need to prepare the xApp helm Chart. Assuming you have already edited your xApp Helm chart, locate it, and make the following edits as well. Edit the values.yaml file to point to the xApp Core Docker image, either local or global one in a Docker image repository:

...
# Image settings for the xApp Core

image:

    repository: dockerRepoUrl/<xapp-name>

    pullPolicy: IfNotPresent

...

Also don’t forget to set the xappFrameworkConfig.flushOnDeployment field back to ‘false’ in case you changed it to true.

Next, edit the xApp Helm chart Chart.yaml to specify the version:

...

version: <xapp-helm-chart-version>

...

appVersion: <xapp-version>

...

NOTE: The appVersion refers to the version of the xApp Core Docker image, while the version field is the version of the xApp helm Chart. The version of the Helm Chart is used when deploying the xApp (so it is used as the --version flag in the helm install command, or in the Version field on the xApp Deployment page of the dRAX Dashboard).

1.5 Package the Helm chart

Package the Helm chart in a .tgz file using:

helm package /helm_chart/xapp

This will create the .tgz xApp Helm chart package, which will also have the version of the xApp. You can now use this .tgz file to deploy your helm chart, either by issuing the helm install command on this file (and specifying the global.kubeIp), or using the Upload Helm chart deployment method from the dRAX Dashboard.

1.6 (Optional) Upload the xApp Helm Chart to a Helm Repository

You can also create a Helm Chart repository, or use a pre-existing one, and add the xApp Helm Chart .tgz file to it. This way you can make it globally available. Now, from the dRAX Dashboard you can also use the Remote Helm Chart Repository deployment method for an xApp. How to create a Helm Chart repository is out of this document's scope.

1.7 Use xApp

You can now share your xApp with the world. We recommend that you upload your xApp Core Docker image to a Docker image repository (such as Dockerhub) and make your own Helm Chart repository to expose your xApp helm Chart. This way anyone, anywhere can use your xApp if you grant them permissions.

All other scenarios will either require you to copy the xApp Core Docker image to the dRAX host machine, and/or copy the xApp helm chart to the dRAX host.