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 MacOS support; fix Issue #352 #363

Merged
merged 6 commits into from Apr 17, 2018

Conversation

Projects
None yet
2 participants
@colin-stubbs
Contributor

colin-stubbs commented Apr 2, 2018

Add's MacOS support to minion; allowing upgrade of salt-minion's running on MacOS systems.

Tested on MacOS 10.13.3 in conjunction with Windows and Linux minions in order to test for non-MacOS minion state breakage. Windows/Linux/etc minion upgrades/config still behave as expected.

NOTE: A default value for salt_minion_pkg_source has been removed from map.jinja as 'salt_release' is no longer usable (due to repo.saltstack.com changes) as a way to generate a valid URL to download a .pkg file from.

There are no sym/hard links on repo.saltstack.com permitting the use of 'latest' at present either. The decision to upgrade the minion by salt.minion state relies on explicit configuration defining .pkg source and version to utilise.

Users will to define salt.version, salt.salt_minion_pkg_source URL (and optionally salt.salt_minion_pkg_hash if verification is desired) in order to trigger down of the MacOS .pkg file and upgrade, e.g. the following pillar snippet as an example.

salt:
  release: "2017.7"
  version: "2017.7.4"
  install_packages: True
  {% if grains.os == 'Windows' %}
  salt_minion: 'salt-minion-py3'
  {% elif grains.os == 'MacOS' %}
  salt_minion_pkg_source: 'https://repo.saltstack.com/osx/salt-2017.7.4-py3-x86_64.pkg'
  {% endif %}
@aboe76

This comment has been minimized.

Member

aboe76 commented Apr 4, 2018

@colin-stubbs could you update pillar.example and readme with this info so others.

@colin-stubbs

This comment has been minimized.

Contributor

colin-stubbs commented Apr 5, 2018

Shall do re: pillar.example and README, will also make one small change to existing commit to move {% if salt_settings.install_packages %} up above download-salt-minion. There's no point even thinking about downloading the package if install_packages isn't True!

colin-stubbs added some commits Apr 5, 2018

On MacOS, only attempt download if condition
Add if salt_settings.install_packages to requisites for an attempt to download the minion package on MacOS
Update example pillar for MacOS support
Describe how to use MacOS specific options
@colin-stubbs

This comment has been minimized.

Contributor

colin-stubbs commented Apr 5, 2018

Done, pillar.example and README updated, if salt_settings.install_packages now part of the requisites to attempt .pkg download.

@aboe76 aboe76 requested a review from alxwr Apr 5, 2018

@aboe76

Looks good, I don't have a Mac to test the code...

@aboe76 aboe76 merged commit 32d9a94 into saltstack-formulas:master Apr 17, 2018

ixs added a commit to bawuenet/salt-formula that referenced this pull request Jul 22, 2018

Add MacOS support; fix Issue saltstack-formulas#352 (saltstack-formul…
…as#363)

* Add MacOS support; fix Issue saltstack-formulas#352

* On MacOS, only attempt download if condition

Add if salt_settings.install_packages to requisites for an attempt to download the minion package on MacOS

* Update example pillar for MacOS support

Describe how to use MacOS specific options

* Add MacOS notes

* Update README.rst

* Update README.rst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment