Skip to content

Commit

Permalink
RHEL7 support (#1530)
Browse files Browse the repository at this point in the history
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
  • Loading branch information
jakolehm authored Mar 31, 2020
1 parent 4fc1178 commit 40f533c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 6 deletions.
4 changes: 0 additions & 4 deletions lib/pharos/host/el7/centos7.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ class Centos7 < El7
name: 'cfssl', version: CFSSL_VERSION, license: 'MIT',
enabled: proc { |c| !c.etcd&.endpoints }
)

def docker_repo_name
'extras'
end
end
end
end
3 changes: 1 addition & 2 deletions lib/pharos/host/el7/el7.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Pharos
module Host
class El7 < Configurer
DOCKER_VERSION = '19.03.6'
DOCKER_VERSION = '19.03.8'
CFSSL_VERSION = '1.2'

# @param path [Array]
Expand Down Expand Up @@ -78,7 +78,6 @@ def configure_container_runtime
exec_script(
'configure-docker.sh',
DOCKER_VERSION: DOCKER_VERSION,
DOCKER_REPO_NAME: docker_repo_name,
INSECURE_REGISTRIES: insecure_registries
)
elsif custom_docker?
Expand Down
25 changes: 25 additions & 0 deletions lib/pharos/host/el7/rhel7.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# frozen_string_literal: true

require_relative 'el7'

module Pharos
module Host
class Rhel7 < El7
register_config 'rhel', '7.4'
register_config 'rhel', '7.5'
register_config 'rhel', '7.6'
register_config 'rhel', '7.7'
register_config 'rhel', '7.8'

register_component(
name: 'docker', version: DOCKER_VERSION, license: 'Apache License 2.0',
enabled: proc { |c| c.hosts.any? { |h| h.container_runtime == 'docker' } }
)

register_component(
name: 'cfssl', version: CFSSL_VERSION, license: 'MIT',
enabled: proc { |c| !c.etcd&.endpoints }
)
end
end
end
10 changes: 10 additions & 0 deletions lib/pharos/host/el7/scripts/configure-essentials.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@ yum_install_with_lock() {
EOF
chmod +x /usr/local/share/pharos/el7.sh

if ! rpm -qi yum-utils ; then
yum install -y yum-utils
fi

if ! rpm -qi yum-plugin-versionlock ; then
yum install -y yum-plugin-versionlock
fi

if [ -f "/etc/centos-release" ]; then
yum-config-manager --enable extras
else
subscription-manager repos --enable=rhel-7-server-extras-rpms
fi

if ! rpm -qi chrony ; then
yum install -y chrony
systemctl enable chronyd
Expand Down

0 comments on commit 40f533c

Please sign in to comment.