UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit 0c61a8c1 authored by Jason Krause's avatar Jason Krause :8ball: Committed by Micah Nagel
Browse files

Jsonkrause docs airgap

parent f433890d
2 merge requests!1658Draft: Merge branch 'tempo_tracing_updates' into 'master',!1415Jsonkrause docs airgap
### Current Pipeline Outline and Notes # 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>
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**
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.
...@@ -11,7 +11,7 @@ provider "aws" { ...@@ -11,7 +11,7 @@ provider "aws" {
# Vpc # Vpc
resource "aws_vpc" "airgap_vpc" { resource "aws_vpc" "airgap_vpc" {
cidr_block = "10.0.0.0/16" cidr_block = "10.0.0.0/16"
enable_dns_hostnames = true enable_dns_hostnames = true
tags = { tags = {
...@@ -21,8 +21,8 @@ resource "aws_vpc" "airgap_vpc" { ...@@ -21,8 +21,8 @@ resource "aws_vpc" "airgap_vpc" {
# Public subnet # Public subnet
resource "aws_subnet" "public" { resource "aws_subnet" "public" {
vpc_id = aws_vpc.airgap_vpc.id vpc_id = aws_vpc.airgap_vpc.id
cidr_block = "10.0.0.0/24" cidr_block = "10.0.0.0/24"
availability_zone = local.az availability_zone = local.az
tags = { tags = {
...@@ -41,28 +41,28 @@ resource "aws_internet_gateway" "airgap_vpc_igw" { ...@@ -41,28 +41,28 @@ resource "aws_internet_gateway" "airgap_vpc_igw" {
# Public route table # Public route table
resource "aws_route_table" "airgap_vpc_region_public" { resource "aws_route_table" "airgap_vpc_region_public" {
vpc_id = aws_vpc.airgap_vpc.id vpc_id = aws_vpc.airgap_vpc.id
route { route {
cidr_block = "0.0.0.0/0" cidr_block = "0.0.0.0/0"
gateway_id = aws_internet_gateway.airgap_vpc_igw.id gateway_id = aws_internet_gateway.airgap_vpc_igw.id
} }
tags = { tags = {
Name = "airgap-public-rt" Name = "airgap-public-rt"
} }
} }
# Public route table associations # Public route table associations
resource "aws_route_table_association" "airgap_vpc_region_public" { resource "aws_route_table_association" "airgap_vpc_region_public" {
subnet_id = aws_subnet.public.id subnet_id = aws_subnet.public.id
route_table_id = aws_route_table.airgap_vpc_region_public.id route_table_id = aws_route_table.airgap_vpc_region_public.id
} }
# Private subnet # Private subnet
resource "aws_subnet" "private" { resource "aws_subnet" "private" {
vpc_id = aws_vpc.airgap_vpc.id vpc_id = aws_vpc.airgap_vpc.id
cidr_block = "10.0.2.0/24" cidr_block = "10.0.2.0/24"
availability_zone = local.az availability_zone = local.az
tags = { tags = {
...@@ -72,17 +72,17 @@ resource "aws_subnet" "private" { ...@@ -72,17 +72,17 @@ resource "aws_subnet" "private" {
# Private routing table # Private routing table
resource "aws_route_table" "airgap_vpc_region_private" { resource "aws_route_table" "airgap_vpc_region_private" {
vpc_id = aws_vpc.airgap_vpc.id vpc_id = aws_vpc.airgap_vpc.id
tags = { tags = {
Name = "airgap-private-rt" Name = "airgap-private-rt"
} }
} }
# Private routing table association # Private routing table association
resource "aws_route_table_association" "airgap_vpc_region_private" { resource "aws_route_table_association" "airgap_vpc_region_private" {
subnet_id = aws_subnet.private.id subnet_id = aws_subnet.private.id
route_table_id = aws_route_table.airgap_vpc_region_private.id route_table_id = aws_route_table.airgap_vpc_region_private.id
} }
# Output # Output
...@@ -91,7 +91,7 @@ resource "aws_route_table_association" "airgap_vpc_region_private" { ...@@ -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... # 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 # EOF
#} #}
...@@ -107,7 +107,7 @@ resource "aws_route_table_association" "airgap_vpc_region_private" { ...@@ -107,7 +107,7 @@ resource "aws_route_table_association" "airgap_vpc_region_private" {
#} #}
output "follow_up" { output "follow_up" {
value = <<EOF value = <<EOF
Nothing to see here but I have finished. Nothing to see here but I have finished.
......
# Provider id based on Mesosphere account information # Provider id based on Mesosphere account information
variable "profile_id" { variable "profile_id" {
description = "" description = ""
# Default region is default # Default region is default
default = "default" default = "default"
} }
# AWS Region id # AWS Region id
variable "region_id" { variable "region_id" {
description = "" description = ""
# Default region is us-gov-west-1 # Default region is us-gov-west-1
default = "us-gov-west-1" default = "us-gov-west-1"
} }
# Cluster UUID # Cluster UUID
resource "random_string" "random" { resource "random_string" "random" {
length = 4 length = 4
special = false special = false
lower = true lower = true
upper = false upper = false
} }
# Cluster id # Cluster id
variable "cluster_id" { variable "cluster_id" {
description = "" description = ""
# Default region is airgap-???? # Default region is airgap-????
default = "airgap-" default = "airgap-"
} }
# ec2.tf # ec2.tf
variable "image_id" { variable "image_id" {
description = "Amazon AWS AMI" description = "Amazon AWS AMI"
# default = "ami-06eeaf749779ed329" # default = "ami-06eeaf749779ed329"
default = "ami-06eeaf749779ed329" default = "ami-06eeaf749779ed329"
} }
# ec2.tf # ec2.tf
variable "image_username" { variable "image_username" {
description = "Amazon AWS AMI username" description = "Amazon AWS AMI username"
default = "centos" default = "centos"
} }
# ec2.tf # ec2.tf
variable "ec2_instance_type" { variable "ec2_instance_type" {
description = "AWS EC2 Instance type" description = "AWS EC2 Instance type"
# Default instance type m5.xlarge # Default instance type m5.xlarge
default = "m5.xlarge" default = "m5.xlarge"
} }
# Ssh keyname # Ssh keyname
variable "ssh_key_name" { variable "ssh_key_name" {
description = "" description = ""
# Comment # Comment
default = "airgap" default = "airgap"
} }
# Cluster owner # Cluster owner
......
### The directory contains all the utility scripts and examples. # README
The directory contains all the utility scripts and examples.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment