Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Sets up pyapns on a server using Chef.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
attributes
providers
recipes
resources
templates/default
LICENSE
README.md
metadata.rb

README.md

chef-pyapns

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.

Usage

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.

Configuration

We expose the following options under node['pyapns']:

Name Type Default Description
port Integer 7077 The port pyapns will be listening on.
user String pyapns The user to create and run pyapns as.
group String pyapns The group to create and run pyapns as.
service_name String pyapns The name to generate the upstart service as.
home 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.
apps Array [] An array of hashes containing `app_id`, `cert` and `timeout` and `environment` - Used to generate the autoprovision tac file.
apps_path 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.

Resources

To configure an app to be automatically provisioned on the server, use it roughly the same. This generates the appropriate JSON file in node[:pyapns][:apps_path]:

pyapns_app 'app-id-goes-here' do
  cert        'path-or-cert-contents'
  timeout     30 # Defaults to 15
  environment 'sandbox'
end

Contributing

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

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

http://www.apache.org/licenses/LICENSE-2.0

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.

Something went wrong with that request. Please try again.