Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
ca128aa
First draft
andfasano Feb 26, 2020
7658d03
Adding OWNERS file
andfasano Feb 26, 2020
1817f08
Fixing correct OWNERS users
andfasano Feb 26, 2020
746cf86
Folders and files renaming
andfasano Feb 26, 2020
7786394
Moving back tests under openshift/installer
andfasano Feb 26, 2020
c850ef3
Fixing job order
andfasano Feb 26, 2020
8eecd6b
Job definition fix
andfasano Feb 26, 2020
bcb6213
Adding preliminary step for nss-wrapper-hack
andfasano Feb 26, 2020
9be7f10
Renaming registry steps
andfasano Feb 26, 2020
1491d9b
Modifying secrets (from metal)
andfasano Feb 26, 2020
a0f962b
shared dir test
andfasano Feb 27, 2020
f3bd693
Shell check fix
andfasano Feb 27, 2020
5a5e276
Another test on shared dir
andfasano Feb 27, 2020
dfe285a
Added label
andfasano Feb 27, 2020
2c8dddd
Another test
andfasano Feb 27, 2020
f13925e
Another test on mounted paths
andfasano Feb 27, 2020
beae102
Test for shared dir (and profile)
andfasano Feb 27, 2020
316a862
Setting cluster_type back to packet
andfasano Feb 27, 2020
c68839f
Testing /tmp/secret
andfasano Feb 27, 2020
0890266
Remove tmp check
andfasano Feb 27, 2020
4c19349
Showing content of the cluster profile
andfasano Feb 27, 2020
32e7c53
Showing hidden files also
andfasano Feb 27, 2020
b8fd6ef
Testing CLUSTER_TYPE
andfasano Feb 28, 2020
ca3e250
Artifact dir check
andfasano Feb 28, 2020
d3dfe46
Temp fix for registry shellcheck
andfasano Feb 28, 2020
2f28cac
Adding terraform setup and teardown
andfasano Feb 28, 2020
aa908c1
Fixing packet token issue
andfasano Feb 28, 2020
e42ac94
Fixing share of packet id
andfasano Feb 28, 2020
2d0109b
Fixing teardown and nss execution
andfasano Feb 28, 2020
92efa74
Refactoring logic for sharing terraform files between setup and teardown
andfasano Feb 28, 2020
62d28d9
Fixing nss wrapper typo
andfasano Feb 28, 2020
0f68b61
Another typo fix
andfasano Feb 28, 2020
ac9c19c
Removing touch to SHARED_DIR
andfasano Feb 28, 2020
38c864b
Another typo fix in terraform sharing
andfasano Mar 2, 2020
f7e447b
New test for shared dir
andfasano Mar 2, 2020
7c46ab6
Second share dir test
andfasano Mar 2, 2020
8242735
Third sharing dir test
andfasano Mar 2, 2020
dc9ac84
Fourt thest on shared dir
andfasano Mar 2, 2020
5e52702
Re-enable terrform provisioning steps
andfasano Mar 2, 2020
8ea0f2c
Fix teardown step base image
andfasano Mar 2, 2020
a58a020
Add packet auth token for teardown step
andfasano Mar 2, 2020
9aba418
Enabled dev-scripts checkout and run
andfasano Mar 2, 2020
9ac9790
Remove MIRROR_BASE env var
andfasano Mar 2, 2020
2dedf76
Bumped OPENSHIFT_RELEASE_IMAGE
andfasano Mar 2, 2020
137cf8a
copy logs test
andfasano Mar 3, 2020
b47cbb1
Secondcopy logs test
andfasano Mar 3, 2020
2cf908f
Apply nss fix to teardown step
andfasano Mar 3, 2020
df7d866
Add dir for nss fix
andfasano Mar 3, 2020
181a118
Fix dev-scripts log path name
andfasano Mar 3, 2020
a995d4e
Re-enable all the steps
andfasano Mar 3, 2020
d209bac
Remove kubeconfig copy
andfasano Mar 3, 2020
37a28b2
Another sharing dir test
andfasano Mar 3, 2020
69e5693
Move dev-scripts logs gathering into setup step
andfasano Mar 3, 2020
5179afd
First test run
andfasano Mar 4, 2020
f961fea
Add explicity test suite name
andfasano Mar 4, 2020
d115767
Add debug traces for test execution error
andfasano Mar 4, 2020
7a4550a
Escaped correctly pipes for remote execution and fixed remote artifac…
andfasano Mar 4, 2020
a834d5d
Fix for kubeconfig path configuration
andfasano Mar 4, 2020
24966b7
Run full conformance suite except storage tests
andfasano Mar 5, 2020
3db0df3
Shellcheck fixes
andfasano Mar 5, 2020
8968800
Missing shellcheck fixes
andfasano Mar 5, 2020
98ff397
First draft for step split
andfasano Mar 5, 2020
50b12fc
Workflow typo fix
andfasano Mar 5, 2020
57cdf73
Fix CLUSTER_NAME export
andfasano Mar 5, 2020
1fc21b8
Retest packet setup
andfasano Mar 6, 2020
2ff284f
Re-enable partial test and ds setup execution
andfasano Mar 6, 2020
4376f41
Apply temporary fix for the shared dir issue
andfasano Mar 6, 2020
a54ec1d
Fixed wrong directory name
andfasano Mar 6, 2020
c6e6c1d
Re-enable dev-scripts setup and test execution
andfasano Mar 6, 2020
367d9cf
Merge branch 'baremetal-ds' of https://github.com/andfasano/release i…
akiselev1 Mar 10, 2020
58a4515
Added exclude test cases filter
akiselev1 Mar 10, 2020
2e49a27
Deleted unused step
andfasano Mar 10, 2020
4047fe1
Add tests filter
andfasano Mar 10, 2020
ce7f364
Remove unused commands
andfasano Mar 10, 2020
8ea23ef
Add job config
andfasano Mar 10, 2020
5d8e6f5
Change release version, removed unused env var
andfasano Mar 10, 2020
d226dc1
Changed OPENSHIFT_RELEASE_IMAGE value to 4.4.0-0.nightly-2020-03-09-2…
akiselev1 Mar 10, 2020
e60f75c
Changed OPENSHIFT_RELEASE_IMAGE value to 4.4.0-0.nightly-2020-03-10-1…
akiselev1 Mar 10, 2020
9bf66fd
Changed OPENSHIFT_RELEASE_IMAGE value to 4.5.0-0.nightly-2020-03-10-1…
akiselev1 Mar 10, 2020
bfebf81
Use of RELEASE_IMAGE_LATEST in dev-scrpts
andfasano Mar 11, 2020
06b3c81
Fetch dev-scripts logs always
andfasano Mar 11, 2020
476bcd2
Add pub keys for debugging
andfasano Mar 11, 2020
3c05f67
Configure OPENSHIFT_RELEASE_IMAGE to use latest image available from …
andfasano Mar 11, 2020
7e685ee
Enable Centos8l and use of 4.5.0-0.ci-2020-03-11-134608 release version
andfasano Mar 11, 2020
ff739e2
Changed OPENSHIFT_RELEASE_IMAGE value to 4.5.0-0.ci-2020-03-11-134608
akiselev1 Mar 11, 2020
9fb99a0
Changed operating_system to centos_8
akiselev1 Mar 11, 2020
56ff38d
Remove packet.repo hack
andfasano Mar 11, 2020
16c27fb
Changed OPENSHIFT_RELEASE_IMAGE value to latest
akiselev1 Mar 11, 2020
7b65b67
Changed OPENSHIFT_RELEASE_IMAGE value to latest
akiselev1 Mar 11, 2020
a11ba7a
Troubleshoot e2e-test failure
andfasano Mar 12, 2020
6ab50a4
Changes for unified SHARED_DIR
andfasano Mar 12, 2020
a7c8c96
Fix for read command. Re-enable dev-scripts setup
andfasano Mar 12, 2020
e3eb172
Re-activate tests execution
andfasano Mar 12, 2020
581617a
Merge branch 'baremetal-ds' of https://github.com/andfasano/release i…
akiselev1 Mar 13, 2020
8fe032b
Conformance suite with storage filtering
andfasano Mar 13, 2020
d3195e3
Removed unused code; added personal key for temp debugging
andfasano Mar 13, 2020
659c5ad
Merge branch 'baremetal-ds' of https://github.com/andfasano/release i…
akiselev1 Mar 13, 2020
a410818
Add minimum set of passing tests
andfasano Mar 16, 2020
0a74fc8
Add ipi-install-rbac workflow step
andfasano Mar 16, 2020
b7b4df0
Use latest release image
andfasano Mar 16, 2020
f0db34e
Re-add RELEASE_IMAGE_LATEST in devscripts step
andfasano Mar 16, 2020
9efed46
Changed OPENSHIFT_RELEASE_IMAGE value to
akiselev1 Mar 16, 2020
be95e0a
Remove nss hacks, and move to using baremetal-installer
stbenjam Mar 16, 2020
a5f92cc
Fix ci/prow/ordered-prow-config
stbenjam Mar 16, 2020
e063849
Fix shellcheck
stbenjam Mar 16, 2020
39c8c53
Error out if whoami fails and /etc/passwd is not writeable
stbenjam Mar 16, 2020
677c81a
Merge branch 'baremetal-ds-bm-image' of https://github.com/stbenjam/r…
akiselev1 Mar 17, 2020
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
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,7 @@ tests:
steps:
cluster_profile: aws
workflow: origin-e2e
- as: e2e-baremetalds
steps:
cluster_profile: packet
workflow: baremetalds-e2e
Original file line number Diff line number Diff line change
Expand Up @@ -1222,6 +1222,93 @@ presubmits:
secret:
secretName: sentry-dsn
trigger: (?m)^/test( | .* )e2e-azure-upi,?($|\s.*)
- agent: kubernetes
always_run: true
branches:
- master
context: ci/prow/e2e-baremetalds
decorate: true
decoration_config:
skip_cloning: true
labels:
ci-operator.openshift.io/prowgen-controlled: "true"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-installer-master-e2e-baremetalds
optional: true
rerun_command: /test e2e-baremetalds
skip_report: true
spec:
containers:
- args:
- --artifact-dir=$(ARTIFACTS)
- --branch=master
- --give-pr-author-access-to-namespace=true
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --kubeconfig=/etc/apici/kubeconfig
- --lease-server-password-file=/etc/boskos/password
- --lease-server-username=ci
- --lease-server=https://boskos-ci.svc.ci.openshift.org
- --org=openshift
- --repo=installer
- --resolver-address=http://ci-operator-configresolver-ci.svc.ci.openshift.org
- --secret-dir=/usr/local/e2e-baremetalds-cluster-profile
- --sentry-dsn-path=/etc/sentry-dsn/ci-operator
- --target=e2e-baremetalds
command:
- ci-operator
env:
- name: CONFIG_SPEC
valueFrom:
configMapKeyRef:
key: openshift-installer-master.yaml
name: ci-operator-master-configs
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/apici
name: apici-ci-operator-credentials
readOnly: true
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /usr/local/e2e-baremetalds-cluster-profile
name: cluster-profile
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/sentry-dsn
name: sentry-dsn
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: apici-ci-operator-credentials
secret:
items:
- key: sa.ci-operator.apici.config
path: kubeconfig
secretName: apici-ci-operator-credentials
- name: boskos
secret:
items:
- key: password
path: password
secretName: boskos-credentials
- name: cluster-profile
projected:
sources:
- secret:
name: cluster-secrets-metal
- name: pull-secret
secret:
secretName: regcred
- name: sentry-dsn
secret:
secretName: sentry-dsn
trigger: (?m)^/test( | .* )e2e-baremetalds,?($|\s.*)
- agent: kubernetes
always_run: false
branches:
Expand Down
5 changes: 5 additions & 0 deletions ci-operator/step-registry/baremetalds/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
approvers:
- andfasano
- akiselev1
- derekhiggins
- honza
5 changes: 5 additions & 0 deletions ci-operator/step-registry/baremetalds/devscripts/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
approvers:
- andfasano
- akiselev1
- derekhiggins
- honza
5 changes: 5 additions & 0 deletions ci-operator/step-registry/baremetalds/devscripts/setup/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
approvers:
- andfasano
- akiselev1
- derekhiggins
- honza
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
#!/bin/bash

