- Docker images from
quay.io/astronomerordocker.io - Astronomer Helm charts from
helm.astronomer.io - Astronomer version information from
updates.astronomer.io
Prerequisites
To complete this setup, you need:- A VPC.
- Private Kubernetes.
- A PostgreSQL instance accessible from that environment.
- PostgreSQL superuser permissions.
- A VPN (or other means) set up to access, at a minimum, Kubernetes and DNS from inside your VPC.
- A Helm configuration file for Astronomer named
values.yaml. You can find samplevalues.yamlfiles in the AWS, Azure, GCP standard installation guides.
Step 1: Configure a private Docker registry
Astronomer’s Docker images are hosted on a public registry which isn’t accessible from an airgapped network. Therefore, these images must be hosted on a Docker registry accessible from within your own network. Every major cloud platform provides its own managed Docker registry service that can be used for this step:- AWS: ECR
- Azure: Azure Container Registry
- GCP: Container Registry
-
Log in to the registry and follow the Kubernetes documentation to produce a
/.docker/config.jsonfile. -
Run the following command to create an image pull secret:
- Copy the generated secret for use in Step 3.
Step 2: Fetch images from Astronomer’s Helm template
The images and tags which are required for your Software installation depend on the version of Astronomer you’re installing. To gather a list of exact images and tags required for your Astronomer version:-
Run the following command to template the Astronomer Helm chart and fetch all of its rendered image tags. Make sure to substitute
<your-basedomain>and<your-astronomer-version>with your information.This command sets all possible Helm values that could impact which images are required for your installation. By fetching all images now, you save time by eliminating the risk of missing an image. -
Run the following command to determine the Astronomer Airflow Helm chart version:
-
Run the following command to template the Astronomer Airflow Helm chart and fetch its rendered image tags:
Note: The Astronomer Airflow Helm Chart version begins with the letter v and is versioned separately from Astronomer Software and Airflow.
If you have already enabled or disabled Astronomer platform components in your
values.yaml, you can pass -f/--values values.yaml to helm template to print a list specific to your values.yaml configuration.Step 3: Add images to your values.yaml file
Regardless of whether you choose to mirror or manually pull/push images to your private registry, the returned images and/or tags must be made accessible within your network.
To make these images accessible to Astronomer, specify your organization’s private registry in the global section of your values.yaml file:
values.yaml file:
Step 4: Fetch Airflow Helm charts
There are two Helm charts required for Astronomer:- The Astronomer Helm chart for the Astronomer Platform
- The Astronomer Airflow Helm chart for Airflow deployments in Astronomer Platform
helm pull and applied locally if desired.
Commander, which is Astronomer’s provisioning component, uses the Astronomer Airflow Helm chart to create Airflow deployments. You have two options to make the Helm chart available to Commander:
- Use the built-in Astronomer Airflow Helm chart in the Commander Docker image.
- Host the Astronomer Airflow Helm chart within your network. Not every cloud provider has a managed Helm registry, so you might want to check out JFrog Artifactory or ChartMuseum.
values.yaml file:
values.yaml file:
If you configure both options in your
values.yaml file, then astronomer.commander.airGapped.enabled takes precedence over global.helmRepo.Step 5: Fetch Airflow updates
By default, Astronomer checks for Airflow updates once a day at midnight by queryinghttps://updates.astronomer.io/astronomer-runtime, which returns a JSON file with version details. However, this URL is not accessible in an airgapped environment. There are several options for making these updates accessible in an airgapped environment:
- You can download the JSON and host it in a location that’s accessible within your airgapped environment, for example:
- AWS S3
- Git
- Nginx (example below)
- You can disable the update checks (not advised)
Exposing Airflow updates using an Nginx endpoint
The following topic provides an example implementation of hosting the Airflow updates JSON files in your airgapped environment and accessing them via an Nginx endpoint. Depending on your organization’s platform and use cases, your own installation might vary from this setup. To complete this setup:-
Host an updates JSON in a Kubernetes configmap by running the following commands:
-
Add an Nginx deployment and service configuration to a new file named
nginx-astronomer-certified.yaml:Note the Docker image in the deployment and ensure that this is also accessible from within your environment. -
Save this file and apply it to your cluster by running the following command:
The updates JSON will be accessible by the service name from pods in the Kubernetes cluster via
http://astronomer-releases.astronomer.svc.cluster.local/astronomer-certified.json.
-
If an image with
curlis available in your network, you can run: -
If you have
curlinstalled on your client machine: -
Complete the entire Software installation, then use one of the
astro-uipods which includebashandcurl:
Configuring a custom updates JSON URL
After you have made the updates JSON accessible within your premises, you must configure the Helm chart to fetch updates from the custom URL:Step 6: Install Astronomer using Helm
Before completing this step, double-check that the following statements are true:- You made Astronomer’s Docker images, Astronomer Airflow Helm chart, and updates JSON accessible inside your network.
- You completed Steps 1 through 8 in the AWS, GCP, or Azure install guides.
<your-version> with the version of Astronomer that you want to install: