Utility box hosts:
- stage mongoDB
- production import mongoDB
- elasticsearch monitor
- CI
It is based on elasticsearch-monitor AMI: ami-7edc8a14.
$ vagrant up
$ vagrant ssh
> cd /vagrant
> sudo bin/setup
> exit
$ bin/test
> MONGO_USER=bam MONGO_PASS=bam sudo -E bin/setup
> exit
$ MONGO_URL=mongodb://bam:[email protected] bin/test
$ ssh user@box
> curl -fsSL https://raw.githubusercontent.com/issueapp/box-utility/master/bin/mongo | USR=bam PAS=bam sudo -E sh
add swap $ ssh user@box > curl -fsSL https://raw.githubusercontent.com/issueapp/box-memcached/master/bin/swap | SIZE=2G sudo -E sh
larger root ebs size
-
http://docs.aws.amazon.com/cli/latest/reference/opsworks/create-instance.html
-
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html
$ cat config/instance.json { "InstanceType": "c4.large", "RootDeviceType": "ebs", "BlockDeviceMappings": [ { "DeviceName": "ROOT_DEVICE", "Ebs": { "VolumeSize": 20, "VolumeType": "gp2", "DeleteOnTermination": true } } ] } $ aws opsworks create-instance --cli-input-json file://./config/instance.json --stack-id --layer-ids
$ # or oneliner $ aws opsworks create-instance --stack-id --layer-ids --instance-type <e.g. c4.large> --block-device-mappings '[{"DeviceName":"ROOT_DEVICE","Ebs":{"VolumeType":"gp2","VolumeSize":20}}]'