Skip to content

Instantly share code, notes, and snippets.

@andruby
Last active December 17, 2015 07:19
Show Gist options
  • Save andruby/5571940 to your computer and use it in GitHub Desktop.
Save andruby/5571940 to your computer and use it in GitHub Desktop.
Testing for EC2 cloud-init with User Data
#cloud-config
apt_upgrade: true
apt_update: true
apt_reboot_if_required: true
packages:
- build-essential
- libcurl4-gnutls-dev
- libjansson-dev
- git
- automake
#!/bin/sh
apt-get install -y build-essential libcurl4-gnutls-dev libjansson-dev git automake screen
cd /root && git clone https://github.com/pooler/cpuminer.git
cd /root/cpuminer/ && ./autogen.sh && CFLAGS="-O3 -Wall -msse2" ./configure && make clean && make
#!/bin/sh
echo "Hello Mister. The time is now $(date -R)! And User-Data works to load gists from github" | tee /root/output.txt
cd /root && git clone https://github.com/pooler/cpuminer.git
cd /root/cpuminer/ && ./autogen.sh && CFLAGS="-O3 -Wall -msse2" ./configure && make clean && make
#include
https://gist.github.com/andruby/5571940/raw/cloud-config
https://gist.github.com/andruby/5571940/raw/remote.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment