Skip to content

Commit 2e4563a

Browse files
authored
Merge pull request #268 from CovenantSQL/feature/remove_observer
Remove cql-observer bin file and all related code.
2 parents f4b2050 + 3a1cf7b commit 2e4563a

14 files changed

Lines changed: 30 additions & 1308 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
- REVIEWDOG_VERSION=0.9.11
88
language: go
99
go:
10-
- '1.10.x'
10+
- '1.11.x'
1111

1212
os:
1313
- linux

Makefile

Lines changed: 12 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ use_all_cores:
1717

1818
BUILDER := covenantsql/covenantsql-builder
1919
IMAGE := covenantsql/covenantsql
20-
OB_IMAGE := covenantsql/covenantsql-observer
2120

2221
GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
2322
GIT_DIRTY ?= $(shell test -n "`git status --porcelain`" && echo "+CHANGES" || true)
@@ -41,7 +40,7 @@ builder: status
4140
-f docker/builder.Dockerfile \
4241
.
4342

44-
runner: builder
43+
docker: builder
4544
docker build \
4645
--tag $(IMAGE):$(VERSION) \
4746
--tag $(IMAGE):latest \
@@ -50,24 +49,11 @@ runner: builder
5049
-f docker/Dockerfile \
5150
.
5251

53-
observer_docker: builder
54-
docker build \
55-
--tag $(OB_IMAGE):$(VERSION) \
56-
--tag $(OB_IMAGE):latest \
57-
--build-arg COMMIT=$(COMMIT) \
58-
--build-arg VERSION=$(VERSION) \
59-
-f docker/observer.Dockerfile \
60-
.
61-
62-
docker: runner observer_docker
63-
6452
docker_clean: status
6553
docker rmi -f $(BUILDER):latest
6654
docker rmi -f $(IMAGE):latest
67-
docker rmi -f $(OB_IMAGE):latest
6855
docker rmi -f $(BUILDER):$(VERSION)
6956
docker rmi -f $(IMAGE):$(VERSION)
70-
docker rmi -f $(OB_IMAGE):$(VERSION)
7157

7258

7359
save: status
@@ -89,27 +75,19 @@ logs:
8975
docker-compose logs -f --tail=10
9076

9177
push_testnet:
92-
docker tag $(OB_IMAGE):$(VERSION) $(OB_IMAGE):testnet
93-
docker push $(OB_IMAGE):testnet
9478
docker tag $(IMAGE):$(VERSION) $(IMAGE):testnet
9579
docker push $(IMAGE):testnet
9680

9781
push_bench:
98-
docker tag $(OB_IMAGE):$(VERSION) $(OB_IMAGE):bench
99-
docker push $(OB_IMAGE):bench
10082
docker tag $(IMAGE):$(VERSION) $(IMAGE):bench
10183
docker push $(IMAGE):bench
10284

10385
push_staging:
104-
docker tag $(OB_IMAGE):$(VERSION) $(OB_IMAGE):staging
105-
docker push $(OB_IMAGE):staging
10686
docker tag $(IMAGE):$(VERSION) $(IMAGE):staging
10787
docker push $(IMAGE):staging
10888

10989

11090
push:
111-
docker push $(OB_IMAGE):$(VERSION)
112-
docker push $(OB_IMAGE):latest
11391
docker push $(IMAGE):$(VERSION)
11492
docker push $(IMAGE):latest
11593

@@ -162,18 +140,6 @@ bin/cql-minerd:
162140
-o bin/cql-minerd \
163141
github.com/CovenantSQL/CovenantSQL/cmd/cql-minerd
164142

165-
bin/cql-observer.test:
166-
$(GOTEST) \
167-
-ldflags "$(ldflags_role_client)" \
168-
-o bin/cql-observer.test \
169-
github.com/CovenantSQL/CovenantSQL/cmd/cql-observer
170-
171-
bin/cql-observer:
172-
$(GOBUILD) \
173-
-ldflags "$(ldflags_role_client)" \
174-
-o bin/cql-observer \
175-
github.com/CovenantSQL/CovenantSQL/cmd/cql-observer
176-
177143
bin/cql-utils:
178144
$(GOBUILD) \
179145
-ldflags "$(ldflags_role_client_simple_log)" \
@@ -186,6 +152,13 @@ bin/cql:
186152
-o bin/cql \
187153
github.com/CovenantSQL/CovenantSQL/cmd/cql
188154

