Skip to content

Instantly share code, notes, and snippets.

@myui
Last active August 29, 2015 14:19
Show Gist options
  • Save myui/03567321bb0dadb842b6 to your computer and use it in GitHub Desktop.
Save myui/03567321bb0dadb842b6 to your computer and use it in GitHub Desktop.
cloud-config
#cloud-config
hostname: dcXX
fqdn: dcXX.ec2.internal
mounts:
- [ xvdb, /mnt/disk1, "auto", "defaults,nobootwait,comment=cloudconfig", 0, 2]
- [ xvdc, /mnt/disk2, "auto", "defaults,nobootwait,comment=cloudconfig", 0, 2]
runcmd:
- [ sh, -c, 'mkdir -p /mnt/disk1/hadoop/dfs/dn; mkdir -p /mnt/disk1/hadoop/mapred/local; chown -R hadoop.hadoop /mnt/disk1/hadoop' ]
- [ sh, -c, 'mkdir -p /mnt/disk2/hadoop/dfs/dn; mkdir -p /mnt/disk2/hadoop/mapred/local; chown -R hadoop.hadoop /mnt/disk2/hadoop' ]
- [ sh, -c, 'mkdir -p /var/run/hadoop-hdfs; chown -R hadoop.hadoop /var/run/hadoop-hdfs' ]
- [ sh, -c, '/usr/local/bin/aws ec2 create-tags --resources `curl -s http://169.254.169.254/latest/meta-data/instance-id` --tags Key=Name,Value=\"ML-dev-slave\" Key=Role,Value=\"ML-development\" Key=Environment,Value=\"development\" Key=Hostname,Value=\"`hostname`\"' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment