Rename cluster name to demo (#1000)

* Assign hostname to haproxy container
* Tune vim config
This commit is contained in:
Alexander Kukushkin
2019-03-11 10:57:26 +01:00
committed by GitHub
parent 13f7aede61
commit 9e19b43869
4 changed files with 11 additions and 3 deletions

View File

@@ -1,6 +1,10 @@
sudo: true
dist: trusty
language: python
addons:
apt:
packages:
- expect-dev # for unbuffer
env:
global:
- ETCDVERSION=3.0.17 ZKVERSION=3.4.11 CONSULVERSION=0.7.4
@@ -131,11 +135,11 @@ script:
if [[ $TEST_SUITE != "behave" ]]; then
echo Running unit tests using python${pv}
$TEST_SUITE test
unbuffer $TEST_SUITE test
$TEST_SUITE flake8
elif [[ $pv != $EXCLUDE_BEHAVE ]]; then
echo Running acceptance tests using python${pv}
if ! PATH=.:/usr/lib/postgresql/9.6/bin:$PATH $TEST_SUITE; then
if ! PATH=.:/usr/lib/postgresql/9.6/bin:$PATH unbuffer $TEST_SUITE; then
# output all log files when tests are failing
grep . features/output/*_failed/*postgres?.*
exit 1

View File

@@ -37,6 +37,9 @@ RUN set -ex \
\
# haproxy dummy config
&& echo 'global\n stats socket /run/haproxy/admin.sock mode 660 level admin' > /etc/haproxy/haproxy.cfg \
\
# vim config
&& echo 'syntax on\nfiletype plugin indent on\nset mouse-=a\nautocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab' > /etc/vim/vimrc.local \
\
# Prepare postgres/patroni/haproxy environment
&& mkdir -p $PGHOME/.config/patroni /patroni /run/haproxy \

View File

@@ -61,6 +61,7 @@ services:
image: patroni
networks: [ demo ]
env_file: docker/patroni.env
hostname: haproxy
container_name: demo-haproxy
ports:
- "5000:5000"

View File

@@ -1,4 +1,4 @@
PATRONI_SCOPE=testcluster
PATRONI_SCOPE=demo
PATRONI_ETCD_HOSTS='etcd1:2379','etcd2:2379','etcd3:2379'
PATRONI_RESTAPI_USERNAME=admin