The Container Management file is available as a downloadable bundle from the VMware Pulse IoT Center console. This section lists the steps to download and install Container Management.
Prerequisites
- Ensure that your Docker gateway is enrolled.
- Ensure that the Docker service is enabled and running on your gateway.
Procedure
- Log in to the VMware Pulse IoT Center console UI.
- From the top right of the home page, click the settings icon and click Downloads.
- From the Downloads window, scroll down to the Container Management section and click Download against the container management bundle.
- Using a linux machine, download the Container Management bundle to your local disk.
- Create a campaign:
- Create a package specification YML file. The following example illustrates a sample package specification YML file:
package-spec.yml
root@photon2gw [ ~/code/iotc-clientd/deployment/campaign ]# cat package-spec.yml package: name: container-management-deploy description: container management deploy for photon version: 1.0.0 os: Linux architecture: x86_64 manifest: headlessExecution: true lifecycle: - phase: execute action: data/campaign_install.sh attachments: - path: data/campaign_install.sh - path: data/iotc-client-x86_64-2.0.0.13.tar.gz - path: data/container-management.service
- Create an installation script. The following example illustrates a sample installation script using a Photon gateway:
campaign_install.sh
root@photon2gw [ ~/code/iotc-clientd/deployment/campaign ]# cat data/campaign_install.sh #!/usr/bin/env bash #example campaign on a photon gateway logdir=/var/log/vmware mkdir -p $logdir logfile=$logdir/container_management_campaign_log.txt echo $(date "+%Y-%m-%d %H:%M:%S") Execution script started >> $logfile #ensure docker installed tdnf install docker -qy systemctl daemon-reload systemctl restart docker #clear staging dir rm -rf /tmp/iotc-client tar -xf $DATADIR/data/iotc-client-x86_64-0.0.13.tar.gz -C /tmp #execute install /tmp/iotc-client/install.sh #remove staging rm -rf /tmp/iotc-client echo $(date "+%Y-%m-%d %H:%M:%S") Execution script finished >> $logfile
- Create a campaign package. The following example illustrates a sample campaign package:
root@photon2gw [ ~/campaign ]# ./package-cli package create ./package-spec.yml root@photon2gw [ ~/campaign ]# ls -al *.iotcp -rw-r----- 1 root root 68891 Jun 18 16:58 demo-1.0.0.iotcp
- Upload the campaign package to the VMware Pulse IoT server.
root@photon2gw [ ~/campaign ]# ./package-cli upload package ./demo-1.0.0.iotcp <server address>
- Create a package specification YML file. The following example illustrates a sample package specification YML file:
- Run a campaign on your gateways using the uploaded package.
- Verify that the Container Management package is running on your gateways.
Results
When Container Management starts, it sends the container environment properties and metrics to the gateways. The num-images, num-containers, and num-running-containers metrics are displayed for each gateway.