Skip to content

Commit

Permalink
salt: package & install httpd-tools on Bootstrap node
Browse files Browse the repository at this point in the history
We need `htpasswd` to generate password hashes for the Dex static
user.
The htpasswd is provided by httpd-tools on redhat based os

Fixes: #2352
  • Loading branch information
Ebaneck committed Apr 10, 2020
1 parent 6008615 commit f4b5268
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 0 deletions.
4 changes: 4 additions & 0 deletions buildchain/buildchain/salt_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,10 @@ def _get_parts(self) -> Iterator[str]:
Path('salt/metalk8s/solutions/available.sls'),
Path('salt/metalk8s/solutions/init.sls'),

Path('salt/metalk8s/utils/init.sls'),
Path('salt/metalk8s/utils/httpd-tools/init.sls'),
Path('salt/metalk8s/utils/httpd-tools/installed.sls'),

Path('salt/metalk8s/volumes/init.sls'),
Path('salt/metalk8s/volumes/prepared/init.sls'),
Path('salt/metalk8s/volumes/prepared/installed.sls'),
Expand Down
1 change: 1 addition & 0 deletions buildchain/buildchain/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def deb_full_name(self) -> str:
release='1.el7'
),
PackageVersion(name='container-selinux'), # TODO #1710
PackageVersion(name='httpd-tools'),
PackageVersion(
name='metalk8s-sosreport',
version=SHORT_VERSION,
Expand Down
1 change: 1 addition & 0 deletions salt/metalk8s/roles/bootstrap/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ include:
- metalk8s.repo.installed
- metalk8s.salt.master
- metalk8s.kubectl
- metalk8s.utils
12 changes: 12 additions & 0 deletions salt/metalk8s/utils/httpd-tools/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
#
# Available states
# ================
#
# * installed -> install the given utility
#
#
#

include:
- .installed
16 changes: 16 additions & 0 deletions salt/metalk8s/utils/httpd-tools/installed.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{%- from "metalk8s/macro.sls" import pkg_installed with context %}
include:
- metalk8s.repo
{%- if grains['os_family'].lower() == 'redhat' %}
Install httpd-tools:
{{ pkg_installed('httpd-tools') }}
- require:
- test: Repositories configured
{% else %}
Os family is debian-based:
test.succeed_without_changes: []
{%- endif %}
10 changes: 10 additions & 0 deletions salt/metalk8s/utils/init.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# State to install utilities .
#
# Available states
# ================
#
#

include:
- .httpd-tools

0 comments on commit f4b5268

Please sign in to comment.