sudo wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
tar -xzf go1.4.2.linux-amd64.tar.gz
export GOROOT=PATH_WHERE_YOU_EXTRACT_GO
export PATH=$PATH:$GOROOT/bin
export GOBIN=$GOROOT/bin
mkdir ~/golang/
export GOPATH=~/golang/
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
# Source: https://gist.github.com/0466cff59d08cabb5276f593ca2e513d | |
######################################### | |
# Skaffold # | |
# How to Build and Deploy In Kubernetes # | |
# https://youtu.be/qS_4Qf8owc0 # | |
######################################### | |
######### | |
# Setup # |
solr has a basic authentication module. the description of how to generate the necessary hash + salt string is very hazy. there is this:
https://github.com/ansgarwiechers/solrpasswordhash
project with java code extracted from the solr source .... and then there is this:
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
package main | |
import ( | |
"log" | |
"net/smtp" | |
) | |
func main() { | |
send("hello there") | |
} |
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
import mysql.connector | |
from mysql.connector import errorcode | |
config = { | |
'user': 'root', | |
'password': '', | |
'host': 'localhost', | |
'database': 'acme' | |
} |
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
[toplevel] | |
# Put this in ~/.aws/cli/alias | |
# and you'll have an "aws upgrade" | |
# and an "aws check-upgrade" command. | |
# | |
# Only works on macOS and installs using | |
# the .pkg installer. | |
# | |
upgrade = !f() { | |
curl -s "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "/tmp/AWSCLIV2.pkg" |
Packer
-
Packer is used to build image from a base image, perform provisions and store (commit) the final image.
-
We use provisioners and Packer templates to do the actual work to create the final image.
-
We use Ansible for provisioning.
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
--- | |
- hosts: vm_dummy_group | |
gather_facts: no | |
tasks: | |
- name: Test loop | |
debug: | |
msg: "Spinning up VM number {{ item }}" | |
with_sequence: start={{ start }} end={{ end }} |
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
# 1) Install Kubernetes on a Ubuntu machine | |
sudo -i | |
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
echo 'deb http://apt.kubernetes.io/ kubernetes-xenial main' >> /etc/apt/sources.list.d/kubernetes.list | |
apt update && apt install -y docker.io kubelet kubeadm kubectl | |
sudo systemctl enable docker.service | |
kubeadm init --pod-network-cidr=10.244.0.0/16 # Flannel pod network, see below | |
exit | |
# 2) Prepare kubectl |
NewerOlder