-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [batch2] batch2 prototype * fix n_jobs change in batch * fix pipeline lint error * fix msg in pipeline * increase timeout for test_batch2
- Loading branch information
Showing
63 changed files
with
5,593 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
import os | ||
import asyncio | ||
import aiohttp | ||
import unittest | ||
from hailtop.batch_client.aioclient import BatchClient | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
FROM {{ service_base_image.image }} | ||
|
||
COPY batch2/run-worker.sh / | ||
|
||
COPY batch2/setup.py batch2/MANIFEST.in /batch/ | ||
COPY batch2/batch /batch/batch/ | ||
RUN pip3 install --no-cache-dir /batch && \ | ||
rm -rf /batch | ||
|
||
EXPOSE 5000 | ||
|
||
CMD ["python3", "-m", "batch.batch"] | ||
CMD ["python3", "-m", "batch"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM {{ batch_image.image }} | ||
|
||
COPY pylintrc pylintrc | ||
RUN python3 -m pip install --no-cache-dir \ | ||
pylint==2.3.1 \ | ||
flake8==3.7.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM {{ base_image.image }} | ||
|
||
COPY create-batch-tables.sql . | ||
COPY delete-batch-tables.sql . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM {{ base_image.image }} | ||
|
||
COPY hail/python/setup-hailtop.py /hailtop/setup.py | ||
COPY hail/python/hailtop /hailtop/hailtop/ | ||
RUN python3 -m pip install --no-cache-dir /hailtop \ | ||
&& rm -rf /hailtop | ||
|
||
COPY batch2/test/ /test/ | ||
RUN python3 -m pip install --no-cache-dir \ | ||
pytest-instafail==0.4.1 \ | ||
pytest-xdist==1.29.0 \ | ||
pytest-asyncio==0.10.0 | ||
|
||
CMD ["python3", "-m", "pytest", "-s", "-v", "--instafail", "-n", "1", "-k", "not test_scale", "/test/"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
recursive-include batch/templates * | ||
recursive-include batch/static * | ||
recursive-include batch/js * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
PROJECT := $(shell gcloud config get-value project) | ||
|
||
BATCH2_LATEST = gcr.io/$(PROJECT)/batch2:latest | ||
BATCH2_IMAGE = gcr.io/$(PROJECT)/batch2:$(shell docker images -q --no-trunc batch2 | sed -e 's,[^:]*:,,') | ||
|
||
PY_FILES = $(shell find batch -iname \*.py -not -exec git check-ignore -q {} \; -print) | ||
|
||
PYTHONPATH := $${PYTHONPATH:+$${PYTHONPATH}:}../gear | ||
PYTHON := PYTHONPATH=$(PYTHONPATH) python3 | ||
|
||
flake8-stmp: $(PY_FILES) | ||
$(PYTHON) -m flake8 --config ../setup.cfg batch | ||
touch $@ | ||
|
||
pylint-stmp: $(PY_FILES) | ||
$(PYTHON) -m pylint --rcfile ../pylintrc batch --score=n | ||
touch $@ | ||
|
||
check: flake8-stmp pylint-stmp | ||
|
||
build: | ||
make -C ../docker build | ||
-docker pull $(BATCH2_LATEST) | ||
python3 ../ci/jinja2_render.py '{"service_base_image":{"image":"service-base"}}' Dockerfile Dockerfile.out | ||
docker build -t batch2 -f Dockerfile.out --cache-from batch2,$(BATCH2_LATEST),service-base .. | ||
|
||
push: build | ||
docker tag batch2 $(BATCH2_LATEST) | ||
docker push $(BATCH2_LATEST) | ||
docker tag batch $(BATCH2_IMAGE) | ||
docker push $(BATCH2_IMAGE) | ||
|
||
deploy: push | ||
python3 ../ci/jinja2_render.py '{"code":{"sha":"$(shell git rev-parse --short=12 HEAD)"},"deploy":true,"batch2_image":{"image":"$(BATCH2_IMAGE)"},"batch_pods_ns":{"name":"batch-pods"},"batch_database":{"user_secret_name":"sql-batch-batch-admin-config"},"global":{"domain":"$(DOMAIN)"}}' deployment.yaml deployment.yaml.out | ||
kubectl -n default apply -f deployment.yaml.out | ||
|
||
clean: | ||
rm -f flake8-stmp pylint-stmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from aiohttp import web | ||
|
||
from hailtop.config import get_deploy_config | ||
from gear import configure_logging | ||
|
||
from .batch import app | ||
|
||
configure_logging() | ||
|
||
deploy_config = get_deploy_config() | ||
|
||
web.run_app(deploy_config.prefix_application(app, 'batch2'), host='0.0.0.0', port=5000) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.