From f052db5f0010c1cf3a5166e680aebe4d3048cf70 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 21 May 2019 09:50:27 -0600 Subject: [PATCH] Retire ansible-role-k8s-mariadb Depends-On: https://review.opendev.org/#/c/660436/ Depends-On: https://review.opendev.org/#/c/660440/ Depends-On: https://review.opendev.org/#/c/660437/ Change-Id: I11f24fe31e0e1e86c7c129d69fbc8e5c89f2af31 --- .zuul.yaml | 43 ----- LICENSE | 176 ------------------ README.md | 40 +--- defaults/main.yml | 11 -- meta/main.yml | 24 --- requirements.txt | 2 - tasks/deprovision.yml | 25 --- tasks/hiera.yml | 26 --- tasks/main.yml | 1 - tasks/provision.yml | 170 ----------------- tests/get_logs.sh | 97 ---------- tests/post.yml | 28 --- tests/pre.yml | 44 ----- tests/pre_debian.yml | 1 - tests/pre_rhel.yml | 33 ---- tests/roles/kubernetes/tasks/pre.yml | 12 -- tests/roles/kubernetes/tasks/pre_debian.yml | 1 - tests/roles/kubernetes/tasks/pre_rhel.yml | 53 ------ tests/roles/kubernetes/tasks/run.yml | 65 ------- tests/roles/kubernetes/templates/inventory.j2 | 12 -- tests/roles/openshift/tasks/pre.yml | 6 - tests/roles/openshift/tasks/pre_debian.yml | 1 - tests/roles/openshift/tasks/pre_rhel.yml | 71 ------- tests/roles/openshift/tasks/run.yml | 73 -------- tests/run.yml | 28 --- tests/templates/playbook.j2 | 34 ---- tests/tests.yml | 14 -- 27 files changed, 8 insertions(+), 1083 deletions(-) delete mode 100644 .zuul.yaml delete mode 100644 LICENSE delete mode 100644 defaults/main.yml delete mode 100644 meta/main.yml delete mode 100644 requirements.txt delete mode 100644 tasks/deprovision.yml delete mode 100644 tasks/hiera.yml delete mode 100644 tasks/main.yml delete mode 100644 tasks/provision.yml delete mode 100644 tests/get_logs.sh delete mode 100644 tests/post.yml delete mode 100644 tests/pre.yml delete mode 100644 tests/pre_debian.yml delete mode 100644 tests/pre_rhel.yml delete mode 100644 tests/roles/kubernetes/tasks/pre.yml delete mode 100644 tests/roles/kubernetes/tasks/pre_debian.yml delete mode 100644 tests/roles/kubernetes/tasks/pre_rhel.yml delete mode 100644 tests/roles/kubernetes/tasks/run.yml delete mode 100644 tests/roles/kubernetes/templates/inventory.j2 delete mode 100644 tests/roles/openshift/tasks/pre.yml delete mode 100644 tests/roles/openshift/tasks/pre_debian.yml delete mode 100644 tests/roles/openshift/tasks/pre_rhel.yml delete mode 100644 tests/roles/openshift/tasks/run.yml delete mode 100644 tests/run.yml delete mode 100644 tests/templates/playbook.j2 delete mode 100644 tests/tests.yml diff --git a/.zuul.yaml b/.zuul.yaml deleted file mode 100644 index e121fd1..0000000 --- a/.zuul.yaml +++ /dev/null @@ -1,43 +0,0 @@ -- project: - check: - jobs: - - ansible-role-k8s-mariadb-kubernetes-centos - - ansible-role-k8s-mariadb-openshift-centos - -- nodeset: - name: ansible-role-k8s-centos - nodes: - - name: primary - label: centos-7 - -- job: - name: ansible-role-k8s-base - pre-run: tests/pre.yml - run: tests/run.yml - post-run: tests/post.yml - attempts: 1 - timeout: 10800 - required-projects: - - openstack/ansible-role-k8s-tripleo - -- job: - name: ansible-role-k8s-mariadb-kubernetes-centos - parent: ansible-role-k8s-base - nodeset: ansible-role-k8s-centos - voting: false - vars: - coe: kubernetes - project_name: ansible-role-k8s-mariadb - required-projects: - - openstack/ansible-role-k8s-mariadb - -- job: - name: ansible-role-k8s-mariadb-openshift-centos - parent: ansible-role-k8s-base - nodeset: ansible-role-k8s-centos - voting: false - vars: - coe: openshift - project_name: ansible-role-k8s-mariadb - required-projects: - - openstack/ansible-role-k8s-mariadb diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 68c771a..0000000 --- a/LICENSE +++ /dev/null @@ -1,176 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - diff --git a/README.md b/README.md index 6c203fe..86e34d6 100644 --- a/README.md +++ b/README.md @@ -1,34 +1,10 @@ -K8S MariaDB -========= -[![Galaxy](https://img.shields.io/badge/galaxy-tripleo.k8s--mariadb-blue.svg?style=flat)](https://galaxy.ansible.com/tripleo/k8s-mariadb) -[![Build Status](https://travis-ci.org/tripleo/ansible-role-k8s-mariadb.svg?branch=master)](https://travis-ci.org/tripleo/ansible-role-k8s-mariadb) +This project is no longer maintained. -Install MariaDB in a Kubernetes cluster. +The contents of this repository are still available in the Git +source code management system. To see the contents of this +repository before it reached its end of life, please check out the +previous commit with "git checkout HEAD^1". -Requirements ------------- - -Access to Kubernetes cluster - -Role Variables --------------- - -| Name | Default Value | Description | -|-------------------|---------------------|----------------------| -| `action` | `provision` | List of tasks to run. | -| `coe_host` | `https://localhost:8443` | | -| `coe_config_context` | | | -| `coe_config_file` | | | - - -Dependencies ------------- - -- `ansible.kubernetes-modules` - -Example Playbook ----------------- - - - hosts: all - roles: - - tripleo.k8s-mariadb +For any further questions, please email +openstack-discuss@lists.openstack.org or join #openstack-dev on +Freenode. diff --git a/defaults/main.yml b/defaults/main.yml deleted file mode 100644 index 8bda0ed..0000000 --- a/defaults/main.yml +++ /dev/null @@ -1,11 +0,0 @@ -coe_host: -coe_config_context: -coe_config_file: -action: provision - -service_name: mariadb -namespace: openstack - -mariadb_config: - host: '{{service_name}}' - root_password: weakpassword diff --git a/meta/main.yml b/meta/main.yml deleted file mode 100644 index fe03c65..0000000 --- a/meta/main.yml +++ /dev/null @@ -1,24 +0,0 @@ -galaxy_info: - author: Sam Doran, Flavio Percoco - description: - company: Red Hat - license: MIT - min_ansible_version: 2.3 - - platforms: - - name: EL - versions: - - 7 - - galaxy_tags: - - openstack - - kubernetes - - mysql - - database - - mariadb - -dependencies: - - role: ansible.kubernetes-modules - install_python_requirements: no - - - role: ansible-role-k8s-tripleo diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 4075a79..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -ansible>=2,<2.4 -openshift diff --git a/tasks/deprovision.yml b/tasks/deprovision.yml deleted file mode 100644 index 0236af0..0000000 --- a/tasks/deprovision.yml +++ /dev/null @@ -1,25 +0,0 @@ -- name: Delete mariadb deployment - k8s_v1beta1_stateful_set: - host: "{{coe_host}}" - context: "{{coe_config_context}}" - kubeconfig: "{{coe_config_file}}" - name: mariadb - namespace: "{{namespace}}" - state: absent - -- name: Delete mariadb service - k8s_v1_service: - host: "{{coe_host}}" - context: "{{coe_config_context}}" - kubeconfig: "{{coe_config_file}}" - name: mariadb - namespace: "{{namespace}}" - state: absent - -- name: Delete mariadb configmap - k8s_v1_namespace: - host: "{{coe_host}}" - context: "{{coe_config_context}}" - kubeconfig: "{{coe_config_file}}" - name: mariadb - state: absent diff --git a/tasks/hiera.yml b/tasks/hiera.yml deleted file mode 100644 index 81e635b..0000000 --- a/tasks/hiera.yml +++ /dev/null @@ -1,26 +0,0 @@ -- name: Translate hieradata - parse_tripleo_hiera: - hieradata_file: '{{ hieradata_file }}' - hieradata: '{{ hieradata }}' - schema: - tripleo::profile::base::database::mysql::bind_address: bind_address - tripleo::profile::base::database::mysql::mysql_server_options: mysql_server_options - mysql::server::root_password: root_password - mysql_clustercheck_password: clustercheck_password - mysql_max_connections: mysql_max_connections - default: '{{mariadb_config}}' - when: - - hieradata or hieradata_file - - schema - register: result - -- name: Set facts - set_fact: - mariadb_config: '{{result.conf_dict}}' - when: - - result.conf_dict is defined - - fact_variable != '' - -- debug: - var: mariadb_config - verbosity: 2 diff --git a/tasks/main.yml b/tasks/main.yml deleted file mode 100644 index ef1ef4f..0000000 --- a/tasks/main.yml +++ /dev/null @@ -1 +0,0 @@ -- include: "{{ action }}.yml" diff --git a/tasks/provision.yml b/tasks/provision.yml deleted file mode 100644 index 3ea855c..0000000 --- a/tasks/provision.yml +++ /dev/null @@ -1,170 +0,0 @@ -- name: Create mariadb configmaps - ignore_errors: yes - k8s_v1_config_map: - host: "{{coe_host}}" - context: "{{coe_config_context}}" - kubeconfig: "{{coe_config_file}}" - name: mariadb - namespace: "{{namespace}}" - state: present - debug: yes - labels: - service: mariadb - data: - kolla-config: | - { - "command": "/usr/bin/mysqld_safe", - "config_files": [] - } - server-cnf: | - [mysqld] - pid-file=/var/lib/mysql/mariadb.pid - -- include: hiera.yml - -- name: Create mariadb service - k8s_v1_service: - host: "{{coe_host}}" - context: "{{coe_config_context}}" - kubeconfig: "{{coe_config_file}}" - name: mariadb - namespace: "{{namespace}}" - state: present - ports: - - port: 3306 - name: db - selector: - app: mariadb - labels: - app: mariadb - debug: yes - annotations: - service.alpha.kubernetes.io/tolerate-unready-endpoints: "false" - register: create_service - -- name: Create mariadb deployment - k8s_v1beta1_stateful_set: - host: "{{coe_host}}" - context: "{{coe_config_context}}" - kubeconfig: "{{coe_config_file}}" - name: mariadb - namespace: "{{namespace}}" - state: present - debug: yes - spec_service_name: mariadb - spec_template_metadata_name: mariadb - spec_template_metadata_labels: - app: mariadb - galera: enabled - spec_template_spec_init_containers: - - name: bootstrap - image: tripleoupstream/centos-binary-mariadb - env: - - name: KOLLA_KUBERNETES - value: "" - - name: KOLLA_BOOTSTRAP - value: "" - - name: KOLLA_CONFIG_STRATEGY - value: "COPY_ALWAYS" - - name: DB_ROOT_PASSWORD - value: "{{mariadb_config.root_password}}" - volumeMounts: - - name: kolla-config - mountPath: /var/lib/kolla/config_files/ - - name: mariadb-config - mountPath: /etc/my.cnf.d - - name: mariadb-pvc - mountPath: /var/lib/mysql - volumes: - - name: mariadb-pvc - - name: kolla-config - config_map: - name: mariadb - items: - - key: kolla-config - path: config.json - - name: mariadb-config - config_map: - name: mariadb - items: - - key: server-cnf - path: server.cnf - - containers: - - name: mariadb - image: tripleoupstream/centos-binary-mariadb - ports: - - container_port: 3306 - - container_port: 4567 - - container_port: 4444 - env: - - name: KOLLA_CONFIG_STRATEGY - value: COPY_ALWAYS - - name: KOLLA_KUBERNETES - value: "" - - name: DB_ROOT_PASSWORD - value: '{{mariadb_config.root_password}}' - volume_mounts: - - name: kolla-config - mountPath: /var/lib/kolla/config_files/ - - name: mariadb-config - mountPath: /etc/my.cnf.d - - name: mariadb-pvc - mountPath: /var/lib/mysql - replicas: 1 - volumes: - - name: mariadb-pvc - - name: kolla-config - config_map: - name: mariadb - items: - - key: kolla-config - path: config.json - - name: mariadb-config - config_map: - name: mariadb - items: - - key: server-cnf - path: server.cnf - - register: create_deployment - tags: - - statefulset - -- set_fact: - my_cnf: | - [mysql] - user=root - host={{mariadb_config.host}} - password='{{mariadb_config.root_password}}' - - [client] - user=root - host={{mariadb_config.host}} - password='{{mariadb_config.root_password}}' - - [mysqldump] - user=root - host={{mariadb_config.host}} - password='{{mariadb_config.root_password}}' - - [mysqladmin] - user=root - host={{mariadb_config.host}} - password='{{mariadb_config.root_password}}' - - [mysqlcheck] - user=root - host={{mariadb_config.host}} - password='{{mariadb_config.root_password}}' - -- name: Create mariadb root secret - k8s_v1_secret: - host: "{{coe_host}}" - context: "{{coe_config_context}}" - kubeconfig: "{{coe_config_file}}" - name: mariadb-root - namespace: "{{namespace}}" - state: present - data: - my.cnf: "{{ my_cnf | b64encode }}" diff --git a/tests/get_logs.sh b/tests/get_logs.sh deleted file mode 100644 index f3f1841..0000000 --- a/tests/get_logs.sh +++ /dev/null @@ -1,97 +0,0 @@ -#!/bin/bash - -set +o errexit - -check_failure() { - # All docker container's status are created, restarting, running, removing, - # paused, exited and dead. Containers without running status are treated as - # failure. removing is added in docker 1.13, just ignore it now. - failed_containers=$(docker ps -a --format "{{.Names}}" \ - --filter status=created \ - --filter status=restarting \ - --filter status=paused \ - --filter status=exited \ - --filter status=dead) - - if [[ -n "$failed_containers" ]]; then - exit 1; - fi -} - -copy_logs() { - LOG_DIR=/tmp/logs - SYSTEM_LOGS=$LOG_DIR/logs/ - - if [[ -d "$HOME/.ansible" ]]; then - cp -rvnL $HOME/.ansible/* ${LOG_DIR}/ansible/ - fi - - # Backup etc - cp -rvnL /etc ${LOG_DIR}/ - cp /etc/sudoers ${LOG_DIR}/etc/sudoers.txt - - cp -rvnL /var/log/* ${SYSTEM_LOGS} - cp -rvnL /tmp/kubespray ${LOG_DIR}/ - cp -rvnL /tmp/test-volume ${LOG_DIR}/ - - - if [[ -x "$(command -v journalctl)" ]]; then - journalctl --no-pager > ${SYSTEM_LOGS}/syslog.txt - journalctl --no-pager -u docker.service > ${SYSTEM_LOGS}/docker.log - else - cp /var/log/upstart/docker.log ${SYSTEM_LOGS}/docker.log - fi - - iptables-save > ${SYSTEM_LOGS}/iptables.txt - df -h > ${SYSTEM_LOGS}/df.txt - free > ${SYSTEM_LOGS}/free.txt - parted -l > ${SYSTEM_LOGS}/parted-l.txt - mount > ${SYSTEM_LOGS}/mount.txt - env > ${SYSTEM_LOGS}/env.txt - - if [ `command -v dpkg` ]; then - dpkg -l > ${SYSTEM_LOGS}/dpkg-l.txt - fi - if [ `command -v rpm` ]; then - rpm -qa > ${SYSTEM_LOGS}/rpm-qa.txt - fi - - # final memory usage and process list - ps -eo user,pid,ppid,lwp,%cpu,%mem,size,rss,cmd > ${SYSTEM_LOGS}/ps.txt - - if [ `command -v docker` ]; then - # docker related information - (docker info && docker images && docker ps -a) > ${SYSTEM_LOGS}/docker-info.txt - - for container in $(docker ps -a --format "{{.Names}}"); do - docker logs --tail all ${container} > ${SYSTEM_LOGS}/containers/${container}.txt - done - fi - - - if [ `command -v kubectl` ]; then - if [ `command -v oc` ]; then - oc login -u system:admin - fi - - (kubectl version && kubectl cluster-info dump && kubectl config view) > ${SYSTEM_LOGS}/k8s-info.txt 2>&1 - (kubectl get pods --all-namespaces && kubectl describe all --all-namespaces) > ${SYSTEM_LOGS}/k8s-describe-all.txt 2>&1 - fi - - # Rename files to .txt; this is so that when displayed via - # logs.openstack.org clicking results in the browser shows the - # files, rather than trying to send it to another app or make you - # download it, etc. - - # Rename all .log files to .txt files - for f in $(find ${SYSTEM_LOGS} -name "*.log"); do - mv $f ${f/.log/.txt} - done - - chmod -R 777 ${LOG_DIR} - find $SYSTEM_LOGS -iname '*.txt' -execdir gzip -f -9 {} \+ - find $SYSTEM_LOGS -iname '*.json' -execdir gzip -f -9 {} \+ -} - -copy_logs -check_failure diff --git a/tests/post.yml b/tests/post.yml deleted file mode 100644 index 97a9cfa..0000000 --- a/tests/post.yml +++ /dev/null @@ -1,28 +0,0 @@ ---- -- hosts: all - vars: - logs_dir: "/tmp/logs" - tasks: - - name: Run diagnostics script - script: get_logs.sh - register: get_logs_result - become: true - failed_when: false - - - name: Print get_logs output - debug: - msg: "{{ get_logs_result.stdout }}" - - - name: Download logs to executor - synchronize: - dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}" - mode: pull - src: "{{ logs_dir }}/" - ignore_errors: yes - - - name: Download /etc/hosts file to executor - synchronize: - src: "/etc/hosts" - dest: "{{ zuul.executor.log_root }}/{{inventory_hostname }}/" - mode: pull - ignore_errors: yes diff --git a/tests/pre.yml b/tests/pre.yml deleted file mode 100644 index bad4dda..0000000 --- a/tests/pre.yml +++ /dev/null @@ -1,44 +0,0 @@ ---- -- hosts: all - vars: - logs_dir: "/tmp/logs" - tasks: - - name: "Ensure {{item}} dir exists" - file: - path: "{{item}}" - state: "directory" - with_items: - - "{{ logs_dir }}" - - - name: Ensure node directories - file: - path: "{{ logs_dir }}/{{ item }}" - state: "directory" - mode: 0777 - with_items: - - "logs" - - "logs/containers" - - - name: "iptables: don't jump straight to openstack-INPUT" - become: true - iptables: - chain: "INPUT" - jump: "openstack-INPUT" - state: absent - - - include: pre_rhel.yml - when: ansible_os_family == 'RedHat' - - - include: pre_debian.yml - when: ansible_os_family == 'Debian' - - - include: 'roles/{{coe}}/tasks/pre.yml' - - - name: Create symlink for all required projects - become: true - file: - src: "{{ ansible_env.HOME }}/{{ item.value.src_dir }}" - dest: "/etc/ansible/roles/{{ item.value.short_name }}" - state: link - delegate_to: primary - with_dict: "{{zuul.projects}}" diff --git a/tests/pre_debian.yml b/tests/pre_debian.yml deleted file mode 100644 index ed97d53..0000000 --- a/tests/pre_debian.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/tests/pre_rhel.yml b/tests/pre_rhel.yml deleted file mode 100644 index 2537d81..0000000 --- a/tests/pre_rhel.yml +++ /dev/null @@ -1,33 +0,0 @@ ---- -- name: Enable/Install epel-release - become: true - yum: - name: "{{item}}" - state: present - with_items: - - epel-release - -- name: Enable/Install delorean - become: true - get_url: - url: "{{item.url}}" - dest: "/etc/yum.repos.d/{{item.dest}}" - with_items: - - dest: delorean-deps.repo - url: "https://trunk.rdoproject.org/centos7-master/delorean-deps.repo" - - dest: delorean.repo - url: "https://trunk.rdoproject.org/centos7-master/current-tripleo-rdo/delorean.repo" - -- name: Upgrade all packages - become: true - yum: - name: '*' - state: latest - -- name: Install required packages - become: true - yum: - name: "{{item}}" - state: latest - with_items: - - openstack-tempest diff --git a/tests/roles/kubernetes/tasks/pre.yml b/tests/roles/kubernetes/tasks/pre.yml deleted file mode 100644 index 4dccb8c..0000000 --- a/tests/roles/kubernetes/tasks/pre.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- include: pre_rhel.yml - when: ansible_os_family == 'RedHat' - -- include: pre_debian.yml - when: ansible_os_family == 'Debian' - -- name: Clone kubespray - git: - repo: https://github.com/kubernetes-incubator/kubespray/ - dest: "/tmp/kubespray" - delegate_to: primary diff --git a/tests/roles/kubernetes/tasks/pre_debian.yml b/tests/roles/kubernetes/tasks/pre_debian.yml deleted file mode 100644 index ed97d53..0000000 --- a/tests/roles/kubernetes/tasks/pre_debian.yml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/tests/roles/kubernetes/tasks/pre_rhel.yml b/tests/roles/kubernetes/tasks/pre_rhel.yml deleted file mode 100644 index af0302a..0000000 --- a/tests/roles/kubernetes/tasks/pre_rhel.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -- name: Add ASB repo for ansible-kubernetes-modules - become: true - yum_repository: - name: asb - description: Copr repo for ansible-service-broker-latest owned by @ansible-service-broker - file: asb - baseurl: https://copr-be.cloud.fedoraproject.org/results/@ansible-service-broker/ansible-service-broker-latest/epel-7-$basearch/ - gpgkey: https://copr-be.cloud.fedoraproject.org/results/@ansible-service-broker/ansible-service-broker-latest/pubkey.gpg - gpgcheck: true - enabled: true - skip_if_unavailable: true - repo_gpgcheck: false - -- name: Enable/Install centos-release-openshift-origin - become: true - yum: - name: "{{item}}" - state: present - with_items: - - centos-release-openshift-origin - -# NOTE(flaper87): python-openshift requires a specific version of -# python-requests. We need to update it to the version in the asb repo, hence -# this step. We have to enable epel so we can meet the python2-pysocks -# dependency, which is a python-requests requirement. -- name: Force update for requests/urllib3 - become: true - yum: - name: "{{item}}" - state: latest - update_cache: true - enablerepo: asb,epel - disablerepo: delorean - with_items: - - python-requests - -- name: Install required packages - become: true - yum: - name: "{{item}}" - state: latest - with_items: - - ansible - - python-netaddr - -- name: Install required packages from asb - become: true - yum: - name: "{{item}}" - state: latest - with_items: - - ansible-kubernetes-modules diff --git a/tests/roles/kubernetes/tasks/run.yml b/tests/roles/kubernetes/tasks/run.yml deleted file mode 100644 index 43fa52b..0000000 --- a/tests/roles/kubernetes/tasks/run.yml +++ /dev/null @@ -1,65 +0,0 @@ ---- -- name: Build inventory - template: - src: "roles/kubernetes/templates/inventory.j2" - dest: "/tmp/kubespray/ci_inventory" - delegate_to: "primary" - -- shell: - cmd: | - set -e - set -x - - ansible-playbook -i ci_inventory --skip-tags bastion-ssh-config -e skip_downloads=true -e docker_dns_servers_strict=no -e deploy_netchecker=true cluster.yml - kubectl create namespace openstack - - sudo mkdir /tmp/test-volume - sudo chmod 777 /tmp/test-volume - - cat <