# Setup Guide for chv-starter-pack ### Installing gcloud CLI 1. Join the GCP organization (Ask Ang) 2. Follow this guide on installing the gcloud CLI: https://cloud.google.com/sdk/docs/install - Make sure you add it to your PATH `export PATH=$PATH:$HOME/google-cloud-sdk/bin/` (this assumes you extracted the tar.gz to your HOME directory) ### Creating your VM instance 3. Try `gcloud auth login`, you most likely will run into an error with the configuration creation 4. `gcloud config configurations create <your name>` 5. `sudo chown -R <user>:staff ~/.config`; the `user` is your username (e.g. `vincenttu`) 6. Rerun `gcloud auth login`, it should be succcessful now 7. Run the below command and **make sure to fill in the**: - VM_NAME: your VM name under GCE (e.g. `vincent-vm`) - PROJECT: your GCP project name (e.g. `Agent S`) - SERVICE_ACCOUNT: your service account; this can be found in the steps below - DISK_NAME: your disk name (e.g. `vincent-vm-disk`); usually add the `-disk` suffix to your VM name; this and your VM instance are both going to be created To find the service account: ![gce_vm_page](https://hackmd.io/_uploads/rJQkAcqF1g.png) You'll be on your VM instances page under Compute Engine. Make sure you're under the "Agent S" project shown in the top left and you're signed into your Simular account. Click create instance, then click the "Equivalent Code" button. ![Screenshot 2025-02-12 at 2.21.01 PM](https://hackmd.io/_uploads/HJ9C0cqtJx.png) Copy your service account from the `--service-account` parameter. ```shell gcloud compute instances create ${VM_NAME} --project=${PROJECT} --zone=us-west1-a --machine-type=n1-standard-1 --network-interface=network-tier=STANDARD,stack-type=IPV4_ONLY,subnet=default --maintenance-policy=MIGRATE --provisioning-model=STANDARD --service-account=${SERVICE_ACCOUNT} --scopes=https://www.googleapis.com/auth/devstorage.read_only,https://www.googleapis.com/auth/logging.write,https://www.googleapis.com/auth/monitoring.write,https://www.googleapis.com/auth/service.management.readonly,https://www.googleapis.com/auth/servicecontrol,https://www.googleapis.com/auth/trace.append --create-disk=auto-delete=yes,boot=yes,device-name=${DISK_NAME},image=projects/ubuntu-os-cloud/global/images/ubuntu-2204-jammy-v20250128,mode=rw,size=20,type=pd-standard --no-shielded-secure-boot --shielded-vtpm --shielded-integrity-monitoring --labels=goog-ec-src=vm_add-gcloud --reservation-affinity=any --enable-nested-virtualization ``` After you've created your VM instance, head back to the console. ![gce_vm_page](https://hackmd.io/_uploads/rJQkAcqF1g.png) My VM instance is `vincent-agent-vm`. ### Setup Guide & Usage: chv-starter-pack 8. Click "SSH" twice to create 2 terminal windows. 9. Head to this [repository](https://github.com/abshkbh/chv-starter-pack/tree/main) and specifically this setup guide for GCP: https://github.com/abshkbh/chv-starter-pack/blob/main/setup/gcp-instructions.md. The first part we just finished. 10. Follow the rest of the setup guide above 11. Once installation is successful, you can follow the Usage guide in their README: https://github.com/abshkbh/chv-starter-pack/tree/main?tab=readme-ov-file#usage