Skip to main content
Version: Unreleased 🚧

Air-Gap Install

You can install Capact in an air-gapped environment using different methods, as we simply give you an option to create an archive with Capact Docker images.

This document describes air-gapped installation using k3d. You can use any Kubernetes cluster, but you need to take care of loading images into the cluster.

NOTE: Executed Action may still require internet access, e.g. to download a Terraform module, or to create Cloud SQL on the GCP side.

Prerequisites

Steps

Steps from Do with the internet access are done only once, as it's about preparing the data that is later used for Capact installation.

Do with the internet access

  1. Export Capact version:

    export CAPACT_VERSION=<version> # stable or latest release, such as `0.5.0` or `0.4.0-580e820`
  2. Create an archive with Capact images for the given version:

capact alpha archive-images helm -v --version ${CAPACT_VERSION} -o ./capact-images-amd64.tar.gz --compress gzip
  1. Fetch Capact Helm charts fo the given version:
# Add the Helm chart repository
helm repo add capactio https://storage.googleapis.com/capactio-stable-charts
# Download the charts
helm pull --version ${CAPACT_VERSION} --untar --untardir local-charts capactio/argo capactio/capact capactio/cert-manager capactio/ingress-controller capactio/kubed capactio/monitoring capactio/neo4j
  1. Download Action CRD:
curl -Lo core.capact.io_actions.yaml https://raw.githubusercontent.com/capactio/capact/v${CAPACT_VERSION}/deploy/kubernetes/crds/core.capact.io_actions.yaml
  1. Download k3d images:

    docker pull rancher/k3s:v1.20.10-k3s1
    docker pull rancher/k3d-proxy
    curl -Lo k3s-images-amd64.tar https://github.com/k3s-io/k3s/releases/download/v1.20.10%2Bk3s1/k3s-airgap-images-amd64.tar

    NOTE: Do that only if a k3d cluster is used.

Without the internet access

  1. Create a k3d cluster with the pre-existing images.

    capact env create k3d -v \
    --volume="$PWD/capact-images-amd64.tar.gz:/var/lib/rancher/k3s/agent/images/capact-images-amd64.tar.gz@server[*];agent[*]" \
    --volume="$PWD/k3s-images-amd64.tar:/var/lib/rancher/k3s/agent/images/k3s-images-amd64.tar@server[*];agent[*]" \
    --wait 5m

    NOTE: You can create your own Kubernetes cluster and load images to your nodes or a private Docker registry. For example, use docker load -i ./capact-images-amd64.tar.gz.

  2. Once you have your local Kubernetes cluster set up, install Capact with the following command:

    capact install --version ${CAPACT_VERSION} --helm-repo local-charts --crd ./core.capact.io_actions.yaml --capact-overrides="hub-public.populator.useEmbeddedSourceOnly=true"

    Wait for the command execution to finish.

Next steps

Configure Capact CLI to connect to your fresh local Capact installation. Follow the steps in the First use section of the CLI Getting started guide. Enjoy using Capact!

Cleanup

To remove your local Kubernetes cluster, run:

capact environment delete k3d

NOTE: This command deletes the local cluster with all the data, including the history of executed Actions and created TypeInstances. Make sure you cleaned up all external resources (e.g. managed PostgreSQL databases) based on the TypeInstance data.