Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Extract the downloaded file: tar -xf gv-platform-$VERSION.tar

  2. Prepare K3s for air-gap installation:

    Code Block
    languagebash
    $# mkdir -p /var/lib/rancher/k3s/agent/images/
    $# gunzip -c assets/k3s-airgap-images-amd64.tar.gz > /var/lib/rancher/k3s/agent/images/airgap-images.tar
    $# cp assets/k3s /usr/local/bin && chmod +x /usr/local/bin/k3s
    $# tar -xzf assets/helm-v3.8.2-linux-amd64.tar.gz
    $# cp linux-amd64/helm /usr/local/bin
  3. Install K3s:

    Code Block
    languagebash
    $# cat scripts/k3s.sh | INSTALL_K3S_SKIP_DOWNLOAD=true SKIP_PRECHECK=true K3S_KUBECONFIG_MODE="644" sh -s - server --node-name=local-01
  4. Wait for the 30s and check if K3s is running with the command: kubectl get pods -A and systemctl status k3s.service

...

  1. Import Docker images locally:

    Code Block
    languagebash
    $# mkdir /tmp/import
    $# for f in images/*.gz; do IMG=$(basename "${f}" .gz); gunzip -c "${f}" > /tmp/import/"${IMG}"; done
    $# for f in /tmp/import/*.tar; do ctr -n=k8s.io images import "${f}"; done

...

  1. Install Getvisibility Essentials and set the daily UTC backup hour (0-23) for performing backups.

    Code Block
    $# helm upgrade --install gv-essentials charts/gv-essentials-$VERSION.tgz --wait \
    --timeout=10m0s --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --set backup.hour=1 \
    --set eck-operator.enabled=true \
    --set updateclusterid.enabled=false
  2. Install Monitoring CRD:

    Code Block
    $# helm upgrade --install rancher-monitoring-crd charts/rancher-monitoring-crd-$VERSION.tgz --wait \
    --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --namespace=cattle-monitoring-system \
    --create-namespace
  3. Install Monitoring:

    Code Block
    $# helm upgrade --install rancher-monitoring charts/rancher-monitoring-$VERSION.tgz --wait \
    --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --namespace=cattle-monitoring-system \
    --set k3sServer.enabled=true \
    --set k3sControllerManager.enabled=true \
    --set k3sScheduler.enabled=true \
    --set k3sProxy.enabled=true \
    --set prometheus.retention=5
  4. Check all pods are Running with the command: kubectl get pods -A

...

  • $VERSION with the version that is present in the bundle that has been downloaded

  • $RESELLER with the reseller code (either getvisibility or forcepoint)

  • $PRODUCT with the product being installed (synergy or focus or enterprise)

Code Block
# helm upgrade --install gv-platform charts/gv-platform-$VERSION.tgz --wait \
--timeout=10m0s --kubeconfig /etc/rancher/k3s/k3s.yaml \
--set-string clusterLabels.environment=prod \
--set-string clusterLabels.environment=prod \
--set-string clusterLabels.cluster_reseller=$RESELLER \
--set-string clusterLabels.cluster_name=mycluster \
--set-string clusterLabels.product=$PRODUCT clusterLabels.cluster_reseller=$RESELLER \
--set-string clusterLabels.cluster_name=mycluster \
--set-string clusterLabels.product=$PRODUCT
Info

In case if you expirience 404 error for accessing to Keycloak or UI and use 1.26 (default) version of K3s ensure that treafik patch is applied

Code Block
# kubectl patch clusterrole traefik-kube-system -n kube-system --type='json' -p='[{"op": "add", "path": "/rules/-1/apiGroups/-", "value": "traefik.io"}]'
# kubectl apply -f assets/traefik-patch.yaml
# kubectl rollout restart deployment traefik -n kube-system

Install custom artifact bundles

...

  1. Install Getvisibility Essentials and set the daily UTC backup hour (0-23) for performing backups.
    If you are installing Focus or Enterprise append --set eck-operator.enabled=true to the command in order to enable ElasticSearch.

    Code Block
    $ helm upgrade --install gv-essentials charts/gv-essentials-$VERSION.tgz --wait \
    --timeout=10m0s --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --set global.high_available=true \
    --set eck-operator.enabled=true  \
    --set minio.replicas=4 \
    --set minio.mode=distributed \
    --set consul.server.replicas=3 \
    --set updateclusterid.enabled=false \
    --set backup.hour=1
  2. Install Monitoring CRD:

    Code Block
    $ helm upgrade --install rancher-monitoring-crd charts/rancher-monitoring-crd-$VERSION.tgz --wait \
    --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --namespace=cattle-monitoring-system \
    --create-namespace
  3. Install Monitoring:

    Code Block
    $ helm upgrade --install rancher-monitoring charts/rancher-monitoring-$VERSION.tgz --wait \
    --kubeconfig /etc/rancher/k3s/k3s.yaml \
    --set global.high_available=true \
    --namespace=cattle-monitoring-system \
    --set loki-stack.loki.replicas=2 \
    --set prometheus.prometheusSpec.replicas=2
  4. Check all pods are Running with the command:
    kubectl get pods -A

...