diff --git a/docs/airgap/developer/pipeline.md b/docs/airgap/developer/pipeline.md index cc05273d76813b555b352607ef3223a4d444e7b4..9d35d32df768fb5dd14a37ef6ce8e1ca79a9647b 100644 --- a/docs/airgap/developer/pipeline.md +++ b/docs/airgap/developer/pipeline.md @@ -1,106 +1,80 @@ -### Current Pipeline Outline and Notes - -<ol> -<li><h4>.pre</h4> - - <ol> - <li> - <h4><b>changelog</b></h4> Does a diff to lint what has changed for the logs - </li> - <li><h4><b>commits</b></h4> enforces the conventional commits stuff - </li> - <li> - <h4><b>pre vars</b></h4> - pre checks - </li> - <li> - <h4><b>version</b></h4> - gets various versions to build a complex version number for the build - </li> - </ol> -</li> - -<li><h4><b>smoke tests</b></h4> - <ol> - <li><h4><b>clean install</b></h4> - Doesn't really effect airgap, this sets up things like cluster names and such - </li> - <li><h4><b>upgrade</b></h4> - Splits out testing and determines if there are breaking changes for testing of upgrades. - </li> - </ol> -</li> - -<li><h4><b>network up</b></h4> - <ol> - <li><h4><b>airgap/network up</b></h4> - Creates a VPC and subnets for the cluster to be deployed in. - </li> - <li><h4><b>aws/airgap/package</b></h4> - Packages everything needed for the airgap install into a tar file. This leaves the repositories and images bundled in the Releases section for BB (https://repo1.dso.mil/platform-one/big-bang/bigbang/-/releases) - </li> - </ol> -</li> - -<li><h4><b>airgap up</b></h4> - <ol> - <li><h4><b>aws/airgap/utility up</b></h4> - Sets up proxies using Route 53 to essentially fake out where Repo 1 and Registry 1 exist for the purposes of using an air gap registry and git repo. - </li> - </ol> -</li> - -<li><h4><b>cluster up</b></h4> - <ol> - <li><h4><b>airgap/rke2/cluster up</b></h4> - Stands up an RKE2 cluster for BB in an airgapped network. ** Uses terraform ./gitlab-ci/jobs/rke2/dependencies/terraform/ - - Both this and the non-airgapped use the same image registry.dso.mil/platform-one/big-bang/pipeline-templates/pipeline-templates/k3d-builder:0.0.1 - </li> - </ol> -</li> - -<li><h4><b>bigbang up</b></h4> - <ol> - <li><h4><b>airgap/rke2/bigbang up</b></h4> - Stands up big bang - </li> - </ol> -</li> - -<li><h4><b>test</b></h4> - <ol> - <li><h4><b>airgap/rke2/bigbang test</b></h4> - Runs some basic tests to make sure that Big Bang is up and working. - </li> - </ol> -</li> - -<li><h4><b>bigbang down</b></h4> - <ol> - <li><h4><b>airgap/rke2/bigbang down</b></h4> - Tears down the Big Bang instance - </li> - </ol> -</li> - -<li><h4><b>cluster down</b></h4> - <ol> - <li><h4><b>airgap/rke2/cluster down</b></h4></li> - </ol> -</li> - -<li><h4><b>airgap down</b></h4> - <ol> - <li><h4><b>aws/airgap/package delete</b></h4></li> - <li><h4><b>aws/airgap/utility down</b></h4></li> - </ol> -</li> - -<li><h4><b>network down</b></h4> - <ol> - <li><h4><b>airgap/network down</b></h4></li> - </ol> -</li> -</ol> +# Current Pipeline Outline and Notes +1. .pre + + 1. **changelog** + + Does a diff to lint what has changed for the logs. + 1. **commits** + + Enforces the conventional commits stuff. + 1. **pre vars** + + pre checks + 1. **version** + + Gets various versions to build a complex version number for the build. + +1. **smoke tests** + + 1. **clean install** + + Doesn't really effect airgap, this sets up things like cluster names and such. + 1. **upgrade** + + Splits out testing and determines if there are breaking changes for testing of upgrades. + +1. **network up** + + 1. **airgap/network up** + + Creates a VPC and subnets for the cluster to be deployed in. + 1. **aws/airgap/package** + + Packages everything needed for the airgap install into a tar file. This leaves the repositories and images bundled in the Releases section for BB [https://repo1.dso.mil/platform-one/big-bang/bigbang/-/releases](https://repo1.dso.mil/platform-one/big-bang/bigbang/-/releases) + +1. **airgap up** + + 1. **aws/airgap/utility up** + + Sets up proxies using Route 53 to essentially fake out where Repo 1 and Registry 1 exist for the purposes of using an air gap registry and git repo. + +1. **cluster up** + + 1. **airgap/rke2/cluster up** + + Stands up an RKE2 cluster for BB in an airgapped network. \*\* Uses terraform ./gitlab-ci/jobs/rke2/dependencies/terraform/ + + Both this and the non-airgapped use the same image registry.dso.mil/platform-one/big-bang/pipeline-templates/pipeline-templates/k3d-builder:0.0.1 + +1. **bigbang up** + + 1. **airgap/rke2/bigbang up** + + Stands up the Big Bang instance. + +1. **test** + + 1. **airgap/rke2/bigbang test** + + Runs some basic tests to make sure that Big Bang is up and working. + +1. **bigbang down** + + 1. **airgap/rke2/bigbang down** + + Tears down the Big Bang instance. + +1. **cluster down** + + 1. **airgap/rke2/cluster down** + +1. **airgap down** + + 1. **aws/airgap/package delete** + + 1. **aws/airgap/utility down** + +1. **network down** + + 1. **airgap/network down** diff --git a/docs/airgap/developer/terraform/README.tf b/docs/airgap/developer/terraform/README.md similarity index 97% rename from docs/airgap/developer/terraform/README.tf rename to docs/airgap/developer/terraform/README.md index b60d39db1774b70be22f6223d7aa2dade4c36445..a248093b6a79f01dec489d56ab6565be7358a63f 100644 --- a/docs/airgap/developer/terraform/README.tf +++ b/docs/airgap/developer/terraform/README.md @@ -1,2 +1,3 @@ -Terraform that creates a new VPC and two subnets. One subnet is public the other is airgapped except for access to/from the public subnet. This allows for a jump box or other resources to be easily moved in and out of the public subnet for setting up your development environment for the private subnet. +# README +Terraform that creates a new VPC and two subnets. One subnet is public the other is airgapped except for access to/from the public subnet. This allows for a jump box or other resources to be easily moved in and out of the public subnet for setting up your development environment for the private subnet. diff --git a/docs/airgap/developer/terraform/main.tf b/docs/airgap/developer/terraform/main.tf index 09527a4e7d4e54d8aae4aade49030af8b0e4e9a1..45b23ef5706255b4eef63eea162450b013b0ef6b 100644 --- a/docs/airgap/developer/terraform/main.tf +++ b/docs/airgap/developer/terraform/main.tf @@ -11,7 +11,7 @@ provider "aws" { # Vpc resource "aws_vpc" "airgap_vpc" { - cidr_block = "10.0.0.0/16" + cidr_block = "10.0.0.0/16" enable_dns_hostnames = true tags = { @@ -21,8 +21,8 @@ resource "aws_vpc" "airgap_vpc" { # Public subnet resource "aws_subnet" "public" { - vpc_id = aws_vpc.airgap_vpc.id - cidr_block = "10.0.0.0/24" + vpc_id = aws_vpc.airgap_vpc.id + cidr_block = "10.0.0.0/24" availability_zone = local.az tags = { @@ -41,28 +41,28 @@ resource "aws_internet_gateway" "airgap_vpc_igw" { # Public route table resource "aws_route_table" "airgap_vpc_region_public" { - vpc_id = aws_vpc.airgap_vpc.id + vpc_id = aws_vpc.airgap_vpc.id - route { - cidr_block = "0.0.0.0/0" - gateway_id = aws_internet_gateway.airgap_vpc_igw.id - } + route { + cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.airgap_vpc_igw.id + } - tags = { - Name = "airgap-public-rt" - } + tags = { + Name = "airgap-public-rt" + } } # Public route table associations resource "aws_route_table_association" "airgap_vpc_region_public" { - subnet_id = aws_subnet.public.id - route_table_id = aws_route_table.airgap_vpc_region_public.id + subnet_id = aws_subnet.public.id + route_table_id = aws_route_table.airgap_vpc_region_public.id } # Private subnet resource "aws_subnet" "private" { - vpc_id = aws_vpc.airgap_vpc.id - cidr_block = "10.0.2.0/24" + vpc_id = aws_vpc.airgap_vpc.id + cidr_block = "10.0.2.0/24" availability_zone = local.az tags = { @@ -72,17 +72,17 @@ resource "aws_subnet" "private" { # Private routing table resource "aws_route_table" "airgap_vpc_region_private" { - vpc_id = aws_vpc.airgap_vpc.id + vpc_id = aws_vpc.airgap_vpc.id - tags = { - Name = "airgap-private-rt" - } + tags = { + Name = "airgap-private-rt" + } } # Private routing table association resource "aws_route_table_association" "airgap_vpc_region_private" { - subnet_id = aws_subnet.private.id - route_table_id = aws_route_table.airgap_vpc_region_private.id + subnet_id = aws_subnet.private.id + route_table_id = aws_route_table.airgap_vpc_region_private.id } # Output @@ -91,7 +91,7 @@ resource "aws_route_table_association" "airgap_vpc_region_private" { # Use the following to connect to the bootstrap node and enjoy the ride... - # ssh -J ${var.image_username}@${aws_instance.staging_instance.public_ip} ${var.image_username}@${aws_instance.bootstrap_instance.private_ip} +# ssh -J ${var.image_username}@${aws_instance.staging_instance.public_ip} ${var.image_username}@${aws_instance.bootstrap_instance.private_ip} # EOF #} @@ -107,7 +107,7 @@ resource "aws_route_table_association" "airgap_vpc_region_private" { #} output "follow_up" { - value = <<EOF + value = <<EOF Nothing to see here but I have finished. diff --git a/docs/airgap/developer/terraform/variables.tf b/docs/airgap/developer/terraform/variables.tf index a2dc8a03d55e25b1e231abe4d568d66dae615d76..8c4dc099611e5a098bf6708198afd247a7256c9a 100644 --- a/docs/airgap/developer/terraform/variables.tf +++ b/docs/airgap/developer/terraform/variables.tf @@ -1,58 +1,58 @@ # Provider id based on Mesosphere account information variable "profile_id" { - description = "" - # Default region is default - default = "default" + description = "" + # Default region is default + default = "default" } # AWS Region id variable "region_id" { - description = "" - # Default region is us-gov-west-1 - default = "us-gov-west-1" + description = "" + # Default region is us-gov-west-1 + default = "us-gov-west-1" } # Cluster UUID resource "random_string" "random" { - length = 4 - special = false - lower = true - upper = false + length = 4 + special = false + lower = true + upper = false } # Cluster id variable "cluster_id" { - description = "" - # Default region is airgap-???? - default = "airgap-" + description = "" + # Default region is airgap-???? + default = "airgap-" } # ec2.tf variable "image_id" { - description = "Amazon AWS AMI" - # default = "ami-06eeaf749779ed329" - default = "ami-06eeaf749779ed329" + description = "Amazon AWS AMI" + # default = "ami-06eeaf749779ed329" + default = "ami-06eeaf749779ed329" } # ec2.tf variable "image_username" { - description = "Amazon AWS AMI username" - default = "centos" + description = "Amazon AWS AMI username" + default = "centos" } # ec2.tf variable "ec2_instance_type" { - description = "AWS EC2 Instance type" - # Default instance type m5.xlarge - default = "m5.xlarge" + description = "AWS EC2 Instance type" + # Default instance type m5.xlarge + default = "m5.xlarge" } # Ssh keyname variable "ssh_key_name" { - description = "" - # Comment - default = "airgap" + description = "" + # Comment + default = "airgap" } # Cluster owner diff --git a/docs/airgap/scripts/README.md b/docs/airgap/scripts/README.md index a5b459d4b56fd346e629f365c5c092622dc56b3d..739e591a654e33bd5d32ea512a6d66c6bbbeea76 100644 --- a/docs/airgap/scripts/README.md +++ b/docs/airgap/scripts/README.md @@ -1,2 +1,3 @@ -### The directory contains all the utility scripts and examples. +# README +The directory contains all the utility scripts and examples.