-
Notifications
You must be signed in to change notification settings - Fork 539
docs: added Documentation for Air-Gapped Installation #5360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
c300ffa
added docs for air-gapped-installation
822833c
added all the images in 7.0.0
ba4743a
Merge branch 'main' into airgapped-docs
badal773 6643be1
modified yq command in the docs
4b4bc16
added an entry in summary.md
8afd782
added installation commands
6af21a6
Merge branch 'main' into airgapped-docs
badal773 145c591
modified statements
faea6bf
modified variable name
08caad5
added steps to navigation
16a0f43
added the latest oss chart images
4e125ab
added a note for docker
70b28e2
Merge branch 'main' into airgapped-docs
badal773 2dc17fa
Added Intro + Proofreading + Structuring
ashokdevtron 265e518
Other fixes
ashokdevtron c65dfe0
Lang fix
ashokdevtron 6de253c
added docs for ea-mode only
17a2158
modified lang
fe04b36
Update install-devtron-in-airgapped-environment.md
ashokdevtron d500fbf
added changes
cd1146b
modified changes
c8eaa0d
Merge branch 'main' into airgapped-docs
badal773 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
quay.io/devtron/image-scanner:137872c2-141-23848 | ||
quay.io/devtron/inception:473deaa4-185-21582 | ||
quay.io/devtron/hyperion:291c4c75-280-23860 | ||
public.ecr.aws/docker/library/redis:7.0.5-alpine | ||
quay.io/argoproj/argocd:v2.5.2 | ||
quay.io/argoproj/workflow-controller:v3.4.3 | ||
quay.io/devtron/authenticator:e414faff-393-13273 | ||
quay.io/devtron/bats:v1.4.1 | ||
quay.io/devtron/busybox:1.31.1 | ||
quay.io/devtron/chart-sync:5a1d0301-150-23845 | ||
quay.io/devtron/curl:7.73.0 | ||
quay.io/devtron/dashboard:5f95d187-690-23841 | ||
quay.io/devtron/devtron-utils:dup-chart-repo-v1.1.0 | ||
quay.io/devtron/devtron:291c4c75-434-23853 | ||
quay.io/devtron/ci-runner:48aca9f4-138-23844 | ||
quay.io/devtron/dex:v2.30.2 | ||
quay.io/devtron/git-sensor:86e13283-200-23847 | ||
quay.io/devtron/grafana:7.3.1 | ||
quay.io/devtron/k8s-sidecar:1.1.0 | ||
quay.io/devtron/k8s-utils:tutum-curl | ||
quay.io/devtron/kubectl:latest | ||
quay.io/devtron/kubelink:0dee6306-564-23843 | ||
quay.io/devtron/kubewatch:850b40d5-419-23840 | ||
quay.io/devtron/lens:56211042-333-23839 | ||
quay.io/devtron/migrator:v4.16.2 | ||
quay.io/devtron/nats-box | ||
quay.io/devtron/nats-server-config-reloader:0.6.2 | ||
quay.io/devtron/nats:2.9.3-alpine | ||
quay.io/devtron/notifier:9639b1ab-372-23850 | ||
quay.io/devtron/postgres:11.9 | ||
quay.io/devtron/postgres_exporter:v0.10.1 | ||
quay.io/devtron/prometheus-nats-exporter:0.9.0 | ||
quay.io/devtron/minio:RELEASE.2021-02-14T04-01-33Z | ||
quay.io/devtron/clair:4.3.6 | ||
quay.io/devtron/postgres:11.9.0-debian-10-r26 | ||
quay.io/devtron/postgres_exporter:v0.4.7 | ||
quay.io/devtron/minio-mc:RELEASE.2021-02-14T04-28-06Z | ||
quay.io/devtron/minideb:latest | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
245 changes: 245 additions & 0 deletions
245
docs/setup/install/install-devtron-in-airgapped-environment.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,245 @@ | ||
# Devtron Installation in an Airgapped Environment | ||
|
||
## Introduction | ||
|
||
In certain scenarios, you may need to deploy Devtron to a Kubernetes cluster that isn’t connected to the internet. Such air-gapped environments are used for various reasons, particularly in industries with strict regulatory requirements like healthcare, banking, and finance. This is because air-gapped environments aren't exposed to the public internet; therefore, they create a controlled and secure space for handling sensitive data and operations. | ||
|
||
### Prerequisites | ||
|
||
1. Install `podman` or `docker` on the VM from where you're executing the installation commands. | ||
2. Clone the Devtron Helm chart: | ||
|
||
```bash | ||
git clone https://github.com/devtron-labs/devtron.git | ||
cd devtron | ||
``` | ||
|
||
3. Set the values of `TARGET_REGISTRY`, `TARGET_REGISTRY_USERNAME`, and `TARGET_REGISTRY_TOKEN`. This registry should be accessible from the VM where you are running the cloning script and the K8s cluster where you’re installing Devtron. | ||
|
||
{% hint style="warning" %} | ||
### Note | ||
If you are using Docker, the TARGET_REGISTRY should be in the format `docker.io/<USERNAME>` | ||
{% endhint %} | ||
|
||
--- | ||
|
||
## Docker Instructions | ||
|
||
### Platform Selection | ||
|
||
#### For Linux/amd64 | ||
|
||
```bash | ||
export PLATFORM="linux/amd64" | ||
``` | ||
#### For Linux/arm64 | ||
|
||
```bash | ||
export PLATFORM="linux/arm64" | ||
``` | ||
|
||
|
||
|
||
1. Set the environment variables | ||
|
||
```bash | ||
# Set the source registry URL | ||
export SOURCE_REGISTRY="quay.io/devtron" | ||
|
||
# Set the target registry URL, username, and token/password | ||
export TARGET_REGISTRY="" | ||
export TARGET_REGISTRY_USERNAME="" | ||
export TARGET_REGISTRY_TOKEN="" | ||
|
||
# Set the source and target image file names with default values if not already set | ||
SOURCE_IMAGES_LIST="${SOURCE_IMAGES_LIST:=devtron-images.txt.source}" | ||
TARGET_IMAGES_LIST="${TARGET_IMAGES_LIST:=devtron-images.txt.target}" | ||
``` | ||
|
||
2. Log in to the target Docker registry | ||
|
||
```bash | ||
docker login -u $TARGET_REGISTRY_USERNAME -p $TARGET_REGISTRY_TOKEN $TARGET_REGISTRY | ||
``` | ||
|
||
3. Clone the images | ||
|
||
```bash | ||
while IFS= read -r source_image; do | ||
# Check if the source image belongs to the quay.io/devtron registry | ||
if [[ "$source_image" == quay.io/devtron/* ]]; then | ||
# Replace the source registry with the target registry in the image name | ||
target_image="${source_image/quay.io\/devtron/$TARGET_REGISTRY}" | ||
|
||
# Check if the source image belongs to the quay.io/argoproj registry | ||
elif [[ "$source_image" == quay.io/argoproj/* ]]; then | ||
# Replace the source registry with the target registry in the image name | ||
target_image="${source_image/quay.io\/argoproj/$TARGET_REGISTRY}" | ||
|
||
# Check if the source image belongs to the public.ecr.aws/docker/library registry | ||
elif [[ "$source_image" == public.ecr.aws/docker/library/* ]]; then | ||
# Replace the source registry with the target registry in the image name | ||
target_image="${source_image/public.ecr.aws\/docker\/library/$TARGET_REGISTRY}" | ||
fi | ||
|
||
# Pull the image from the source registry | ||
docker pull --platform $PLATFORM $source_image | ||
|
||
# Tag the image with the new target registry name | ||
docker tag $source_image $target_image | ||
|
||
# Push the image to the target registry | ||
docker push $target_image | ||
|
||
# Output the updated image name | ||
echo "Updated image: $target_image" | ||
|
||
# Append the new image name to the target image file | ||
echo "$target_image" >> "$TARGET_IMAGES_LIST" | ||
|
||
done < "$SOURCE_IMAGES_LIST" | ||
``` | ||
--- | ||
|
||
## Podman Instructions | ||
|
||
### For Multi-arch | ||
|
||
1. Set the environment variables | ||
|
||
```bash | ||
export SOURCE_REGISTRY="quay.io/devtron" | ||
export SOURCE_REGISTRY_TOKEN=#Enter token provided by Devtron team | ||
export TARGET_REGISTRY=#Enter target registry url | ||
export TARGET_REGISTRY_USERNAME=#Enter target registry username | ||
export TARGET_REGISTRY_TOKEN=#Enter target registry token/password | ||
``` | ||
|
||
2. Log in to the target Podman registry | ||
|
||
```bash | ||
podman login -u $TARGET_REGISTRY_USERNAME -p $TARGET_REGISTRY_TOKEN $TARGET_REGISTRY | ||
``` | ||
|
||
3. Clone the images | ||
|
||
```bash | ||
SOURCE_REGISTRY="quay.io/devtron" | ||
TARGET_REGISTRY=${TARGET_REGISTRY} | ||
SOURCE_IMAGES_FILE_NAME="${SOURCE_IMAGES_FILE_NAME:=devtron-images.txt.source}" | ||
TARGET_IMAGES_FILE_NAME="${TARGET_IMAGES_FILE_NAME:=devtron-images.txt.target}" | ||
|
||
cp $SOURCE_IMAGES_FILE_NAME $TARGET_IMAGES_FILE_NAME | ||
while read source_image; do | ||
if [[ "$source_image" == *"workflow-controller:"* || "$source_image" == *"argoexec:"* || "$source_image" == *"argocd:"* ]] | ||
then | ||
SOURCE_REGISTRY="quay.io/argoproj" | ||
sed -i "s|${SOURCE_REGISTRY}|${TARGET_REGISTRY}|g" $TARGET_IMAGES_FILE_NAME | ||
elif [[ "$source_image" == *"redis:"* ]] | ||
then | ||
SOURCE_REGISTRY="public.ecr.aws/docker/library" | ||
sed -i "s|${SOURCE_REGISTRY}|${TARGET_REGISTRY}|g" $TARGET_IMAGES_FILE_NAME | ||
else | ||
SOURCE_REGISTRY="quay.io/devtron" | ||
sed -i "s|${SOURCE_REGISTRY}|${TARGET_REGISTRY}|g" $TARGET_IMAGES_FILE_NAME | ||
fi | ||
done <$SOURCE_IMAGES_FILE_NAME | ||
echo "Target Images file finalized" | ||
|
||
while read -r -u 3 source_image && read -r -u 4 target_image ; do | ||
echo "Pushing $source_image $target_image" | ||
podman manifest create $source_image | ||
podman manifest add $source_image $source_image --all | ||
podman manifest push $source_image $target_image --all | ||
done 3<"$SOURCE_IMAGES_FILE_NAME" 4<"$TARGET_IMAGES_FILE_NAME" | ||
``` | ||
|
||
--- | ||
|
||
## Devtron Installation | ||
|
||
Before starting, ensure you have created an image pull secret for your registry if authentication is required. | ||
|
||
1. Create the namespace (if not already created) | ||
```bash | ||
kubectl create ns devtroncd | ||
``` | ||
|
||
2. Create the Docker registry secret | ||
```bash | ||
kubectl create secret docker-registry devtron-imagepull \ | ||
--namespace devtroncd \ | ||
--docker-server=$TARGET_REGISTRY \ | ||
--docker-username=$TARGET_REGISTRY_USERNAME \ | ||
--docker-password=$TARGET_REGISTRY_TOKEN | ||
``` | ||
If you are installing Devtron with the CI/CD module or using Argo CD, create the secret in the following namespaces else, you can skip this step-: | ||
```bash | ||
kubectl create secret docker-registry devtron-imagepull \ | ||
--namespace devtron-cd \ | ||
--docker-server=$TARGET_REGISTRY \ | ||
--docker-username=$TARGET_REGISTRY_USERNAME \ | ||
--docker-password=$TARGET_REGISTRY_TOKEN | ||
kubectl create secret docker-registry devtron-imagepull \ | ||
--namespace devtron-ci \ | ||
--docker-server=$TARGET_REGISTRY \ | ||
--docker-username=$TARGET_REGISTRY_USERNAME \ | ||
--docker-password=$TARGET_REGISTRY_TOKEN | ||
kubectl create secret docker-registry devtron-imagepull \ | ||
--namespace argo \ | ||
--docker-server=$TARGET_REGISTRY \ | ||
--docker-username=$TARGET_REGISTRY_USERNAME \ | ||
--docker-password=$TARGET_REGISTRY_TOKEN | ||
``` | ||
|
||
3. Navigate to the Devtron Helm chart directory | ||
```bash | ||
cd charts/devtron | ||
``` | ||
|
||
|
||
### Install Devtron without any Integration | ||
|
||
Use the below command to install Devtron without any Integrations | ||
|
||
1. Without `imagePullSecrets`: | ||
```bash | ||
helm install devtron . -n devtroncd --set global.containerRegistry="$TARGET_REGISTRY" | ||
``` | ||
|
||
2. With `imagePullSecrets`: | ||
```bash | ||
helm install devtron . -n devtroncd --set global.containerRegistry="$TARGET_REGISTRY" --set global.imagePullSecrets[0].name=devtron-imagepull | ||
``` | ||
|
||
### Installing Devtron with CI/CD Mode | ||
Use the below command to install Devtron with only the CI/CD module | ||
|
||
1. Without `imagePullSecrets`: | ||
```bash | ||
helm install devtron . -n devtroncd --set installer.modules={cicd} --set global.containerRegistry="$TARGET_REGISTRY" | ||
``` | ||
|
||
2. With `imagePullSecrets`: | ||
```bash | ||
helm install devtron . -n devtroncd --set installer.modules={cicd} --set global.containerRegistry="$TARGET_REGISTRY" --set global.imagePullSecrets[0].name=devtron-imagepull | ||
``` | ||
|
||
### Install Devtron with CICD Mode including Argocd | ||
|
||
Use the below command to install Devtron with the CI/CD module and Argo CD | ||
|
||
1. Without `imagePullSecrets`: | ||
```bash | ||
helm install devtron . --create-namespace -n devtroncd --set installer.modules={cicd} --set argo-cd.enabled=true --set global.containerRegistry="$TARGET_REGISTRY" --set argo-cd.global.image.repository="${TARGET_REGISTRY}/argocd" --set argo-cd.redis.image.repository="${TARGET_REGISTRY}/redis" | ||
``` | ||
|
||
2. With `imagePullSecrets`: | ||
```bash | ||
helm install devtron . --create-namespace -n devtroncd --set installer.modules={cicd} --set argo-cd.enabled=true --set global.containerRegistry="$TARGET_REGISTRY" --set argo-cd.global.image.repository="${TARGET_REGISTRY}/argocd" --set argo-cd.redis.image.repository="${TARGET_REGISTRY}/redis" --set global.imagePullSecrets[0].name=devtron-imagepull | ||
``` | ||
|
||
--- | ||
|
||
## Next Steps | ||
After installation, refer [Devtron installation documentation](https://docs.devtron.ai/install/install-devtron-with-cicd-with-gitops#devtron-dashboard) for further steps, including obtaining the dashboard URL and the admin password. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.