funbox / init-exporter Goto Github PK
View Code? Open in Web Editor NEWUtility for exporting services described by Procfile to init system
License: MIT License
Utility for exporting services described by Procfile to init system
License: MIT License
System info:
cat /etc/*-release
): CentOS 6uname -a
): 2.6.32
System info:
Procfile
with the reload_signal
option defined.reload
command using initctl
.Expected behavior:
Command reload
sends defined signal to the process.
Actual behavior:
Upstart configuration is broken with the Unknown stanza
message. Upstart job cannot be started.
Additional info:
Issue happens due to unsupported stanza reload
in upstart 0.6.5 that ships with CentOS 6 distro.
Possible solutions:
init-checkconf
utility (does not exist on CentOS 6).upstart
to the latest stable version (sic!) and verify upstart
version installed.Systemd has its own resource control options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
LimitCPU=, LimitFSIZE=, LimitDATA=, LimitSTACK=, LimitCORE=, LimitRSS=, LimitNOFILE=, LimitAS=, LimitNPROC=, LimitMEMLOCK=, LimitLOCKS=, LimitSIGPENDING=, LimitMSGQUEUE=, LimitNICE=, LimitRTPRIO=, LimitRTTIME=
We need to set LimitNOFILE and LimitNPROC to something different than default values.
Also it would be great to make them configurable by user.
$ sudo upstart-export --uninstall --format upstart myapp
Error while arguments parsing:
Argument --uninstall is not supported
I believe that the right spelling is uninstall
:)
Hi!
We'd love to have configurable in procfile LimitMEMLOCK option because some services/utils (e.g. elastic) demand to customise it.
I found limits parsing in source code here, but there is no MEMLOCK support. Hope you'll find it reasonable to add it.
Hello everyone,
I suppose that would be nice to implement systems.resource-control options to limit applications by CPU, RAM, I/O etc. from the Procfile
definition.
On the one hand, it might be useful for those people, who run multiple applications on one server and want to assign particular amount of systems resources. On the other hand, it works only with systemd
whereas upstart
supervisor does not have this feature out-of-box.
What do you think? Let's discuss this further.
System info:
cat /etc/*-release
): CentOS 7uname -a
): 3.10.0
System info:
Procfile
with the reload_signal
option defined.reload
command using systemctl
.Expected behavior:
Command reload
sends defined signal to the process.
Actual behavior:
systemd
sends signal to parent process, whose helper does not handle signal and does not forward to its child process. So child process is unable to trap and process the signal.
Additional info:
Possible solutions:
trap
inside init-exporter helpers with given signal and sigHandler
which sends signal to child process.ExecReload
command (not only kill
).A attempt to export simple procfile v2 with command section like the following:
commands:
app1:
env:
JAVA_OPTS: '"-Xms512m -Xmx1g -XX:+HeapDumpOnIutOfMemoryError"'
LOADER_SYSTEM: true
command: bin/run-something
leads to export failure with error message:
Errors while application validation:
- Environment variable value "-Xms512m -Xmx1g -XX:+HeapDumpOnOutOfMemoryError" is insecure and can't be accepted
I believe it is quite common to setup some configuration through environment variables defined that way, so it seems that validation rules applied on export are too strict.
Hi ๐ป
It would have been nice for low-volume services to have a single log file for all processes.
Now it requires repeating the log
option in each process:
# Procfile.v2
commands:
foo:
command: foo
log: log/common.log
bar:
command: bar
log: log/common.log
Common log option would have been more convenient:
# Procfile.v2
log_file: log/common.log
commands:
foo:
command: foo
bar:
command: bar
Thanks ๐
Continuing the issue #57
Proposal:
Return setting reload_signal for CentOS 7 (systemctl). Use it in the property ExecReload
. Use the command pkill
instead kill
.
ExecReload=/bin/pkill -SIGUSR2 -P $MAINPID
Current behavior:
reload_signal is not supported
Desired behavior:
I would like to, when executing the command systemctl reload
sends defined signal to the process.
You need to run systemctl daemon-reload
after uninstallation to unload uninstalled units from the system.
Proposal:
Add pyenv
version manager for Python in addition to rbenv
to init-exporter
on the analogy of rbenv
.
Current behavior:
pyenv
is not supported by init-exporter
.
Desired behavior:
Would be nice to have the following line in the helper program:
[[ -r /etc/profile.d/pyenv.sh ]] && source /etc/profile.d/pyenv.sh
Use case:
It would allow use Python-written programs using pyenv
without a necessity to craft a wrapper on application level that exports environment variables.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.