Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
The cloud plugin allows resource allocations to be requested and
provisioned in OpenStack and OpenShift cloud environments from ColdFront.

Note: OpenShift support requires deploying the [openshift-acct-mgt][]
API service.

[openshift-acct-mgt]: https://github.com/cci-moc/openshift-acct-mgt

## Terminology
Caution as OpenStack, OpenShift and ColdFront use the same term to mean different
things!
Expand Down
18 changes: 4 additions & 14 deletions ci/microshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#
set -xe

: "${ACCT_MGT_VERSION:="master"}"
: "${ACCT_MGT_REPOSITORY:="https://github.com/cci-moc/openshift-acct-mgt.git"}"
: "${KUBECONFIG:=$HOME/.kube/config}"

test_dir="$PWD/testdata"
Expand All @@ -24,8 +22,6 @@ sudo docker run -d --rm --name microshift --privileged \
echo "::endgroup::"

microshift_addr=$(sudo docker inspect microshift --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}')
sudo sed -i '/onboarding-onboarding.cluster.local/d' /etc/hosts
echo "$microshift_addr onboarding-onboarding.cluster.local" | sudo tee -a /etc/hosts

KUBECONFIG_FULL_PATH="$(readlink -f "$KUBECONFIG")"
mkdir -p "${KUBECONFIG_FULL_PATH%/*}"
Expand All @@ -46,14 +42,8 @@ while ! oc get route -A; do
done
echo "::endgroup::"

# Install OpenShift Account Management
git clone "${ACCT_MGT_REPOSITORY}" "$test_dir/openshift-acct-mgt"
git -C "$test_dir/openshift-acct-mgt" config advice.detachedHead false
git -C "$test_dir/openshift-acct-mgt" checkout "$ACCT_MGT_VERSION"
# Creating service account and rolebinding
oc create serviceaccount test-serviceaccount -n default
oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:default:test-serviceaccount

echo "::group::Deploy openshift-acct-mgt"
oc apply -k "$test_dir/openshift-acct-mgt/k8s/overlays/crc"
oc wait -n onboarding --for=condition=available --timeout=800s deployment/onboarding
echo "::endgroup::"

sleep 60
sleep 10
6 changes: 4 additions & 2 deletions ci/run_functional_tests_openshift.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
# Tests expect the resource to be name Devstack
set -xe

export OPENSHIFT_MICROSHIFT_TOKEN="$(oc create token -n onboarding onboarding-serviceaccount)"
export OPENSHIFT_MICROSHIFT_TOKEN="$(oc create token -n default test-serviceaccount)"
export OPENSHIFT_MICROSHIFT_VERIFY="false"

if [[ ! "${CI}" == "true" ]]; then
source /tmp/coldfront_venv/bin/activate
fi

microshift_addr=$(sudo docker inspect microshift --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}')

export DJANGO_SETTINGS_MODULE="local_settings"
export FUNCTIONAL_TESTS="True"
export OS_API_URL="https://onboarding-onboarding.cluster.local:6443"
export OS_API_URL="https://$microshift_addr:6443"
export PYTHONWARNINGS="ignore:Unverified HTTPS request"


Expand Down
Loading