155+
bin/cql.test:
156+
$(GOTEST) \
157+
-ldflags "$(ldflags_role_client)" \
158+
-o bin/cql.test \
159+
github.com/CovenantSQL/CovenantSQL/cmd/cql
160+
161+
189162
bin/cql-fuse:
190163
$(GOBUILD) \
191164
-ldflags "$(ldflags_role_client_simple_log)" \
@@ -210,27 +183,19 @@ bin/cql-faucet:
210183
-o bin/cql-faucet \
211184
github.com/CovenantSQL/CovenantSQL/cmd/cql-faucet
212185

213-
bin/cql-explorer:
214-
$(GOBUILD) \
215-
-ldflags "$(ldflags_role_client)" \
216-
-o bin/cql-explorer \
217-
github.com/CovenantSQL/CovenantSQL/cmd/cql-explorer
218-
219186
bp: bin/cqld.test bin/cqld
220187

221188
miner: bin/cql-minerd.test bin/cql-minerd
222189

223-
observer: bin/cql-observer.test bin/cql-observer
224-
225-
client: bin/cql-utils bin/cql bin/cql-fuse bin/cql-adapter bin/cql-mysql-adapter bin/cql-faucet bin/cql-explorer
190+
client: bin/cql-utils bin/cql bin/cql.test bin/cql-fuse bin/cql-adapter bin/cql-mysql-adapter bin/cql-faucet
226191

227-
all: bp miner observer client
192+
all: bp miner client
228193

229194
clean:
230195
rm -rf bin/cql*
231196
rm -f *.cover.out
232197
rm -f coverage.txt
233198

234199
.PHONY: status start stop logs push push_testnet clean \
235-
bin/cqld.test bin/cqld bin/cql-minerd.test bin/cql-minerd bin/cql-utils bin/cql-observer bin/cql-observer.test \
236-
bin/cql bin/cql-fuse bin/cql-adapter bin/cql-mysql-adapter bin/cql-faucet bin/cql-explorer
200+
bin/cqld.test bin/cqld bin/cql-minerd.test bin/cql-minerd bin/cql-utils \
201+
bin/cql bin/cql.test bin/cql-fuse bin/cql-adapter bin/cql-mysql-adapter bin/cql-faucet

alltest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set -o nounset
66

77
main() {
88
make clean
9-
make -j6 bp miner observer
9+
make -j5 bp miner bin/cql.test
1010

1111
go test -tags "$UNITTESTTAGS" -race -failfast -parallel 16 -cpu 16 -coverprofile main.cover.out $(go list ./... | grep -v CovenantSQL/api)
1212
go test -tags "$UNITTESTTAGS" -race -failfast -parallel 16 -cpu 16 -coverpkg ./api/...,./rpc/jsonrpc -coverprofile api.cover.out ./api/...

bin/docker-entry.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ blockproducer)
1212
exec /app/cqld -config "${COVENANT_CONF}" -metric-web "${METRIC_WEB_ADDR}" "${@}"
1313
;;
1414
observer)
15-
MAGIC_DOLLAR='$' envsubst < /etc/nginx/conf.d/servers/explorer.conf.template > /etc/nginx/conf.d/default.conf
16-
nginx -g 'daemon off;' </dev/null &
17-
exec /app/cql-observer -config "${COVENANT_CONF}" -listen "${COVENANTSQL_OBSERVER_ADDR}"
15+
exec /app/cql -config "${COVENANT_CONF}" -web "${COVENANTSQL_OBSERVER_ADDR}" "${@}"
1816
;;
1917
adapter)
2018
exec /app/cql-adapter -config "${COVENANT_CONF}" "${@}"
@@ -28,8 +26,5 @@ cli)
2826
faucet)
2927
exec /app/cql-faucet -config ${COVENANT_CONF} "${@}"
3028
;;
31-
explorer)
32-
exec /app/cql-explorer -config ${COVENANT_CONF} "${@}"
33-
;;
3429
esac
3530

cmd/cql-explorer/README.md

Lines changed: 0 additions & 182 deletions
This file was deleted.

0 commit comments

Comments
 (0)