-
Notifications
You must be signed in to change notification settings - Fork 443
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/bashscript refactoring #348
Conversation
ed5f7e7
to
053fdbb
Compare
@kardapoltsev , I've changed the settings of |
@@ -0,0 +1,17 @@ | |||
${{header}} | |||
${{control-functions}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely like this idea a lot, splitting the template into re-usable components....
If only we could auto-document this stuff...
This LGTM. Is it ok to merge or are you doing more work on it? |
I'm afraid we should first merge #363 and then I rebase once again and then we can merge :) |
adding new ones for server-archetypes
Adding changes discussed in #358
053fdbb
to
3d63d6e
Compare
This is a major refactoring of the bash-script-creation parts.
Main Goals
archetypes
andstandard
bash scriptsReusable bash snippets
To reuse more bash scripts every reusable part is stored inside the
linuxScriptReplacements
.The
linuxScriptReplacements
are scoped, so we can provide some parts only forDebian
or
Rpm
. One of the default debian scripts now looks like thisThe
control-functions
define methods for user/group creation/deletion which workon most linux distributions.
Consolidate rpm and debian
java_server
archetype the controlscripts are now name like the debian. See the scriptlets-override-rpm test for details.<package>/<name>-template
, e.g.debian/postinst-template
DebianPlugin
has now less magic (like rpm). Only thedaemon_user
anddaemon_group
will be generated. The chown commands are now generated bydebianMakeChownReplacements
and added to thelinuxScriptReplacements in Debian
Archetype Bashscripts
Bash scripts for a specified archetype are now placed in
<archetype>/<package>/<script>-template
.Non package-specified scripts are located in
<archetype>/<identifier>/<script>
. E.gFor the
java_server
archetype we have different systemloader scripts.They get resolved like this
Java Server Archetype
The scripts for the server archetype are now build up from basic templates.
loader-functions
script which provides two functionsstartService
andstopService
loader-functions
with${{loader-functions}}
(just a replacement) and can use these methods like thecontrol-script
functionsAddition stuff
This won't be compatible with
0.7.x
as I started to use some sbt 0.13.x features.Tests and discussion
@jsuereth @kardapoltsev @aparkinson can you test on your systems? I have tested
everything so far on