Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Drop support for CentOS 7
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimesouza committed Sep 22, 2023
1 parent cf38270 commit f018f27
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 44 deletions.
3 changes: 0 additions & 3 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ bases:
- name: ubuntu
channel: "20.04"
architectures: [amd64]
- name: centos
channel: "7"
architectures: [amd64]

parts:
charm:
Expand Down
4 changes: 1 addition & 3 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ options:
This can be set to the Organization's local mirror/cache of packages and
supersedes the Omnivector repositories. Alternatively, it can be used to
track a `testing` Slurm version, e.g. by setting to
`ppa:omnivector/osd-testing` (on Ubuntu), or
`https://omnivector-solutions.github.io/repo/centos7/stable/$basearch`
(on CentOS).
`ppa:omnivector/osd-testing`.
Note: The configuration `custom-slurm-repo` must be set *before*
deploying the units. Changing this value after deploying the units will
Expand Down
39 changes: 1 addition & 38 deletions dispatch
Original file line number Diff line number Diff line change
@@ -1,43 +1,6 @@
#!/bin/bash
# This hook installs the centos dependencies needed to run the charm,
# creates the dispatch executable, regenerates the symlinks for start and
# upgrade-charm, and kicks off the operator framework.
# This hook creates the dispatch executable and kicks off the operator framework.

set -e

# Source the os-release information into the env.
. /etc/os-release

if ! [[ -f '.installed' ]]
then
# Determine if we are running in centos or ubuntu, if centos
# provision the needed prereqs.
if [[ $ID == 'ubuntu' ]]
then
echo "Running Ubuntu."
echo "Nothing to do."
elif [[ $ID == 'centos' ]]
then
# Determine the centos version and install prereqs accordingly
major=$(cat /etc/centos-release | tr -dc '0-9.'|cut -d \. -f1)
echo "Running CentOS$major, installing prereqs."
if [[ $major == "7" ]]
then
yum -y install epel-release
yum -y install yum-priorities python3
elif [[ $major == "8" ]]
then
dnf -y install epel-release
dnf -y install yum-priorities python3
else
echo "Running unsuppored version of centos: $major"
exit -1
fi
else
echo "Running unsuppored os: $ID"
exit -1
fi
touch .installed
fi

JUJU_DISPATCH_PATH="${JUJU_DISPATCH_PATH:-$0}" PYTHONPATH=lib:venv ./src/charm.py

0 comments on commit f018f27

Please sign in to comment.