mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
remove old shell-based backup/restore tests
This commit is contained in:
parent
53373240ef
commit
f2a6ee738c
6 changed files with 0 additions and 237 deletions
|
|
@ -144,16 +144,6 @@ jobs:
|
|||
- run:
|
||||
command: make test-external-lookup EXTERNAL_LOOKUP_DSN=postgresql://postgres:password@localhost/circle_test?sslmode=disable
|
||||
no_output_timeout: 30m
|
||||
test-backup-restore:
|
||||
executor:
|
||||
name: golang
|
||||
steps:
|
||||
- checkout-plus
|
||||
- skip-if-root-unchanged
|
||||
- setup_remote_docker
|
||||
- run: echo -n $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin
|
||||
- run: make backuptests-build
|
||||
- run: make backuptests
|
||||
cluster-tests:
|
||||
executor:
|
||||
name: golang
|
||||
|
|
@ -273,10 +263,6 @@ workflows:
|
|||
context: molecula
|
||||
requires:
|
||||
- setup
|
||||
- test-backup-restore:
|
||||
context: molecula
|
||||
requires:
|
||||
- setup
|
||||
- cluster-tests:
|
||||
context: molecula
|
||||
requires:
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
ARG GO_VERSION=latest
|
||||
|
||||
######################
|
||||
### Pilosa builder ###
|
||||
######################
|
||||
|
||||
FROM golang:${GO_VERSION} as pilosa-builder
|
||||
ARG MAKE_FLAGS
|
||||
WORKDIR /pilosa
|
||||
|
||||
COPY . ./
|
||||
|
||||
RUN make build FLAGS="-o build/featurebase" ${MAKE_FLAGS}
|
||||
|
||||
#####################
|
||||
### Pilosa runner ###
|
||||
#####################
|
||||
|
||||
FROM alpine:3.13.2 as runner
|
||||
|
||||
LABEL maintainer "dev@molecula.com"
|
||||
|
||||
RUN apk add --no-cache curl jq
|
||||
|
||||
COPY --from=pilosa-builder /pilosa/build/featurebase /
|
||||
|
||||
COPY NOTICE /NOTICE
|
||||
|
||||
EXPOSE 10101
|
||||
VOLUME /data
|
||||
|
||||
ENV PILOSA_DATA_DIR /data
|
||||
ENV PILOSA_BIND 0.0.0.0:10101
|
||||
ENV PILOSA_BIND_GRPC 0.0.0.0:20101
|
||||
|
||||
ENTRYPOINT ["/featurebase"]
|
||||
CMD ["server"]
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
ARG GO_VERSION=latest
|
||||
|
||||
######################
|
||||
### Pilosa builder ###
|
||||
######################
|
||||
|
||||
FROM golang:${GO_VERSION} as pilosa-builder
|
||||
ARG MAKE_FLAGS
|
||||
WORKDIR /pilosa
|
||||
|
||||
COPY . ./
|
||||
|
||||
RUN make build FLAGS="-o build/featurebase" ${MAKE_FLAGS}
|
||||
|
||||
FROM moleculacorp/idk as idk
|
||||
LABEL maintainer "dev@molecula.com"
|
||||
RUN apt-get update -y
|
||||
RUN apt-get install -y bash curl jq
|
||||
|
||||
|
||||
COPY --from=pilosa-builder /pilosa/build/featurebase /
|
||||
COPY testBackupRestore.sh /
|
||||
CMD ["bash","/testBackupRestore.sh"]
|
||||
9
Makefile
9
Makefile
|
|
@ -155,15 +155,6 @@ clustertests: vendor
|
|||
clustertests-build: vendor
|
||||
docker-compose -f $(DOCKER_COMPOSE) down -v
|
||||
docker-compose -f $(DOCKER_COMPOSE) up --exit-code-from=client1 --build
|
||||
# Test Cluster backup and restore
|
||||
backuptests-build: vendor
|
||||
docker-compose -f docker-compose-3.yml down
|
||||
docker-compose -f docker-compose-3.yml build
|
||||
|
||||
backuptests: vendor
|
||||
docker-compose -f docker-compose-3.yml down -v
|
||||
docker-compose -f docker-compose-3.yml up --exit-code-from=client1 --abort-on-container-exit
|
||||
|
||||
|
||||
# Install Pilosa
|
||||
install:
|
||||
|
|
|
|||
|
|
@ -1,97 +0,0 @@
|
|||
version: "3"
|
||||
services:
|
||||
pilosa0:
|
||||
image: build/pilosa
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.pilosa
|
||||
environment:
|
||||
PILOSA_ADVERTISE: pilosa0:10101
|
||||
PILOSA_ADVERTISE_GRPC: pilosa0:20101
|
||||
PILOSA_CLUSTER_REPLICAS: 1
|
||||
PILOSA_DATA_DIR: /data/pilosa0
|
||||
PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosa0:10201
|
||||
PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosa0:10301
|
||||
PILOSA_ETCD_INITIAL_CLUSTER: pilosa0=http://pilosa0:10301,pilosa1=http://pilosa1:10301,pilosa2=http://pilosa2:10301
|
||||
PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201
|
||||
PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301
|
||||
PILOSA_NAME: pilosa0
|
||||
PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf}
|
||||
volumes:
|
||||
- data:/data
|
||||
healthcheck:
|
||||
test: x=$$(curl -s localhost:10101/status | jq -r ".state") && [[ "$$x" == "NORMAL" ]] || $$(exit 1)
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
pilosa1:
|
||||
image: build/pilosa
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.pilosa
|
||||
environment:
|
||||
PILOSA_ADVERTISE: pilosa1:10101
|
||||
PILOSA_ADVERTISE_GRPC: pilosa1:20101
|
||||
PILOSA_CLUSTER_REPLICAS: 1
|
||||
PILOSA_DATA_DIR: /data/pilosa1
|
||||
PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosa1:10201
|
||||
PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosa1:10301
|
||||
PILOSA_ETCD_INITIAL_CLUSTER: pilosa0=http://pilosa0:10301,pilosa1=http://pilosa1:10301,pilosa2=http://pilosa2:10301
|
||||
PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201
|
||||
PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301
|
||||
PILOSA_NAME: pilosa1
|
||||
PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf}
|
||||
volumes:
|
||||
- data:/data
|
||||
pilosa2:
|
||||
image: build/pilosa
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.pilosa
|
||||
environment:
|
||||
PILOSA_ADVERTISE: pilosa2:10101
|
||||
PILOSA_ADVERTISE_GRPC: pilosa2:20101
|
||||
PILOSA_CLUSTER_REPLICAS: 1
|
||||
PILOSA_DATA_DIR: /data/pilosa2
|
||||
PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosa2:10201
|
||||
PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosa2:10301
|
||||
PILOSA_ETCD_INITIAL_CLUSTER: pilosa0=http://pilosa0:10301,pilosa1=http://pilosa1:10301,pilosa2=http://pilosa2:10301
|
||||
PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201
|
||||
PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301
|
||||
PILOSA_NAME: pilosa2
|
||||
PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf}
|
||||
volumes:
|
||||
- data:/data
|
||||
pilosax:
|
||||
image: build/pilosa
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.pilosa
|
||||
environment:
|
||||
PILOSA_ADVERTISE: pilosax:10101
|
||||
PILOSA_ADVERTISE_GRPC: pilosax:20101
|
||||
PILOSA_CLUSTER_REPLICAS: 1
|
||||
PILOSA_DATA_DIR: /data/pilosax
|
||||
PILOSA_ETCD_ADVERTISE_CLIENT_ADDRESS: http://pilosax:10201
|
||||
PILOSA_ETCD_ADVERTISE_PEER_ADDRESS: http://pilosax:10301
|
||||
PILOSA_ETCD_INITIAL_CLUSTER: pilosax=http://pilosax:10301
|
||||
PILOSA_ETCD_LISTEN_CLIENT_ADDRESS: http://0.0.0.0:10201
|
||||
PILOSA_ETCD_LISTEN_PEER_ADDRESS: http://0.0.0.0:10301
|
||||
PILOSA_NAME: pilosax
|
||||
PILOSA_STORAGE_BACKEND: ${PILOSA_STORAGE_BACKEND:-rbf}
|
||||
volumes:
|
||||
- data:/data
|
||||
client1:
|
||||
image: tgruben/bash
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.runner
|
||||
environment:
|
||||
- GO111MODULE=on
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
depends_on:
|
||||
- pilosa0
|
||||
|
||||
volumes:
|
||||
data:
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
declare STATUS="NORMAL"
|
||||
declare TIMEOUT=30
|
||||
sleep 4
|
||||
STATUS=$STATUS timeout -s TERM $TIMEOUT bash -c \
|
||||
'while [[ ${STATUS_RECEIVED} != ${STATUS} ]];\
|
||||
do STATUS_RECEIVED=$(curl --connect-timeout 1 -s pilosa0:10101/status | jq -r ".state") && \
|
||||
echo "received status: $STATUS_RECEIVED" && \
|
||||
sleep 1;\
|
||||
done;'
|
||||
echo "NOW DO STUFF"
|
||||
datagen --source kitchensink_keyed -e 9999 --pilosa.index sink --pilosa.batch-size 10000 --pilosa.hosts pilosa0:10101
|
||||
before=$(/featurebase chksum --host pilosa0:10101)
|
||||
/featurebase backup -o backupdir --host pilosa0:10101
|
||||
curl -X DELETE -s pilosa0:10101/index/sink
|
||||
/featurebase restore -s backupdir --host pilosa0:10101
|
||||
after=$(/featurebase chksum --host pilosa0:10101)
|
||||
if [ "$before" = "$after" ]; then
|
||||
echo "PASS Cluster"
|
||||
else
|
||||
echo "FAIL Single"
|
||||
exit 1
|
||||
fi
|
||||
/featurebase restore -s backupdir --host pilosax:10101
|
||||
single=$(/featurebase chksum --host pilosax:10101)
|
||||
if [ "$before" = "$single" ]; then
|
||||
echo "PASS Single"
|
||||
exit 0
|
||||
else
|
||||
echo "FAIL Single"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
datagen --source texas_health -e 9999 --pilosa.index newsink --pilosa.batch-size 10000 --pilosa.hosts pilosa0:10101
|
||||
before=$(/featurebase chksum --host pilosa0:10101)
|
||||
/featurebase backup -o newbackupdir --host pilosa0:10101 --index newsink
|
||||
curl -X DELETE -s pilosa0:10101/index/newsink
|
||||
/featurebase restore -s newbackupdir --host pilosa0:10101
|
||||
after=$(/featurebase chksum --host pilosa0:10101)
|
||||
if [ "$before" = "$after" ]; then
|
||||
echo "PASS Cluster Table"
|
||||
else
|
||||
echo "FAIL Single Table"
|
||||
exit 1
|
||||
fi
|
||||
/featurebase restore -s newbackupdir --host pilosax:10101
|
||||
single=$(/featurebase chksum --host pilosax:10101)
|
||||
if [ "$before" = "$single" ]; then
|
||||
echo "PASS Single Table"
|
||||
exit 0
|
||||
else
|
||||
echo "FAIL Single Table"
|
||||
exit 1
|
||||
fi
|
||||
Loading…
Add table
Reference in a new issue