Continuous Deployment Quick Start

Instructions for installing the Free Edition Edge Delta agent with Continuous Deployment.

You can install the Edge Delta Free Edition agent on a Kubernetes cluster using Continuous Deployment (CD) with GitOps principles. To do this, you configure your CD tooling such as Argo CD, Flux or Jenkins X to synchronize the cluster with the manifests on your configuration repository.

When you make updates to the configuration repository, they are automatically applied by your CD tooling to the cluster. It does this by polling the configuration regularly. If there is a mismatch between the configuration (desired state) and the cluster (current state), the configuration is pulled and applied to the cluster. This enables cluster self healing.

In addition, you save any dependent images in your own image repository. Keeping your images and configurations isolated gives you control over changes. With this workflow, change control on the configuration repository and image repository enables you to have change control on your cluster.

In addition, you can monitor changes to images and configurations using code diffs before applying them to your image repo, configuration repos, and in turn, cluster.

This also makes maintaining custom settings easier as you can isolate all your customizations from vendor updates to the default manifests.

Alternatively, for a lightweight implementation you can configure your CD tool to use the public Edge Delta chart repository and image store and simply pass in custom variables.

Required Information

To configure your CD tooling to deploy the Edge Delta agent, you need the following information:

  1. The Edge Delta helm chart location on your configuration repository.
  2. The Edge Delta agent image location on your image repository.
  3. The private API key for your agent. The agent API key is provided in the installation instructions when you first install an agent in the free Edition. If you don’t know the key you can view the installation instructions: click Admin - Clusters, click the drop down icon in the Actions column and select Deploy Instructions. The API key is the secretApiKey.value= value.
  4. The currently supported version for the Free Edition agent ({{variable.Current Free Edition Version}}). The current version is also provided in the installation instructions. The version is the image.tag= value.

Example Implementation: Argo CD

The following example uses Argo CD. The Edge Delta agent image is saved on an owned image store, in this instance Docker Hub. The helm chart and Argo CD configuration files are saved on a private configuration repository, in this case on GitHub. Argo CD polls this configuration repo for the configuration and it deploys Edge Delta in a Kubernetes cluster that, in this instance, it also resides on. The initial configuration is done on a local computer while the Kubernetes cluster is on a separate host.

Prerequisites for the K8s Host

The K8s host can be the same as the local host. It requires a running Kubernetes cluster with the Argo CD CLI (external linkl) installed.

Install Prerequisites on the local host

  1. Install git. If you have homebrew:
brew install git
  1. Install Docker. If you have homebrew:
brew install --cask docker
  1. Install Helm. If you have homebrew:
brew install helm

Create a Configuration Repository

Using your local machine:

  1. Create a private repository in GitHub or another git repo host.
  2. Ensure you have access to your repository with write permissions, for example with an installed SSH key / Personal Access Token.

For the purposes of a POV, POC or to learn, you can refer to a private GitHub repo by creating a PAT and adding it to the URL you use to specify the repo. This is not a recommended method for production.

https://<pat><your username>/<repo>.git

Add the Edge Delta Chart to the Repository

On your local machine:

  1. Create a local clone of your configuration repo and navigate into it.
git clone<username/repo-name>
cd <repo-name>
  1. Download the edge delta helm chart.
helm repo add edgedelta
helm repo update
  1. Pull the chart with the required version, in this instance {{variable.Current Free Edition Version}}, into a charts/edgedelta folder
mkdir -p charts/edgedelta
cd charts/edgedelta
helm pull edgedelta/edgedelta --version v0.1.56
  1. Create a helm index file in the charts/edgedelta folder and configure it to point to the folder’s URL in your configuration repo. The URL parameter in the index indicates the location of the tgz file.
helm repo index ../edgedelta --url <your-repo>/charts/edgedelta
  1. Add, commit and push the changes to your configuration repo on the main branch.
git add . 
git commit -m "<commit-message>"
git push origin main

Create an Image Store Containing the Edge Delta Images

