Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Latest commit

 

History

History
69 lines (48 loc) · 2.79 KB

README.md

File metadata and controls

69 lines (48 loc) · 2.79 KB

Terraform — Google Cloud Build for go-ipfs

Automated builds of the following go-ipfs fork below using a Google Cloud Build trigger,

The build pipeline consists of the following steps,

  1. Build the ipfs binary using the Dockerfile from the fork
  2. Store the binary in a Google Cloud Storage bucket

Code Mirrors

Requirements

Configuration

Update the Terraform input variables in ipfs.tfvars,

  • gcs_name — Name of the Google storage bucket which will store the built ipfs binary
  • gcs_locationGCS location of the bucket
  • gcs_storage_class — Storage class for the bucket

Authentication

Google provider documentation is at registry.terraform.io/providers/hashicorp/google/latest/docs.

Google Cloud Shell can deploy this script without configuration.

Deployment

Step 1: Use the following command to create a Terraform plan,

$ ./bin/plan.sh

To avoid fetching the latest state of resources, use the following command,

$ ./bin/plan.sh -refresh=false

Step 2: Review the plan using the following command,

$ ./bin/view.sh

Step 3: Apply the plan using the following command,

$ ./bin/apply.sh

Encryption

Encrypt sensitive files (Terraform input variables and state) before saving them. .gitignore must contain the unencrypted file paths.

Use the following command to decrypt the files after cloning the repository,

$ ./bin/decrypt.sh

Use the following command after running bin/apply.sh to encrypt the updated state files,

$ ./bin/encrypt.sh <gpg key id>