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

Docs should mention that Java 8 is required, and allow more graceful settings for the "rd" script #54

Closed
nkadel-skyhook opened this issue Jan 5, 2017 · 5 comments

Comments

@nkadel-skyhook
Copy link

Rundeck requires Java 7 or better, rundeck-cli requires Java 8 (or perhaps better later on). This is problematic for hosts that have multiple Java setups installed, and requires "JAVA_HOME" or similar environmental wrappers around the /usr/bin/rd script, which is symlinked to the [appdir]/bin/rd. That gets problematic.

The wrapper script could be easily configured to allow sourcing a user's "$HOME/.rd/rd.conf", to allow resetting of JAVA_HOME and even of RD user credentials on a user specific basis, without having to write "environment" based wrappers. I'd be happy to submit a patch for this, if I can get a pointer to where that bin/rd script is actually generated. If it's not built in the source tree but rather is embedded in the SRPM files, I'd also appreciate seeing the SRPM configuration in an available git repo.

@nkadel-skyhook nkadel-skyhook changed the title Docks should mention that Java 8 is required, and allow more graceful settings for the "rd" script Docs should mention that Java 8 is required, and allow more graceful settings for the "rd" script Jan 5, 2017
@gschueler
Copy link
Member

The rd script is generated by the gradle application plugin, but it is customizable using a template: https://docs.gradle.org/2.13/userguide/application_plugin.html#N15F30

https://docs.gradle.org/2.13/dsl/org.gradle.jvm.application.tasks.CreateStartScripts.html

This is their example using a template file:

task createStartScripts(type: CreateStartScripts) {
  unixStartScriptGenerator.template = resources.text.fromFile('customUnixStartScript.txt')
  windowsStartScriptGenerator.template = resources.text.fromFile('customWindowsStartScript.txt')
}

@nkadel-skyhook
Copy link
Author

So, perhaps the right approach is a mini shell wrapper, pointed to the gradle generated script? I'd hesitate trying to keep a template consistent with all the standard gradle generated options in this case.

@nkadel-skyhook
Copy link
Author

Where is the SRPM and RPM generation? Is that built into gradle, which I've not personally used yet?

@gschueler
Copy link
Member

rpm generation is also via gradle plugin: https://github.com/rundeck/rundeck-cli/blob/master/build.gradle#L123
I don't think it generates SRPM

@gschueler
Copy link
Member

@nkadel-skyhook i think your customization is simple I will try modifying the script template within the build file.

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