Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences between foreman export supervisord and honcho export supervisord #109

Closed
msabramo opened this issue Nov 27, 2014 · 2 comments
Closed

Comments

@msabramo
Copy link
Collaborator

Maybe some of the differences with Foreman are intentional; some are not?

Just going to catalog the differences for now.

[marca@marca-mac2 export_test]$ foreman export supervisord . -a myapp && mv myapp.conf foreman_myapp.conf
[foreman export] writing: myapp.conf
[marca@marca-mac2 export_test]$ honcho export supervisord . -a myapp && mv myapp.conf honcho_myapp.conf
[marca@marca-mac2 export_test]$ diff -u foreman_myapp.conf honcho_myapp.conf
diff --git a/foreman_myapp.conf b/honcho_myapp.conf
index cec5788..1733ae5 100644
--- a/foreman_myapp.conf
+++ b/honcho_myapp.conf
@@ -1,14 +1,13 @@
-
-[program:myapp-ansvc-1]
-command=bin/ansvc start
+[program:myapp-ansvc]
+command=/bin/sh -c 'bin/ansvc start'
 autostart=true
 autorestart=true
 stopsignal=QUIT
-stdout_logfile=/var/log/myapp/ansvc-1.log
-stderr_logfile=/var/log/myapp/ansvc-1.error.log
-user=myapp
+stdout_logfile=/var/log/myapp/ansvc-0.log
+stderr_logfile=/var/log/myapp/ansvc-0.error.log
+user=marca
 directory=/Users/marca/dev/git-repos/honcho/export_test
 environment=PORT="5000"

 [group:myapp]
-programs=myapp-ansvc-1
+programs=myapp-ansvc
@msabramo
Copy link
Collaborator Author

Differences:

  1. Foreman puts a newline at the beginning of the file, like honcho used to do, but this was removed in PR supervisord template: \n at end; not at beginning #96. This is a Foreman bug and I've created Nicer formatting for exported supervisord files ddollar/foreman#503 for it. @ddollar just merged this so I'm going to put a line through this one.
  2. Foreman names the program myapp-ansvc-1; Honcho uses myapp-ansvc (no number) and Foreman's numbering (used for program name and log files) starts at 1; Honcho's starts at 0. I've created PR export supervisord: Improve process numbering #113 for this.
  3. Honcho sticks a /bin/sh -c in front of the command. Not sure of rationale for this. I've addressed this with PR export supervisord: Remove shell from command #110.
  4. Foreman sets the user to the app name. Honcho uses my logged-in user name. I've created PR export: Default user name to app name #111 for this.
  5. Foreman tells the user what it's doing -- e.g.:
    [foreman export] writing: myapp.conf
    I've created PR export: Display message about writing file #112 for this.

msabramo added a commit to msabramo/honcho that referenced this issue Nov 27, 2014
This matches Foreman's behavior (see nickstenning#109) and also matches what the
Honcho docs say at https://honcho.readthedocs.org/en/latest/export.html:

    -s SHELL, --shell SHELL
        Specify the shell that should run the application.
        Only used for upstart.
msabramo added a commit to msabramo/honcho that referenced this issue Nov 27, 2014
and remove code for deducing current user.

This makes the behavior consistent with Foreman (see nickstenning#109). Also, I
think folks are more likely to want to run their apps as some
app-specific user, not as the user running export. In fact, some folks
may run `honcho export` on a completely different box than where they
end up running the applications.
msabramo added a commit to msabramo/honcho that referenced this issue Nov 27, 2014
This matches Foreman's behavior (see nickstenning#109) and also matches what the
Honcho docs say at https://honcho.readthedocs.org/en/latest/export.html:

    -s SHELL, --shell SHELL
        Specify the shell that should run the application.
        Only used for upstart.
msabramo added a commit to msabramo/honcho that referenced this issue Nov 27, 2014
This makes it consistent with Foreman (See nickstenning#109) and is just nice for
the user to know what is happening.
msabramo added a commit to msabramo/honcho that referenced this issue Nov 27, 2014
and remove code for deducing current user.

This makes the behavior consistent with Foreman (see nickstenning#109). Also, I
think folks are more likely to want to run their apps as some
app-specific user, not as the user running export. In fact, some folks
may run `honcho export` on a completely different box than where they
end up running the applications.
msabramo added a commit to msabramo/honcho that referenced this issue Nov 27, 2014
More consistent with Foreman (see nickstenning#109).

1. Make numbering 1-based instead of 0-based.
2. Include number in program name.

I also moved the append of `num` to `full_name` from the Python code to
the template. I think that this is better, because it will allow folks
to control whether or not it gets appended using a custom template
(which is hopefully coming soon... 😄)
msabramo added a commit to msabramo/honcho that referenced this issue Nov 28, 2014
More consistent with Foreman (see nickstenning#109).

1. Make numbering 1-based instead of 0-based.
2. Include number in program name.

I also moved the append of `num` to `full_name` from the Python code to
the template. I think that this is better, because it will allow folks
to control whether or not it gets appended using a custom template
(which is hopefully coming soon... 😄)
msabramo added a commit to msabramo/honcho that referenced this issue Nov 28, 2014
This makes it consistent with Foreman (See nickstenning#109) and is just nice for
the user to know what is happening.
msabramo added a commit to msabramo/honcho that referenced this issue Nov 28, 2014
This makes it consistent with Foreman (See nickstenning#109) and is just nice for
the user to know what is happening.
msabramo added a commit to msabramo/honcho that referenced this issue Nov 28, 2014
This makes it consistent with Foreman (See nickstenning#109) and is just nice for
the user to know what is happening.
msabramo added a commit to msabramo/honcho that referenced this issue Dec 4, 2014
This makes it consistent with Foreman (See nickstenning#109) and is just nice for
the user to know what is happening.
@nickstenning
Copy link
Owner

I think we've resolved most of the differences that are worth caring about now. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants