Skip to content

Instantly share code, notes, and snippets.

View rstarmer's full-sized avatar

Robert Starmer rstarmer

View GitHub Profile
@rstarmer
rstarmer / gist:8915184
Created February 10, 2014 12:42
Etherpad-Lite setup
https://github.com/velaluqa/puppet-etherpad.git
sudo apt-get update
sudo apt-get install -y python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
apt-get install abiword
echo 12345 > /srv/etherpad/.git/4777e366923ee89d380b12eb413c950b721
sudo iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 9000
edit params.pp

Ultimate OpenStack IceHouse Guide

This is a Quick Guide to deploy OpenStack IceHouse on top of Ubuntu 14.04, it is IPv6-Ready!

It is compliant with OpenStack's official documentation (docs.openstack.org).

The tenant's subnets are based on Neutron, with ML2 plugin and Single Flat Network topology, dual-stacked.

The Single Flat Network is the simplest network topology supported by OpenStack (I think). So, it is easier to understand and follow.

@rstarmer
rstarmer / local.conf
Last active August 29, 2015 14:06
local.conf
[[local|localrc]]
# Uncomment the next line after you've run devstack once if you don't want to try to download everything again.
#OFFLINE=true
#VIRT_DRIVER=docker
# Set default passwords, further accelerate deployment, maybe make this less generic if you're in an environment where someone may 'play' with your system
ADMIN_PASSWORD=ubuntu
DATABASE_PASSWORD=ubuntu
RABBIT_PASSWORD=ubuntu
SERVICE_PASSWORD=ubuntu
#!/bin/bash
echo hello world
@rstarmer
rstarmer / setup.sh
Last active December 21, 2015 10:53
Cloud Applications simple application setup.sh script for CentOS Linux
#!/bin/bash
#Install prerequisites
sudo yum install -y git httpd ruby-devel rubygems rubygem-bundler epel-release pygpgme curl
# Add the phusionsoft passenger RPM repository so that we can install the
# Apache passenger module
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo \
https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
@rstarmer
rstarmer / ruby_hw.tf
Created December 29, 2015 10:08
Terraform .tf file to create a single VM in OpenStack
# Create a Virtual Machine
# For OpenStack, as with Digital Ocean, access credentials are needed
# They can be provided in a fashion similar to DO, passed as variables
# or via the terraform CLI as parameters, but they also can be passed
# as environment variables. The standard "openrc.sh" file includes
# all the prerequisite parameters including OS_AUTH_URL, OS_PASSWORD
# OS_USERNAME, OS_TENANT_NAME, and OS_REGION_NAME. The simplest is
# often to source the openrc file to set these variables, or set them
# in the provdier as follows:
@rstarmer
rstarmer / playbook.yml
Created December 29, 2015 10:16
Main playbook for simple ruby application deployment. Requires 'passenger' role as well.
---
- hosts: all
sudo: yes
roles:
- passenger
handlers:
- name: reload apache
service: name=httpd state=reloaded
@rstarmer
rstarmer / Dockerfile
Created December 31, 2015 09:41
A dockerfile to create a passenger ruby application environment and install our application from github
# See https://github.com/phusion/passenger-docker/blob/master/Changelog.md for
# a list of version numbers.
FROM phusion/passenger-ruby22:0.9.18
# Set correct environment variables.
ENV HOME /root
# Use baseimage-docker's init process.
CMD ["/sbin/my_init"]
@rstarmer
rstarmer / playbook.yml
Created December 31, 2015 09:44
A playbook to deploy a docker environment on an Ubuntu 14.04 based VM
---
- hosts: all
sudo: no
####
tasks:
- name: Install dependencies
apt:
name={{ item }}
update_cache=yes
@rstarmer
rstarmer / play-update.yml
Created December 31, 2015 09:46
Ansible playbook to update a deployed docker image
---
- hosts: all
sudo: no
tasks:
- name: application container
docker:
name: ruby-hw
image: rstarmer/ruby-hw
state: reloaded