aws s3api create-bucket --bucket my-kops-bucket --location- eu-west-1 --create-bucket-configuration LocationConstraint=eu-west-1
export NAME=my-kops-cluster-name
export KOPS_STATE_STORE=s3://my-kops-bucket-name
kops create cluster --zones eu-west-1a,eu-west-1b --name $NAME --node-count=2 --node-size=t2.medium --authorization=RBAC --networking=calico --encrypt-etcd-storage --kubernetes-version=v1.7.10
kops update cluster --yes
kops validate cluster
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
| apiVersion: monitoring.coreos.com/v1 | |
| kind: ServiceMonitor | |
| metadata: | |
| name: nginx | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: nginx | |
| namespaceSelector: | |
| matchNames: |
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
| // Place your settings in this file to overwrite the default settings | |
| { | |
| "workbench.colorTheme": "Solarized Light", | |
| "git.confirmSync": false, | |
| "files.exclude": { | |
| "**/.git": true, | |
| "**/.svn": true, | |
| "**/.hg": true, | |
| "**/CVS": true, | |
| "**/.DS_Store": true, |
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
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Launch", | |
| "type": "go", | |
| "request": "launch", | |
| "mode": "debug", | |
| "remotePath": "", |
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
| or i in `kubectl get nodes |grep -v "NAME"| awk '{print $1}'`; do ssh -t core@$i "sudo sysctl net.netfilter.nf_conntrack_max=1000000" ;done |
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 logging | |
| import time | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| ch = logging.StreamHandler(sys.stdout) | |
| ch.setFormatter(logging.Formatter("%(levelname)s %(asctime)s %(funcName)s %(lineno)d %(message)s")) | |
| logger.addHandler(ch) |
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
| FROM alpine:3.3 | |
| # Here we install GNU libc (aka glibc) and set C.UTF-8 locale as default. | |
| ENV LC_ALL=en_US.UTF-8 \ | |
| LANG=en_US.UTF-8 \ | |
| LANGUAGE=en_US.UTF-8 | |
| RUN ALPINE_GLIBC_BASE_URL="https://github.com/andyshinn/alpine-pkg-glibc/releases/download" && \ | |
| ALPINE_GLIBC_PACKAGE_VERSION="2.23-r1" && \ | |
| ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" && \ |
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
| echo 127.0.0.1 localhost > /etc/hosts | |
| echo `ifconfig eth0 | awk '/inet addr/{print substr($2,6)}'` `hostname` >> /etc/hosts |
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
| machine: | |
| services: | |
| - docker | |
| post: | |
| - wget https://gist.githubusercontent.com/gianrubio/dce37ee9b9c024937832d776597e2603/raw/4cdb30e5075e8e6064ac48a258e05f518f8c88c0/circleci-tunnel.sh ~/ && chmod +x ~/circleci-tunnel.sh | |
| - ~/circleci-tunnel.sh start: | |
| background: true |
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 json | |
| from botocore.exceptions import ClientError | |
| import boto3 | |
| import sys | |
| import logging | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.INFO) | |
| from zabbix.api import ZabbixAPI |