Created
September 26, 2015 22:05
-
-
Save afiune/add44d18c1d0d2fc38fe to your computer and use it in GitHub Desktop.
Start a delivery-cluster from scratch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [default] | |
| region=us-west-2 | |
| aws_access_key_id = | |
| aws_secret_access_key = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First: Provision a machine in EC2 and login to it! | |
| Then use the following list of commands to user delivery-cluster | |
| -------------------------------------------------------------------------------- | |
| wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.8.0-1_amd64.deb | |
| wget https://slack-files.com/files-pub/fe6/download/delivery.license # Get your own license | |
| sudo apt-get install build-essential | |
| sudo apt-get install git | |
| sudo dpkg -i chefdk_0.8.0-1_amd64.deb | |
| echo 'eval "$(chef shell-init bash)"' >> ~/.bash_profile | |
| . ~/.bash_profile | |
| vi ~/.ssh/afiune.pem | |
| chmod 600 ~/.ssh/afiune.pem | |
| mkdir ~/.aws | |
| vi ~/.aws/config | |
| # Something weird here.. For some reason we need to have both | |
| cp ~/.aws/config ~/.aws/credentials | |
| git clone https://github.com/opscode-cookbooks/delivery-cluster.git ~/delivery-cluster | |
| cd delivery-cluster/ | |
| rake setup:generate_env | |
| echo 'export CHEF_ENV=bug-fix' >> ~/.bash_profile | |
| export CHEF_ENV=bug-fix | |
| chef exec rake setup:cluster | |
| # Boom Failure HERE! | |
| knife cookbook upload --all --cookbook-path /root/delivery-cluster/.chef/local-mode-cache/cache/cookbooks --force | |
| # FIX: Super awful workaround | |
| export BUNDLE_PATH=$GEM_HOME | |
| rake setup:chef_server | |
| rake setup:delivery |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "bug-fix", | |
| "description": "Delivery Cluster Environment", | |
| "json_class": "Chef::Environment", | |
| "chef_type": "environment", | |
| "override_attributes": { | |
| "delivery-cluster": { | |
| "id": "bug-fix", | |
| "driver": "aws", | |
| "aws": { | |
| "key_name": "afiune", | |
| "ssh_username": "ubuntu", | |
| "image_id": "ami-5189a661", | |
| "subnet_id": "subnet-eacb348f", | |
| "security_group_ids": "sg-03f96f67", | |
| "use_private_ip_for_ssh": true | |
| }, | |
| "chef-server": { | |
| "organization": "bug-fix", | |
| "existing": false, | |
| "flavor": "c3.xlarge" | |
| }, | |
| "delivery": { | |
| "version": "latest", | |
| "enterprise": "bug-fix", | |
| "license_file": "/root/delivery.license", | |
| "flavor": "c3.xlarge" | |
| }, | |
| "builders": { | |
| "count": "1", | |
| "flavor": "c3.large" | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment