This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
config.vm.box = "rax" | |
config.ssh.private_key_path = "~/.ssh/id_rsa_my_private_key" | |
config.vm.provider :rackspace do |rs| | |
rs.username = "YOUR USERNAME" | |
rs.api_key = "YOUR API KEY" | |
rs.flavor = /512MB/ | |
rs.image = /Ubuntu 12.04/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
STOP=$(($(date +%s)+300)) | |
COMPLETE_FILE="/tmp/automation-complete" | |
ME="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/$( basename ${BASH_SOURCE[0]} )" | |
while [[ ! -f "${COMPLETE_FILE}" && $(date +%s) -lt ${STOP} ]]; | |
do | |
sleep 1 | |
done | |
rm -f ${ME} ${COMPLETE_FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get -y install git | |
su - jenkins | |
git config --global user.name "Jenkins" | |
git config --global user.email "youremail@yourbusiness.com" | |
ssh-keygen -t rsa # You can use the default options here. Don't set a password. | |
cat .ssh/id_rsa.pub # Add this key to your Github account | |
ssh git@github.com # Add Github to your know_hosts file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function ostype() { | |
if [ -e /etc/redhat-release ]; then | |
export distro="Redhat/CentOS" | |
else | |
if [ "$(lsb_release -d | awk '{print $2}')" == "Ubuntu" ];then | |
export distro="Ubuntu" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine 'mysql-master' do | |
machine_options ssh_username: 'root', | |
bootstrap_options: { | |
key_name: 'id_rsa', | |
flavor_id: 'onmetal-io1', | |
image_id: 'd22ea57e-e12e-4a0a-ad6b-680dd676fd7c' | |
} | |
recipe 'apt' | |
recipe 'mysql::server' | |
tag 'database' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node.set['apt']['compile_time_update'] = true | |
include_recipe 'apt' | |
node.set['build-essential']['compile_time'] = true | |
include_recipe 'build-essential' | |
chef_gem 'chef-metal' do | |
version '0.11.2' | |
action :install | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case node['recipes'] | |
when 'cookbook::recipe' | |
take some action | |
when 'cookbook::other_recipe' | |
take other action | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heat_template_version: 2013-05-23 | |
description: | | |
Heat template to deploy a single Django server | |
parameters: | |
database_host: | |
description: Cloud Database hostname. | |
type: string |
NewerOlder