git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
- kubernetes is an open source orchestration tool for Docker containers( kubernetes supports also rkt as a replacement for docker).
- It automates the deployment + scaling + management of Docker containers across clusters of physical or virtual machines .
- Docker manage the life cycle of a container (run,stop,start etc... a container), kubernetes (specifically kubelet) instructs or delegate Docker to do this task on a specific machine.
- it's the physical machines or the virtual ones that the kubernetes platform is deployed on, mainly it's composed from a master machine and nodes.
- Master components:
- etcd
Also works across git branches if you keep the intermediate build images around, e.g. those <none>
images in the docker images
output.
FROM golang:1.12 AS builder
# enable Go modules support
ENV GO111MODULE=on
WORKDIR $GOPATH/src/github.com/myrepo/myapp
This file contains 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
http { | |
log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
'"$request" $status $body_bytes_sent ' | |
'"$http_referer" "$http_user_agent" $request_time ' | |
'<"$request_body" >"$resp_body"'; | |
lua_need_request_body on; | |
set $resp_body ""; | |
body_filter_by_lua ' |
This file contains 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 ( | |
"encoding/json" | |
"fmt" | |
) | |
func dumpMap(space string, m map[string]interface{}) { | |
for k, v := range m { | |
if mv, ok := v.(map[string]interface{}); ok { |
This file contains 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 | |
CONTEXT="$1" | |
if [[ -z ${CONTEXT} ]]; then | |
echo "Usage: $0 KUBE-CONTEXT" | |
exit 1 | |
fi |
This file contains 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
export TF_CREDS=~/.config/gcloud/terraform-admin.json | |
# create service account in Terraform Admin Project | |
gcloud iam service-accounts create terraform \ | |
--display-name "Terraform Admin Account" | |
# download JSON credentials | |
gcloud iam service-accounts keys create ${TF_CREDS} \ | |
--iam-account terraform@${TF_ADMIN}.iam.gserviceaccount.com |
This file contains 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
export TF_CREDS=~/.config/gcloud/terraform-admin.json | |
# create service account in Terraform Admin Project | |
gcloud iam service-accounts create terraform \ | |
--display-name "Terraform Admin Account" | |
# download JSON credentials | |
gcloud iam service-accounts keys create ${TF_CREDS} \ | |
--iam-account terraform@${TF_ADMIN}.iam.gserviceaccount.com |
This file contains 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
variables: | |
GCP_ZONE: us-central1-a | |
stages: | |
- npm-install | |
- push | |
npm-install: | |
image: node:8-alpine | |
stage: npm-install |
NewerOlder