Skip to content
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

#738 - Fixed markdown linting violations from landing zone v2 readme document #722

Merged
merged 9 commits into from
Jan 22, 2024
93 changes: 45 additions & 48 deletions docs/landing-zone-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
- [Summary](#summary)
- [Initial Organization configuration](#initial-organization-configuration)
- [Config Controller project and cluster](#config-controller-project-and-cluster)
- [Option 1 - Org level folder](#option-1---org-level-folder)
tackaberry marked this conversation as resolved.
Show resolved Hide resolved
- [Option 2 - Folder in a Folder](#option-2---folder-in-a-folder)
- [Option 1 - Org level Project](#option-1---org-level-project)
- [Option 2 - Project in a Folder](#option-2---project-in-a-folder)
- [GKE Autopilot - Fully managed cluster](#gke-autopilot---fully-managed-cluster)
- [GKE Standard](#gke-standard)
- [GKE Credentials](#gke-credentials)
- [GKE Service Account](#gke-service-account)
- [2. Create your landing zone](#2-create-your-landing-zone)
Expand Down Expand Up @@ -118,10 +112,10 @@ It is possible to only have 1 client and service multiple teams and working grou
To deploy this Landing Zone you will need to:

1. [Complete the bootstrap procedure.](#1-complete-the-bootstrap-procedure)
2. [Create your landing zone.](#2-create-your-landing-zone)
3. [Deploy the infrastructure using gitops](#deploy-the-infrastructure-using-gitops)
4. [Validate the landing zone deployment](#4-validate-the-landing-zone-deployment)
5. [Perform the post deployment steps](#5-perform-the-post-deployment-steps)
1. [Create your landing zone.](#2-create-your-landing-zone)
1. [Deploy the infrastructure using gitops](#deploy-the-infrastructure-using-gitops)
1. [Validate the landing zone deployment](#4-validate-the-landing-zone-deployment)
1. [Perform the post deployment steps](#5-perform-the-post-deployment-steps)

### <a name='Completethebootstrapprocedure'></a>1. Complete the bootstrap procedure

Expand Down Expand Up @@ -221,36 +215,36 @@ The following instructions in this section 1 for the boostrap of the Config Cont
### <a name='Option1-Orglevelfolder'></a>Option 1 - Org level folder

```shell
FOLDER_ID=$(gcloud resource-manager folders create --display-name=$LZ_FOLDER_NAME --organization=$ORG_ID --format="value(name)" --quiet | cut -d "/" -f 2)
FOLDER_ID=$(gcloud resource-manager folders create --display-name=$LZ_FOLDER_NAME --organization=$ORG_ID --format="value(name)" --quiet | cut -d "/" -f 2)
```

### <a name='Option2-FolderinaFolder'></a>Option 2 - Folder in a Folder

```shell
FOLDER_ID=$(gcloud resource-manager folders create --display-name=$LZ_FOLDER_NAME --folder=$ROOT_FOLDER_ID --format="value(name)" --quiet | cut -d "/" -f 2)
FOLDER_ID=$(gcloud resource-manager folders create --display-name=$LZ_FOLDER_NAME --folder=$ROOT_FOLDER_ID --format="value(name)" --quiet | cut -d "/" -f 2)
```

2. Create a new project at the org level where we will install the Config Controller instance.
1. Create a new project at the org level where we will install the Config Controller instance.

### <a name='Option1-OrglevelProject'></a>Option 1 - Org level Project

```shell
gcloud projects create $PROJECT_ID --set-as-default --organization=$ORG_ID
gcloud projects create $PROJECT_ID --set-as-default --organization=$ORG_ID
```

### <a name='Option2-ProjectinaFolder'></a>Option 2 - Project in a Folder

```shell
gcloud projects create $PROJECT_ID --set-as-default --folder=$ROOT_FOLDER_ID
gcloud projects create $PROJECT_ID --set-as-default --folder=$ROOT_FOLDER_ID
```

1. Enable Billing

```shell
```shell
gcloud beta billing projects link $PROJECT_ID --billing-account $BILLING_ID
```
```

2. Set the project ID
1. Set the project ID

```shell
gcloud config set project $PROJECT_ID
Expand Down Expand Up @@ -354,13 +348,14 @@ The following instructions in this section 1 for the boostrap of the Config Cont
### <a name='GKEAutopilot-Fullymanagedcluster'></a>GKE Autopilot - Fully managed cluster

```shell
gcloud anthos config controller create $CLUSTER --location $REGION --network $NETWORK --subnet $SUBNET --master-ipv4-cidr-block="172.16.0.128/28" --full-management
gcloud anthos config controller create $CLUSTER --location $REGION --network $NETWORK --subnet $SUBNET --master-ipv4-cidr-block="172.16.0.128/28" --full-management
```

### <a name='GKEStandard'></a>GKE Standard
Optional

```shell
gcloud anthos config controller create $CLUSTER --location $REGION --network $NETWORK --subnet $SUBNET
gcloud anthos config controller create $CLUSTER --location $REGION --network $NETWORK --subnet $SUBNET
```

### <a name='GKECredentials'></a>GKE Credentials
Expand Down Expand Up @@ -424,7 +419,7 @@ cd pbmm-landingzone

All Gatekeeper Policy Package releases can be found [here](https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/releases?q=gatekeeper&expanded=true)

2. Get the core landing zone package
1. Get the core landing zone package

- Experimentation

Expand All @@ -448,7 +443,9 @@ cd pbmm-landingzone

[Releases List](https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/releases?q=core-landing-zone&expanded=true)

3. Customize Packages
1. Customize Packages

> **!!! Important** !!! PLEASE DON'T SKIP or IGNORE THIS STEP!

Review and customize all packages' `setters.yaml` with the unique configuration of your landing zone.
For example "core-landing-zone" will have the same [setters.yaml](https://github.com/GoogleCloudPlatform/pubsec-declarative-toolkit/blob/main/solutions/core-landing-zone/setters.yaml) as in the repo in the root of the pkg directory.
Expand All @@ -461,43 +458,43 @@ Optional

#### <a name='core-landing-zone-kpt'></a>core-landing-zone

1. initialize the package
1. initialize the package

```shell
kpt live init core-landing-zone --namespace config-control
```
```shell
kpt live init core-landing-zone --namespace config-control
```

1. apply / hydrate the templated package with setters.yaml values - where kpt-set values are replaced
1. apply / hydrate the templated package with setters.yaml values - where kpt-set values are replaced

```shell
kpt fn render core-landing-zone
```
```shell
kpt fn render core-landing-zone
```

1. Apply the hydrated kubernetes yaml to the cluster
1. Apply the hydrated kubernetes yaml to the cluster

```shell
kpt live apply core-landing-zone --reconcile-timeout=2m --output=table
```
```shell
kpt live apply core-landing-zone --reconcile-timeout=2m --output=table
```

1. Check the status of the deployed resources
1. Check the status of the deployed resources

```shell
kpt live status core-landing-zone
```
```shell
kpt live status core-landing-zone
```

1. Check the status of the deployed services on the cluster
1. Check the status of the deployed services on the cluster

```shell
kubectl get gcp --all-namespaces
```
```shell
kubectl get gcp --all-namespaces
```

or a specific namespace
or a specific namespace

```shell
kubectl get gcp -n projects
```
```shell
kubectl get gcp -n projects
```

Repeat the above process with additional solutions packages.
Repeat the above process with additional solutions packages.


## <a name='deploy-the-infrastructure-using-gitops'></a>3. Deploy the infrastructure using GitOps
Expand All @@ -507,7 +504,7 @@ Repeat the above process with additional solutions packages.

To start you will need a git repo, this guide can be used with repositories residing in Github, Gitlab or Azure Devops. The instructions have been modified from the config controller setup guide located in [Manage Google Cloud resources with Config Controller](https://cloud.google.com/anthos-config-management/docs/how-to/config-controller-setup#manage-resources) and [Setup GitOps](https://cloud.google.com/anthos-config-management/docs/how-to/config-controller-setup#set_up_gitops).

***Skip this step if not using git repos.**
***Skip this step if not using git repos.***

### <a name='CreateanewrepositoryinyourRepoHostingSolutionGithubGitlaborAzureDevops'></a>Create a new repository in your Repo Hosting Solution (Github, Gitlab or Azure Devops)

Expand Down