Skip to content

Instantly share code, notes, and snippets.

@ehershey

ehershey/-

Created Dec 1, 2014
Embed
What would you like to do?
debian71-tmpl: &debian71-tmpl
template: true
arch: linux_amd64
provider: ec2
settings:
ami: ami-28008940
securitygroups: mci
keyname: mci
user: admin
key: mci
setup_as_sudo: true
expansions:
decompress: tar zxvf
ps: ps aux
kill_pid: kill -- -$(ps opgid= %v)
setup_mci_only: |
echo "github.com,207.97.227.239 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==" | tee -a /home/admin/.ssh/known_hosts
echo "${github_private_key}" | tee -a /home/admin/.ssh/id_rsa
echo "${github_public_key}" | tee -a /home/admin/.ssh/id_rsa.pub
echo "s3_key: ${s3_key}" | tee -a /data/expansions_s3.yml
echo "s3_secret: ${s3_secret}" | tee -a /data/expansions_s3.yml
echo "${api_httpscert}" | tee -a ${api_httpscert_path}
chmod 600 /home/admin/.ssh/*
chown -R admin:admin /data
chown -R admin:admin /home/admin/.ssh
debian71-build:
<<: *debian71-tmpl
name: debian71-build
template: false
spawn_allowed: false
hosts: []
maxhosts: 10
provider: ec2
settings:
bid_price: 0.56
instancetype: m3.2xlarge
mountinfo: [
{devicename: "/dev/xvdd", virtualname: "ephemeral0"}, #on m3.2xlarge, this is a 80GB SSD.
{devicename: "/dev/xvde", virtualname: "ephemeral1"}, #on m3.2xlarge, this is a 80GB SSD.
]
setup: |
#!/bin/bash
set -o errexit
set -o verbose
umount /mnt || true
umount /dev/xvdd || true
umount /dev/xvde || true
udevadm control --stop-exec-queue
yes | mdadm --create /dev/md0 --level=0 -c256 --raid-devices=2 /dev/xvdd /dev/xvde
udevadm control --start-exec-queue
blockdev --setra 32 /dev/md0
/sbin/mkfs.xfs -f /dev/md0
mkdir -p /data
echo "/dev/md0 /data auto noatime 0 0" | tee -a /etc/fstab
mount /data
chown -R admin:admin /data
debian71-test:
<<: *debian71-tmpl
name: debian71-test
spawn_allowed: true
template: false
hosts: []
maxhosts: 10
provider: ec2
settings:
instancetype: m3.large
bid_price: 0.14
mountinfo: [
{devicename: "/dev/xvdd", virtualname: "ephemeral0"}, #on m3.large, this is a 32GB SSD.
]
setup: |
#!/bin/bash
set -o errexit
set -o verbose
umount /mnt || true
umount /dev/xvdd || true
/sbin/mkfs.xfs -f /dev/xvdd
mkdir -p /data
mount /dev/xvdd /data
chown -R admin:admin /data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment