Application Groups

App Groups are abstractions used to deploy multiple apps that might have inter dependency (loosely or tightly coupled) on each other. One method of deploying interdependent apps is using docker-compose type yaml specification. The document describes docker compose yaml based app group deployment.

Deploying an App Group

App Group deployment requires docker-compose.yaml which specifies different applications, network, resources, and dependencies between the applications.

In the following sample docker-compose.yaml, two applications are specified: redis and mynginx. Network and volumes to be used for these applications are also specified.

version: '3.3'

services:
   redis:
     image: redis:latest
     volumes:
       - db_data:/var/lib/mysql
     restart: on-failure
     environment:
       MYSQL_ROOT_PASSWORD: somewordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress
     networks:
       - front_end
       - back_end
   mynginx:
     depends_on:
       - redis
     image: nginx:latest
     ports:
       - "9000:80"
     restart: on-failure
     mem_limit: 64m
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: wordpress
       WORDPRESS_DB_PASSWORD: wordpress
       WORDPRESS_DB_NAME: wordpress
     networks:
       - front_end
volumes:
    db_data: {}
networks:

   front_end:
     external:
        name: int1
   back_end:
     external:
        name: iox-nat_docker0

Specifying the Network Name in docker-compose.yaml

IOx does not provide the creation of any new networks, so these cannot be specified in docker-compose.yaml. To find the network names that can be used in docker-compose.yaml, see the "Network Information" table under System Info tab.

On an IC300 the Network Information table shows the following:

App Group Network

Uploading docker-compose.yaml (App Group Specification)

An App Group can be created by uploading the specification (docker-compose.yaml). Click "Add New" under the App Groups tab from Local Manger (LM).

Deploy App LM

After uploading docker-compose.yaml, upload the individual application packages that are defined in docker-compose.yaml. In the above sample docker-compose.yaml, two applications (redis, mynginx) are defined. Redis requires the app package that contains redis:latest docker image. Mynix app requires the app package that contains nginx:latest image.

Deploy App1 Group LM

Upload the redis and mynginx applications by clicking the Upload buttons.

Deploy App1 Action LM

Note: The App State changes from "Image unavailable" to "DEPLOYED" after the images for the applications are successfully loaded.

Starting the App Groups

Click on the Up button with "App start" to activate the app redis and then mynginx. After both of the apps are ACTIVATED, they will be started and put into RUNNING state.

  • The activate and start order of the apps will be in accordance to the "depends on" directive, if any, specified in uploaded docker-compose.yaml.

  • The app will be provisioned with network and volume as specified in docker-compose.yaml for the applications.

App Group Running

After a successful activation, the App Group status will be shown as RUNNING. Also, the "App State" for the individual apps will be RUNNING.

You can also start the App Group by clicking on the UP button and choosing "Up without app start". The individual apps will not be started but only ACTIVATED.

You can start the apps by choosing "Up with app start".

Stopping the App Group

Click on the Down button with "App destroy" to stop the apps that are part of the app group. They will be DEACTIVATED.

App Group Stopping

After a successful deactivation, the App Group status will be shown as DEPLOYED. Also, the "App State" for the individual apps will be DEPLOYED

You can also stop the App Group by clicking on the Down button without App Destroy. In this case individual apps will only be STOPPED but not DEACTIVATED.

Managing an Individual App of the App Group

You can get more details about the app in an App Group by clicking the Manage button corresponding to the app.

Ind App Info

You can upload the package_config.ini, the application data, or download logs for the app using the tabs shown in this screen.

Upgrading the App Group

Upgrading of an app group is required when you want to use the app with a newer version in docker-compose.yaml, change the network, or change the volume.

Click the Manage button for the App Group. You can edit the docker-compose.yaml in the editable textbox after clicking the Edit button.

Upgrading App Group

After editing the docker-compose.yaml, save it by clicking Save. The App Group is updated, and you return to the App Group main page.

If the App Group is updated by specifying a different app image version than is specified initially for the app, the App Group will show "Image unavailable" for that app.

You can upload the newer version of the app package for that app by using the Upload button.

Deleting the App Group

An App Group can be deleted by clicking the Delete button. The App Group can be deleted only when it is in DEPLOYED state.

Caveats

  • Only compose version 2 and version 3 constructs are supported. Version 1 may work but no support is claimed.

  • Not all of the constructs of docker compose are supported. For example, docker compose constructs such as build, deploy, and swarm related constructs are not supported.

  • docker-compose yaml are not be used to create networks. Only IOx networks that are available can be defined in docker-compose.yaml.

  • "External" volumes are not supported. Only volumes managed through Docker are supported. Therefore, the "external" config for volumes is not supported.

Docker Compose Constructs and Attributes Supported by IOx

Download the table of the Docker Compose Constructs and Attributes here in Word or PDF.