From 18644c77be32ff6adf385c4b1fde18f7d66312d6 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 13 Jun 2017 09:54:06 -0400 Subject: papr: rename redhat-ci related files to papr The project was renamed to PAPR, see: https://github.com/projectatomic/papr --- .papr.inventory | 23 +++++++++++++++++++++++ .papr.sh | 28 ++++++++++++++++++++++++++++ .papr.yml | 30 ++++++++++++++++++++++++++++++ .redhat-ci.inventory | 23 ----------------------- .redhat-ci.sh | 28 ---------------------------- .redhat-ci.yml | 30 ------------------------------ 6 files changed, 81 insertions(+), 81 deletions(-) create mode 100644 .papr.inventory create mode 100755 .papr.sh create mode 100644 .papr.yml delete mode 100644 .redhat-ci.inventory delete mode 100755 .redhat-ci.sh delete mode 100644 .redhat-ci.yml diff --git a/.papr.inventory b/.papr.inventory new file mode 100644 index 000000000..23bc9923c --- /dev/null +++ b/.papr.inventory @@ -0,0 +1,23 @@ +[OSEv3:children] +masters +nodes +etcd + +[OSEv3:vars] +ansible_ssh_user=root +ansible_python_interpreter=/usr/bin/python3 +deployment_type=origin +openshift_image_tag="{{ lookup('env', 'OPENSHIFT_IMAGE_TAG') }}" +openshift_master_default_subdomain="{{ lookup('env', 'RHCI_ocp_node1_IP') }}.xip.io" +openshift_check_min_host_memory_gb=1.9 + +[masters] +ocp-master + +[etcd] +ocp-master + +[nodes] +ocp-master openshift_schedulable=false +ocp-node1 openshift_node_labels="{'region':'infra'}" +ocp-node2 openshift_node_labels="{'region':'infra'}" diff --git a/.papr.sh b/.papr.sh new file mode 100755 index 000000000..aedf2527b --- /dev/null +++ b/.papr.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -xeuo pipefail + +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 + +# run the actual installer +ansible-playbook -vvv -i .papr.inventory playbooks/byo/config.yml + +# 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 fedora:25 sh -c \ + '"dnf install -y origin-tests && \ + KUBECONFIG=/config /usr/libexec/origin/extended.test --ginkgo.v=1 \ + --ginkgo.noColor --ginkgo.focus=\"Services.*NodePort|EmptyDir\""' diff --git a/.papr.yml b/.papr.yml new file mode 100644 index 000000000..c29f4b5c9 --- /dev/null +++ b/.papr.yml @@ -0,0 +1,30 @@ +--- + +cluster: + hosts: + - name: ocp-master + distro: fedora/25/atomic + - name: ocp-node1 + distro: fedora/25/atomic + - name: ocp-node2 + distro: fedora/25/atomic + container: + image: fedora:25 + +packages: + - gcc + - python-pip + - python-devel + - openssl-devel + - redhat-rpm-config + +context: 'fedora/25/atomic | origin/v3.6.0-alpha.1' + +env: + OPENSHIFT_IMAGE_TAG: v3.6.0-alpha.1 + +tests: + - ./.papr.sh + +artifacts: + - journals/ diff --git a/.redhat-ci.inventory b/.redhat-ci.inventory deleted file mode 100644 index 23bc9923c..000000000 --- a/.redhat-ci.inventory +++ /dev/null @@ -1,23 +0,0 @@ -[OSEv3:children] -masters -nodes -etcd - -[OSEv3:vars] -ansible_ssh_user=root -ansible_python_interpreter=/usr/bin/python3 -deployment_type=origin -openshift_image_tag="{{ lookup('env', 'OPENSHIFT_IMAGE_TAG') }}" -openshift_master_default_subdomain="{{ lookup('env', 'RHCI_ocp_node1_IP') }}.xip.io" -openshift_check_min_host_memory_gb=1.9 - -[masters] -ocp-master - -[etcd] -ocp-master - -[nodes] -ocp-master openshift_schedulable=false -ocp-node1 openshift_node_labels="{'region':'infra'}" -ocp-node2 openshift_node_labels="{'region':'infra'}" diff --git a/.redhat-ci.sh b/.redhat-ci.sh deleted file mode 100755 index fce8c1d52..000000000 --- a/.redhat-ci.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -set -xeuo pipefail - -pip install -r requirements.txt - -# ping the nodes to check they're responding and register their ostree versions -ansible -vvv -i .redhat-ci.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 - -# run the actual installer -ansible-playbook -vvv -i .redhat-ci.inventory playbooks/byo/config.yml - -# 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 fedora:25 sh -c \ - '"dnf install -y origin-tests && \ - KUBECONFIG=/config /usr/libexec/origin/extended.test --ginkgo.v=1 \ - --ginkgo.noColor --ginkgo.focus=\"Services.*NodePort|EmptyDir\""' diff --git a/.redhat-ci.yml b/.redhat-ci.yml deleted file mode 100644 index 6dac7b256..000000000 --- a/.redhat-ci.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- - -cluster: - hosts: - - name: ocp-master - distro: fedora/25/atomic - - name: ocp-node1 - distro: fedora/25/atomic - - name: ocp-node2 - distro: fedora/25/atomic - container: - image: fedora:25 - -packages: - - gcc - - python-pip - - python-devel - - openssl-devel - - redhat-rpm-config - -context: 'fedora/25/atomic | origin/v3.6.0-alpha.1' - -env: - OPENSHIFT_IMAGE_TAG: v3.6.0-alpha.1 - -tests: - - ./.redhat-ci.sh - -artifacts: - - journals/ -- cgit v1.2.3 From ef2f54d7c48458c0f65a0953c6900e541b46328d Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 13 Jun 2017 09:57:18 -0400 Subject: papr: install libffi-devel Closes: #4418 --- .papr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.papr.yml b/.papr.yml index c29f4b5c9..eec0f76ec 100644 --- a/.papr.yml +++ b/.papr.yml @@ -15,6 +15,7 @@ packages: - gcc - python-pip - python-devel + - libffi-devel - openssl-devel - redhat-rpm-config -- cgit v1.2.3 From d840f53aaaf4243c412ed1652ea74bccedcaa54b Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 13 Jun 2017 10:16:07 -0400 Subject: docs: better documentation for PAPR Add a section in `repo_structure.md`, and rename from `redhat-ci` to `PAPR` and point to the new upstream repo in `pull_requests.md`. Closes: #4078 --- docs/pull_requests.md | 8 ++++---- docs/repo_structure.md | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/pull_requests.md b/docs/pull_requests.md index fcc3e275c..45ae01a9d 100644 --- a/docs/pull_requests.md +++ b/docs/pull_requests.md @@ -10,8 +10,8 @@ Whenever a [Pull Request is opened](../CONTRIBUTING.md#submitting-contributions), some automated test jobs must be successfully run before the PR can be merged. -Some of these jobs are automatically triggered, e.g., Travis and Coveralls. -Other jobs need to be manually triggered by a member of the +Some of these jobs are automatically triggered, e.g., Travis, PAPR, and +Coveralls. Other jobs need to be manually triggered by a member of the [Team OpenShift Ansible Contributors](https://github.com/orgs/openshift/teams/team-openshift-ansible-contributors). ## Triggering tests @@ -48,9 +48,9 @@ simplifying the workflow towards a single infrastructure in the future. There are a set of tests that run on Fedora infrastructure. They are started automatically with every pull request. -They are implemented using the [`redhat-ci` framework](https://github.com/jlebon/redhat-ci). +They are implemented using the [`PAPR` framework](https://github.com/projectatomic/papr). -To re-run tests, write a comment containing `bot, retest this please`. +To re-run tests, write a comment containing only `bot, retest this please`. ## Triggering merge diff --git a/docs/repo_structure.md b/docs/repo_structure.md index 693837fba..f598f22c3 100644 --- a/docs/repo_structure.md +++ b/docs/repo_structure.md @@ -52,3 +52,16 @@ These are plugins used in playbooks and roles: . └── test Contains tests. ``` + +### CI + +These files are used by [PAPR](https://github.com/projectatomic/papr), +It is very similar in workflow to Travis, with the test +environment and test scripts defined in a YAML file. + +``` +. +├── .papr.yml +├── .papr.sh +└── .papr.inventory +``` -- cgit v1.2.3 From b122e6a655a3a9807ea38741bfc6be6cc5f28436 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 13 Jun 2017 11:51:23 -0400 Subject: papr: add documentation to YAML and simplify context Don't duplicate the actual image tag used in the context. Just print it in the logs instead. That way there's no risk of it being outdated when we bump the tag in the YAML. --- .papr.sh | 2 ++ .papr.yml | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.papr.sh b/.papr.sh index aedf2527b..fe0b97b68 100755 --- a/.papr.sh +++ b/.papr.sh @@ -1,6 +1,8 @@ #!/bin/bash set -xeuo pipefail +echo "Targeting OpenShift Origin $OPENSHIFT_IMAGE_TAG" + pip install -r requirements.txt # ping the nodes to check they're responding and register their ostree versions diff --git a/.papr.yml b/.papr.yml index eec0f76ec..16d6e78b1 100644 --- a/.papr.yml +++ b/.papr.yml @@ -1,5 +1,16 @@ --- +# This YAML file is used by PAPR. It details the test +# environment to provision and the test procedure. For more +# information on PAPR, see: +# +# https://github.com/projectatomic/papr +# +# The PAPR YAML specification detailing allowed fields can +# be found at: +# +# https://github.com/projectatomic/papr/blob/master/sample.papr.yml + cluster: hosts: - name: ocp-master @@ -19,7 +30,7 @@ packages: - openssl-devel - redhat-rpm-config -context: 'fedora/25/atomic | origin/v3.6.0-alpha.1' +context: 'fedora/25/atomic' env: OPENSHIFT_IMAGE_TAG: v3.6.0-alpha.1 -- cgit v1.2.3