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 / 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 / travis.yml
Created December 31, 2015 10:12
.travis.yml file to drive both test and deployment (on success) of a simple web app
sudo: false
language: ruby
rvm:
- 2.2.1
before_install:
- openssl aes-256-cbc -K $encrypted_a1a5bb03449b_key -iv $encrypted_a1a5bb03449b_iv -in travis.pem.enc -out travis.pem -d
- chmod 600 ./travis.pem
after_success:
- ssh web@ruby-hw.opsits.com -i ./travis.pem -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /var/www/ruby_hw/update.sh
@rstarmer
rstarmer / config.ru
Created December 31, 2015 10:19
Ruby rack configuration, describing how to run a Sinatra ruby application 'hw.rb'
require './hw'
run Sinatra::Application