Skip to content

Instantly share code, notes, and snippets.

View russmckendrick's full-sized avatar

Russ McKendrick russmckendrick

View GitHub Profile
@russmckendrick
russmckendrick / Vagrantfile
Created April 26, 2015 14:25
Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
BOX_NAME = 'russmckendrick/centos7'
BOX_IP = '192.168.0.42'
HOSTNAME = 'testing'
DOMAIN = 'vagrant.dev'
Vagrant.require_version '>= 1.4.0'
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
@russmckendrick
russmckendrick / fig.yml
Created February 22, 2015 11:13
Fig YML
app:
# container can be either built from Dockerfile or from image
# in this case we will tell fig to build image in current directory
build: ./
# map ports
ports:
- "8080:8080"
# mount volumes
volumes:
- ./:/code
@russmckendrick
russmckendrick / Fig install
Created February 22, 2015 10:42
Fig Installation Ubuntu
sudo su -
curl -L https://github.com/docker/fig/releases/download/1.0.1/fig-`uname -s`-`uname -m` > /usr/local/bin/fig; chmod +x /usr/local/bin/fig
exit
@russmckendrick
russmckendrick / Vagrantfile
Created February 15, 2015 12:35
Vagrantfile for review
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.33.10"
# Share an additional folder to the guest VM. The first argument is
@russmckendrick
russmckendrick / installation.sh
Created February 14, 2015 15:09
NGINX & ngx_pagespeed
# Install the packages need to compile NGINX with ngx_pagespeed
yum install -y gcc-c++ pcre-dev pcre-devel zlib-devel make unzip openssl-devel
# Add a user for NGINX
useradd nginx
usermod -s /sbin/nologin nginx
# Download the latest version of ngx_pagespeed and psol
# See https://github.com/pagespeed/ngx_pagespeed/releases for latest release
- name: install ntp
yum: pkg=ntp state=installed
- name: check ntpd service is stopped
shell: "service ntpd status | grep -q stopped; echo $?"
register: result
- name: ntpdate
command: ntpdate 0.uk.pool.ntp.org
when: result.stdout == "0"
- name: ntp config file
template: src=roles/common/templates/ntp.conf.j2 dest=/etc/ntp.conf owner=root group=root mode=0644
@russmckendrick
russmckendrick / docker-fig-install.md
Created November 1, 2014 14:53
Installation of Docker + Fig on CentOS 7

Install the latest Docker + Fig

curl -L https://get.docker.com/builds/Linux/x86_64/docker-latest > /usr/bin/docker; chmod +x /usr/bin/docker
curl -L https://raw.githubusercontent.com/docker/docker/master/contrib/init/systemd/docker.service > /usr/lib/systemd/system/docker.service
curl -L https://raw.githubusercontent.com/docker/docker/master/contrib/init/systemd/docker.socket > /usr/lib/systemd/system/docker.socket
curl -L https://github.com/docker/fig/releases/download/1.0.0/fig-`uname -s`-`uname -m` > /usr/local/bin/fig; chmod +x /usr/local/bin/fig
systemctl enable docker
systemctl start docker
@russmckendrick
russmckendrick / fig-lemp-dev.yml
Last active August 29, 2015 14:08
Fig Examples
web:
image: reconnix/nginx-php54
volumes:
- ./web:/var/www/html/
ports:
- 80
environment:
PHP_POOL: mywebsite
VIRTUAL_HOST: mywebsite.local.reconnix.com
links:
EXPECTED_ARGS=2
E_BADARGS=5
if [ $# -ne $EXPECTED_ARGS ]
then
echo "Usage: $0 mysql_port mysql_user"
exit $E_BADARGS
fi
MYSQL_PORT=$1
@russmckendrick
russmckendrick / coreos.md
Last active August 29, 2015 14:06
Install etcd & fleetctrl on a mac

Grab an etcd token;

curl -w "\n" https://discovery.etcd.io/new
https://discovery.etcd.io/<token>
#cloud-config