Skip to content

Instantly share code, notes, and snippets.

# Implement DevOps in Google Cloud: Challenge Lab
# https://www.qwiklabs.com/focuses/13287?parent=catalog
# Open Cloud shell, run:
gcloud config set compute/zone us-east1-b
git clone https://source.developers.google.com/p/$DEVSHELL_PROJECT_ID/r/sample-app
gcloud container clusters get-credentials jenkins-cd
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user=$(gcloud config get-value account)
helm repo add stable https://charts.helm.sh/stable
helm repo update
@ekoyudhi
ekoyudhi / gsp344_serverless-firebase-development-challenge-lab.sh
Created March 14, 2021 03:51
Serverless Firebase Development: Challenge Lab
gcloud config set project $(gcloud projects list --format='value(PROJECT_ID)' --filter='qwiklabs-gcp')
git clone https://github.com/rosera/pet-theory.git
# 1. Firestore Database Create
Go to Firestore > Select Naive Mode > Location: nam5 > Create Database
# 2. Firestore Database Populate
cd pet-theory/lab06/firebase-import-csv/solution
npm install
node index.js netflix_titles_original.csv
@ekoyudhi
ekoyudhi / gsp301_deploy-a-compute-instance-with-a-remote-startup-script.sh
Created March 14, 2021 02:31
GSP301 Deploy a Compute Instance with a Remote Startup Script
# Deploy a Compute Instance with a Remote Startup Script
# https://google.qwiklabs.com/focuses/1735?parent=catalog
# Task 1: Confirm that a Google Cloud Storage bucket exists that contains a file
gsutil mb gs://$DEVSHELL_PROJECT_ID
gsutil cp gs://sureskills-ql/challenge-labs/ch01-startup-script/install-web.sh gs://$DEVSHELL_PROJECT_ID
# Task 2: Confirm that a compute instance has been created that has a remote startup script called install-web.sh configured
gcloud compute instances create example-instance --zone=us-central1-a --tags=http-server --metadata startup-script-url=gs://$DEVSHELL_PROJECT_ID/install-web.sh

Membuat sertifikat self-signed

openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem

Melihat isi sertifikat

openssl x509 -in cert.pem -text

PEM dan DER