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

Wip/rpm server archetype #176

Merged
merged 8 commits into from
Feb 28, 2014
Merged

Wip/rpm server archetype #176

merged 8 commits into from
Feb 28, 2014

Conversation

muuki88
Copy link
Contributor

@muuki88 muuki88 commented Feb 28, 2014

Fixing #149
This PR is based on PR #174 to minimize merging overhead.

What has be done

  • Added linuxSettings for server archetype
  • Added pid folder in server archetype
  • Refactored JavaStartScript class/object
  • Tested with CentOS 6.5
  • Added exec to bash-script again for correct PID handling

More details

After installing the rpm with

sudo rpm -Uvh your-app.noarch.rpm

you access the service with

sudo service your-app start
sudo service your-app status
sudo service your-app stop
sudo service your-app restart

TODO

  • The correct users for the daemonUser and daemonGroup are not created. Root is used a fallback by rpm
  • The service is not autostarted after installation
  • Upstart doesn't work (just copied the debian configuration, but no luck)

- Added linuxSettings for server archetype
- Added pid folder in server archetype
- Refactored JavaStartScript class/object
- Tested with CentOS 6.5
@@ -128,7 +128,7 @@ execRunner () {
}

# We Don't use "exec" here for our pids to be accurate.
"$@"
exec "$@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) We keep changing our minds here. Exec feels right as this should make the PID files line up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it should. We were all a bit confused (#168) However I'm with @kardapoltsev and we should put it back as this is the way to go.

@jsuereth
Copy link
Member

Cool. I like this change, travis CI says it passed. If you're done with this change, feel free to merge. The System V script still looks like it might need something to change the daemonUser (important for security). Otherwise, looks good.

@muuki88
Copy link
Contributor Author

muuki88 commented Feb 28, 2014

I'll write one more test and run the service as daemon user.

@muuki88
Copy link
Contributor Author

muuki88 commented Feb 28, 2014

Okay. I think we can merge this and improve based on that. Left todo is

  • check why pre and postun scripts don't run (fixed)
  • upstart support (it should be easy, right?!?!)
  • test on Fedora/RHEL/CentOS 5

muuki88 added a commit that referenced this pull request Feb 28, 2014
@muuki88 muuki88 merged commit e26728e into master Feb 28, 2014
@muuki88 muuki88 deleted the wip/rpm-server-archetype branch February 28, 2014 22:54
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.

2 participants