-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial cleanup and restructuring for beam 2.35
- Loading branch information
1 parent
4992719
commit fd5f5fc
Showing
30 changed files
with
79 additions
and
4,249 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,16 @@ | ||
FROM gcr.io/world-fishing-827/github.com/globalfishingwatch/gfw-pipeline:latest-python3.7 | ||
|
||
# Setup scheduler-specific dependencies | ||
COPY ./requirements-scheduler.txt ./ | ||
RUN pip install -r requirements-scheduler.txt | ||
|
||
# Setup worker dependencies | ||
COPY ./requirements-worker.txt ./ | ||
RUN pip install -r requirements-worker.txt | ||
|
||
# Setup local packages | ||
COPY . /opt/project | ||
RUN pip install -e . | ||
|
||
# Setup the entrypoint for quickly executing the pipelines | ||
ENTRYPOINT ["scripts/run.sh"] |
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 apache/beam_python3.7_sdk:2.35.0 | ||
|
||
# Setup local application dependencies | ||
COPY ./requirements-worker.txt ./ | ||
RUN pip install -r requirements-worker.txt | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,41 +1,69 @@ | ||
steps: | ||
|
||
- name: 'gcr.io/cloud-builders/docker' | ||
id: build | ||
id: build-scheduler | ||
args: [ | ||
'build', | ||
'-t', | ||
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:latest', | ||
'-t', | ||
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:$TAG_NAME', | ||
'.' | ||
'-t', '${_SCHEDULER_IMAGE_NAME}:${TAG_NAME}', | ||
'-t', '${_SCHEDULER_IMAGE_NAME}:latest', | ||
'-f', 'Dockerfile-scheduler', | ||
'.', | ||
] | ||
|
||
- name: 'gcr.io/cloud-builders/docker' | ||
id: test | ||
args: [ | ||
'run', | ||
'--rm', | ||
'--entrypoint', | ||
'py.test', | ||
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:latest' | ||
'--entrypoint', 'py.test', | ||
'${_SCHEDULER_IMAGE_NAME}:latest', | ||
] | ||
waitFor: [ 'build' ] | ||
|
||
- name: 'gcr.io/cloud-builders/docker' | ||
id: push_latest | ||
id: push-scheduler-tag | ||
args: [ | ||
'push', | ||
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:latest' | ||
'${_SCHEDULER_IMAGE_NAME}:${TAG_NAME}' | ||
] | ||
waitFor: [ 'build', 'test' ] | ||
|
||
- name: 'gcr.io/cloud-builders/docker' | ||
id: push_tagged | ||
id: push-scheduler-latest | ||
args: [ | ||
'push', | ||
'gcr.io/$PROJECT_ID/github-globalfishingwatch-pipe-segment:$TAG_NAME' | ||
'${_SCHEDULER_IMAGE_NAME}:latest' | ||
] | ||
|
||
- name: 'gcr.io/cloud-builders/docker' | ||
id: build-worker | ||
waitFor: ['test'] | ||
args: [ | ||
'build', | ||
'-t', '${_WORKER_IMAGE_NAME}:${TAG_NAME}', | ||
'-t', '${_WORKER_IMAGE_NAME}:latest', | ||
'-f', 'Dockerfile-worker', | ||
'.', | ||
] | ||
|
||
- name: 'gcr.io/cloud-builders/docker' | ||
id: push-worker-tag | ||
waitFor: ['build-worker'] | ||
args: [ | ||
'push', | ||
'${_WORKER_IMAGE_NAME}:${TAG_NAME}' | ||
] | ||
|
||
- name: 'gcr.io/cloud-builders/docker' | ||
id: push-worker-latest | ||
waitFor: ['build-worker'] | ||
args: [ | ||
'push', | ||
'${_WORKER_IMAGE_NAME}:latest' | ||
] | ||
waitFor: [ 'build', 'test' ] | ||
|
||
timeout: 600s | ||
substitutions: | ||
_BASE_IMAGE_NAME: 'gcr.io/${PROJECT_ID}/pipe-segment' | ||
_SCHEDULER_IMAGE_NAME: '${_BASE_IMAGE_NAME}/scheduler' | ||
_WORKER_IMAGE_NAME: '${_BASE_IMAGE_NAME}/worker' | ||
options: | ||
dynamic_substitutions: true | ||
|
Oops, something went wrong.