Supported Application Types

Version: 1.0
Last Modified: 9/29/2020

MobiledgeX provides support for several different application file types and deployment options. The table below lists these deployment options and their associated file types. Details about how to manage each deployment types are covered in their respective sections below.

Supported Application Types File Type
VM QCOW2 image
Docker (v19.03.3) Docker Compose (v3.8), Docker image
Kubernetes k8s yaml with manifest, Docker image
*Helm(v2) single helm chart

*For Helm, apiVersion v1 is currently only supported for helm charts.

VM

For VM deployment, use a VM image as a QCOW2 format. With the image, you can upload it to our MobiledgeX Artifactory. Upon uploading the image, you will be prompted for your username and password to proceed with the upload. The command to upload the image is:

$ curl -u<username> -T <path_to_file> "https://artifactory.mobiledgex.net/artifactory/repo-cloudxr/<target_file_path>" --progress-bar -o <upload status filename>  


Refer to the Deploy a VM using the Mobiledge Edge-Cloud Console tutorial to learn how to deploy a VM.

Docker

For applications deployed as Docker-based, we support Docker Compose files in the following ways:

  • A Deployment Manifest argument for Docker Compose files used as input. You can either paste or manually type in your plain text file into the Deployment Manifest box or select the Docker Compose file located on your local server where it is loaded into the Manifest box.
  • Docker Compose files referenced as a ZIP file. The ZIP file must be referenced from a web server (and not referenced locally), or retrieved from Artifactory.

Docker Compose files can include multiple images and options, as well as additional files. Make sure that if you are using a ZIP file as input, your ZIP file is not encrypted, and the URL should be accessible without requiring authentication.

ZIP files need to contain a manifest.yml file, and should also include other contents, such as the example provided below. Based on the content of the manifest.yml file, the system will read and execute the Docker Compose files within the yaml file, so it's important to remember that each file specified in the manifest.yml file is present.

Manifest Example:

  $ cat manifest.yml

  dockercomposefiles:
  - docker-compose.yml
  - docker-compose2.yml

For a dedicated cluster with IP access type Direct, input to the Ports argument is required. Although you may have specified the ports in your manifest, doing so does not open the ports automatically. You must also set (open) the ports via the Edge-Cloud Console from the Create Apps page.

Ports settings

Option 1: Docker Compose file as input

If you want to use the Docker Compose file as input, simply input the plain text manually into the Deployment Manifest text box from the Create Apps page. The other option is to use the file selection option and reference your file from your local server, where your text file is loaded into the Deployment Manifest text box.

Deployment Manifest Docker example

Option 2: Docker Compose as a ZIP or nonZIP file from a file system or HTTP Server

To reference your Docker Compose ZIP file, make sure you are referencing it as a URL from an HTTP server. The server should be accessible without requiring authentication. For nonZIP files, you can use the file selection option and reference your nonZIP file from your local server, where it will load the content into the Deployment Manifest text box.

File Selection option

Option 3: Docker Compose as a ZIP file on Artifactory

If you wish to reference your Docker Compose ZIP file from Artifactory, you can do so the same way you reference the ZIP file from an HTTP server. Instead of navigating to an HTTP server, you're navigating to the ZIP file that you uploaded to MobiledgeX Artifactory. The format of the path is similar to the path that you provided when you first create your organization and pushed an image to our repository, like this: https://artifactory.mobiledgex.net/artifactory/repo-mobilegeX/post_redis_compose.ZIP.

For Options 2 and 3 where you want to perform a ZIP deployment, provide the URL in the Deployment Manifest text box and ensure the image path is blank. For an example on how to deploy a ZIP file, refer to the How to create a Docker-composed deployment using multiple files tutorial.

GPU-enabled Docker Deployment

Note: GPU support for Docker and Docker Compose is still actively under development. Please check back periodically for updates to GPU support.

You can deploy Docker containers to GPU-enabled hardware in the following ways:

  • As a Docker image
  • As Docker Compose file

In regions where GPUs are deployed, a set of GPU-specific flavors are available. These flavors contain the string GPU, for example, m4.small-gpu.

Deploy a GPU-enabled Docker image

If you would like to use a Docker image for your GPU deployment, select a GPU-enabled Flavor for the application if you are using auto-clustering, or choose a Flavor for manually created clusters. Then, follow the steps as described within Upload images to MobiledgeX registries to upload your Docker image.

Deploy a GPU-enabled Docker Compose file

While the easiest way to deploy a GPU-enabled container is to use a Docker image, as described above, you can also use Docker Compose. Simply follow the steps in How to use a Docker Compose file as input, and remember to identify the following in your Docker Compose file:

  • Specify the Compose version as 2.3
  • Specify the option runtime-nvidia in your service definition
  • Add NVIDIA_VISIBLE_DEVICES=all to your environment section

Sample Docker Compose File

This sample compose file illustrates the correct use of arguments to enable GPU support, by using the MobiledgeX ComputerVision Application as an example.


version: '2.3' services: compvision: image: docker.mobiledgex.net/mobiledgex/images/computervision-gpu:2020-09-15 network_mode: "host" restart: unless-stopped runtime: nvidia environment: - NVIDIA_VISIBLE_DEVICES=all

GPU-enabled Docker Deployment Troubleshooting

  • Ensure you correctly specify your arguments in the yaml file, as shown in the example above.
  • Make sure you select the appropriate GPU-enabled flavor.
  • If you received errors indicating that "no host is available," the cloudlet you are attempting to use may not have any free GPU resources available. If that is the case, try deploying to a different cloudlet.

If problems continue to persist and you cannot deploy your Docker container to a GPU-enabled hardware, contact the Support Team for further assistance.

Kubernetes

You can reference a k8s.yml file to deploy your application if you are using Kubernetes. You can optionally type in the content of your k8s.yaml file directly in the Deployment Manifest, specify the URL to the path of your K8s.yaml file, or simply locate your K8s.yml file locally using the file selection option from the Deployment Manifest area. The content will load into the Deployment Manifest text box.

If you choose to use a Docker image to deploy a Kubernetes Manifest, you can:

  • Specify the image path without an input argument to the Deployment Manifest. A Manifest will be generated for you.
  • Manually provide a Deployment Manifest argument which includes the image path referenced within the Manifest itself.

    Note: You cannot use a ZIP file with Kubernetes to deploy your application.

    Folder icon to reference Deployment Manifest

    It's important to remember to specify the Service section within the k8s.yml file. Otherwise, your deployment will not succeed. The following is an example of a deployment manifest.



apiVersion: v1 kind: Service metadata: name: nginx-service labels: run: nginx-deployment spec: type: LoadBalancer ports: - port: 80 targetPort: 80 protocol: TCP name: tcp80 selector: run: nginx-deployment --- apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 kind: Deployment metadata: name: nginx-deployment spec: selector: matchLabels: app: nginx replicas: 1 # tells deployment to run 1 pods matching the template template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 protocol: TCP

Helm

You can use a helm chart, which is a collection of files related to your Kubernetes resources, to deploy your application. If you wish to use a single helm chart for your application deployment, specify the URL path, for example, https://resources.gigaspaces.com/helm-charts:gigaspaces/insightedge to the helm chart as input into the Image Path field under Create Apps. You are not required to provide any input into the Deployment Manifest section.

Create Apps screen: Image Path input field

When you specify the helm chart as input in the image path, you have the option to add an Annotation. Annotations are conditions or tags added as dependencies. This area is a free form region where you can specify conditions or tags specific to your helm chart. For example, in the Key field, you can type in version and in the Value field, type in the version of your helm chart, such as 1.0.

Create Apps screen: Annotations

If you require additional configurations for your application, such as adding environmental variables or including customization files for helm deployments, you can specify these types of configurations by specifying the content of the configuration file in the Config field, and selecting either Environmental Variables or Helm Customization.

Create Apps screen: Configs

List of commands to upload images to MobiledgeX registries

The following lists all commands used to upload your images to our registries. Remember to replace the sample organization name with your own organization name.

If you are uploading an image to our Docker registry, use these commands:

  $ docker login -u <username> docker.mobiledgex.net
  $ docker tag <your application> docker.mobiledgex.net/testdorganization/images/<application name>:<version>
  $ docker push docker.mobiledgex.net/testdorganization/images/<application name>:<version>
  $ docker logout docker.mobiledgex.net

If you are uploading an image to our VM registry, use the following curl command:

  $ curl -u<username> -T <path_to_file> "https://artifactory.mobiledgex.net/artifactory/repo-testdorganization/<target_file_path>" --progress-bar -o <upload status filename>

If you wish to delete an image from Our VM registry, use the following curl command:

  $ curl -u<username>:<password> -XDELETE <image-path>

Where to go from here