cookbook 'opsworks_python', '~> 0.0.3'
opsworks_python (3) Versions 0.0.3 Follow2
Deploys and configures python based applications with supervisor
cookbook 'opsworks_python', '~> 0.0.3', :supermarket
knife supermarket install opsworks_python
knife supermarket download opsworks_python
opsworks_python Cookbook
This cookbook is designed to be able to describe and deploy python applications on AWS OpsWorks with supervisor.
Requirements
Chef 0.10.0 or higher required (for Chef environment use).
The following Opscode cookbooks are dependencies:
- python
- supervisor
Additionally, the AWS OpsWorks following cookbooks are required:
- deploy
- scm_helper
Stack/Layer configuration
Stack configuration
In your stack, update enable your custom json:
{
"deploy": {
"my_python_app": {
"custom_type": "python", // Required otherwise the recipe will skip
// List of package to install (optional)
"packages": {
"pip_package_name": "latest",
},
// OS packages (optional)
"os_packages": {
"package_name": "lasest"
},
"opsworks_python": {
"supervisor": {
// supervisor options
}
}
}
}}
Recipes
python
The python deploy recipe creates a virtualenv and installs specified OS and python packages. This is the default recipe. These attributes can be set on the deploy configuration (node[:deploy][application_name]
) or globally (node["opsworks_python"]
).
Attribute Parameters
- packages: a list of python packages to be installed in the virtualenv
- os_packages: a list of OS packages to be installed on the instance
- venv_options: a string with command line options for virtualenv creation (defaults to
--no-site-packages
) - python_major_version: the major version of python to use (only allowable in the deploy configuration, not globally), allows you to use python
2.4
,2.5
or2.6
as needed.
Related recipes
- python-undeploy: removes the virtual env and stops supervisor for the app
supervisor
by default supervisor looks for application.py into your app folder.
If your entrypoint is different set:
["opsworks_python"]["supervisor"]["script"] = 'myscript.py'
If you want supervisor to use a specific command:
["opsworks_python"]["supervisor"]["command"] = 'mycommand'
Other supervisor options for the service are described here
Disable supervisor
set node["opsworks_python"]["supervisor"]["disabled"] = true
and supervisor will be disabled.
Bugfix for R3 Instances
OpsWorks currently has a bug that affects r3 class instances, where the
ephemeral instance storage is not formatted or mounted on initial load. This
causes reboots to fail, since the volume is listed in fstab, and also results
in reduced space available on /mnt
.
To workaround this issue, this package contains a custom recipe that formats
and mounts the default ephemeral volume on r3 instances. To enable the
recipe, add the opsworks_deploy_python::r3-mount-patch
recipe to the start
of the setup section of any layers that might run on an r3 instance.
License & Authors
Author:: Florent Vilmart (flo@flovilmart.com)
Inspired from:: Alec Mitchell (alecpm@gmail.com)
With thanks to Jazkarta, Inc. and KCRW Radio
```text
Copyright 2014, Alec Mitchell
Licensed under the BSD License.
```
Dependent cookbooks
deploy >= 0.0.0 |
scm_helper >= 0.0.0 |
opsworks_initial_setup >= 0.0.0 |
python >= 0.0.0 |
supervisor >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
application_buildout Cookbok CHANGELOG
Collaborator Number Metric
0.0.3 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.0.3 failed this metric
FC064: Ensure issues_url is set in metadata: opsworks_python/metadata.rb:1
FC065: Ensure source_url is set in metadata: opsworks_python/metadata.rb:1
FC066: Ensure chef_version is set in metadata: opsworks_python/metadata.rb:1
FC069: Ensure standardized license defined in metadata: opsworks_python/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:3
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:8
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:13
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.3 passed this metric
Testing File Metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.3 failed this metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.0.3 failed this metric
FC064: Ensure issues_url is set in metadata: opsworks_python/metadata.rb:1
FC065: Ensure source_url is set in metadata: opsworks_python/metadata.rb:1
FC066: Ensure chef_version is set in metadata: opsworks_python/metadata.rb:1
FC069: Ensure standardized license defined in metadata: opsworks_python/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:3
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:8
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:13
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.0.3 passed this metric
Testing File Metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.3 failed this metric
FC065: Ensure source_url is set in metadata: opsworks_python/metadata.rb:1
FC066: Ensure chef_version is set in metadata: opsworks_python/metadata.rb:1
FC069: Ensure standardized license defined in metadata: opsworks_python/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:3
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:8
FC085: Resource using new_resource.updated_by_last_action to converge resource: opsworks_python/providers/default.rb:13
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.0.3 passed this metric
Testing File Metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.0.3 failed this metric
0.0.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number