Manage container software
You can use Edge Manager to upload, deploy, or update custom container software.
Tag the Docker image
Whether deploying custom container software on either your core or gateway devices, first build and tag the Docker image in preparation for uploading it to the Edge Intelligence core.
Before you begin
- Make sure Docker is installed and running on the machine where you will be building and tagging the Docker image.
- Locate the Edge Intelligence core IP address and Docker Trusted Registry port information. You need this information to build and tag the Docker image. See Port configuration requirements (core).
- Build an image (sample.tar, for example) using Docker CLI commands or obtain an image from a third party.
- Check whether the Docker image is present on the machine using the command docker image -a.
If not, run the command docker image load -i <source_image>.tar (or tar.gz) to load an image from a .tar or .tar.gz file.
Procedure
Log in as a root user on the Edge Intelligence core node.
Optionally, log in to your machine to tag the image locally.Run the docker image -a command to show all images.
Find the image name and current tag for the image you want to use.
To tag the image, do the following:
docker tag <source_image_name>:<old_tag> <cluster_fqdn>:32500/<target_image_name>:<new_tag>
Example:
docker tag httpd:test edge.hitachi-lumada.net:32500/httpd:latest
NoteDo not tag the image with the folder path /repository/pandora. This path is used for internal services.To save the Docker image as a .tar or .tar.gz file, run the following command:
(Optionally, save as a tar.gz file.)docker save -o <image_name>.tar <cluster_fqdn>:32500/<target_image_name>:<new_tag>
Example:
docker save -o httpd.tar edge.hitachi-lumada.net:32500/httpd:latest
NoteIf the Docker image was tagged and saved on a different machine than where you access Edge Manager, move the .tar or .tar.gz file to the machine used to access Edge Manager
Upload container software
Before you begin
- Only .tar and .tar.gz file formats are supported.
- Build and tag a Docker image with the core IP address and Docker Trusted Registry port. For instructions, see Tag the Docker image.
- Resume upload is not supported when using browsers from different machines, such as stop on machine A, then resume on machine B.
- Resume upload is not supported when using different types of browsers on the same machine, such as first using Chrome, then Firefox.
- The browser might log out automatically when you have been logged in for 30 minutes. You may experience upload failure and need to resume. That is because Keycloak's default setting is 30 minutes but this is configurable.
- Resume upload is not supported when using the browser's incognito or private mode and then exiting all the browser sessions.
If you open a browser in incognito mode, upload something, are logged out, and then close all browser windows, then the upload won't resume. On the other hand, if two browsers are open in incognito mode and only one of the incognito sessions are open, then the other browser that is still open should be able to resume.
Procedure
In Edge Manager, select
.Use the Browse button to navigate to your Docker image and select Open.
Click Upload to upload the Docker image.
The software is uploaded successfully if it displays with a 'Successful' status.If the Status column displays the error, "Upload failed: unable to push uploaded file to registry", then the Docker image was tagged incorrectly. To resolve, verify that the core IP address and port correspond to the location where you are uploading the image.NoteIf an image with the same image name and version as an existing image is uploaded, it will replace the existing image.NoteIf you delete the Docker image using Docker CLI commands, the images still displays in the Edge Manager because it has not been removed from the Docker Trusted Registry.
Deploy container software on the core device
You can deploy container software on Edge Intelligence core by uploading an application configuration.
Before you begin
- Verify that the software has been uploaded successfully to the software repository on the Repository tab in Edge Manager.
- Ensure that deployment information is complete and available as a separate YAML file for uploading or for copying into Edge Manager.
- Verify that the optional configuration and secret information is complete and available as separate YAML files for uploading into Edge Manager.
Procedure
Go to the Kubernetes dashboard.
- On-premises:
Either
- Select .
- On the Deployment tab, click the link to go to the dashboard.
or go directly to
https://k8s-dashboard.<cluster_fqdn>:30443
- On GKE: Go to https://console.cloud.google.com/kubernetes.
- On-premises:
Click +CREATE in the upper-right corner of the dashboard to create a namespace where your application can run.
Do one of the following:
- Select CREATE FROM TEXT INPUT and paste the contents of your YAML file for namespace creation.
- Select CREATE FROM FILE, then navigate to select your YAML file for namespace creation.
NoteAs a best practice, do not deploy applications to the following existing namespaces: default, hiota, hiota-ui, kube-system, logging, monitoring.This YAML example creates a namespace called custom-apps:apiVersion: v1 kind: Namespace metadata: name: custom-apps
Click UPLOAD.
Select the namespace you have deployed in the left-hand navigation of the Kubernetes dashboard in the Namespace list.
Click +CREATE in the upper-right corner of the dashboard, this time to deploy the YAML file for the application.
Do one of the following:
- Select CREATE FROM TEXT INPUT and paste the contents of your YAML file for application deployment.
- Select CREATE FROM FILE, then navigate to select your YAML file for namespace creation.
NoteMake sure the namespace in the deployment YAML file matches the namespace you’re in.Click UPLOAD.
Use the same process for any supporting configuration and secret YAML files as described in Deploy software configurations or secrets on the core device.
Results
Update container software on the core device
You can update container software on Edge Intelligence core by editing the application configuration.
Before you begin
Procedure
Go to the Kubernetes dashboard:
- On-premises:
Either
- Select .
- On the Deployment tab, click the link to go to the dashboard.
or go directly to
https://k8s-dashboard.<cluster_fqdn>:30443
- On GKE: Go to https://console.cloud.google.com/kubernetes.
- On-premises:
In the Namespace list, select the namespace where your container software is deployed.
In the Workloads navigation, select Deployments.
From the Actions menu (
The container configuration appears in the editor.) next to the pod name for the selected pod, select View/edit YAML.
Make the necessary edits and click UPDATE.
Deploy container software on a gateway
You can deploy software to single or multiple gateway devices.
Prerequisites for deploying software on a gateway
Please observe the following prerequisites to successfully deploy container software to a gateway.
- The container software must be uploaded to the Docker Trusted Registry before you can deploy.
- The deployment information should be complete and available as a separate YAML file for uploading, or for copying into Edge Manager.
- The optional configuration and secret information should be complete and available as separate YAML files for uploading into Edge Manager.
- To monitor select information, such as CPU or memory, or for troubleshooting, you can mount your volume in a different folder than the default location. However, as a best practice for security, do not change the default volume mounts which the containers write to for persisting data:
/var/lumada-edge/volumes/default-gateway/{CONTAINER_NAME}/dynamic/{VOLUME_NAME}
NoteOnly hostPath is supported for persisting volumes on a gateway.NoteCurrently, only deployment is supported in Edge Manager. DaemonSet is not supported.
Deploy software to one or more gateways
Procedure
In Edge Manager, select the Device tab.
Select one or more gateway devices using the check boxes.
Only devices that are online and in Ready state can be selected.Select
.In the Software section, find the software container you want to deploy and copy the path to the clipboard.
Update the deployment YAML with the copied path of the container image.In the Upload Files section, paste your updated deployment YAML file into the edit window.
(Optional) In the Upload secret and configuration files (optional) text box, add the following files:
- Configuration YAML: Contains configuration settings that are needed to deploy software, or parameters that can customize your installation.
- Secret YAML: Stores and manages sensitive information, such as passwords, OAuth tokens, and SSH keys.
Click Deploy.
The Deployment tab appears to show the status of the deployment.
Deploy software to a device group
Procedure
In Edge Manager, select the Device tab, then the Device Group tab.
Select a device group.
The Details sub-tab opens.Select
to deploy software to the device group.In the Software section, find the software container you want to deploy and copy the path to the clipboard.
Update your deployment YAML with the copied path of the container image.In the Upload Files section, paste your updated deployment YAML file into the edit window.
(Optional) In the Upload secret and configuration files (optional) text box, add the following files:
- Configuration YAML: Contains configuration settings that are needed to deploy software, or parameters that can customize your installation.
- Secret YAML: Stores and manages sensitive information, such as passwords, OAuth tokens, and SSH keys.
Click Deploy.
The Deployment tab appears to show the status of the deployment.
Update container software on a gateway
You can update container software on a gateway device.
Build, tag, and upload your container software to DTR.
See Tag the Docker image and Upload container software for details.In Edge Manager, select the Device tab.
Select a device name to go to the Device Details page.
Select the Software Updates tab to view the list of container software available on the selected gateway device.
From the Actions menu (
) next to the deployment YAML file that you want to update, select View/Edit.
Update the deployment YAML if needed and click Deploy.
The container restarts.
Delete container software on a gateway
You can delete container software from a gateway device.
Procedure
In Edge Manager, select the Device tab.
Select a device name.
Select the Software Updates tab to view the list of deployment YAML files available on the selected gateway device.
From the Actions menu (
) next to the YAML file that you want to delete, select Delete.
Results