Skip to content

Commit

Permalink
Add development docker build make job (#2030)
Browse files Browse the repository at this point in the history
  • Loading branch information
robskillington authored Oct 30, 2019
1 parent 1461ce6 commit 9906249
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
23 changes: 21 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,22 @@ endif
$(SERVICE)-linux-amd64:
$(LINUX_AMD64_ENV) make $(SERVICE)

.PHONY: $(SERVICE)-docker-dev
$(SERVICE)-docker-dev: clean-build $(SERVICE)-linux-amd64
mkdir -p ./bin/config

# Hacky way to find all configs and put into ./bin/config/
find ./src | fgrep config | fgrep ".yml" | xargs -I{} cp {} ./bin/config/
find ./src | fgrep config | fgrep ".yaml" | xargs -I{} cp {} ./bin/config/

# Build development docker image
docker build -t $(SERVICE):dev -t quay.io/m3dbtest/$(SERVICE):dev-$(USER) -f ./docker/$(SERVICE)/development.Dockerfile ./bin

.PHONY: $(SERVICE)-docker-dev-push
$(SERVICE)-docker-dev-push: $(SERVICE)-docker-dev
docker push quay.io/m3dbtest/$(SERVICE):dev-$(USER)
@echo "Pushed quay.io/m3dbtest/$(SERVICE):dev-$(USER)"

endef

$(foreach SERVICE,$(SERVICES),$(eval $(SERVICE_RULES)))
Expand Down Expand Up @@ -471,10 +487,13 @@ fossa: install-tools
fossa-test: fossa
PATH=$(combined_bin_paths):$(PATH) fossa test

.PHONY: clean-build
clean-build:
@rm -rf $(BUILD)

.PHONY: clean
clean:
clean: clean-build
@rm -f *.html *.xml *.out *.test
@rm -rf $(BUILD)
@rm -rf $(VENDOR)
@rm -rf ./src/ctl/ui/build

Expand Down
13 changes: 13 additions & 0 deletions docker/m3dbnode/development.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM alpine:latest
LABEL maintainer="The M3DB Authors <m3db@googlegroups.com>"

RUN apk add --no-cache curl jq

# Add m3dbnode binary
ADD ./m3dbnode /bin/m3dbnode
ADD ./config/m3dbnode-local-etcd.yml /etc/m3dbnode/m3dbnode.yml

EXPOSE 2379/tcp 2380/tcp 7201/tcp 7203/tcp 9000-9004/tcp

ENTRYPOINT [ "/bin/m3dbnode" ]
CMD [ "-f", "/etc/m3dbnode/m3dbnode.yml" ]
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ spec:
- name: PROMREMOTEBENCH_LABELS_JSON_ENV
value: '{"generator":"PROMREMOTEBENCH_POD_NAME"}'
- name: PROMREMOTEBENCH_QUERY
value: "true"
value: "false"
- name: PROMREMOTEBENCH_QUERY_TARGET
value: http://m3coordinator-dedicated-test-cluster:7201/api/v1/query_range
- name: PROMREMOTEBENCH_QUERY_CONCURRENCY
Expand Down

0 comments on commit 9906249

Please sign in to comment.