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

Remove forever daemon in lieu of plain Upstart on Ubuntu 14 #30

Merged
merged 1 commit into from
Aug 28, 2016

Conversation

xenithorb
Copy link
Collaborator

The previous method of using the forever monitor daemon with upstart
failed at being able to write to the pid-file upon reboot. This showed
up in Vagrant testing and I believe it has something to do with the fact
that we're creating the pidfile manually within the play.

I have prior experience with NodeJS+Upstart and it turns out that
forever isn't actually necessary at all. With console log and
respawn directives, and an unforked process, Upstart properly tracks
the PID (without a pidfile), respawns the process should it die, and
logs by default to /var/log/upstart/rocketchat.log

This changeset removes the following tasks and has the added benefit of
simplifying the play overall:

  • Ensure Forever (NodeJS) is installed [Ubuntu 14]
  • Check to see if the Rocket.Chat log file is present [Ubuntu 14]
  • Ensure the Rocket.Chat log file is present [Ubuntu 14]
  • Ensure the Rocket.Chat pid file is present [Ubuntu 14]

The former log-file path has been replaced with a symlink pointing to
the new logfile path.

This fixes #11

The previous method of using the forever monitor daemon with upstart
failed at being able to write to the pid-file upon reboot. This showed
up in Vagrant testing and I believe it has something to do with the fact
that we're creating the pidfile manually within the play.

I have prior experience with NodeJS+Upstart and it turns out that
forever isn't actually necessary at all. With `console log` and
`respawn` directives, and an unforked process, Upstart properly tracks
the PID (without a pidfile), respawns the process should it die, and
logs by default to `/var/log/upstart/rocketchat.log`

This changeset removes the following tasks and has the added benefit of
simplifying the play overall:

- Ensure Forever (NodeJS) is installed [Ubuntu 14]
- Check to see if the Rocket.Chat log file is present [Ubuntu 14]
- Ensure the Rocket.Chat log file is present [Ubuntu 14]
- Ensure the Rocket.Chat pid file is present [Ubuntu 14]

The former log-file path has been replaced with a symlink pointing to
the new logfile path.

This fixes #11
@xenithorb xenithorb merged commit e0423f6 into master Aug 28, 2016
@xenithorb xenithorb deleted the fix_ubuntu14_upstart branch August 28, 2016 16:03
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

Successfully merging this pull request may close these issues.

1 participant