<commit_before>

## Setup Variables
export PROJECT_ID=$(gcloud config get-value project)
export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format='value(projectNumber)')
export USE_GKE_GCLOUD_AUTH_PLUGIN=True


export DB_INSTANCE_NAME=quote-db-instance
export DB_INSTANCE_PASSWORD=<PASSWORD>
export DB_NAME=quote-db
export DB_USER=quote-user
export DB_PASSWORD=<PASSWORD>

export VPC_CONNECTOR=quoteconnector



gcloud services enable \
  cloudresourcemanager.googleapis.com \
  container.googleapis.com \
  sourcerepo.googleapis.com \
  cloudbuild.googleapis.com \
  containerregistry.googleapis.com \
  servicenetworking.googleapis.com \
  sqladmin.googleapis.com

## Create GKE Cluster
#gcloud container clusters create mycluster --zone=us-central1-b
gcloud container --project "$PROJECT_ID" clusters create "quote-cluster" \
--region "us-central1" --num-nodes=2 --async


## Configure Private VPC
gcloud compute addresses create google-managed-services-default \
    --global \
    --purpose=VPC_PEERING \
    --prefix-length=20 \
    --network=projects/$PROJECT_ID/global/networks/default

gcloud services vpc-peerings connect \
    --service=servicenetworking.googleapis.com \
    --ranges=google-managed-services-default \
    --network=default \
    --project=$PROJECT_ID




## Create Private Postgres Cloud SQL Database
gcloud beta sql instances create $DB_INSTANCE_NAME \
    --project=$PROJECT_ID \
    --network=projects/$PROJECT_ID/global/networks/default \
    --no-assign-ip \
    --database-version=POSTGRES_12 \
    --cpu=2 \
    --memory=4GB \
    --region=$REGION \
    --root-password=${DB_INSTANCE_PASSWORD} \
    --async
<commit_msg>Workload Id added to std cluster (#17)<commit_after>

## Setup Variables
export PROJECT_ID=$(gcloud config get-value project)
export PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID --format='value(projectNumber)')
export USE_GKE_GCLOUD_AUTH_PLUGIN=True


export DB_INSTANCE_NAME=quote-db-instance
export DB_INSTANCE_PASSWORD=<PASSWORD>
export DB_NAME=quote-db
export DB_USER=quote-user
export DB_PASSWORD=<PASSWORD>

export VPC_CONNECTOR=quoteconnector



gcloud services enable \
  cloudresourcemanager.googleapis.com \
  container.googleapis.com \
  sourcerepo.googleapis.com \
  cloudbuild.googleapis.com \
  containerregistry.googleapis.com \
  servicenetworking.googleapis.com \
  sqladmin.googleapis.com

## Create GKE Cluster
#gcloud container clusters create mycluster --zone=us-central1-b
gcloud container --project "$PROJECT_ID" clusters create "quote-cluster" \
--region "us-central1" --num-nodes=2 --workload-pool=$PROJECT_ID.svc.id.goog --async


## Configure Private VPC
gcloud compute addresses create google-managed-services-default \
    --global \
    --purpose=VPC_PEERING \
    --prefix-length=20 \
    --network=projects/$PROJECT_ID/global/networks/default

gcloud services vpc-peerings connect \
    --service=servicenetworking.googleapis.com \
    --ranges=google-managed-services-default \
    --network=default \
    --project=$PROJECT_ID




## Create Private Postgres Cloud SQL Database
gcloud beta sql instances create $DB_INSTANCE_NAME \
    --project=$PROJECT_ID \
    --network=projects/$PROJECT_ID/global/networks/default \
    --no-assign-ip \
    --database-version=POSTGRES_12 \
    --cpu=2 \
    --memory=4GB \
    --region=$REGION \
    --root-password=${DB_INSTANCE_PASSWORD} \
    --async

{'fraction_non_alphanumeric': 0.11254775198354393, 'fraction_numerical': 0.0058771672054069935, 'mean_word_length': 3.8767908309455588, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1519957', 'n_tokens_mistral': 1102, 'n_tokens_neox': 1061, 'n_words': 205}