-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make compute kit job deploy openstack and run minimal tempest
- Loading branch information
1 parent
6b1f30e
commit cbe10b6
Showing
11 changed files
with
162 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
ci/nova-operator-compute-kit/playbooks/deploy-openstack.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
# Note make download_tools and make openstack commands run | ||
# in https://github.com/rdo-infra/review.rdoproject.org-config/blob/master/playbooks/crc/openstack.yaml | ||
# We can override the openstack operator image by defining openstack_img in the zuul job | ||
|
||
- hosts: controller | ||
name: Deploy Openstack Operators | ||
vars: | ||
nova_operator_basedir: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/nova-operator" | ||
tasks: | ||
- name: Deploy OpenStack | ||
ansible.builtin.command: "oc apply -k {{ nova_operator_basedir }}/ci/nova-operator-compute-kit/topology/ci" | ||
changed_when: true | ||
|
||
# note(sean-k-mooney): the openstack operator does not properly init its ready status | ||
# so we need to wait for the nova and openstack cr to be ready before we can proceed. | ||
# This can be removed later once the operator is fixed. | ||
- name: Make sure Nova CR is ready | ||
ansible.builtin.command: oc wait Nova nova --for condition=Ready --timeout=120s | ||
changed_when: false | ||
|
||
- name: Make sure Openstack CR is ready | ||
ansible.builtin.command: oc wait OpenstackControlPlane openstack --for condition=Ready --timeout=120s | ||
changed_when: false |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
- name: Tempest | ||
hosts: controller | ||
vars: | ||
nova_operator_basedir: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/nova-operator" | ||
tasks: | ||
- name: Use OpenStack Namespace | ||
ansible.builtin.command: oc project openstack | ||
changed_when: false | ||
|
||
- name: Deploy OpenStack | ||
ansible.builtin.command: "oc apply -k {{ nova_operator_basedir }}/ci/nova-operator-compute-kit/topology/tempest" | ||
changed_when: true | ||
|
||
- name: Wait for tempest-worker pod to start | ||
ansible.builtin.command: oc wait pod tempest-worker --for condition=Ready --timeout=120s | ||
changed_when: false | ||
|
||
- name: Create local tempest log dir | ||
ansible.builtin.file: | ||
path: "{{ ansible_user_dir }}/zuul-output/logs/controller/tempest" | ||
state: directory | ||
mode: "0755" | ||
|
||
- name: Run tempest tests | ||
ansible.builtin.command: "oc rsh pod/tempest-worker /var/lib/tempest/run_tempest.sh" | ||
register: tempest_output | ||
changed_when: true | ||
|
||
- name: Save tempest output | ||
ansible.builtin.copy: | ||
dest: "{{ ansible_user_dir }}/zuul-output/logs/controller/tempest/tempest-output.txt" | ||
content: "{{ tempest_output.stdout }}" | ||
mode: "0644" | ||
|
||
# TODO(sean-k-mooney): copy the html test report to the zuul output dir. |
15 changes: 4 additions & 11 deletions
15
ci/nova-operator-compute-kit/topology/ci/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: openstack | ||
|
||
bases: | ||
- ../network-isolation | ||
|
||
# patches: | ||
# - path: keystone.yaml | ||
# - path: glance.yaml | ||
# - path: placement.yaml | ||
# - path: neutron.yaml | ||
# - path: nova.yaml | ||
# - path: infra.yaml | ||
patches: | ||
- path: storage.yaml | ||
resources: | ||
- ../base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
ci/nova-operator-compute-kit/topology/tempest/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
namespace: openstack | ||
# TODO: add generation of tempest test specification and run_tempest.sh script. | ||
# currently we are just running the minimal set of tempest tests using the | ||
# run_tempest.sh script from the tempest container. To be able to control the | ||
# concurrency of the tests we need to generate a replacement script which can | ||
# be injected into the container via a configmap. The is also needed to enable | ||
# us to do a two phase run where we run the api tests in parallel and then run the | ||
# scenario tests serially. as is done in the integrated-compute job. | ||
# https://github.com/openstack/tempest/blob/master/tox.ini#L201-L214 | ||
resources: | ||
- tempest.yaml |
38 changes: 38 additions & 0 deletions
38
ci/nova-operator-compute-kit/topology/tempest/tempest.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: tempest-worker | ||
spec: | ||
volumes: | ||
- name: tempest-workdir | ||
emptyDir: {} | ||
- name: cloud-passwd | ||
secret: | ||
secretName: openstack-config-secret | ||
- name: clouds-config | ||
configMap: | ||
name: openstack-config | ||
- name: pre-install | ||
emptyDir: {} | ||
|
||
containers: | ||
- name: tempest-container | ||
image: quay.io/podified-antelope-centos9/openstack-tempest:current-podified | ||
command: ["/usr/bin/dumb-init", "sleep", "infinity"] | ||
volumeMounts: | ||
- mountPath: "/home" | ||
name: tempest-workdir | ||
- mountPath: "/etc/openstack" | ||
name: pre-install | ||
- mountPath: "/etc/openstack/clouds.yaml" | ||
name: clouds-config | ||
subPath: clouds.yaml | ||
- mountPath: "/etc/openstack/secure.yaml" | ||
name: cloud-passwd | ||
subPath: secure.yaml | ||
env: | ||
- name: OS_CLOUD | ||
valueFrom: | ||
configMapKeyRef: | ||
name: openstack-config | ||
key: OS_CLOUD |