forked from openshift/openshift-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.papr.sh
executable file
·52 lines (42 loc) · 1.76 KB
/
.papr.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
set -xeuo pipefail
# Essentially use a similar procedure other openshift-ansible PR tests use to
# determine which image tag should be used. This allows us to avoid hardcoding a
# specific version which quickly becomes stale.
if [ -n "${PAPR_BRANCH:-}" ]; then
target_branch=$PAPR_BRANCH
else
target_branch=$PAPR_PULL_TARGET_BRANCH
fi
if [[ "${target_branch}" =~ ^release- ]]; then
target_branch="${target_branch/release-/}"
else
dnf install -y sed
target_branch="$( git describe | sed 's/^openshift-ansible-\([0-9]*\.[0-9]*\)\.[0-9]*-.*/\1/' )"
fi
export target_branch
pip install -r requirements.txt
# ping the nodes to check they're responding and register their ostree versions
ansible -vvv -i .papr.inventory nodes -a 'rpm-ostree status'
upload_journals() {
mkdir journals
for node in master node1 node2; do
ssh ocp-$node 'journalctl --no-pager || true' > journals/ocp-$node.log
done
}
trap upload_journals ERR
# make all nodes ready for bootstrapping
ansible-playbook -v -i .papr.inventory playbooks/openshift-node/private/image_prep.yml
# run the actual installer
ansible-playbook -v -i .papr.inventory playbooks/deploy_cluster.yml
### DISABLING TESTS FOR NOW, SEE:
### https://github.com/openshift/openshift-ansible/pull/6132
### # run a small subset of origin conformance tests to sanity
### # check the cluster NB: we run it on the master since we may
### # be in a different OSP network
### ssh ocp-master docker run --rm --net=host --privileged \
### -v /etc/origin/master/admin.kubeconfig:/config \
### registry.fedoraproject.org/fedora:27 sh -c \
### '"dnf install -y origin-tests && \
### KUBECONFIG=/config /usr/libexec/origin/extended.test --ginkgo.v=1 \
### --ginkgo.noColor --ginkgo.focus=\"Services.*NodePort|EmptyDir\""'