KnifeBootstrapAWS: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
create instance | create instance | ||
8GB for root, 50GB for /var/lib/jenkins | 8GB for root, 50GB for /var/lib/jenkins |
Latest revision as of 23:02, 24 January 2018
create instance
8GB for root, 50GB for /var/lib/jenkins
yum -y update
install/configure postfix
aws ec2 run-instances --image-id ami-d2c924b2 --count 1 --instance-type t2.medium--key-name invadelabs-2016.03.25 --security-groups build.invadelabs.com | grep InstanceId > instance_id.txt
XXX add script to set $INSTANCE_ID
aws ec2 create-tags --resources $INSTANCE_ID --tags "Key=Name,Value=build.invadelabs.com”
aws ec2 modify-instance-attribute --instance-id $INSTANCE_ID --disable-api-termination
aws ec2 associate-address --instance-id $INSTANCE_ID --public-ip 52.21.104.251
knife bootstrap build.invadelabs.com -N build.invadelabs.com \
-E _default -r 'role[base]' -j '{ "foo": "bar" }' \
--ssh-user centos --sudo \
-i Desktop/build.invadelabs.com-20160325.pem
ssh -i Desktop/invadelabs-20160325.pem [email protected]
sudo chef-client
$ knife cookbook upload apt runit yum compat_resource packagecloud yum-epel jenkins jenkins-invadelabs
$ knife ssh name:jenkins-master "sudo chef-client" -x drew --sudo