No commit activity in last 3 years
No release in over 3 years
Export Procfile entries to Upstart jobs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
>= 0
~> 2.14

Runtime

>= 0
>= 0
 Project Readme

Procfile Upstart Exporter

Gem Version Build Status Code Climate Dependency Status Coverage Status

Export Procfile entries to Upstart jobs.

Y U no Foreman?

I'm aware of Foreman's exporting capabilities but I find them lacking for the following reasons:

  1. Templates have long stading issues. This could be solved with custom templates.

  2. Generated Upstart jobs are placed in the same folder. It would be nice to have a structure like the following:

    /etc/init
    ├── application
    │   ├── background-workers.conf
    │   └── web.conf
    └── application.conf
    

    This makes it easy to delete the application's job entries and looks good. Specific processes could be started/stopped with <action> <application>/<process>. For example, start the job configured in /etc/init/application/web with start application/web.

  3. When jobs change their name or are removed, they are never deleted from /etc/init.

Procfile Upstart Exporter makes this possible.

Install

Procfile Upstart Exporter is a Ruby gem. Install it with gem install procfile-upstart-exporter.

Usage

Create Upstart jobs configuration

# procfile-upstart-exporter create                                            \
    --application <application>                                               \
    --procfile <path-to-procfile>                                             \
    --log <path-to-log>                                                       \
    --environment <path-to-dotenv-file>                                       \
    --user <user-to-run-job>                                                  \
    --path <path-where-upstart-jobs-will-be-created>                          \
    --verbose

Delete Upstart jobs configuration

# procfile-upstart-exporter destroy                                           \
    --application <application>                                               \
    --path <path-where-upstart-jobs-are-found>                                \
    --verbose

Changelog

v0.0.4

v0.0.3

  • Fix logging in job destruction.
  • Only stop and destroy needed jobs.

v0.0.2

  • Warn if Procfile or .env don't exist.
  • Treat properly spaces and comment lines in .env.

v0.0.1

  • First implementation of craete and destroy commands with basic functionality.

New release procedure

  1. Update changelog.
  2. Bump version.
  3. Push tag with version. For example, v1.2.3.
  4. Publish in RubyGems.

License

Copyright © 2013 Das Dad

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.