Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

install and setup on centos #1

Merged
merged 3 commits into from
Feb 6, 2018
Merged

install and setup on centos #1

merged 3 commits into from
Feb 6, 2018

Conversation

seth-shaw-unlv
Copy link
Contributor

No description provided.

{{ karaf_install_symlink }}/bin/start && sleep 5
args:
chdir: "{{ karaf_install_symlink }}/bin"
creates: "{{ karaf_install_symlink }}/bin/karaf-wrapper"
environment:
Copy link
Contributor

Choose a reason for hiding this comment

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

If you are going to change how this is defined here, it should probably change everywhere for consistency.

https://github.com/Islandora-Devops/ansible-role-karaf/blob/master/tasks/service.yml#L33-L36

@@ -1,13 +1,21 @@
---

- name: Copy setenv script
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this needed? It runs fine for me in my testing without setting this on Cent 7.

Probably doesn't hurt to add, but just wondering why it was added.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we are masking some issues with the Blazegraph and Fedora roles by setting JAVA_HOME here then? Since it seems like Karaf starts fine without it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I built the tasks based on the instructions in the Karaf Quick Guide which included this script. I simply included it because they did.

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay cool. 👍🏻

Just wanted some detail why its there.


karaf_java_packages:
karaf_java_packages_yum:
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like to see this remain karaf_java_pacakges and then set it to the appropriate value for cent or for ubuntu, same with karaf_java_home.

I'm a fan of that way this role handles OS specific settings, so they can be overridden in a playbook and they can get sensible default values.

Maybe something like this:
https://github.com/geerlingguy/ansible-role-mysql/blob/master/tasks/variables.yml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Testing an alternative now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I should note that my recent Grok PR avoided this by simply listing the packages in repo-specific tasks. Should I go back and revise it to be more like the I just committed?

@jonathangreen jonathangreen mentioned this pull request Feb 6, 2018
Now imports variable values for Debian and RedHat dynamically.
Also cleans out legacy environment variables, set using the setenv script.
@@ -13,14 +13,12 @@ karaf_log_path: ${karaf.data}/log/

karaf_logging_template: org.ops4j.pax.logging.cfg

karaf_java_home: "{% if ansible_os_family == 'RedHat' %}/usr/lib/jvm/java-1.8.0-openjdk/{% else %}/usr/lib/jvm/java-8-openjdk-amd64{% endif %}"
karaf_java_home: /usr/lib/jvm/java-8-openjdk-amd64
Copy link
Contributor

Choose a reason for hiding this comment

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

Should all these variables be removed as they are now set in the various vars files?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right, since whatever value the have in defaults will get overridden by the vars value due to the include. (I think.)

vars/RedHat.yml Outdated
@@ -0,0 +1,7 @@
---

karaf_java_home: /usr/lib/jvm/java-1.8.0-openjdk/
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the / here extraneous or should the same variable in the Debian.yml have one on its end? Might be nothing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is probably extraneous. Both ubuntu and centos provisioned fine with the current settings. I can try removing it and testing centos again...

@jonathangreen
Copy link
Contributor

jonathangreen commented Feb 6, 2018

I like the new approach for variables. The only problem I have now is that the variables defined with include_vars are almost last on the variable precedence list, so they are almost impossible to override, should a role wish to do so.

Its a little ugly, but thats what this is avoiding:
https://github.com/geerlingguy/ansible-role-mysql/blob/master/tasks/variables.yml#L15-L18
By explicitly setting the variables only if they are not already defined somewhere else.

@seth-shaw-unlv
Copy link
Contributor Author

The conditional check isn't that ugly. I'll toss it in, but we will need to either delete or comment out the existing values in defaults.

@jonathangreen
Copy link
Contributor

Maybe just comment them out, with a note that they are set to a distro specific variable...

@jonathangreen
Copy link
Contributor

@jonathangreen
Copy link
Contributor

👍 looks awesome to me

@jonathangreen
Copy link
Contributor

Travis is red, but I'm going to merge anyway since the testing branch isn't in yet.

@jonathangreen jonathangreen merged commit d2e6779 into islandora-deprecated:master Feb 6, 2018
@seth-shaw-unlv seth-shaw-unlv deleted the centos branch February 6, 2018 23:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants