chrome-remote-desktop-pipeline
A pipeline to deploy a Chrome Remote Desktop host based on a development environment.
See joatmon08/chrome-remote-desktop-image for the image used.
Pre-Requisites
- Terraform
- Terraform Cloud
- Google Cloud
- CircleCI
Usage
-
Make sure to create a Terraform Cloud workspace and add the variables required in variables.tf.
- You can do this manually by creating a local.env file as such
export TF_VAR_credentials=$[cat key-terraform.json] export TF_VAR_crd_code="" export TF_VAR_crd_pin= export TF_VAR_crd_user= export TF_VAR_public_key=$[cat circleci.pub] export TF_VAR_project= export TF_VAR_prefix= export TF_VAR_region= export INFRA_ENVIRONMENT=
- Then, run the pushvars script to push these up locally.
bash ./scripts/pushvars.sh -l true
- You can do this manually by creating a local.env file as such
-
Note that the TF_VAR_crd_code and TF_VAR_region will be overwritten by CircleCI.
-
Get the refresh token from remotedesktop.google.com/headless. Copy this. You need to get a new one each time you run the pipeline
-
Add the following to the CircleCI environment variables;
GCLOUD_SERVICE_KEY="json service account key" SSH_PUBLIC_KEY="SSH public key for host" TFCLOUD_SERVICE_KEY="API token for Terraform Cloud" TF_VAR_crd_code="Refresh token that you got above." TF_VAR_region="Region you want to deploy the instance to"