airshipctl/tools/deployment/azure
Anderson, Craig (ca846m) 2daacf5f2a image-builder integration for ISO builds
This introduces airshipctl integration with image-builder [0], which
replaces the existing isogen tool for ephemeral ISO generation.

The airshipctl isogen executor has been updated for building ephemeral
ISOs using the image-builder container. The ability for user-declared
filenames for cloud-init user data and network data was removed, since
the user's only interest is in supplying the relevant overrides, not in
transparent naming coordination with the image-builder container. A new
object is added to the document package to identify the document kind,
label, and key to retrieve data from since this is pattern we will
reuse elsewhere.

Progress flag removed as requsted. Progress is reported directly by the
image-builder container.

Isogen debug flag removed in favor of using log.DebugEnabled()

[0] https://review.opendev.org/#/c/730777/

Depends-On: https://review.opendev.org/c/airship/images/+/730777/
Change-Id: I545004feaf2116f8ffb29faf6f7f7f5fcfe24fff
2020-12-17 14:47:53 -08:00
..
11_build_kind_cluster.sh Integration of Azure provider to Airship 2.0 2020-10-05 19:27:31 +00:00
31_create_configs.sh image-builder integration for ISO builds 2020-12-17 14:47:53 -08:00
41_initialize_management_cluster.sh Integration of Azure provider to Airship 2.0 2020-10-05 19:27:31 +00:00
51_deploy_workload_cluster.sh Integration of Azure provider to Airship 2.0 2020-10-05 19:27:31 +00:00
100_clean_up_resources.sh Integration of Azure provider to Airship 2.0 2020-10-05 19:27:31 +00:00
200_configure_test_vm.sh Integration of Azure provider to Airship 2.0 2020-10-05 19:27:31 +00:00
200_transfer_airshipctl.sh Integration of Azure provider to Airship 2.0 2020-10-05 19:27:31 +00:00
201_zuul_local_test.sh Integration of Azure provider to Airship 2.0 2020-10-05 19:27:31 +00:00
README.md Integration of Azure provider to Airship 2.0 2020-10-05 19:27:31 +00:00

Zuul Gate Scripts for Bootstrap Container/Ephemeral Cluster/Azure Target Cluster

This folder container the Zuul Gate Scripts for configuring the tools necessary to automatically validate the building of Bootstrap Container (Go app + Docker Image), deployment of Ephemeral Cluster on Azure Cloud and Google Cloud, then using the Azure Ephemeral Cluster to deploy the Target Cluster on Azure Cloud.

Installing and Configuring Tools

The following scripts are used to install and configure tools such as "kubectl", "Go", "Kustomize" and "airshipctl":

  • 01_install_kubectl.sh - installs "kubectl" CLI
  • 02_install_go.sh - installs the "Go" language
  • 03_install_kustomize_docker.sh - install "kustomize" CLI
  • 21_systemwide_executable.sh - build the "airshipctl" CLI

Bootstrap Container and Ephemeral Cluster

The following scrips are used to deploy the Ephemeral cluster on Azure and Google Cloud.

  • 41_deploy_azure_ephemeral_cluster.sh - creates the Azure Bootstrap container that deploys the Azure (AKS) Ephemeral cluster
  • 41_initialize_management_cluster.sh - creates the GCP Bootstrap container that deploys the GCP (GKE) Ephemeral cluster

NOTE: the Bootstrap container images shall be built and pushed to quay.io registry prior to executing these scripts.

Initializing the Ephemeral cluster and Deploying the Target Cluster

The following scripts initialize the Ephemeral cluster with CAPI and CAPZ components and deploy the Target/Workload cluster on the Azure Cloud platform.

  • 41_initialize_management_cluster.sh - initializes the Azure Ephemeral cluster with CAPI and CAPZ components
  • 51_deploy_workload_cluster.sh - deploys a Target/Workload cluster on the Azure Cloud platform

And last but not least, the following scripts is a clean up script, deleting all resources created the public clouds, including the ephemeral clusters.

  • 100_clean_up_resources.sh

Supporting Local Test Scripts

The scripts in this section are used for testing the end-to-end testing pipeline outside the Zuul environment. It simulates the Zuul pipeline on a clean remote VM, e.g., VM created on Azure Cloud.

  • 201_zuul_local_test.sh - simulates the sequence of scripts to run on a Zuul environment.
  • 200_transfer_airshipctl.sh - this script transfers the airshipctl local repository to the test VM then executes 201_zuul_local_test.sh
  • 200_configure_test_vm.sh - Prepares the test VM with basic tools such as "make" and "docker", then executes 200_transfer_airshipctl.sh.

By executing 200_configure_test_vm.sh on a development server will trigger the entire test pipeline, i.e., "Zero Touch" local test.

Pre-requisite: the 200_configure_test_vm.sh requires a special script file that exports environment variables specific for the Azure and GCP Cloud account credentials. See template for this script below:

# Azure cloud authentication credentials.
export AZURE_SUBSCRIPTION_ID="<Your Azure Subscription ID>"
export AZURE_TENANT_ID="<Your Tenant ID>"
export AZURE_CLIENT_ID="<Your Service Principal ID>"
export AZURE_CLIENT_SECRET="<Your Service Principal Secret>"

# To use the default public cloud, otherwise set to AzureChinaCloud|AzureGermanCloud|AzureUSGovernmentCloud
export AZURE_ENVIRONMENT="AzurePublicCloud"

export AZURE_SUBSCRIPTION_ID_B64="$(echo -n "$AZURE_SUBSCRIPTION_ID" | base64 | tr -d '\n')"
export AZURE_TENANT_ID_B64="$(echo -n "$AZURE_TENANT_ID" | base64 | tr -d '\n')"
export AZURE_CLIENT_ID_B64="$(echo -n "$AZURE_CLIENT_ID" | base64 | tr -d '\n')"
export AZURE_CLIENT_SECRET_B64="$(echo -n "$AZURE_CLIENT_SECRET" | base64 | tr -d '\n')"

# GCP Environment Variables
export GCP_PROJECT=<Your Google Cloud Project ID>
export GCP_ACCOUNT=<Your Google Cloud Account ID>