set -o nounset
set -o errexit
set -o pipefail

cluster_profile=/var/run/secrets/ci.openshift.io/cluster-profile

export SSH_PRIV_KEY_PATH=${cluster_profile}/ssh-privatekey
export PULL_SECRET_PATH=${cluster_profile}/pull-secret
export SSHOPTS="-o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ServerAliveInterval=90 -i ${SSH_PRIV_KEY_PATH}"

echo "************ baremetalds devscripts setup command ************"
env | sort

# Ensure our UID, which is randomly generated, is in /etc/passwd. This is required
# to be able to SSH.
if ! whoami &> /dev/null; then
if [[ -w /etc/passwd ]]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
else
echo "/etc/passwd is not writeable, and user matching this uid is not found."
exit 1
fi
fi

# Initial check
if [ "${CLUSTER_TYPE}" != "packet" ] ; then
echo >&2 "Unsupported cluster type '${CLUSTER_TYPE}'"
exit 1
fi

echo "-------[ $SHARED_DIR ]"
ls -ll ${SHARED_DIR}

# Fetch packet server IP
IP=$(cat ${SHARED_DIR}/server-ip)
export IP
echo "Packet server IP is ${IP}"

# Checkout dev-scripts and make
for x in $(seq 10) ; do
test $x == 10 && exit 1
ssh $SSHOPTS root@$IP hostname && break
sleep 10
done

# Get dev-scripts logs
finished()
{
set +e

# Get dev-scripts logs
echo "dev-scripts setup completed, fetching logs"
ssh $SSHOPTS root@$IP tar -czf - /root/dev-scripts/logs | tar -C ${ARTIFACT_DIR} -xzf -
sed -i -e 's/.*auths.*/*** PULL_SECRET ***/g' ${ARTIFACT_DIR}/root/dev-scripts/logs/*
}
trap finished EXIT TERM

# Prepare configuration and run dev-scripts
scp $SSHOPTS ${PULL_SECRET_PATH} root@$IP:pull-secret

timeout -s 9 175m ssh $SSHOPTS root@$IP bash - << EOF |& sed -e 's/.*auths.*/*** PULL_SECRET ***/g'

set -ex

#### For debug only, to be removed ####################################
curl https://github.com/derekhiggins.keys >> /root/.ssh/authorized_keys
curl https://github.com/andfasano.keys >> /root/.ssh/authorized_keys
curl https://github.com/russellb.keys >> /root/.ssh/authorized_keys
curl https://github.com/stbenjam.keys >> /root/.ssh/authorized_keys
curl https://github.com/honza.keys >> /root/.ssh/authorized_keys
#######################################################################

yum install -y git

mkdir -p /tmp/artifacts

if [ ! -e dev-scripts ] ; then
git clone https://github.com/openshift-metal3/dev-scripts.git
fi
cd dev-scripts

set +x
echo "export PULL_SECRET='\$(cat /root/pull-secret)'" > /root/dev-scripts/config_root.sh
set -x

curl https://mirror.openshift.com/pub/openshift-v4/clients/oc/4.4/linux/oc.tar.gz | tar -C /usr/bin -xzf -

#echo "export OPENSHIFT_RELEASE_IMAGE=registry.svc.ci.openshift.org/ocp/release:4.5.0-0.ci-2020-03-11-134608" >> /root/dev-scripts/config_root.sh
#echo "export OPENSHIFT_RELEASE_IMAGE=registry.svc.ci.openshift.org/${NAMESPACE}/release:latest" >> /root/dev-scripts/config_root.sh
echo "export OPENSHIFT_RELEASE_IMAGE=${RELEASE_IMAGE_LATEST}" >> /root/dev-scripts/config_root.sh

echo "export ADDN_DNS=\$(awk '/nameserver/ { print \$2;exit; }' /etc/resolv.conf)" >> /root/dev-scripts/config_root.sh
echo "export OPENSHIFT_CI=true" >> /root/dev-scripts/config_root.sh
echo "export MIRROR_IMAGES=true" >> /root/dev-scripts/config_root.sh

echo 'export KUBECONFIG=/root/dev-scripts/ocp/ostest/auth/kubeconfig' >> /root/.bashrc

if [ ! -e /opt/dev-scripts/pool ] ; then
mkdir -p /opt/dev-scripts/pool
mount -t tmpfs -o size=100G tmpfs /opt/dev-scripts/pool
fi

timeout -s 9 105m make

EOF







Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ref:
as: baremetalds-devscripts-setup
from: stable:baremetal-installer
commands: baremetalds-devscripts-setup-commands.sh
resources:
requests:
cpu: 1000m
memory: 500Mi
documentation: |-
Checkout and execute dev-scripts on a packet server
5 changes: 5 additions & 0 deletions ci-operator/step-registry/baremetalds/e2e/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
approvers:
- andfasano
- akiselev1
- derekhiggins
- honza
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
workflow:
as: baremetalds-e2e
steps:
pre:
- ref: baremetalds-packet-setup
- ref: ipi-install-rbac
- ref: baremetalds-devscripts-setup
test:
- ref: baremetalds-e2e-test
post:
- ref: baremetalds-packet-teardown
documentation: |-
This workflow executes the common end-to-end test suite on a cluster provisioned by running dev-scripts on a packet server.
5 changes: 5 additions & 0 deletions ci-operator/step-registry/baremetalds/e2e/test/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
approvers:
- andfasano
- akiselev1
- derekhiggins
- honza
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/bin/bash

set -o nounset
set -o errexit
set -o pipefail

cluster_profile=/var/run/secrets/ci.openshift.io/cluster-profile

export SSH_PRIV_KEY_PATH=${cluster_profile}/ssh-privatekey
export SSHOPTS="-o ConnectTimeout=5 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ServerAliveInterval=90 -i ${SSH_PRIV_KEY_PATH}"

echo "************ baremetalds test command ************"
env | sort

# Ensure our UID, which is randomly generated, is in /etc/passwd. This is required
# to be able to SSH.
if ! whoami &> /dev/null; then
if [[ -w /etc/passwd ]]; then
echo "${USER_NAME:-default}:x:$(id -u):0:${USER_NAME:-default} user:${HOME}:/sbin/nologin" >> /etc/passwd
else
echo "/etc/passwd is not writeable, and user matching this uid is not found."
exit 1
fi
fi

# Initial check
if [ "${CLUSTER_TYPE}" != "packet" ] ; then
echo >&2 "Unsupported cluster type '${CLUSTER_TYPE}'"
exit 0
fi

echo "-------[ $SHARED_DIR ]"
ls -ll ${SHARED_DIR}

IP=$(cat ${SHARED_DIR}/server-ip)
export IP

# Copy test binaries on packet server
echo "### Copying test binaries"
scp $SSHOPTS /usr/bin/openshift-tests /usr/bin/kubectl root@$IP:/usr/local/bin

# # List of exclude cases
# echo "### Preparing filter"
# read -d '*' EXCL << EOF
# sig-storage
# custom build with buildah being created from new-build
# docker build using a pull secret Building from a template
# prune builds based on settings in the buildconfig
# result image should have proper labels set
# Image policy
# deploymentconfigs adoption
# Alerts
# templateinstance readiness test
# oc adm must-gather
# capture build stages and durations
# deploymentconfigs with multiple image change triggers
# Managed cluster should
# forcePull should affect pulling builder images
# s2i build with a root user image
# Networking Granular Checks: Services
# Image layer subresource
# openshift mongodb image creating from a template
# capture build stages and durations
# process valueFrom in build strategy environment variables
# result image should have proper labels set S2I build from a template
# oc new-app
# Image append
# oc tag
# forcePull should affect pulling builder images
# templateinstance readiness test
# Multi-stage image builds
# Image extract
# TestDockercfgTokenDeletedController
# process valueFrom in build strategy environment variables
# Prometheus when installed on the cluster
# build can reference a cluster service with a build being created from new-build
# deploymentconfigs with multiple image change triggers
# deploymentconfigs should respect image stream tag reference policy
# *
# EOF

# Tests execution
set +e
echo "### Running tests"
ssh $SSHOPTS root@$IP openshift-tests run "openshift/conformance/parallel" --dry-run \| grep 'Feature:ProjectAPI' \| openshift-tests run -o /tmp/artifacts/e2e.log --junit-dir /tmp/artifacts/junit -f -
rv=$?

echo "### Fetching results"
ssh $SSHOPTS root@$IP tar -czf - /tmp/artifacts | tar -C ${ARTIFACT_DIR} -xzf -
set -e
echo "### Done! (${rv})"
exit $rv
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ref:
as: baremetalds-e2e-test
from: stable:tests
commands: baremetalds-e2e-test-commands.sh
resources:
requests:
cpu: "3"
memory: 600Mi
limits:
memory: 2Gi
documentation: |-
The Baremtal DS E2E step executes the common end-to-end test suite.
5 changes: 5 additions & 0 deletions ci-operator/step-registry/baremetalds/packet/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
approvers:
- andfasano
- akiselev1
- derekhiggins
- honza
5 changes: 5 additions & 0 deletions ci-operator/step-registry/baremetalds/packet/setup/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
approvers:
- andfasano
- akiselev1
- derekhiggins
- honza
Loading