Merge "Use etcd from distribution"
This commit is contained in:
commit
b016a0b1fa
9 files changed
+118
-75
No files matched your search
+46
-22
@@ -52,26 +52,46 @@
|
||||
Run tests using ``examples`` environment.
|
||||
vars:
|
||||
tox_envlist: examples
|
||||
tooz_backend_daemon: redis
|
||||
tooz_use_pifpaf: false
|
||||
pre-run:
|
||||
- playbooks/pre.yaml
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py311
|
||||
parent: openstack-tox-py311
|
||||
abstract: true
|
||||
pre-run:
|
||||
- playbooks/pre.yaml
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py314
|
||||
parent: openstack-tox-py314
|
||||
abstract: true
|
||||
pre-run:
|
||||
- playbooks/pre.yaml
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py311-etcd3gw
|
||||
parent: openstack-tox-py311
|
||||
parent: tooz-tox-py311
|
||||
description: |
|
||||
Run tests using ``py311-etcd3gw`` environment.
|
||||
vars:
|
||||
tox_envlist: py311-etcd3gw
|
||||
tooz_backend_daemon: etcd
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py311-memcached
|
||||
parent: openstack-tox-py311
|
||||
parent: tooz-tox-py311
|
||||
description: |
|
||||
Run tests using ``py311-memcached`` environment.
|
||||
vars:
|
||||
tox_envlist: py311-memcached
|
||||
tooz_backend_daemon: memcached
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py311-mysql
|
||||
parent: openstack-tox-py311
|
||||
parent: tooz-tox-py311
|
||||
# NOTE(tkajinam): Debian Bookworm which is used for py311 tests do not
|
||||
# provide mysqld. Because pifpaf does not support mariadb atm we use
|
||||
# Ubuntu Noble which provides mysql.
|
||||
@@ -81,62 +101,65 @@
|
||||
vars:
|
||||
tox_envlist: py311-mysql
|
||||
python_use_pyenv: True
|
||||
tooz_backend_daemon: mysql
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py311-postgresql
|
||||
parent: openstack-tox-py311
|
||||
parent: tooz-tox-py311
|
||||
description: |
|
||||
Run tests using ``py311-postgresql`` environment.
|
||||
vars:
|
||||
tox_envlist: py311-postgresql
|
||||
tooz_backend_daemon: postgresql
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py311-redis
|
||||
parent: openstack-tox-py311
|
||||
parent: tooz-tox-py311
|
||||
description: |
|
||||
Run tests using ``py311-redis`` environment.
|
||||
vars:
|
||||
tox_envlist: py311-redis
|
||||
pre-run:
|
||||
- playbooks/stop-redis.yaml
|
||||
tooz_backend_daemon: redis
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py311-sentinel
|
||||
parent: openstack-tox-py311
|
||||
parent: tooz-tox-py311
|
||||
description: |
|
||||
Run tests using ``py311-sentinel`` environment.
|
||||
vars:
|
||||
tox_envlist: py311-sentinel
|
||||
pre-run:
|
||||
- playbooks/stop-redis.yaml
|
||||
tooz_backend_daemon: redis
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py311-zookeeper
|
||||
parent: openstack-tox-py311
|
||||
parent: tooz-tox-py311
|
||||
description: |
|
||||
Run tests using ``py311-zookeeper`` environment.
|
||||
vars:
|
||||
tox_envlist: py311-zookeeper
|
||||
tooz_backend_daemon: zookeeper
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py314-etcd3gw
|
||||
parent: openstack-tox-py314
|
||||
parent: tooz-tox-py314
|
||||
description: |
|
||||
Run tests using ``py314-etcd3gw`` environment.
|
||||
vars:
|
||||
tox_envlist: py314-etcd3gw
|
||||
tooz_backend_daemon: etcd
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py314-memcached
|
||||
parent: openstack-tox-py314
|
||||
parent: tooz-tox-py314
|
||||
description: |
|
||||
Run tests using ``py314-memcached`` environment.
|
||||
vars:
|
||||
tox_envlist: py314-memcached
|
||||
tooz_backend_daemon: memcached
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py314-mysql
|
||||
parent: openstack-tox-py314
|
||||
parent: tooz-tox-py314
|
||||
# NOTE(tkajinam): Debian Trixie which is used for py314 tests do not
|
||||
# provide mysqld. Because pifpaf does not support mariadb atm we use
|
||||
# Ubuntu Noble which provides mysql.
|
||||
@@ -146,39 +169,40 @@
|
||||
vars:
|
||||
python_use_pyenv: True
|
||||
tox_envlist: py314-mysql
|
||||
tooz_backend_daemon: mysql
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py314-postgresql
|
||||
parent: openstack-tox-py314
|
||||
parent: tooz-tox-py314
|
||||
description: |
|
||||
Run tests using ``py314-postgresql`` environment.
|
||||
vars:
|
||||
tox_envlist: py314-postgresql
|
||||
tooz_backend_daemon: postgresql
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py314-redis
|
||||
parent: openstack-tox-py314
|
||||
parent: tooz-tox-py314
|
||||
description: |
|
||||
Run tests using ``py314-redis`` environment.
|
||||
vars:
|
||||
tox_envlist: py314-redis
|
||||
pre-run:
|
||||
- playbooks/stop-redis.yaml
|
||||
tooz_backend_daemon: redis
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py314-sentinel
|
||||
parent: openstack-tox-py314
|
||||
parent: tooz-tox-py314
|
||||
description: |
|
||||
Run tests using ``py314-sentinel`` environment.
|
||||
vars:
|
||||
tox_envlist: py314-sentinel
|
||||
pre-run:
|
||||
- playbooks/stop-redis.yaml
|
||||
tooz_backend_daemon: redis
|
||||
|
||||
- job:
|
||||
name: tooz-tox-py314-zookeeper
|
||||
parent: openstack-tox-py314
|
||||
parent: tooz-tox-py314
|
||||
description: |
|
||||
Run tests using ``py314-zookeeper`` environment.
|
||||
vars:
|
||||
tox_envlist: py314-zookeeper
|
||||
tooz_backend_daemon: zookeeper
|
||||
+6
-4
@@ -1,5 +1,3 @@
|
||||
redis-sentinel [platform:dpkg]
|
||||
redis-server [platform:dpkg]
|
||||
libpq-dev [platform:dpkg]
|
||||
postgresql [platform:dpkg]
|
||||
mysql-client [platform:dpkg !platform:debian]
|
||||
@@ -8,6 +6,10 @@ mysql-server [platform:dpkg !platform:debian]
|
||||
mariadb-server [platform:debian]
|
||||
build-essential [platform:dpkg]
|
||||
libffi-dev [platform:dpkg]
|
||||
zookeeperd [platform:dpkg]
|
||||
memcached [platform:dpkg]
|
||||
unzip [platform:dpkg]
|
||||
etcd-server [platform:dpkg tests-functional-etcd]
|
||||
etcd-client [platform:dpkg tests-functional-etcd]
|
||||
redis-sentinel [platform:dpkg tests-functional-redis]
|
||||
redis-server [platform:dpkg tests-functional-redis]
|
||||
zookeeperd [platform:dpkg tests-functional-zookeeper]
|
||||
memcached [platform:dpkg tests-functional-memcached]
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
backend_services_map:
|
||||
etcd:
|
||||
- etcd
|
||||
memcached:
|
||||
- memcached
|
||||
mysql:
|
||||
- mariadb
|
||||
postgresql:
|
||||
- postgresql
|
||||
redis:
|
||||
- redis-server
|
||||
- redis-sentinel
|
||||
zookeeper:
|
||||
- zookeeper
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
backend_services_map:
|
||||
etcd:
|
||||
- etcd
|
||||
memcached:
|
||||
- memcached
|
||||
mysql:
|
||||
- mysql
|
||||
postgresql:
|
||||
- postgresql
|
||||
redis:
|
||||
- redis-server
|
||||
- redis-sentinel
|
||||
zookeeper:
|
||||
- zookeeper
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
backend_services_map:
|
||||
etcd: []
|
||||
memcached: []
|
||||
mysql: []
|
||||
postgresql: []
|
||||
redis: []
|
||||
zookeeper: []
|
||||
@@ -0,0 +1,27 @@
|
||||
- hosts: all
|
||||
roles:
|
||||
- role: bindep
|
||||
bindep_profile: "tests-functional-{{ tooz_backend_daemon }}"
|
||||
tasks:
|
||||
- name: "Prepare backend services for pifpaf"
|
||||
block:
|
||||
- name: Include OS-specific variables
|
||||
include_vars: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_os_family }}-{{ ansible_distribution }}.yaml"
|
||||
- "{{ ansible_os_family }}.yaml"
|
||||
- name: "Stop backend services"
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
become: yes
|
||||
loop: "{{ backend_services_map[tooz_backend_daemon] }}"
|
||||
- name: Remove ZOO_LOG_DIR
|
||||
lineinfile:
|
||||
path: /etc/zookeeper/conf/environment
|
||||
regexp: '^ZOO_LOG_DIR=.*'
|
||||
state: absent
|
||||
become: yes
|
||||
when: tooz_backend_daemon == 'zookeeper'
|
||||
when: "{{ tooz_use_pifpaf | default(true) }}"
|
||||
@@ -1,12 +0,0 @@
|
||||
# On Ubuntu, just installing the redis-server package starts Redis. As a
|
||||
# result, when we try to start one via pifpaf it fails because the port
|
||||
# is already in use.
|
||||
# See https://bugs.launchpad.net/python-tooz/+bug/1828610
|
||||
- hosts: all
|
||||
name: Stop Redis server before running tests
|
||||
tasks:
|
||||
- name: Stop Redis
|
||||
service:
|
||||
name: redis-server
|
||||
state: stopped
|
||||
become: true
|
||||
+1
-3
@@ -10,9 +10,7 @@ then
|
||||
do
|
||||
IFS=" "
|
||||
TOOZ_TEST_DRIVER=(${TOOZ_TEST_DRIVER})
|
||||
SETUP_ENV_SCRIPT="./setup-${TOOZ_TEST_DRIVER[0]}-env.sh"
|
||||
[ -x $SETUP_ENV_SCRIPT ] || unset SETUP_ENV_SCRIPT
|
||||
$SETUP_ENV_SCRIPT pifpaf -e TOOZ_TEST run "${TOOZ_TEST_DRIVER[@]}" -- $*
|
||||
pifpaf -e TOOZ_TEST run "${TOOZ_TEST_DRIVER[@]}" -- $*
|
||||
done
|
||||
unset IFS
|
||||
else
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Invoked by run-tests.sh
|
||||
|
||||
set -eux
|
||||
if [ -z "$(which etcd)" ]; then
|
||||
ETCD_VERSION=${ETCD_VERSION:-3.5.21}
|
||||
case `uname -s` in
|
||||
Darwin)
|
||||
OS=darwin
|
||||
SUFFIX=zip
|
||||
;;
|
||||
Linux)
|
||||
OS=linux
|
||||
SUFFIX=tar.gz
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported OS"
|
||||
exit 1
|
||||
esac
|
||||
case `uname -m` in
|
||||
x86_64)
|
||||
MACHINE=amd64
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported machine"
|
||||
exit 1
|
||||
esac
|
||||
TARBALL_NAME=etcd-v${ETCD_VERSION}-$OS-$MACHINE
|
||||
test ! -d "$TARBALL_NAME" && curl -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${TARBALL_NAME}.${SUFFIX} | tar xz
|
||||
export PATH=$PATH:$TARBALL_NAME
|
||||
fi
|
||||
|
||||
$*
|
||||
Reference in new issue
Block a user