Skip to content

Commit

Permalink
Fix up fedora and amazon linux
Browse files Browse the repository at this point in the history
  • Loading branch information
dwoz committed Nov 13, 2024
1 parent e8240a0 commit 9a49344
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 9 deletions.
8 changes: 6 additions & 2 deletions custom/testing/amazonlinux-2.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ SHELL ["/bin/bash", "-c"]

RUN <<EOF
set -e

if [ $(uname -m) = "x86_64" ]; then
export ARCH=x86_64
else
export ARCH=arm64
fi

yum update -y
yum install -y epel-release
yum install -y curl wget tar xz patchelf
yum install -y curl wget tar xz patchelf util-linux openssl-pkcs11

wget https://packages.broadcom.com/artifactory/saltproject-generic/onedir/3007.1/salt-3007.1-onedir-linux-$ARCH.tar.xz
tar xf salt-3007.1-onedir-linux-$ARCH.tar.xz

./salt/salt-call --local --pillar-root=/golden-pillar-tree --file-root=/golden-state-tree state.apply provision

rm -rf salt
rm -rf salt-3007.1-onedir-linux-$ARCH.tar.xz
rm -rf golden-pillar-tree
Expand Down
2 changes: 1 addition & 1 deletion custom/testing/fedora-40.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN <<EOF
fi

yum update -y
yum install -y curl wget tar xz patchelf
yum install -y curl wget tar xz patchelf openssl-pkcs11-sign-provider

wget https://packages.broadcom.com/artifactory/saltproject-generic/onedir/3007.1/salt-3007.1-onedir-linux-$ARCH.tar.xz
tar xf salt-3007.1-onedir-linux-$ARCH.tar.xz
Expand Down
5 changes: 3 additions & 2 deletions custom/testing/golden-state-tree/os/amazon/config/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ include:
- config.path
- config.ulimits
- config.locale
{#-
- config.sssd
- config.timezone
- config.dhclient
- config.sshd_config
- config.timezone #}
- config.dhclient
6 changes: 3 additions & 3 deletions custom/testing/golden-state-tree/os/fedora/config/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ include:
- config.path
- config.ulimits
- config.locale
- config.sssd
- config.timezone
- config.dhclient
{#- - config.sssd
- config.sshd_config
- config.timezone #}
- config.dhclient
1 change: 1 addition & 0 deletions custom/testing/golden-state-tree/os/fedora/init.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include:
- .config
- .pkgs
- python

{%- if pillar.get('github_actions_runner', False) %}
- github-actions-runner
Expand Down
2 changes: 1 addition & 1 deletion custom/testing/golden-state-tree/os/fedora/pkgs/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include:
- pkgs.curl
- pkgs.dmidecode
- pkgs.dnsutils
- pkgs.docker
{#- - pkgs.docker #}
- pkgs.gcc
- pkgs.gpg
- pkgs.ipset
Expand Down
34 changes: 34 additions & 0 deletions custom/testing/golden-state-tree/python/amazon_dependencies.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Install dnf config manager
install_config_command:
cmd.run:
- name: dnf install -y 'dnf-command(config-manager)'


# Use config manager to enable powertools repo. This is needed for libnsl2-devel
enable_powertools_repo:
cmd.run:
- name: dnf config-manager --set-enabled powertools
- require:
- install_config_command


python_dependencies:
pkg.latest:
- pkgs:
- gcc
- make
- findutils
- openssl
- openssl-devel
- libffi-devel
- bzip2-devel
- zlib-devel
- libuuid-devel
- readline-devel
- ncurses-devel
- gdbm-devel
- sqlite-devel
- xz-devel
- libnsl2-devel
- require:
- enable_powertools_repo
17 changes: 17 additions & 0 deletions custom/testing/golden-state-tree/python/fedora_dependencies.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
python_dependencies:
pkg.latest:
- pkgs:
- gcc
- make
- findutils
- openssl-devel
- libffi-devel
- bzip2-devel
- zlib-ng-compat-devel
- libuuid-devel
- readline-devel
- ncurses-devel
- gdbm-devel
- sqlite-devel
- xz-devel
- libnsl2-devel
2 changes: 2 additions & 0 deletions custom/testing/golden-state-tree/python/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
include:
{%- if grains['os'] == 'Rocky' %}
- .rocky_dependencies
{%- elif grains['os'] == 'Fedora' %}
- .fedora_dependencies
{%- elif grains.get("oscodename") == 'Amazon Linux 2' %}
- .rocky_dependencies
{%- elif grains.get("osfinger") == 'Amazon Linux-2023' %}
Expand Down

0 comments on commit 9a49344

Please sign in to comment.