forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
split scheduler and worker (airbytehq#5737)
* docker-compose split of scheduler and worker * fix heartbeat location bug + add support for kubernetes * use two workers in integration tests * capture logs in AirbyteTestContainer * add waiting * rename to make it easier to review * rename module * fix remaining conflicts * allow configuring max workers of each type and document usage * fix build * remove comment * add worker resource requiremetns * try to fix for connector build * fix regression in biuld * add env comments for SUBMITTER_NUM_THREADS * Update airbyte-workers/src/main/java/io/airbyte/workers/WorkerApp.java Co-authored-by: Davin Chia <[email protected]> * Update airbyte-workers/src/main/java/io/airbyte/workers/temporal/TemporalPool.java Co-authored-by: Davin Chia <[email protected]> * merge temporalpool into workerapp * output docker system info * move check to before * remove unnecessary parts of the patch * could this be the problem? i thought i added this * show disk usage * add print statements * add pruning * fix prune option * use force Co-authored-by: Davin Chia <[email protected]>
- Loading branch information
Showing
31 changed files
with
639 additions
and
229 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -456,6 +456,9 @@ jobs: | |
- role: worker | ||
EOF | ||
- name: Check Docker System Info | ||
run: docker system info | ||
|
||
- name: KIND Kubernetes Cluster Setup | ||
uses: helm/[email protected] | ||
with: | ||
|
@@ -475,13 +478,18 @@ jobs: | |
AWS_S3_INTEGRATION_TEST_CREDS: ${{ secrets.AWS_S3_INTEGRATION_TEST_CREDS }} | ||
GOOGLE_CLOUD_STORAGE_TEST_CREDS: ${{ secrets.GOOGLE_CLOUD_STORAGE_TEST_CREDS }} | ||
|
||
- name: Show Disk Usage | ||
run: | | ||
df -h | ||
docker system df | ||
- name: Run Kubernetes End-to-End Acceptance Tests | ||
env: | ||
USER: root | ||
HOME: /home/runner | ||
AWS_S3_INTEGRATION_TEST_CREDS: ${{ secrets.AWS_S3_INTEGRATION_TEST_CREDS }} | ||
run: | | ||
IS_MINIKUBE=true ./tools/bin/acceptance_test_kube.sh | ||
CI=true IS_MINIKUBE=true ./tools/bin/acceptance_test_kube.sh | ||
# In case of self-hosted EC2 errors, remove this block. | ||
stop-kube-acceptance-test-runner: | ||
name: Stop Kube Acceptance Test EC2 Runner | ||
|
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
57 changes: 57 additions & 0 deletions
57
airbyte-config/models/src/main/java/io/airbyte/config/MaxWorkersConfig.java
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,57 @@ | ||
/* | ||
* MIT License | ||
* | ||
* Copyright (c) 2020 Airbyte | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy | ||
* of this software and associated documentation files (the "Software"), to deal | ||
* in the Software without restriction, including without limitation the rights | ||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
* copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all | ||
* copies or substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
* SOFTWARE. | ||
*/ | ||
|
||
package io.airbyte.config; | ||
|
||
public class MaxWorkersConfig { | ||
|
||
private final int maxSpecWorkers; | ||
private final int maxCheckWorkers; | ||
private final int maxDiscoverWorkers; | ||
private final int maxSyncWorkers; | ||
|
||
public MaxWorkersConfig(final int maxSpecWorkers, final int maxCheckWorkers, final int maxDiscoverWorkers, final int maxSyncWorkers) { | ||
this.maxSpecWorkers = maxSpecWorkers; | ||
this.maxCheckWorkers = maxCheckWorkers; | ||
this.maxDiscoverWorkers = maxDiscoverWorkers; | ||
this.maxSyncWorkers = maxSyncWorkers; | ||
} | ||
|
||
public int getMaxSpecWorkers() { | ||
return maxSpecWorkers; | ||
} | ||
|
||
public int getMaxCheckWorkers() { | ||
return maxCheckWorkers; | ||
} | ||
|
||
public int getMaxDiscoverWorkers() { | ||
return maxDiscoverWorkers; | ||
} | ||
|
||
public int getMaxSyncWorkers() { | ||
return maxSyncWorkers; | ||
} | ||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM openjdk:14.0.2-slim AS worker | ||
|
||
# Install Docker to launch worker images. Eventually should be replaced with Docker-java. | ||
# See https://gitter.im/docker-java/docker-java?at=5f3eb87ba8c1780176603f4e for more information on why we are not currently using Docker-java | ||
RUN apt-get update && apt-get install -y \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg-agent \ | ||
software-properties-common | ||
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - | ||
RUN add-apt-repository \ | ||
"deb [arch=amd64] https://download.docker.com/linux/debian \ | ||
$(lsb_release -cs) \ | ||
stable" | ||
RUN apt-get update && apt-get install -y docker-ce-cli jq | ||
|
||
ENV APPLICATION airbyte-workers | ||
|
||
WORKDIR /app | ||
|
||
# Install kubectl | ||
RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.17.14/bin/linux/amd64/kubectl | ||
RUN chmod +x ./kubectl | ||
RUN mv ./kubectl /usr/local/bin | ||
|
||
# Move and run worker | ||
COPY build/distributions/${APPLICATION}*.tar ${APPLICATION}.tar | ||
|
||
RUN tar xf ${APPLICATION}.tar --strip-components=1 | ||
|
||
# wait for upstream dependencies to become available before starting server | ||
ENTRYPOINT ["/bin/bash", "-c", "bin/${APPLICATION}"] |
Oops, something went wrong.