MobiledgeX Edge-Cloud 3.0: Continuous Integration and Development using MobiledgeX EdgeBox

September 16th, 2021

Headshot for Vasanth Mohan

Vasanth Mohan

Developer Advocate

With the release of MobiledgeX Edge-Cloud 3.0, developers on the platform can begin quick iterative testing and deployments of their applications using MobiledgeX EdgeBox. We understand that the development of edge solutions frequently happens far away from the actual production deployment and that developers need a solution locally to build their edge applications. With MobiledgeX EdgeBox, developers can transform their Mac or Linux laptop into a test cloudlet that is accessible via the MobiledgeX platform. This allows developers to test MobiledgeX APIs and deployment policies for their Docker and Kubernetes applications, which can easily be transferred to production. 

Getting Started

Getting started with EdgeBox requires just three easy steps: 

  1. Creating a free account on the MobiledgeX Console.

  2. Setting up your laptop as an edge cloudlet

  3. Deploying Docker containers or Kubernetes pods to your laptop cloudlet

In our previous blog about EdgeBox, setting up your laptop as a cloudlet can be done very simply using the EdgeBox Command Line Interface. With Python3 and Docker installed, simply:

  1. pip3 install edgebox 

  2. docker login -u <username> docker.mobiledgex.net

  3. edgebox create <test-edge>

Finally, follow up with our guide on the Developer Portal to learn how to use the MobiledgeX Console to configure your newly created private cloudlet for test deployments.

Figure 1: Edge Box Cloudlet

Continuous Integration and Continuous Delivery

Figure 2: Github Actions CI/CD Workflow

To best utilize EdgeBox within your application Continuous Integration / Continuous Deployments, we recommend using the MobiledgeX Github Actions workflow. By setting up an EdgeBox for your developer organization, you can run and make builds that automatically get deployed to the MobiledgeX platform and can be dynamically spun up as a cloudlet. This provides an easy and free way for your development team to continuously test your application and ensure that it works within the MobiledgeX platform. 

Github Actions can be integrated into your existing Github projects to allow you to iteratively test on your EdgeBox in just a few steps. 

  1. Once you have created an account on MobiledgeX, you will need to add your MobiledgeX username and password to your Github secrets. This will allow your CI/CD pipeline to handle deployments to MobiledgeX

Figure 3: Github Actions Secrets
  1. Next, you will need to create two yaml files in a .mobiledgex folder in your Github repo

    1. app.yaml : Specifies the parameters on how to create your application like the compute resources required, the type of deployment, ports required, etc. Here is an example yaml file.  

    2. appinst.yml (optional) : Specifies where your application instances should be deployed when you create a new release of your Github project. Here is an example yaml file and while testing, you can specify EdgeBox cloudlet as a deployment site. 

  2. In Github, you will need to create a Github workflow, which specifies when you push changes or create a release, what actions should happen to make a build of your application and start the deployments. This is all specified in a main.yml file and here is an example. 

  3. Then finally, make changes to your application, push the changes to Github, create a release, and then watch your application get built and automatically deployed to your EdgeBox. 

When it is time for your application to get deployed onto a live cloudlet, you can simply change the deployment locations with your Github actions appinst.yaml file, which will then push your changes into production. This allows your team to have one workflow to help manage your application with MobiledgeX. 

To get started, you can read our documentation on the Developer Portal for using Github Actions with MobiledgeX.
If you are a developer new to MobiledgeX, head over to our Getting Started page to learn more about the MobiledgeX Edge-Cloud platform and try it out today!