Managing IBM Z ChatOps container
This section describes the commands available for managing the container.
- Loads the IBM® Z ChatOps Container image
-
- Container Command Line Utility:Run the following command:
You shall run this command only once. If the image is successfully loaded, you can delete the Z-ChatOps-Image-v1131.tar file.bnzContainer.sh load - Container management command: docker/podman:
- Go to the directory where you extract the IBM Z ChatOps Container archive.
- Run the following
command:
container management command image load < ./Z-ChatOps-Image-v113.tar
- Container Command Line Utility:
- Start IBM Z® ChatOps container
-
- Container Command Line Utility:Run the following command:
If no IBM Z ChatOps container exists, it creates a new container from the loaded IBM Z ChatOps Container image.bnzContainer.sh start - Container management command: docker/podman:
- If you have not created your container, run the following command to create the ChatOps
container for
1.1.3.1:
This command creates a container named zchatops_113 using bridge network and publish ports 4001 and 5001 to host. It also binds mount ChatOps configuration folder /opt/ibm/zchatops/config to volume zchatops-configuration-113.container management command container create --name=zchatops_1131 --network=bridge -p 4001:4001 -p 5001:5001 --restart on-failure:5 -v zchatops-configuration-1131:/opt/ibm/zchatops/config -t zchatops:1131 - If you have created your container, run the following command to start your
container:
container management command container start zchatops_1131
- If you have not created your container, run the following command to create the ChatOps
container for
1.1.3.1:
- Container Command Line Utility:
- Stop the running IBM Z ChatOps container
- Run one of the following commands according to your needs:
- Container Command Line Utility:
bnzContainer.sh stop - Container management command:
docker/podman:
container management command container stop zchatops_1131
- Container Command Line Utility:
- Restart the running IBM Z ChatOps container
- Run one of the following commands according to your needs:
- Container Command Line Utility:
bnzContainer.sh restart - Container management command:
docker/podman:
container management command container restart zchatops_1131
- Container Command Line Utility:
- Show the status of the IBM Z ChatOps container or image
- Run one of the following commands according to your needs:
- Container Command Line Utility:
bnzContainer.sh status - Container management command: docker/podman:
- Show the image
status:
container management command image ls --filter reference='zchatops:1131' - Show the container
status:
container management command container ls --all -q --filter name='zchatops_1131'
- Show the image
status:
- Container Command Line Utility:
- Open a Bash shell to the running IBM Z ChatOps container
- Run one of the following commands according to your needs:
- Container Command Line Utility:
The default working directory is ZCHATOPS_HOME, which in this case, is /opt/ibm/zchatops.bnzContainer.sh shellIt allows you to access the internal of the container, for example, if the configuration files must be edited manually.
To exit the shell, issue command
exitin the shell. It only exits the shell connection into the container, the container and IBM Z ChatOps continue to run. - Container management command:
docker/podman:
container management command container exec -it zchatops_1131 sh -c 'bash'
- Container Command Line Utility:
- Uninstall IBM Z ChatOps container and Container image
-
- Container Command Line Utility:Run the following command:
The command deletes the current IBM Z ChatOps container and the Container image.bnzContainer.sh uninstallWarning: All custom configuration will get lost! Run the command only if you must remove IBM Z ChatOps. - Container management command: docker/podman:
- Stop your container. For more information about how to stop the container, see stop IBM Z ChatOps container with container management command.
- Run the following command to delete IBM Z ChatOps
container:
container management command container rm zchatops_1131 - Run the following command to delete IBM Z ChatOps
image:
container management command image rm zchatops:1131 - Run the following command to delete the configuration
volume:
container management command volume rm zchatops-configuration-1131
- Container Command Line Utility:
- bnzContainer.sh collect
-
Collects and bundles all relevant log files from the running IBM Z ChatOps container and copies them to the host system's /tmp folder.
For example, you can run this command if you have a problem and the IBM Support team requests the log information.
- bnzContainer.sh import
-
Import the custom configurations and settings of a IBM Z ChatOps container from a file on the host filesystem.
- bnzContainer.sh export
-
Export the custom configurations and settings of a IBM Z ChatOps container to a file on the host filesystem.
- bnzContainer.sh reconfigure
-
Some configuration can only be specified during the creation of IBM Z ChatOps container, for example, the network configuration. If you must change such a configuration option, issue this command to make the configuration changes effective.
Internally, the current container is committed into a snapshot of the Container image, from which a new container is created. By this means, the new container has all the configuration and customization of the old container, but runs with the new configuration. When you issue command bnzContainer.sh reconfigure, a new snapshot is created. Keep the snapshot image because an image cannot be removed if there are containers derived from it. The image doesn't take up too much disk space because only the changes, compared to the official image, are stored in it.
- bnzContainer.sh migrate
-
Migrates all of your custom configuration from the old IBM Z ChatOps container into the new container of a new IBM Z ChatOps release. See Upgrading to IBM Z ChatOps 1.1.3.1 with Container or Upgrading to IBM Z ChatOps 1.1.3 with Container.