1. Quick guide¶
In this section we introduce you to a development sandbox called the x/rApp Development Environment, which can be easily deployed on an existing dRAX installation. The x/rApp Development Environment can be deployed with a click of a button and easily accessed using SSH. Once accessed, you will have the x/rApp Template at your disposal to start developing you x/rApp without any further pre-requirement steps.
1.1 Deploy the x/rApp Development Environment¶
The x/rApp Development Environment can be easily deployed in a user friendly way via the dRAX Dashboard. Open the dRAX Dashboard, and using the left hand side tabs navigate to: RIC -> xApp Deployment.
In the newly opened form, from the Deploy Method drop-down menu, select Deploy xApp Development Environment.
Next, fill in the metadata fields, such as your xApps name, organization team, etc. The Version field indicates which version of the x/rApp Development Environment to use. Leave this at “latest”, as this automatically picks the latest stable version of the x/rApp Development Environment for your version of dRAX.
Finally, since the x/rApp Development Environment is accessed using SSH, you have to set the SSH password which will be used. Set the SSH password in the Developer SSH Password field.
Note: Enter a password between 7 to 15 characters which contains at least one numeric digit and a special character.
Lastly, click the Submit button to deploy the x/rApp Development Environment.
1.2 Accessing the x/rApp Development Environment¶
Once the x/rApp Development Environment is deployed, you will need to discovery its SSH port so that you can SSH into it.
1.2.1 Discover x/rApp Development Environment SSH Port¶
To discover the x/rApp Development Environment SSH Port, open the dRAX Dashboard and navigate to the RIC -> xApp Overview tab on the left hand menu. In the xApps list, find your x/rApp based on the xApp Name, organization and team name that you have entered during x/rApp Deployment.
Next, click the Show button under the Service column. This will show you all the services that the x/rApp has. One of those services is the xapp-dev-ssh service which is the SSH used for accessing the x/rApp Development Environment. Note down the port number under the NodePort column as this is the port number that is exposed outside of Kubernetes.
NOTE: The NodePort is a randomly assigned port number in the range of 30000-32000.
1.2.2 SSH into the x/rApp Development Environment¶
You can now access the x/rApp Development Environment by simply SSHing into it:
ssh -p <xapp-dev-ssh> xapp@<drax-ip-address>
Using the -p option, you can specify the SSH port, which we discovered in the previous step. The username in the x/rApp Development Environment is always xapp, and you have to connect to the IP address where your dRAX RIC, or specifically your x/rApp, is running.
1.3 Start the x/rApp in the x/rApp Development Environment¶
You are now SSHed into the x/rApp Development Environment. You will be in the home folder by default, where you have the xapp folder. Inside that xapp folder you have the x/rApp Template.
To start your x/rApp, you can go to the xapp/core folder and start the xapp_main.py Python file:
cd xapp/core
python3 xapp_main.py
1.4 Edit the x/rApp¶
The developer is free to edit the xapp_main.py and create other .py files. You can stop the currently running xapp_main.py, edit the files and restart the x/rApp again. This allows you to work in a sandbox environment, all fully integrated into dRAX, and focus only on the functionality you bring.
Please check the Development Workflows section which explain different approaches to accessing the x/rApp Development Environment and best development practices.
1.5 [IMPORTANT] Backup your x/rApp code¶
The x/rApp Development Environment has git pre-installed. To avoid losing your work, we strongly suggest that you immediately push your code to your remote Git Repository. Git is already initialized in the xapp folder, therefore you can just add your remote and push the code:
git add .
git commit -m "first commit"
git remote add origin <your-git-url>
git push -u origin main
NOTE: Please note that any changes will be lost once the sandbox deployment is removed. Therefore it is important to backup your work before deleting the x/rApp Development Environment.
1.6 How to uninstall the x/rApp Development Environment¶
You can simply delete the x/rApp Development Environment by clicking the Uninstall button on the xApp Overview page on the dRAX Dashboard.