Skip to content

Instantly share code, notes, and snippets.

View russmckendrick's full-sized avatar
📚
Writting the second edition of Learn Ansible.

Russ McKendrick russmckendrick

📚
Writting the second edition of Learn Ansible.
View GitHub Profile
@russmckendrick
russmckendrick / oo-install.md
Last active August 29, 2015 14:02
oo-install

This GIST accompanies this blog post ....

Checking for necessary tools...
...looks good.
Downloading oo-install package...
Extracting oo-install to temporary directory...
Starting oo-install...
OpenShift Installer (Build 20140515-1427)
----------------------------------------------------------------------
brew install python
sudo brew postinstall python
sudo pip install --upgrade https://github.com/sickill/asciinema/tarball/master
asciinema auth
brew install auto-scaling
brew install aws-cfn-tools
brew install aws-elasticache
brew install aws-elasticbeanstalk
brew install aws-iam-tools
brew install aws-sns-cli
brew install cloud-watch
brew install ec2-ami-tools
brew install ec2-api-tools
brew install elb-tools
docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock -t russmckendrick/nginx-proxy
mkdir /home/myawesometest
vim /home/myawesometest/fig.yml
webserver:
image: russmckendrick/nginx-php
volumes:
- /home/containers/web:/var/www/html/
ports:
@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
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 / 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:
@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
- 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 / 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