Use etcd from distribution
etcd has been available in Ubuntu and Debian for some time. Use the distribution package to install it, following the other backends like redis. Change-Id: I4eaefb1eddd0158a18e30e40dcaff9521632fcec Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
1 parent
286796d544
commit
ec252e926d
7 files changed
+29
-41
No files matched your search
+8
-1
@@ -5,12 +5,13 @@
|
||||
parent: openstack-tox-py312
|
||||
vars:
|
||||
tox_envlist: py312-etcd
|
||||
pre-run:
|
||||
- playbooks/stop-etcd.yaml
|
||||
|
||||
- project:
|
||||
templates:
|
||||
- check-requirements
|
||||
- lib-forward-testing-python3
|
||||
- openstack-cover-jobs
|
||||
- openstack-python3-jobs
|
||||
- openstack-python3-next-jobs
|
||||
- periodic-stable-jobs
|
||||
@@ -18,7 +19,13 @@
|
||||
- release-notes-jobs-python3
|
||||
check:
|
||||
jobs:
|
||||
- openstack-tox-cover:
|
||||
pre-run:
|
||||
- playbooks/stop-etcd.yaml
|
||||
- etcd3gw-py312-functional
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-cover:
|
||||
pre-run:
|
||||
- playbooks/stop-etcd.yaml
|
||||
- etcd3gw-py312-functional
|
||||
@@ -0,0 +1,2 @@
|
||||
etcd-server [platform:dpkg test]
|
||||
etcd-client [platform:dpkg test]
|
||||
@@ -0,0 +1,3 @@
|
||||
---
|
||||
etcd_services:
|
||||
- etcd
|
||||
@@ -0,0 +1,2 @@
|
||||
---
|
||||
etcd_services: []
|
||||
@@ -0,0 +1,11 @@
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: Include OS-specific variables
|
||||
include_vars: "{{ ansible_os_family }}.yaml"
|
||||
- name: "Stop etcd services"
|
||||
service:
|
||||
name: "{{ item }}"
|
||||
state: stopped
|
||||
enabled: no
|
||||
become: yes
|
||||
loop: "{{ etcd_services }}"
|
||||
@@ -1,31 +0,0 @@
|
||||
#!/bin/bash
|
||||
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
|
||||
|
||||
$*
|
||||
@@ -40,21 +40,17 @@ commands = {posargs}
|
||||
deps = {[testenv]deps}
|
||||
setenv =
|
||||
PYTHON=coverage run --source etcd3gw --parallel-mode
|
||||
allowlist_externals =
|
||||
{toxinidir}/setup-etcd-env.sh
|
||||
commands =
|
||||
coverage erase
|
||||
{toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- stestr run {posargs}
|
||||
pifpaf -e TOOZ_TEST run etcd -- stestr run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report --show-missing
|
||||
|
||||
[testenv:examples]
|
||||
allowlist_externals =
|
||||
{toxinidir}/setup-etcd-env.sh
|
||||
commands =
|
||||
{toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- python {toxinidir}/etcd3gw/examples/etcd.py
|
||||
pifpaf -e TOOZ_TEST run etcd -- python {toxinidir}/etcd3gw/examples/etcd.py
|
||||
|
||||
[testenv:docs]
|
||||
deps =
|
||||
@@ -63,10 +59,8 @@ commands =
|
||||
sphinx-build -W -b html doc/source doc/build/html
|
||||
|
||||
[testenv:py{3,311,312,313,314}-etcd]
|
||||
allowlist_externals =
|
||||
{toxinidir}/setup-etcd-env.sh
|
||||
commands =
|
||||
{toxinidir}/setup-etcd-env.sh pifpaf -e TOOZ_TEST run etcd -- stestr run {posargs}
|
||||
pifpaf -e TOOZ_TEST run etcd -- stestr run {posargs}
|
||||
|
||||
[testenv:releasenotes]
|
||||
skip_install = true
|
||||
|
||||
Reference in new issue
Block a user