CI/CD on Kubernetes.
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
Host NAT | |
HostName 52.15.213.177 | |
ForwardAgent yes | |
StrictHostKeyChecking ask | |
IdentityFile "C:\Users\Zach Tankersley\.ssh\id_rsa.pem" | |
User ec2-user | |
Host 10.0.1.12 | |
ProxyCommand C:\Windows\System32\OpenSSH\ssh.exe -q -W %h:%p NAT | |
ForwardAgent yes |
Prerequisite: latest Docker for Mac on MacOS Sierra
$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
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
version: 2 | |
jobs: | |
build_and_test: | |
# ... insert your test suite here | |
docker_push: | |
# Build app container and push it to the GCR registry | |
# Note: we want to build and push an image with tags based on both | |
# the Git commit hash AND the branch name. This way, we can refer to |
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 ruby | |
# This script can be used to parse and dump the information from | |
# the 'html/contact_info.htm' file in a Facebook user data ZIP download. | |
# | |
# It prints all cell phone call + SMS message + MMS records, plus a summary of each. | |
# | |
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created | |
# in whatever the working directory of the program is when executed. | |
# |
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
<?php | |
/** | |
* Sync Groups from WordPress to Discourse | |
* | |
* First creates 'groups' meta_key (which should be customized to your needs) | |
* Then it monitors for changes in the 'groups' meta_value and connects to Discourse API to sync groups | |
* | |
* WordPress References | |
* https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/meta.php?order=name#L235 | |
* http://wordpress.stackexchange.com/questions/16835/how-to-hook-update-post-meta-and-delete-post-meta |
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
#!/bin/bash | |
export GOLANG_VERSION=1.9.2 | |
export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz | |
export GOLANG_DOWNLOAD_SHA256=de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b | |
apt-get update -qq | |
apt-get install -y --no-install-recommends \ | |
g++ \ |
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
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get install -y software-properties-common python-software-properties | |
sudo add-apt-repository --yes ppa:gluster/glusterfs-3.10; | |
sudo apt-get update | |
sudo apt-get install --yes glusterfs-server xfsprogs | |
sudo apt-get upgrade --yes | |
sudo apt-get -y autoremove |
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
#!/bin/bash | |
# vars | |
[ -z "$NUM_WORKERS" ] && NUM_WORKERS=3 | |
# init swarm (need for service command); if not created | |
docker node ls 2> /dev/null | grep "Leader" | |
if [ $? -ne 0 ]; then | |
docker swarm init > /dev/null 2>&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
#!/bin/sh | |
export SCALEWAY_ORGANIZATION=XXX | |
export SCALEWAY_TOKEN=XXX | |
export SWARM_TOKEN=XXX | |
docker-machine create -d scaleway --swarm --scaleway-name=swarm-manager --swarm-master --swarm-discovery=token://$SWARM_TOKEN swarm-manager | |
for node in 1 2 3; do docker-machine create -d scaleway --swarm --scaleway-name=swarm-node-$node --swarm-discovery=token://$SWARM_TOKEN swarm-node-$node; done |