File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33The cloud plugin allows resource allocations to be requested and
44provisioned in OpenStack and OpenShift cloud environments from ColdFront.
55
6- Note: OpenShift support requires deploying the [ openshift-acct-mgt] [ ]
7- API service.
8-
9- [ openshift-acct-mgt ] : https://github.com/cci-moc/openshift-acct-mgt
10-
116## Terminology
127Caution as OpenStack, OpenShift and ColdFront use the same term to mean different
138things!
Original file line number Diff line number Diff line change 55#
66set -xe
77
8- : " ${ACCT_MGT_VERSION:= " master" } "
9- : " ${ACCT_MGT_REPOSITORY:= " https://github.com/cci-moc/openshift-acct-mgt.git" } "
108: " ${KUBECONFIG:= $HOME / .kube/ config} "
119
1210test_dir=" $PWD /testdata"
@@ -24,8 +22,6 @@ sudo docker run -d --rm --name microshift --privileged \
2422echo " ::endgroup::"
2523
2624microshift_addr=$( sudo docker inspect microshift --format=' {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' )
27- sudo sed -i ' /onboarding-onboarding.cluster.local/d' /etc/hosts
28- echo " $microshift_addr onboarding-onboarding.cluster.local" | sudo tee -a /etc/hosts
2925
3026KUBECONFIG_FULL_PATH=" $( readlink -f " $KUBECONFIG " ) "
3127mkdir -p " ${KUBECONFIG_FULL_PATH%/* } "
@@ -46,14 +42,8 @@ while ! oc get route -A; do
4642done
4743echo " ::endgroup::"
4844
49- # Install OpenShift Account Management
50- git clone " ${ACCT_MGT_REPOSITORY} " " $test_dir /openshift-acct-mgt"
51- git -C " $test_dir /openshift-acct-mgt" config advice.detachedHead false
52- git -C " $test_dir /openshift-acct-mgt" checkout " $ACCT_MGT_VERSION "
45+ # Creating service account and rolebinding
46+ oc create serviceaccount test-serviceaccount -n default
47+ oc adm policy add-cluster-role-to-user cluster-admin system:serviceaccount:default:test-serviceaccount
5348
54- echo " ::group::Deploy openshift-acct-mgt"
55- oc apply -k " $test_dir /openshift-acct-mgt/k8s/overlays/crc"
56- oc wait -n onboarding --for=condition=available --timeout=800s deployment/onboarding
57- echo " ::endgroup::"
58-
59- sleep 60
49+ sleep 10
Original file line number Diff line number Diff line change 55# Tests expect the resource to be name Devstack
66set -xe
77
8- export OPENSHIFT_MICROSHIFT_TOKEN=" $( oc create token -n onboarding onboarding -serviceaccount) "
8+ export OPENSHIFT_MICROSHIFT_TOKEN=" $( oc create token -n default test -serviceaccount) "
99export OPENSHIFT_MICROSHIFT_VERIFY=" false"
1010
1111if [[ ! " ${CI} " == " true" ]]; then
1212 source /tmp/coldfront_venv/bin/activate
1313fi
1414
15+ microshift_addr=$( sudo docker inspect microshift --format=' {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' )
16+
1517export DJANGO_SETTINGS_MODULE=" local_settings"
1618export FUNCTIONAL_TESTS=" True"
17- export OS_API_URL=" https://onboarding-onboarding.cluster.local :6443"
19+ export OS_API_URL=" https://$microshift_addr :6443"
1820export PYTHONWARNINGS=" ignore:Unverified HTTPS request"
1921
2022
You can’t perform that action at this time.
0 commit comments