Merge branch 'master' into 3106-modal-loading-indicator
[arvados.git] / docker / build_tools / Makefile
index 69db746326767729c5eacaa728db905400a7929a..d01f955b0c3e370c759bc4edb88b11f4cc323735 100644 (file)
@@ -1,4 +1,4 @@
-all: api-image doc-image workbench-image warehouse-image sso-image
+all: api-image doc-image workbench-image keep-image sso-image
 
 # `make clean' removes the files generated in the build directory
 # but does not remove any docker images generated in previous builds
@@ -10,9 +10,9 @@ clean:
 # `make realclean' will also remove the docker images and force
 # subsequent makes to build the entire chain from the ground up
 realclean: clean
-       -[ -n "`docker ps -q`" ] && docker stop `docker ps -q`
-       -docker rm `docker ps -a -q`
-       -docker rmi `docker images -q`
+       -[ -n "`$(DOCKER) ps -q`" ] && $(DOCKER) stop `$(DOCKER) ps -q`
+       -$(DOCKER) rm `$(DOCKER) ps -a -q`
+       -$(DOCKER) rmi `$(DOCKER) images -q`
 
 # ============================================================
 # Dependencies for */generated files which are prerequisites
@@ -26,6 +26,8 @@ BASE_DEPS = base/Dockerfile $(BASE_GENERATED)
 
 JOBS_DEPS = jobs/Dockerfile
 
+JAVA_BWA_SAMTOOLS_DEPS = java-bwa-samtools/Dockerfile
+
 API_DEPS = api/Dockerfile $(API_GENERATED)
 
 DOC_DEPS = doc/Dockerfile doc/apache2_vhost
@@ -34,12 +36,12 @@ WORKBENCH_DEPS = workbench/Dockerfile \
                  workbench/passenger.conf \
                  $(WORKBENCH_GENERATED)
 
-WAREHOUSE_DEPS = warehouse/Dockerfile \
-                 warehouse/supervisor.conf \
-                 $(WAREHOUSE_GENERATED)
+KEEP_DEPS = keep/Dockerfile
 
 SSO_DEPS = sso/passenger.conf $(SSO_GENERATED)
 
+BCBIO_NEXTGEN_DEPS = bcbio-nextgen/Dockerfile
+
 BASE_GENERATED = base/generated/arvados.tar.gz
 
 API_GENERATED = \
@@ -47,8 +49,7 @@ API_GENERATED = \
         api/generated/config_databases.sh \
         api/generated/database.yml \
         api/generated/omniauth.rb \
-        api/generated/production.rb \
-        api/generated/secret_token.rb \
+        api/generated/application.yml \
         api/generated/superuser_token
 
 API_GENERATED_IN = \
@@ -56,23 +57,16 @@ API_GENERATED_IN = \
         api/config_databases.sh.in \
         api/database.yml.in \
         api/omniauth.rb.in \
-        api/production.rb.in \
-        api/secret_token.rb.in \
+        api/application.yml.in \
         api/superuser_token.in
 
 WORKBENCH_GENERATED = \
         workbench/generated/apache2_vhost \
-        workbench/generated/production.rb \
-        workbench/generated/secret_token.rb
+        workbench/generated/application.yml
 
 WORKBENCH_GENERATED_IN = \
         workbench/apache2_vhost.in \
-        workbench/production.rb.in \
-        workbench/secret_token.rb.in
-
-WAREHOUSE_GENERATED = warehouse/generated/warehouse.conf
-
-WAREHOUSE_GENERATED_IN = warehouse/warehouse.conf.in
+        workbench/application.yml.in
 
 SSO_GENERATED = \
         sso/generated/apache2_vhost \
@@ -89,7 +83,8 @@ $(BUILD):
        rsync -rlp --exclude=docker/ --exclude='**/log/*' --exclude='**/tmp/*' \
                --chmod=Da+rx,Fa+rX ../ build/
        find build/ -name \*.gem -delete
-       cd build/sdk/python/ && ./build.sh
+       cd build/services/fuse/ && python setup.py build
+       cd build/sdk/python/ && python setup.py build
        cd build/sdk/cli && gem build arvados-cli.gemspec
        cd build/sdk/ruby && gem build arvados.gemspec
        touch build/.buildstamp
@@ -114,7 +109,7 @@ $(SSO_GENERATED): config.yml $(SSO_GENERATED_IN)
 # 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
+DOCKER_BUILD = $(DOCKER) build -q
 
 # ============================================================
 # The main Arvados servers: api, doc, workbench, warehouse
@@ -131,10 +126,24 @@ doc-image: base-image $(BUILD) $(DOC_DEPS)
        $(DOCKER_BUILD) -t arvados/doc doc
        date >doc-image
 
+keep-image: debian-image $(BUILD) $(KEEP_DEPS)
+       $(DOCKER_BUILD) -t arvados/keep keep
+       date >keep-image
+
 jobs-image: base-image $(BUILD) $(JOBS_DEPS)
        $(DOCKER_BUILD) -t arvados/jobs jobs
        date >jobs-image
 
+java-bwa-samtools-image: jobs-image $(BUILD) $(JAVA_BWA_SAMTOOLS_DEPS)
+       $(DOCKER_BUILD) -t arvados/jobs-java-bwa-samtools java-bwa-samtools
+       date >java-bwa-samtools-image
+
+bcbio-nextgen-image: $(BUILD) $(BASE_GENERATED) $(BCBIO_NEXTGEN_DEPS)
+       rm -rf bcbio-nextgen/generated
+       cp -r base/generated bcbio-nextgen
+       $(DOCKER_BUILD) -t arvados/bcbio-nextgen bcbio-nextgen
+       date >bcbio-nextgen-image
+
 workbench-image: passenger-image $(BUILD) $(WORKBENCH_DEPS)
        mkdir -p workbench/generated
        tar -czf workbench/generated/workbench.tar.gz -C build/apps workbench