Skip to content

Commit 82b4029

Browse files
committed
ref(*): slim down to just client and controller
1 parent fa449ed commit 82b4029

4 files changed

Lines changed: 15 additions & 133 deletions

File tree

Makefile

Lines changed: 12 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,38 @@
11
include ../includes.mk
22

3-
.PHONY: all test logs
4-
5-
all: build run
6-
7-
SHELL_SCRIPTS = $(wildcard bin/*) $(shell find "." -name '*.sh')
8-
93
COMPONENT = controller
104
IMAGE = $(IMAGE_PREFIX)$(COMPONENT):$(BUILD_TAG)
11-
DEV_IMAGE = $(REGISTRY)$(IMAGE)
5+
SHELL_SCRIPTS = $(wildcard bin/*) $(shell find "." -name '*.sh')
126

137
build: check-docker
148
docker build -t $(IMAGE) .
159

16-
clean: check-docker check-registry
10+
clean: check-docker
1711
docker rmi $(IMAGE)
1812

19-
full-clean: check-docker check-registry
13+
full-clean: check-docker
2014
docker images -q $(IMAGE_PREFIX)$(COMPONENT) | xargs docker rmi -f
2115

22-
install: check-deisctl
23-
deisctl install $(COMPONENT)
24-
25-
uninstall: check-deisctl
26-
deisctl uninstall $(COMPONENT)
27-
28-
start: check-deisctl
29-
deisctl start $(COMPONENT)
30-
31-
stop: check-deisctl
32-
deisctl stop $(COMPONENT)
33-
34-
restart: stop start
35-
36-
run: install start
37-
38-
dev-release: push set-image
39-
40-
push: check-registry
41-
docker tag -f $(IMAGE) $(DEV_IMAGE)
42-
docker push $(DEV_IMAGE)
43-
44-
set-image: check-deisctl
45-
deisctl config $(COMPONENT) set image=$(DEV_IMAGE)
46-
47-
release:
48-
docker push $(IMAGE)
49-
50-
deploy: build dev-release restart
51-
52-
runserver:
53-
python manage.py runserver
54-
5516
postgres:
56-
docker start postgres || docker run --restart="always" -d -p 5432:5432 --name postgres postgres:9.4.1
17+
docker start postgres || docker run --restart="always" -d -p 5432:5432 --name postgres postgres:9.3
5718
docker exec postgres createdb -U postgres deis 2>/dev/null || true
5819
@echo "To use postgres for local development:"
5920
@echo " export PGHOST=`docker-machine ip $$(docker-machine active) 2>/dev/null || echo 127.0.0.1`"
6021
@echo " export PGPORT=5432"
6122
@echo " export PGUSER=postgres"
6223

63-
db:
64-
python manage.py syncdb --migrate --noinput
65-
66-
coverage:
67-
coverage run manage.py test --noinput api
68-
coverage html
69-
70-
test: test-unit test-functional
71-
7224
setup-venv:
7325
@if [ ! -d venv ]; then virtualenv venv; fi
7426
venv/bin/pip install --disable-pip-version-check -q -r requirements.txt -r dev_requirements.txt
7527

76-
test-style: setup-venv
77-
venv/bin/flake8 --show-pep8 --show-source
28+
test: test-style test-unit
29+
30+
test-style:
31+
flake8 --show-pep8 --show-source
7832
shellcheck $(SHELL_SCRIPTS)
7933

80-
test-unit: setup-venv test-style
81-
venv/bin/coverage run manage.py test --noinput web registry api
82-
venv/bin/coverage report -m
34+
test-unit:
35+
coverage run manage.py test --noinput web registry api
36+
coverage report -m
8337

84-
test-functional:
85-
@$(MAKE) -C ../tests/ test-etcd
86-
@$(MAKE) -C ../tests/ test-postgresql
87-
GOPATH=`cd ../tests/ && godep path`:$(GOPATH) go test -v ./tests/...
38+
.PHONY: build clean full-clean postgres setup-venv test test-style test-unit

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This Docker image is based on the official
77
[alpine:3.2](https://registry.hub.docker.com/_/alpine/) image.
88

99
Please add any [issues](https://github.com/deis/deis/issues) you find with this software to
10-
the [Deis Project](https://github.com/deis/deis).
10+
the [Deis Workflow v2 Project](https://github.com/deis/workflow).
1111

1212
## Usage
1313

bin/boot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ sleep $((ETCD_TTL+1))
2626

2727
function etcd_set_default {
2828
set +e
29-
ERROR="$(etcdctl --no-sync -C "$ETCD" mk "$ETCD_PATH/$1" "$2" 2>&1 >/dev/null)"
29+
ERROR="$(etcdctl --no-sync -C "$ETCD" mk "$ETCD_PATH/$1" "$2" >/dev/null 2>&1)"
3030

3131
if [[ $? -ne 0 ]] && echo "$ERROR" | grep -iqve "key already exists"; then
3232
echo "etcd_set_default: an etcd error occurred ($ERROR)"
@@ -38,7 +38,7 @@ function etcd_set_default {
3838

3939
function etcd_safe_mkdir {
4040
set +e
41-
ERROR="$(etcdctl --no-sync -C "$ETCD" mkdir "$1" 2>&1 >/dev/null)"
41+
ERROR="$(etcdctl --no-sync -C "$ETCD" mkdir "$1" >/dev/null 2>&1)"
4242

4343
if [[ $? -ne 0 ]] && echo "$ERROR" | grep -iqve "key already exists"; then
4444
echo "etcd_safe_mkdir: an etcd error occurred ($ERROR)"

tests/controller_test.go

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

0 commit comments

Comments
 (0)