Procfile Upstart Exporter
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:
-
Templates have long stading issues. This could be solved with custom templates.
-
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
withstart application/web
. -
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
- Add
umask
to Upstart template.
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
anddestroy
commands with basic functionality.
New release procedure
- Update changelog.
- Bump version.
- Push tag with version. For example,
v1.2.3
. - 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.