Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

This article instructs on how to create a DaemonSet in order to install and run 1 sample of Cloudaware Breeze agent on every node of cloud-managed Kubernetes cluster (Amazon EKS, Azure AKS, Google GKE). This allows to enable TunHub on the cluster and get the URL for further configuration of Kubernetes integration in Cloudaware. Linux only.

Description

DaemonSet starts the container with Breeze agent installer. The container has two bind mounts:

  • host:/opt > container:/opt - used for the Breeze agent installation from container to the host file system

  • host:/ > container:/var/root - used for launching the agent in the chroot environment

The container runs two commands:

  1. Install the Breeze agent to the /opt directory

  2. Run the simple daemon which runs the Breeze agent every 15 minutes

Step-by-step guide

1. Open Cloudaware Github repo with Kubernetes files. Clone the repo to your Github using git clone command.

2. Log in to Cloudaware account. Select Admin under your username in the upper right corner. Locate Breeze in the list of DevOps Integrations. Click 1 Configured.

3. Download the Breeze installer file (for Linux).

4. Untar the Breeze installer and copy the extracted files (./breeze-agent folder) into kubernetes/daemonset folder of the cloned rep:

tar xvzf breeze-agent.example.version.0.x86_64.linux.tgz

5.

cd ./kubernetes/daemonset && docker build -t ca-breeze-ds .

6. Upload the result image to your private container registry. Create a repository in your private container registry (e.g. AWS ECR, Azure ACR, Google GCR, etc.) named ca-breeze-ds.

docker tag ca-breeze-ds:latest <CONTAINER_REGISTRY_HOSTNAME>/ca-breeze-ds:latest
docker push <CONTAINER_REGISTRY_HOSTNAME>/ca-breeze-ds:latest 

WHERE

<CONTAINER_REGISTRY_HOSTNAME> is a placeholder that needs to be replaced by your private container registry URI(e.g. 111111111111.dkr.ecr.us-east-1.amazonaws.com/breeze-agent)

Edit the DaemonSet configuration file ds-breeze-agent.yaml, replace placeholders (make sure image pull secret is added to kubernetes secrets)

kubectl create -f ds-breeze-agent.yaml

To verify that the daemonset has been created, you may run the following command:

kubectl get ds

Create Docker Image

1. Download the Breeze agent installer and unpack it to the current directory:

wget breeze-agent.example.version.0.x86_64.linux.tgz
tar xvzf breeze-agent.example.version.0.x86_64.linux.tgz

2. Build the Docker image:

docker build -t IMAGE_NAME .

3. Push the image to your private Docker container registry:

docker tag IMAGE_NAME:latest DOCKER_SERVER_HOSTNAME/IMAGE_NAME:latest
docker push IMAGE_NAME:latest DOCKER_SERVER_HOSTNAME/IMAGE_NAME:latest

Run DaemonSet

1. Edit the DaemonSet configuration file ds-breeze-agent.yaml and replace the following placeholders with valid values:

  • DOCKER_SERVER_HOSTNAME

  • IMAGE_NAME

  • DOCKER_SERVER_SECRETS

2. Create the new DaemonSet:

kubectl create -f ds-breeze-agent.yaml

  • No labels