Skip to content

Instantly share code, notes, and snippets.

@russomi
Last active October 20, 2021 23:25
Show Gist options
  • Save russomi/1579f8514b4f4f454f0645674b30825b to your computer and use it in GitHub Desktop.
Save russomi/1579f8514b4f4f454f0645674b30825b to your computer and use it in GitHub Desktop.
GCP Terraform Resources

aws s3 ls s3://softwareheritage/graph/2018-09-25/parquet/ --recursive --human-readable --summarize

aws s3 ls s3://russomi-gcp-data-transfer --recursive --human-readable --summarize

Start: 2021-08-24 21:31:05 235.7 MiB content/006b35033d914c6fb1413adafd54e177.parquet End: 2021-08-24 23:53:36 52.4 MiB snapshot_branches/fda5f03c987c45c5bee9be08741a2220.parquet

~ 180 MiB/s

Total Objects: 3277 Total Size: 1.1 TiB

aws s3 sync s3://softwareheritage/graph/2018-09-25/parquet/ s3://russomi-gcp-data-transfer

How much storage is a TiB?

One tebibyte is equal to 240 or 1,099,511,627,776 bytes. One terabyte is equal to 1012 or 1,000,000,000,000 bytes. A tebibyte equals nearly 1.1 TB. That's about a 10% difference between the size of a tebibyte and a terabyte, which is significant when talking about storage capacity.

for an approximate result, multiply the digital storage value by 1100

https://stackoverflow.com/questions/8905164/how-do-i-calculate-mb-s-mib-s https://www.majordifferences.com/2018/03/differences-between-megabyte-and.html

MiB/s = mebibyte per second

Conditional Resources

https://stackoverflow.com/questions/60231309/terraform-conditional-creation-of-a-resource-based-on-a-variable-in-tfvars

VPC Peering

data "google_compute_network" "shared" { name = "shared" }

data "google_compute_network" "dev" { name = "dev" }

data "google_compute_network" "prod" { name = "prod" }

module "peering-shared-dev" { source = "terraform-google-modules/network/google//modules/network-peering" version = "~> 3.2.1" local_network = data.google_compute_network.shared.self_link peer_network = data.google_compute_network.dev.self_link }

module "peering-shared-prod" { source = "terraform-google-modules/network/google//modules/network-peering" version = "~> 3.2.1" local_network = data.google_compute_network.shared.self_link peer_network = data.google_compute_network.prod.self_link module_depends_on = [module.peering-shared-dev.complete] }

gcloud projects add-iam-policy-binding plasma-centaur-859
--member=user:michael.russo@cloudtp.com
--role=roles/iap.tunnelResourceAccessor gcloud projects add-iam-policy-binding plasma-centaur-859
--member=user:michael.russo@cloudtp.com
--role=roles/compute.instanceAdmin.v1 gcloud projects add-iam-policy-binding plasma-centaur-859
--member=user:michael.russo@cloudtp.com
--role=roles/iam.serviceAccountUser

gcloud projects add-iam-policy-binding plasma-centaur-859
--member=user:michael.russo@cloudtp.com
--role=roles/iam.osLoginExternalUser

Using Jenkins for distributed builds on Compute Engine

https://www.jenkins.io/doc/tutorials/tutorials-for-installing-jenkins-on-Google-Cloud/

https://cloud.google.com/architecture/using-jenkins-for-distributed-builds-on-compute-engine

https://cloud.google.com/architecture/continuous-delivery-jenkins-kubernetes-engine

https://cloud.google.com/architecture/jenkins-on-kubernetes-engine

https://cloud.google.com/architecture/jenkins-on-kubernetes-engine-tutorial

https://cloud.google.com/architecture/managing-infrastructure-as-code-with-terraform-jenkins-and-gitops

https://github.com/terraform-google-modules/terraform-google-jenkins

https://github.com/jenkinsci/google-compute-engine-plugin

https://github.com/GoogleCloudPlatform/jenkins-integration-samples

https://github.com/andrebq/jenkins-gce

