This recipe installs and sets up a default running instance of pyapns on an ubuntu box.
We use upstart in this recipe to manage the application recipe.
Simply add the
chef-pyapns recipe to your application and then add
pyapns to your runlist or include the recipe.
We also optionally add a
pyapns_app resource for things that will be autoprovisioned on configuration. This ties everything
together to make it work as expected.
We expose the following options under
||Integer||7077||The port pyapns will be listening on.|
||String||pyapns||The user to create and run pyapns as.|
||String||pyapns||The group to create and run pyapns as.|
||String||pyapns||The name to generate the upstart service as.|
||String||/var/lib/pyapns||The directory to create and use as the home directory for the pyapns user. Also where the application is run from.|
||Array||||An array of hashes containing `app_id`, `cert` and `timeout` and `environment` - Used to generate the autoprovision tac file.|
||String||/etc/pyapns/apps||Directory to setup to hold PyAPNS application definitions. Each is a hash containing the same items as in apps, but as a JSON file.|
To configure an app to be automatically provisioned on the server, use it roughly the same. This generates the appropriate JSON file in
pyapns_app 'app-id-goes-here' do cert 'path-or-cert-contents' timeout 30 # Defaults to 15 environment 'sandbox' end
We encourage all community contributions. Keeping this in mind, please follow these general guidelines when contributing:
- Fork the project
- Create a topic branch for what you’re working on (git checkout -b awesome_feature)
- Commit away, push that up (git push your_remote awesome_feature)
- Create a new GitHub Issue with the commit, asking for review. Alternatively, send a pull request with details of what you added.
- Once it’s accepted, if you want access to the core repository feel free to ask! Otherwise, you can continue to hack away in your own fork.
Other than that, our guidelines very closely match the GemCutter guidelines here.
(Thanks to GemCutter for the contribution guide)
Copyright 2012 Filter Squad.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.