-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changing Rocky scripts for 8 and 9 and adding steps to preconfig scri…
…pts for ceph
- Loading branch information
Showing
9 changed files
with
464 additions
and
12 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
rocky-offline-repo-switcher.sh → rocky8-offline-repo-switcher.sh
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
#!/bin/bash | ||
|
||
# Matthew Hutchinson <[email protected]> | ||
|
||
# Rocky 8 System Configuration Tweaks for Cluster Nodes | ||
|
||
ID=$(grep -w ID= /etc/os-release | cut -d= -f2 | tr -d '"') | ||
Platform=$(grep -w PLATFORM_ID= /etc/os-release | cut -d= -f2 | tr -d '"') | ||
|
||
# Check if the OS is Rocky Linux 8 | ||
if [[ "$ID" != "rocky" || "$Platform" != "platform:el8" ]]; then | ||
echo "OS is not Rocky8 Linux" | ||
exit 1 | ||
fi | ||
|
||
|
||
interpreter=$(ps -p $$ | awk '$1 != "PID" {print $(NF)}' | tr -d '()') | ||
|
@@ -31,7 +43,7 @@ Welcome to the | |
| ##| ######/| #######/| ## | ## \ #/ | ####### /#######/ | ||
|__/ \______/ |_______/ |__/ |__/ \_/ \_______/|_______/ | ||
Rocky Preconfiguration Script. | ||
Rocky8 Preconfiguration Script. | ||
This script will install epel-release, zfs, cockpit and add our repos. Houston UI will be | ||
configured with our latest tools and packages. | ||
|
@@ -56,6 +68,66 @@ EOF | |
|
||
setup_45drives_repo() { | ||
local res | ||
|
||
#Install Ceph Repo | ||
read -p "What version of Ceph are you using (15/16/17): " response | ||
if [[ "$response" == "15" ]]; then | ||
echo "Configuring Ceph Stable repository for version 15" | ||
cat <<EOF > /etc/yum.repos.d/ceph_stable.repo | ||
[ceph_stable] | ||
baseurl = http://download.ceph.com/rpm-octopus/el8/\$basearch | ||
gpgcheck = 1 | ||
gpgkey = https://download.ceph.com/keys/release.asc | ||
name = Ceph Stable \$basearch repo | ||
priority = 2 | ||
[ceph_stable_noarch] | ||
baseurl = http://download.ceph.com/rpm-octopus/el8/noarch | ||
gpgcheck = 1 | ||
gpgkey = https://download.ceph.com/keys/release.asc | ||
name = Ceph Stable noarch repo | ||
priority = 2 | ||
EOF | ||
elif [[ "$response" == "16" ]]; then | ||
echo "Configuring Ceph Stable repository for version 16" | ||
cat <<EOF > /etc/yum.repos.d/ceph_stable.repo | ||
[ceph_stable] | ||
baseurl = http://download.ceph.com/rpm-pacific/el8/\$basearch | ||
gpgcheck = 1 | ||
gpgkey = https://download.ceph.com/keys/release.asc | ||
name = Ceph Stable \$basearch repo | ||
priority = 2 | ||
[ceph_stable_noarch] | ||
baseurl = http://download.ceph.com/rpm-pacific/el8/noarch | ||
gpgcheck = 1 | ||
gpgkey = https://download.ceph.com/keys/release.asc | ||
name = Ceph Stable noarch repo | ||
priority = 2 | ||
EOF | ||
elif [[ "$response" == "17" ]]; then | ||
echo "Configuring Ceph Stable repository for version 17" | ||
cat <<EOF > /etc/yum.repos.d/ceph_stable.repo | ||
[ceph_stable] | ||
baseurl = http://download.ceph.com/rpm-17.2.7/el8/\$basearch | ||
gpgcheck = 1 | ||
gpgkey = https://download.ceph.com/keys/release.asc | ||
name = Ceph Stable \$basearch repo | ||
priority = 2 | ||
[ceph_stable_noarch] | ||
baseurl = http://download.ceph.com/rpm-17.2.7/el8/noarch | ||
gpgcheck = 1 | ||
gpgkey = https://download.ceph.com/keys/release.asc | ||
name = Ceph Stable noarch repo | ||
priority = 2 | ||
EOF | ||
else | ||
echo "Invalid Selection, Please enter '15''16' or '17'" | ||
exit | ||
fi | ||
|
||
|
||
#Install 45Drives Repository | ||
echo "Downloading 45Drives Repo Setup Script" | ||
curl -sSL https://repo.45drives.com/setup -o setup-repo.sh | ||
|
@@ -108,7 +180,7 @@ houston_configuration() { | |
dnf -y install dnf-plugins-core | ||
dnf config-manager --set-enabled powertools | ||
dnf install -y cockpit cockpit-pcp cockpit-benchmark cockpit-navigator cockpit-file-sharing cockpit-45drives-hardware cockpit-identities cockpit-machines \ | ||
cockpit-sosreport cockpit-storaged cockpit-scheduler cockpit-zfs | ||
cockpit-sosreport cockpit-storaged cockpit-scheduler | ||
res=$? | ||
if [[ $res != 0 ]]; then | ||
echo "Error Installing Cockpit" | ||
|
@@ -138,7 +210,7 @@ update_system() { | |
local res | ||
|
||
echo "Updating system" | ||
dnf update -y | ||
dnf update --nobest -y | ||
res=$? | ||
|
||
if [[ $res != 0 ]]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,21 @@ | ||
#!/bin/bash | ||
|
||
# Matthew Hutchinson <[email protected]> | ||
|
||
|
||
# Rocky 8 System Configuration Tweaks | ||
|
||
|
||
ID=$(grep -w ID= /etc/os-release | cut -d= -f2 | tr -d '"') | ||
Platform=$(grep -w PLATFORM_ID= /etc/os-release | cut -d= -f2 | tr -d '"') | ||
|
||
# Check if the OS is Rocky Linux 8 | ||
if [[ "$ID" != "rocky" || "$Platform" != "platform:el8" ]]; then | ||
echo "OS is not Rocky8 Linux" | ||
exit 1 | ||
fi | ||
|
||
|
||
interpreter=$(ps -p $$ | awk '$1 != "PID" {print $(NF)}' | tr -d '()') | ||
|
||
if [ "$interpreter" != "bash" ]; then | ||
|
@@ -29,7 +45,7 @@ Welcome to the | |
| ##| ######/| #######/| ## | ## \ #/ | ####### /#######/ | ||
|__/ \______/ |_______/ |__/ |__/ \_/ \_______/|_______/ | ||
Rocky Preconfiguration Script. | ||
Rocky8 Preconfiguration Script. | ||
This script will install epel-release, zfs, cockpit and add our repos. Houston UI will be | ||
configured with our latest tools and packages. | ||
|
@@ -178,7 +194,7 @@ update_system() { | |
local res | ||
|
||
echo "Updating system" | ||
dnf update -y | ||
dnf update --nobest -y | ||
res=$? | ||
|
||
if [[ $res != 0 ]]; then | ||
|
Oops, something went wrong.