Skip to content

Instantly share code, notes, and snippets.

View thom8's full-sized avatar

Thom Toogood thom8

View GitHub Profile
@thom8
thom8 / d8install.sh
Created August 20, 2015 12:51
Install Drupal 8 sprint box
#!/bin/bash
git clone https://github.com/thom8/drupal8-vagrant.git
cd drupal8-vagrant
if !(vagrant plugin list | grep -q vagrant-hostsupdater); then
vagrant plugin install vagrant-hostupdater
fi
vagrant up
@thom8
thom8 / deploy-playbook.yml
Created November 20, 2015 00:38
ansible-playbook deploy-playbook.yml -e "project=<project>" -e "branch=<branch>"
---
- hosts: "tag_UID_{{ (branch+project) | checksum }}"
connection: local
gather_facts: no
tasks:
- name: Terminate existing instance
local_action: ec2
state=absent
@thom8
thom8 / terminate-playbook.yml
Created November 20, 2015 00:39
ansible-playbook termina-playbook.yml -e "project=<project>" -e "branch=<branch>"
---
- hosts: "tag_UID_{{ (branch+project) | checksum }}"
gather_facts: True
connection: local
vars:
- dns_zones:
- domain1.com
- domain2.com
- branch_shortname: "{{ branch | basename }}"
@thom8
thom8 / vagrant-box-update-all.sh
Last active September 15, 2017 16:33
Update all your vagrant base boxes
#!/bin/bash
# Find all boxes which have updates
AVAILABLE_UPDATES=`vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2`
if [ ! ${#AVAILABLE_UPDATES[@]} -eq 0 ]; then
for box in $AVAILABLE_UPDATES ; do
echo "Found an update for $box"
---
# Custom project config.
drush_version: "7.0.0-rc2"
drush_keep_updated: yes
@thom8
thom8 / Vagrantfile
Created December 21, 2015 10:29
beetbox simple Vagrantfile
require 'open-uri'
conf_files = ["config.yml", "drupal8.make.yml"]
conf_files.each do |conf|
open(conf, 'wb') do |file|
file << open("https://raw.githubusercontent.com/drupalmel/beetbox/master/#{conf}").read
end
end
eval(open("https://raw.githubusercontent.com/drupalmel/beetbox/master/Vagrantfile") {|f| f.read })
---
machine:
python:
version: 2.7.6
environment:
BEETBOX_HOME: /home/ubuntu/beetbox
BEETBOX_DEPENDENCIES: https://raw.githubusercontent.com/drupalmel/beetbox/master/tests/dependencies.sh
dependencies:
pre:
- curl -fsSL $BEETBOX_DEPENDENCIES | bash
@thom8
thom8 / Vagrantfile
Created February 9, 2016 02:34
Beetbox /w ubuntu/trusty64 as the base.
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'yaml'
Vagrant.require_version '>= 1.8.0'
cwd = File.dirname(File.expand_path(__FILE__))
config_dir = '.beetbox/'
project_config = "#{cwd}/#{config_dir}config.yml"
@thom8
thom8 / dvm_remap.sh
Last active February 21, 2016 21:48
#!/bin/bash -e
DVM_CONFIG=${1:-'config.yml'}
if [ ! -f "$DVM_CONFIG" ]; then
echo "Drupal VM config file not found."
exit 1
else
# Remap Drupal VM config variables.
@thom8
thom8 / Vagrantfile
Last active March 3, 2016 02:40
Wordpress Beetbox
# Add this Vagrantfile to an empty directory and run vagrant up -- http://beetbox.rtfd.org
require 'open-uri'
require 'fileutils'
cwd = File.dirname(File.expand_path(__FILE__))
lconfig = "#{cwd}/.beetbox/config.yml"
FileUtils::mkdir_p "#{cwd}/.beetbox"
open(lconfig, 'wb') << open("https://gist.githubusercontent.com/thom8/4e01f75e0be7b71f05b9/raw/config.yml").read unless File.exist?(lconfig)
eval(open("https://raw.githubusercontent.com/beetboxvm/beetbox/master/Vagrantfile") {|f| f.read })