On your local machine:

  1. Create an image store and ensure you have access to it, in this example a docker hub account is used.
  2. Unpack a copy of the chart you downloaded earlier and open it.
helm pull edgedelta/edgedelta --version v0.1.56 --untar 
cd edgedelta
cat values.yaml
  1. Examine the values.yaml file and note the image repo location for the agent:

You may want to also have optional Edge Delta images in your store like the trouble shooter and HttpRecorder:

  1. Pull the specific Edge Delta agent image and version from the public image store.
docker pull
  1. Tag the local image with your image repo URL and the tag
docker tag <>:v0.1.52
  1. Push the local image to your store using the tag.
docker push <>:v0.1.56
  1. Clean up the unpacked chart and local images.
docker image ls
docker image rm -f <image ID>
cd .. 
rm -r edgedelta

Create the Argo CD Configuration File

There are a number of methods to create parameter overrides that contain your customizations. You may also want to isolate your development, test and production environments. While Kustomize is a recommended approach, this demonstration will add helm parameters for to the Argo CD application definition. The secret API key will be passed in separately by Argo CD and saved on the cluster as a secret.

On your local machine:

  1. Navigate to the cloned configuration repository and create an argocd directory
cd ../..
mkdir argocd
  1. Create the app.yaml file in the argocd folder with the following commands. Specify the location of the helm index file in the repoURL parameter. Enter the required version in the targetRevision parameter. Finally, specify the location of the agent in your image repo with the value parameter.
cd argocd
echo 'apiVersion:
kind: Application
  name: edgedelta
  namespace: argocd
  project: default
    chart: edgedelta
    repoURL: <yourconfiguration repo>
    targetRevision: <the required version, for example 0.1.56> 
        - name:
          value: "<your image location>"
    server: "https://kubernetes.default.svc"
    namespace: edgedelta
      prune: true
      selfHeal: true
    - CreateNamespace=true' >app.yaml 

The Argo CD application definition’s syncPolicy section will automatically update when changes are made to the source repo (automated), it will delete applications with configuration that are no longer in the source repo (prune), and it will reject manual changes to the cluster if they are not in conformance with the configuration repo. Finally, it will automatically create the namespaces required for the applications in the configuration based on the spec.destination.namespace.

  1. Push your changes to the repo.
git add . 
git commit -m "<commit-message>"
git push origin main

Install Argo CD in the cluster

On the K8s host:

  1. Create the argocd namespace
kubectl create namespace argocd
  1. Deploy the Argo CD server in the Kubernetes cluster in the argocd namespace. Then wait for the pods to be ready.
kubectl apply -n argocd -f
kubectl get po -A

Following GitOps principles, consider copying the argocd install yaml file to your own repository and accessing it from there.

  1. To pass in the API key and repo credentials you need to log into the argocd server. First, expose the Argo CD server with an external IP in accordance with your organization’s ingress policy. For this demo, the server is port forwarded. Other methods are discussed here (external link).
kubectl port-forward svc/argocd-server -n argocd 8080:443
  1. In a new terminal, get the default password and copy it.
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo
  1. Login onto the admin user account using the default password and change the password:
argocd login localhost:8080
argocd account update-password
  1. Configure credentials, in accordance with your company security policy, to your configuration repository for Argo CD. In this example, a personal access token (PAT) generated by GitHub is provided as a password.
argocd repo add <your repo URL> --username <your username> --password <personal access token>
  1. Deploy the app.yaml configuration in the argocd namespace:
kubectl -n argocd apply -f <your configuration repo>/argocd/app.yaml
  1. Pass in the secret API key for the agent to connect to the Edge Delta Saas.
argocd app set edgedelta -p secretApiKey.value=<your-API-key>

Manage Upgrades

When a new agent release is required by Edge Delta for the Free Edition agent, you can upload the new version to your image repo and update the targetRevision version number in the app.yaml. If the Edge Delta pod fails you can roll back to the working configuration.

Similarly, you should regularly check for updates to the helm chart and run a diff to ensure that you know what changes occured.

After installing the agent, you can Set Up Alerts.