Skip to content

Agent update

You may need to upgrade your Streaming agent to the most recent version from time to time. The agent will be forced to upgrade to the newest version if the agent container is restarted.


AWS Container Update

Note

The required steps to update the container will vary according to the version of the UI you are using. The newest version of the UI is referred to as the New ECS Experience and is enabled/disabled using the slider at the top-left of the window. Where applicable, we have accounted for the different steps in the instructions below.

  1. From the navigation bar, choose the region that contains your agent image.
  2. Open the console at Management Console and select Elastic Container Service.
  3. Click Clusters from the left-hand side menu.

The below instructions then fork, depending on your ECS experience.

If you are using the new ECS Experience:

  1. On the Clusters page, select the name of the cluster in which your agent resides.
  2. On the cluster details page for your cluster, select the service where your agent is running.
  3. Click the Edit Service button in the top-right of the page.
  4. Within the Deployment Options section, check the Force new deployment checkbox.
  5. Click Update. The container will now be deployed and no further action is required.

If you are not using the new ECS Experience:

  1. On the Clusters page, select the name of the cluster in which your agent resides.
  2. On the cluster details page for your cluster, select the service where your agent is running.
  3. Click the Update button in the top-right of the page.
  4. On the Update service page, select the Force new deployment checkbox.
  5. Click on Next step for this page and for the remaining Configure Network and Set Auto Scaling pages.
  6. On the Review page, click Update Service to finish and redeploy the agent.

For more information, please refer to Amazon's Update AWS Service documentation.


Azure Container Update

Restarting an Azure container does not trigger the container to pull the latest agent image version and so does not update the agent. To update an Azure container, you must manually stop and then start the container as detailed below. When a container image is updated, the new image is retrieved, and the Streaming agent is upgraded automatically. Where required, a container group can be restarted with the command: az container restart. All containers in the container group are restarted by this action.

Stop and start the Microsoft Azure container using the console:

  1. Sign in to the Azure portal, and navigate to Container Instances.
  2. Select the container instance in which your agent resides.
  3. Click Stop at the top of the Container Instance page.
  4. Wait for the container instance to stop, then click Start.

For more information, please read Manually stop or start containers in Azure Container Instances.


Kubernetes

To upgrade the Streaming agent's container image in Kubernetes, delete the pod deployment and recreate it. This pulls the updated container image.

For a more in-depth look at how deployments manage rolling updates, read the commands below:

  1. Get the pod name:
$ kubectl get pod --namespace matillion-cdc

NAME            READY   STATUS    RESTARTS   AGE
matillion-cdc   1/1     Running   0          58s
  1. Delete the pod:
$ kubectl delete pod matillion-cdc --namespace matillion-cdc

pod "matillion-cdc" deleted
  1. Recreate the pod (deploy the latest version):
$ kubectl create -f xyz.yaml --namspace matillion-cdc

pod/matillion-cdc created
  1. Check the pod is running again:
$ kubectl --namespace matillion-cdc get all

NAME                READY   STATUS    RESTARTS   AGE
pod/matillion-cdc   1/1     Running   0          58s

For more information, please refer to the Kubernetes Pod Deployment.


Google Compute Engine

To upgrade the Streaming agent's container image in Google Compute Engine, follow the commands below:

  1. SSH into the Compute Engine Instance via gcloud CLI:
gcloud compute ssh "<compute-intance-name>" \
--project "<google-cloud-project-id>" \
--zone "<compute-instance-zone>"

See: gcloud compute ssh for more information.

  1. Find the agent container you would like to upgrade:
docker ps

CONTAINER ID   IMAGE                                                        COMMAND                  CREATED        STATUS        PORTS     NAMES
031e193c0e8d   public.ecr.aws/matillion/cdc-agent:2                         "/bin/sh -c 'java -j…"   17 hours ago   Up 17 hours             klt-dev-cdc-agent-lpgq
3e23101372fd   gcr.io/stackdriver-agents/stackdriver-logging-agent:1.9.4    "/entrypoint.sh /usr…"   4 days ago     Up 4 days               stackdriver-logging-agent

Note

Make note of the Streaming agent's container id. In the above example it is 031e193c0e8d.

See: docker ps for more information.

  1. Stop the running agent container:
docker stop <container_id_from_step_2>

See: docker stop for more information.

  1. Remove the agent container:
docker rm <container_id_from_step_2>

See: docker rm for more information.

  1. Pull the updated image:
docker pull public.ecr.aws/matillion/cdc-agent:2

See: docker pull for more information.

  1. Launch a new agent container with the updated image using Compute Engine Container Startup Agent konlet-startup.
sudo systemctl start konlet-startup
  1. The service konlet-startup will create a new Docker container instance using the container metadata (configuration) defined.