SHELL = $(warning [$@])$(OLD_SHELL) -x
endif
-all: skydns-image skydock-image api-image compute-image doc-image workbench-image keep-image sso-image shell-image
+all: skydns-image skydock-image api-image compute-image doc-image workbench-image keep-image keep-proxy-image sso-image shell-image
IMAGE_FILES := $(shell ls *-image 2>/dev/null |grep -v -E 'debian-arvados-image|skydns-image|skydock-image')
GENERATED_DIRS := $(shell ls */generated 2>/dev/null)
DEBIAN_IMAGE := $(shell $(DOCKER) images -q arvados/debian |head -n1)
-REALCLEAN_CONTAINERS := $(shell $(DOCKER) ps -a |grep -e arvados -e api_server -e keep_server -e doc_server -e workbench_server |cut -f 1 -d' ')
+REALCLEAN_CONTAINERS := $(shell $(DOCKER) ps -a |grep -e arvados -e api_server -e keep_server -e keep_proxy_server -e doc_server -e workbench_server |cut -f 1 -d' ')
REALCLEAN_IMAGES := $(shell $(DOCKER) images -q arvados/* |grep -v $(DEBIAN_IMAGE) 2>/dev/null)
DEEPCLEAN_IMAGES := $(shell $(DOCKER) images -q arvados/*)
SKYDNS_CONTAINERS := $(shell $(DOCKER) ps -a |grep -e crosbymichael/skydns -e crosbymichael/skydock |cut -f 1 -d' ')
JOBS_DEPS = jobs/Dockerfile
+ARV_WEB_DEPS = arv-web/Dockerfile arv-web/apache2_foreground.sh arv-web/apache2_vhost
+
JAVA_BWA_SAMTOOLS_DEPS = java-bwa-samtools/Dockerfile
API_DEPS = api/* config.yml $(API_GENERATED)
COMPUTE_DEPS = compute/* config.yml $(COMPUTE_GENERATED)
-DOC_DEPS = doc/Dockerfile doc/apache2_vhost
+DOC_DEPS = doc/Dockerfile $(DOC_GENERATED)
WORKBENCH_DEPS = workbench/Dockerfile \
config.yml \
KEEP_DEPS = keep/Dockerfile config.yml $(KEEP_GENERATED)
+KEEP_PROXY_DEPS = keepproxy/Dockerfile config.yml $(KEEP_PROXY_GENERATED)
+
SSO_DEPS = config.yml $(SSO_GENERATED)
BCBIO_NEXTGEN_DEPS = bcbio-nextgen/Dockerfile
KEEP_GENERATED_IN = keep/*.in
KEEP_GENERATED = keep/generated/*
+KEEP_PROXY_GENERATED_IN = keepproxy/*.in
+KEEP_PROXY_GENERATED = keepproxy/generated/*
+
API_GENERATED_IN = api/*.in
API_GENERATED = api/generated/*
SSO_GENERATED_IN = sso/*.in
SSO_GENERATED = sso/generated/*
+DOC_GENERATED_IN = doc/*.in
+DOC_GENERATED = doc/generated/*
+
KEEP_DEPS += keep/generated/bin/keepproxy
KEEP_DEPS += keep/generated/bin/keepstore
keep/generated/bin/%: $(wildcard build/services/%/*.go)
ln -sfn ../../../../.. keep/generated/src/git.curoverse.com/arvados.git
GOPATH=$(shell pwd)/keep/generated go get $(@:keep/generated/bin/%=git.curoverse.com/arvados.git/services/%)
+KEEP_PROXY_DEPS += keepproxy/generated/bin/keepproxy
+keepproxy/generated/bin/%: $(wildcard build/services/%/*.go)
+ mkdir -p keepproxy/generated/src/git.curoverse.com
+ ln -sfn ../../../../.. keepproxy/generated/src/git.curoverse.com/arvados.git
+ GOPATH=$(shell pwd)/keepproxy/generated go get $(@:keepproxy/generated/bin/%=git.curoverse.com/arvados.git/services/%)
+
$(BUILD):
mkdir -p build
rsync -rlp --exclude=docker/ --exclude='**/log/*' --exclude='**/tmp/*' \
$(SSO_GENERATED): $(SSO_GENERATED_IN)
$(CONFIG_RB) sso
+$(DOC_GENERATED): $(DOC_GENERATED_IN)
+ $(CONFIG_RB) doc
+
$(KEEP_GENERATED): $(KEEP_GENERATED_IN)
$(CONFIG_RB) keep
-# The docker build -q option suppresses verbose build output.
-# Necessary to prevent failure on building warehouse; see
-# https://github.com/dotcloud/docker/issues/3172
-DOCKER_BUILD = $(DOCKER) build -q --rm=true
+$(KEEP_PROXY_GENERATED): $(KEEP_PROXY_GENERATED_IN)
+ $(CONFIG_RB) keepproxy
+
+DOCKER_BUILD = $(DOCKER) build --rm=true
# ============================================================
# The main Arvados servers: api, doc, workbench, compute
$(DOCKER_BUILD) -t arvados/keep keep
date >keep-image
+keep-proxy-image: debian-arvados-image $(BUILD) $(KEEP_PROXY_DEPS)
+ @echo "Building keep-proxy-image"
+ $(DOCKER_BUILD) -t arvados/keepproxy keepproxy
+ date >keep-proxy-image
+
jobs-image: base-image $(BUILD) $(JOBS_DEPS)
$(DOCKER_BUILD) -t arvados/jobs jobs
date >jobs-image
$(DOCKER_BUILD) -t arvados/sso sso
date >sso-image
+arv-web-image: passenger-image $(ARV_WEB_DEPS)
+ $(DOCKER_BUILD) -t arvados/arv-web arv-web
+ date >arv-web-image
+
# ============================================================
# The arvados/base image is the base Debian image plus packages
# that are dependencies for every Arvados service.