Pre-requisites

  1. Make sure there is a bidirectional connection b/w the following components/services:

    1. VCS <—> K8s Cluster
    2. Image Registry <—> K8s Cluster
  2. v1.19 <= K8s Version <= v1.24

Installation

Download airgap bundles

Visit the customer-specific download portal with the password provided in the email that you’ll receive from DeepSource and download KOTS Airgap Bundle, and DeepSource Airgap bundle.

If you haven’t received the email with your download portal and password, reach out to enterprise-support@deepsource.io

Install KOTS

Ref: https://docs.replicated.com/reference/kots-cli-getting-started#manually-download-and-install

Download KOTS

MacOS (AMD and ARM):

curl -LO https://github.com/replicatedhq/kots/releases/latest/download/kots_darwin_all.tar.gz

Linux (AMD):

curl -LO https://github.com/replicatedhq/kots/releases/latest/download/kots_linux_amd64.tar.gz

Linux (ARM):

curl -LO https://github.com/replicatedhq/kots/releases/latest/download/kots_linux_arm64.tar.gz

Extract KOTS Archive

tar -xvzf <kots_archive_file>

Install KOTS as a kubectl plugin

Rename the kots executable to kubectl-kots and move it to one of the directories in your $PATH. This ensures the system can access the executable when running kots CLI commands.

Run one of the following commands, depending on if you have write access to the target directory:

  • You have write access to the directory:
mv kots /PATH_TO_TARGET_DIRECTORY/kubectl-kots

Replace PATH_TO_TARGET_DIRECTORY with the path to a directory that is in your PATH environment variable. For example, /usr/local/bin.

  • You do not have write access to the directory:
sudo mv kots /PATH_TO_TARGET_DIRECTORY/kubectl-kots
  • Replace PATH_TO_TARGET_DIRECTORY with the path to a directory that is in your PATH environment variable. For example, /usr/local/bin.

Verify the installation:

kubectl kots --help

Configure Image Registry (Docker V2 Compatible)

  1. Harbor

    1. Create a new project (e.g.: deepsource), this project name is referred as registry-namespace further in the docs
    2. Create a user with R/W access to the project and note down the username and password for further use.

Upload KOTS Specific Images to the Image Registry

Ref: https://docs.replicated.com/enterprise/updating-app-manager#air-gap-environments

  1. Upload the KOTS Airgap Bundle to your image registry; this will upload kotsadm (the admin console) and the components KOTS requires.
  2. Run the command from the directory where you downloaded the bundle:
kubectl kots admin-console \
push-images ./kotsadm.tar.gz \
 <registry-host>/<registry-namespace> \
 --registry-username <registry-username> \
 --registry-password <registry-password>

For the Harbor image registry, the <registry-namespace> will usually be the project name.

To update the App Manager, refer: https://docs.replicated.com/enterprise/updating-app-manager#air-gap-environments

Install/Upgrade DeepSource

Install

Ref: https://docs.replicated.com/enterprise/installing-existing-cluster-automation#air-gap-existing-cluster

To install DeepSource Enterprise Server, run the following command from the directory where you downloaded the airgap bundle:

kubectl kots install deepsource-fowl   \
 --shared-password <admin-console-password> \
 --license-file <deepsource-license> \
 --airgap-bundle <deepsource-app-release.airgap> \
 --namespace <k8s-namespace> \
 --kotsadm-registry <registry-host> \
 --kotsadm-namespace <registry-namespace> \
 --registry-username <registry-username> \
 --registry-password <registry-password> \
 --no-port-forward

Upgrade

Ref: https://docs.replicated.com/enterprise/updating-apps#air-gapped-installations-on-an-existing-cluster

To upgrade DeepSource Enterprise Server, run the following command from the directory where you downloaded the airgap bundle:

kubectl kots upstream upgrade deepsource-fowl \
  --airgap-bundle <new-deepsource-app-release.airgap> \
  --kotsadm-namespace <registry-namespace> \
  --kotsadm-registry <registry-host> \
  --registry-username <registry-username> \
  --registry-password <registry-password> \
  -n <k8s-namespace>

Configure DeepSource

Visit the Admin Console

  1. Create a port-forward using kubectl port-forward -n deepsource service/kotsadm 3000:3000
  2. Log in using the <admin-console-password> password that was set during the installation step

App Manager Configuration

Visit /docs/enterprise-server-configuration to configure the app from admin console.