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

Add removal of out of date JRE versions to JRE8 installers? #398

Open
danielcb opened this issue May 10, 2016 · 6 comments
Open

Add removal of out of date JRE versions to JRE8 installers? #398

danielcb opened this issue May 10, 2016 · 6 comments

Comments

@danielcb
Copy link
Contributor

I would like to propose to add

REMOVEOUTOFDATEJRES=1 (remove out of date JRE versions)
(and maybe AUTO_UPDATE=0 (disable autoupdate) also)

to the JRE8 states, since I think those are sane defaults for those installers (remove out of date for obvious reasons and auto update because we manage JRE via saltstack and this way we don't have any other tools interfering. Also jres auto_updater does not work unattended anyways, so..)

https://docs.oracle.com/javase/8/docs/technotes/guides/install/config.html#table_config_file_options

Any opinions on this?

@TheBigBear
Copy link
Contributor

@danielcb yes, I think this is generally a very good idea. (but I need help to make it work for all)

I have been wondering for a while now, whether it is high time salt winrepo-ng now to start leveraging jinja2 templating power more and have both "sane" defaults and at the same time have ways to override those defaults using jinja2 variables and pillars.

so use things like set language of pkg to be installed, for browsers for example, and options like the ones above to be added and set to 'sane' defaults in the provided installer, but choose a format that allows easy overriding using pillars.

One of the reasons this has not happened, as yet, is that I still can't get my head around the various salt setup options like environments, file backends, such as file_root and gitfs_root, pillar, external file_tree etc options and combinations thereof to try to make use of this in a clean and universally useable and portable way that can be re-used in others peoples setup. ;-(

what would it take?

in the sls file:

(Note: I know the line below is not right and won't work. But can somebody tell me what would work and how to structure the files and setup in salt to make a multi env, multi pillar setup work as well as not break a simple out of the box salt setup as-is?)

install_flags: '/s REBOOT={{ pillar.get['{{ saltenv }}.{{ saltpillar }}.jre8.reboot', SUPPRESS] SPONSORS={{ pillar.get['{{ saltenv }}.{{ saltpillar }}.jre8.sponsors'], 0 }} REMOVEOUTOFDATEJRES={{ pillar.get['{{ saltenv }}.{{ saltpillar }}.jre8.removeoutofdatejres'], 1 }} AUTO_UPDATE={{ {{ saltenv }}.{{ saltpillar }}.jre8.auto_update'],0'

@twangboy @jfindlay @UtahDave @terminalmage

Once I understand how it all hangs together and could work for everybody I would be happy to work through the repo and make those changes in that direction where it makes sense or gets requested.

@TheBigBear
Copy link
Contributor

@twangboy @jfindlay @UtahDave @terminalmage @eliasp it has been a full week with no progress or help, can somebody, maybe one of you folks, please help me and/or point me in the right direction, basically explaining the correct jinja and pillar lookup stanzas to implement the above #398 (comment) cleanly? I will then do the leg (or donkey) work and apply the so learned insight into the winrepo-ng sls files, promised.

@TheBigBear
Copy link
Contributor

also similar winrepo-ng usage and proper syntax input feedback is needed here #144 and here #350

TheBigBear added a commit that referenced this issue Jun 23, 2016
…eter

Fix python interpreter for tests.py
TheBigBear added a commit that referenced this issue Jun 23, 2016
Merge pull request #398 from TheBigBear/TheBigBear-fix-python-interpreter
@TheBigBear
Copy link
Contributor

@twangboy @jfindlay @UtahDave @terminalmage ^^^ any help from any of you with #398 (comment)

@dafyddj
Copy link
Collaborator

dafyddj commented May 30, 2017

@TheBigBear I have been thinking along these lines recently. Here is an example winrepo sls that I have developed for my own use.

{%- load_yaml as default_settings %}
host: 'https://github.com'
{%- endload %}

{% set winrepo_settings = salt['pillar.get'](
    'winrepo',
    default=default_settings,
    merge=True
  )
%}

{% set nscp = salt['pillar.get'](
    'nscp:winrepo',
    default=winrepo_settings,
    merge=True
  )
%}

nscp:
{% for version in ['0.5.0.62', '0.4.4.23', '0.4.4.15'] %}
  '{{ version }}':
    full_name: NSClient++ (x64)
    installer: {{ nscp.host}}/mickem/nscp/releases/download/{{ version }}/NSCP-{{ version }}-x64.msi
    install_flags: '/passive /norestart ADDLOCAL=ALL REMOVE=Documentation'
    uninstaller: {{ nscp.host}}/mickem/nscp/releases/download/{{ version }}/NSCP-{{ version }}-x64.msi
    uninstall_flags: '/passive /norestart'
    msiexec: True
{% endfor %}
  '0.4.3.143':
    full_name: NSClient++ (x64)
#Pillar
winrepo:
  host: '\\server\repo'

My use case here is that I want to be able to host binaries locally for some minions, but fallback to the upstream location for other minions (similar to #144). The pattern could easily be adapted to include, say install_flags and locale. It allows for general pillar values, and package specific ones too.

I'm no Jinja/Salt expert so there may be a better/neater idiom but this works for me.

Comments?

@dafyddj
Copy link
Collaborator

dafyddj commented Jul 14, 2017

@TheBigBear do you have any comments on what I have discussed above?

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

3 participants