This cookbook deploys the individual services that make up the DualSpark Cutthroat Kitchen Microservice API platform.
build-essential
- Installs C compiler / build toolssupervisor
- Installs supervisor and provides resources to configure servicespython
- Installs Python, pip and virtualenv. Includes LWRPs for managing Python packages withpip
andvirtualenv
isolated Python environments.
Key | Type | Description | Default |
---|---|---|---|
['apt']['compile_time_update'] | Boolean | force the default recipe to run apt-get update at compile time | true |
['build-essential']['compile_time'] | Boolean | Execute resources at compile time | true |
['python']['install_method'] | String | method to install python with | package |
['python']['version'] | String | the version of the package to install/upgrade. If no version is given latest is assumed. | 2.7.10 |
['python']['checksum'] | String | sha256 checksum for source package of python install if/when installed from source. | eda8ce6eec03e74991abb5384170e7c65fcd7522e409b8e83d7e6372add0f12a |
['ctk-api']['package_name'] | String | Name of the python package to install/td> | ctk-episode-api |
['ctk-api']['package_version'] | String | Version of the python package to install | 0.1.0 |
['ctk-api']['package_location'] | String | Package location template for downlodaing and installing python package from URL | https://s3-us-west-2.amazonaws.com/packages.dualspark.com/dev/ctk-api-episode/#{node['ctk-api']['package_name']}-#{node['ctk-api']['package_version']}.tar.gz |
['ctk-api']['name'] | String | Name of this API | episode |
['ctk-api']['single_uri_base'] | String | Base uri from which this API is hosted | /#{node['ctk-api']['name']} |
['ctk-api']['list_uri_base'] | String | Base uri for list actions and post for creating new objects | /#{node['ctk-api']['name']}s |
['ctk-api']['healthcheck_base'] | String | Uri for the health check action for this api | /healthcheck |
Just include ctk-api
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[ctk-api]"
]
}
Building Images on AWS
To build images on AWS, you'll need to run the following command before you run Packer against the imagebuild.packer.json file to bundle all of the cookbooks together:
bundle exec berks vendor
Fairly soon the need to do this will go away given that there's now a PR in to handle preCommand hooks for the chef-solo provisioner in Packer: https://github.com/maoo/packer/commit/aa58996caa7569eb3f8365f5da149ce4d9d90613
To run the actual packer build, run the following command:
packer build imagebuild.packer.json
This process assumes you've set your AWS keys in an AWS credentials file. Otherwise, you can pass these variables in via Packer user varibles.
packer build \
-var 'aws_access_key=foo' \
-var 'aws_secret_key=bar' \
imagebuild.packer.json
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Authors:
- Patrick McClory patrick@dualspark.com