This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#1) on https://console.developers.google.com/ register project and associate API from library | |
# OUTPUT: client_id,client_secret | |
client_id="..." | |
client_secret="...." | |
#2) get authorization code at the following link using web browser | |
# OUTPUT: code | |
scope="https://www.googleapis.com/auth/drive" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://cloud.google.com/storage/docs/encryption/ | |
BUCKET_NAME=YOUR_NAME_enron_corpus | |
gsutil mb gs://${BUCKET_NAME} | |
gsutil cp gs://enron_corpus/allen-p/inbox/1. . | |
tail 1. | |
Enable API/Create keyring | |
gcloud services enable cloudkms.googleapis.com |
Create a secrets file:
touch ~/.secret
Make sure it looks like this:
#!/bin/bash
Some useful resources regarding Kubernetes Operators, CRDs, etc.
- Kubernetes sample controller: https://github.com/kubernetes/sample-controller
- Joe Beda's TGIK sample repo and YouTube videos: https://github.com/jbeda/tgik-controller
- Thomas Stringer's blog post: https://medium.com/@trstringer/create-kubernetes-controllers-for-core-and-custom-resources-62fc35ad64a3
- Kube-controller-demo by Aaron Levy: https://github.com/aaronlevy/kube-controller-demo
- Analyzing value of Operator Framework for Kubernetes community: https://itnext.io/analyzing-value-of-operator-framework-for-kubernetes-community-5a65abc259ec
- Steps to generate CRD/Operator code: cloud-ark/kubeplus#14
- kubebuilder: https://github.com/kubernetes-sigs/kubebuilder
- CoreOS operator framework: https://coreos.com/blog/introducing-operator-framework
In case there's already a DHCP config for netplan for the private IP address:
File: /etc/netplan/50-cloud-init.yaml
Contents:
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init's network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
for full_name in $(kubectl get all -o name | grep -vE replicaset\|pod); do | |
name="$(echo "$full_name" | sed -e "s/.*\///g")"; | |
type="$(echo "$full_name" | sed -e "s/\/.*//g")"; | |
case "${type}" in | |
deployment*) | |
type=Deployment | |
;; | |
"service") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Update the `apt` package index | |
apt: | |
update_cache: yes | |
- name: Install packages to allow apt to use a repository over HTTPS | |
package: | |
name: "{{ item }}" | |
state: latest |
Starting at a new employer always mean checking out various git repositories.
As the amount of repositories a company has grows, the time needed to clone all of those repositories also grows.
This script automates this task.
In order for this script to work, a personal access token is needed.
- SQL: relational, NOSQL: non relational
- SQL: universal but defined schema
- NoSQL: unstructured dynamic schema
- SQL is vertically scalable, increased resources of one machine
- NoSQL is horizontally scalable, increase number of machines
- NoSQL can become larger and more powerful
- NoSQL does not require a DBA (Database Administrator)
- flexible and high performing