AWS EC2 and Hosted Chef (in-progress)
- A hosted chef account from http://chef.io
- An AWS account
- A RHEL/CentOS AMI
- Create an AWS resource handler connection in CloudBolt.
- This includes an Internet-accessible VPC.
- Import an AMI for the region used
- On your CB server, create the directory /var/opt/cloudbolt/resourcehandlers/aws/<instance_id>/; where <instance_id> is take from the URL for the Resource Handler configuration page for this resource handler, e.g. for https://your_cloudbolt_server/admin/resourcehandlers/1/, the <instance_id> is "1"
- Upload your private .pem file to the directory created in the previous script. This is case sensitive, so if the key name is MyKeY, then the .pem file should be MyKeY.pem.
- Create a Configuration Management connection to Hosted Chef in CloudBolt.
- Create an organization in Hosted Chef and be sure to save the validator key as <organization_name>_validator.pem
- Create an Configuration Manager Chef instance in CloudBolt under Admin > Configuration Managers > "Add a configuration manager".
- Create /var/opt/cloudbolt/connectors/chef/<provider_id>/ where <provider_id> is taken from the URL after clicking your Chef Configuration Manager instance in CloudBolt. For instance in this url: https://your_cloudbolt_instance/providers/1; the provider_id = 1.
- Be sure to download the private key for your Hosted Chef user account and save it as <username>.pem to /var/opt/cloudbolt/connectors/chef/<provider_id>/<username>.pem
- From Hosted Chef, select the organization in the list of organizations and click "Generate Knife Config" to download the knife config to your local computer. Copy this file (knife.rb) to /var/opt/cloudbolt/connectors/chef/<provider_id>/.
- Copy <organization_name>_validator.pem to /var/opt/cloudbolt/connectors/chef/<provider_id>/
- Complete the install of knife per instructions provided by Chef. There's a link to these instructions in the CloudBolt documentation for Chef setup.
- Import any cookbooks or roles being used from Hosted Chef.
- Create an environment for the above resource handler.
- Set the configuration manager to the chef instance created above
- Set the AWS Region and select the appropriate VPC
- Add an OS Build (AMI) that was imported via the Resource Handler configuration
- Be sure the availability zone is set the zone containing your VPC
- Upload sleep orchestration hook attached to this article. By default this script sleeps for 3 minutes.
- Link to this file is just below this text.
- Add to the Pre-Network hook, give it any name, and bind it to the CloudBolt Environment defined in step 3.
- If CloudBolt needs to wait longer for the EC2 instance to initialize before bootstrapping the Chef client, edit line 6 of sleep.py.
- Provision a server -- you should see an Applications select list at the bottom of your server configuration.