https://www.jenkins.io/projects/jcasc/

https://github.com/orgs/jenkinsci/repositories?language=&q=google&sort=&type=

https://github.com/terraform-google-modules/terraform-google-jenkins

https://github.com/mikeqiu2011/terraform_jenkins_gce

https://github.com/bob-crutchley/gce-jenkins

https://github.com/viglesiasce/jenkins-gce ** Install Jenkins on GCE with Terraform

https://github.com/russomi-labs/terraform-google-jenkins

https://github.com/GoogleCloudPlatform/terraform-validator

https://github.com/russomi-labs/solutions-terraform-cloudbuild-gitops

https://github.com/topics/terraform-module?q=terraform-google

Google Cloud Getting Started

https://cloud.google.com/gcp/getting-started

https://cloud.google.com/docs

https://cloud.google.com/docs/ci-cd

https://cloud.google.com/solutions/application-migration

https://cloud.google.com/solutions/backup-dr

https://cloud.google.com/solutions/migration-center

https://cloud.google.com/kubernetes-engine/docs/tutorials/gitops-cloud-build

https://cloud.google.com/docs/terraform?hl=en#tools_for_using_terraform_with

https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/blob/master/docs/terraform.md

Google Compute Engine

https://cloud.google.com/compute/docs

https://cloud.google.com/compute/docs/tutorials

https://cloud.google.com/compute/docs/quickstarts

https://cloud.google.com/compute/docs/instance-groups/stateful-migs

https://cloud.google.com/compute/docs/disks/add-persistent-disk

Google Cloud Architecture

https://cloud.google.com/architecture

https://cloud.google.com/architecture/managing-infrastructure-as-code

Google Cloud Storage Transfer

https://cloud.google.com/storage-transfer/docs

Google Cloud Best Practices

https://cloud.google.com/docs#section-2

https://cloud.google.com/architecture/migrating-vms-migrate-for-compute-engine-getting-started

https://cloud.google.com/architecture/migration-to-google-cloud-transferring-your-large-datasets

https://cloud.google.com/compute/docs/images/image-management-best-practices

https://cloud.google.com/load-balancing/docs/tutorials/optimize-app-latency

https://cloud.google.com/solutions/best-practices-floating-ip-addresses

https://cloud.google.com/solutions/connecting-securely

https://cloud.google.com/docs/enterprise/best-practices-for-enterprise-organizations

All Solutions

https://cloud.google.com/docs#section-3

Cloud Products

https://cloud.google.com/docs#cloud-products

Google Cloud Github

https://github.com/GoogleCloudPlatform

https://github.com/GoogleCloudPlatform/cloud-foundation-toolkit/blob/master/docs/terraform.md

https://github.com/GoogleCloudPlatform/jenkins-docker

Jenkins

https://www.jenkins.io/doc/book/scaling/architecting-for-scale/

https://www.jenkins.io/doc/tutorials/tutorials-for-installing-jenkins-on-Google-Cloud/

https://cloud.google.com/architecture/using-jenkins-for-distributed-builds-on-compute-engine

https://cloud.google.com/architecture/managing-infrastructure-as-code-with-terraform-jenkins-and-gitops

https://console.cloud.google.com/marketplace/product/google/jenkins2

https://cloud.google.com/docs/ci-cd

JFrog Artifactory

https://jfrog.com/blog/jfrog-artifactory-saas-google-cloud-platform-gcp/

https://cloud.google.com/community/tutorials/artifactory-gcs-setup

https://jfrog.com/partner/google-cloud-platform/

https://bitnami.com/stack/artifactory/cloud/google

https://cloud.google.com/blog/products/gcp/deploying-jfrog-artifactory-saas-on-google-cloud-platform

Slack Bots

https://github.com/glamboyosa/PRBot

Github Actions

https://faun.pub/continuous-integration-of-java-project-with-github-actions-7a8a0e8246ef https://hustakin.github.io/bestpractice/use-github-actions-to-build-multi-envs-ci/ https://github.com/SonarSource/sonarcloud-github-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment