GoogleCloudPlatform / GoogleCloudPlatform/pubsec-declarative-toolkit

Add dev deployment.sh for KCC cluster CD create/delete and LZ initial deployment/delete with canary

Open
#192 10 comments 0 reactions 1 assignee Claimed by @fmichaelobrien View on GitHub
arete automation delete developer-experience
Dominant language
Shell
Stars
36
Forks
26
PR merge metrics
No merged PRs in 30d

Description

sh changes in prep of adding delete to Arete shortly

# pending
- P1: delete 3 liens by targeting the following IAM resource labels
- managed-by-cnrm=true, resource-group=nonprod or common

start with
```
export REGION=northamerica-northeast1
export SUBNET=pdt-na1-sn
export CLUSTER=pdt-na1
export NETWORK=pdt-na1-vpc
export CC_PROJECT_ID=controller-agz-1201
export BOOT_PROJECT_ID=$(gcloud config list --format 'value(core.project)')
export BILLING_ID=$(gcloud alpha billing projects describe $BOOT_PROJECT_ID '--format=value(billingAccountName)' | sed 's/.*\///')
USER="$(kubectl get ConfigConnectorContext -n config-control -o jsonpath='{.items[0].spec.googleServiceAccount}' 2> /dev/null)"
ORGID=$(gcloud projects get-ancestors $CC_PROJECT_ID --format='get(id)' | tail -1)
gcloud compute networks create $NETWORK --subnet-mode=custom
gcloud compute networks subnets create $SUBNET --network $NETWORK --range 192.168.0.0/16 --region $REGION
gcloud alpha anthos config controller create $CLUSTER --location $REGION --network $NETWORK --subnet $SUBNET --full-management
gcloud anthos config controller list
gcloud anthos config controller delete --location $REGION $CLUSTER --quiet
```

```
oot_@cloudshell:~/wse_github/obriensystems/pubsec-declarative-toolkit/solutions/landing-zone (controller-agz-1201)$ ./bootstrap.sh run
Start: 1669999560
BILLING_ID: 011BCB-037F97-C9169E
ORGID: 6839210352
Create request issued for: [pdt-na1a]
Waiting for operation [projects/controller-agz-1201/locations/northamerica-northeast1/operations/operation-1669999564244-5eedb12cd46ba-b1d78310-a897d51f] to complete...working...
Waiting for operation [projects/controller-agz-1201/locations/northamerica-northeast1/operations/operation-1669999564244-5eedb12cd46ba-b1d78310-a897d51f] to complete...done.
Created instance [pdt-na1a].
Fetching cluster endpoint and auth data.
kubeconfig entry generated for krmapihost-pdt-na1a.
Cluster create time: 1105
Create request issued for: [pdt-na1b]
Waiting for operation [projects/controller-agz-1201/locations/northamerica-northeast1/operations/operation-1670000669112-5eedb54a83894-65a57b7a-0a500016] to complete...done.
Created instance [pdt-na1b].
Fetching cluster endpoint and auth data.
kubeconfig entry generated for krmapihost-pdt-na1b.
Cluster create time: 1105
Create request issued for: [pdt-na1c]
Waiting for operation [projects/controller-agz-1201/locations/northamerica-northeast1/operations/operation-1670001774021-5eedb9683c996-e79796ea-d4a84512] to complete...failed.
ERROR: (gcloud.alpha.anthos.config.controller.create) unexpected error occurred while waiting for SLM operation [projects/krmapihosting-slm/locations/northamerica-northeast1/operations/operation-1670001779009-5eedb96cfe9b4-581aecfb-9cfebea7]: You cannot create more than 3 clusters in location northamerica-northeast1; to create more than 3, you must request an increase of your Google Compute Engine quota for region northamerica-northeast1 to 25 CPUs or more.
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.