Skip to content

Commit

Permalink
kube build fixes (airbytehq#7139)
Browse files Browse the repository at this point in the history
* upgrade ec2-github-runner

* remaining build fixes

* fix build
  • Loading branch information
jrhizor authored Oct 18, 2021
1 parent 8d8eda9 commit 0f93224
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gke-kube-test-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
aws-region: us-east-2
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: start
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand Down
25 changes: 16 additions & 9 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
aws-region: us-east-2
- name: Start EC2 Runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: start
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand Down Expand Up @@ -154,7 +154,7 @@ jobs:
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand All @@ -179,7 +179,7 @@ jobs:
aws-region: us-east-2
- name: Start EC2 Runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: start
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand Down Expand Up @@ -312,7 +312,7 @@ jobs:
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand All @@ -338,7 +338,7 @@ jobs:
aws-region: us-east-2
- name: Start EC2 Runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: start
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand Down Expand Up @@ -404,7 +404,7 @@ jobs:
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand All @@ -430,11 +430,11 @@ jobs:
aws-region: us-east-2
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: start
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
ec2-image-id: ami-0717900bad4b648ca
ec2-image-id: ami-0d4083c04fde515c4
ec2-instance-type: c5.2xlarge
subnet-id: subnet-0469a9e68a379c1d3
security-group-id: sg-0793f3c9413f21970
Expand Down Expand Up @@ -499,13 +499,20 @@ jobs:
- name: KIND Kubernetes Cluster Setup
uses: helm/[email protected]
with:
node_image: kindest/node:v1.21.2
config: /tmp/kind-config.yaml
# In case of self-hosted EC2 errors, remove this env block.
env:
USER: root
HOME: /home/runner
CHANGE_MINIKUBE_NONE_USER: true

- name: Describe kube nodes
run: kubectl describe nodes
env:
USER: root
HOME: /home/runner

- name: Build Platform Docker Images
run: SUB_BUILD=PLATFORM ./gradlew composeBuild --scan

Expand Down Expand Up @@ -558,7 +565,7 @@ jobs:
aws-secret-access-key: ${{ secrets.SELF_RUNNER_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2.2.1
uses: machulav/ec2-github-runner@v2.3.0
with:
mode: stop
github-token: ${{ secrets.SELF_RUNNER_GITHUB_ACCESS_TOKEN }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ private static JobRead waitForJob(final JobsApi jobsApi, final JobRead originalJ
throws InterruptedException, ApiException {
JobRead job = originalJob;
int count = 0;
while (count < 200 && jobStatuses.contains(job.getStatus())) {
while (count < 400 && jobStatuses.contains(job.getStatus())) {
sleep(1000);
count++;

Expand Down
17 changes: 10 additions & 7 deletions tools/bin/acceptance_test_kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ assert_root
# Since KIND does not have access to the local docker agent, manually load the minimum images required for the Kubernetes Acceptance Tests.
# See https://kind.sigs.k8s.io/docs/user/quick-start/#loading-an-image-into-your-cluster.
echo "Loading images into KIND..."
kind load docker-image airbyte/server:dev --name chart-testing
kind load docker-image airbyte/scheduler:dev --name chart-testing
kind load docker-image airbyte/webapp:dev --name chart-testing
kind load docker-image airbyte/worker:dev --name chart-testing
kind load docker-image airbyte/db:dev --name chart-testing
kind load docker-image airbyte/server:dev --name chart-testing &
kind load docker-image airbyte/scheduler:dev --name chart-testing &
kind load docker-image airbyte/webapp:dev --name chart-testing &
kind load docker-image airbyte/worker:dev --name chart-testing &
kind load docker-image airbyte/db:dev --name chart-testing &
kind load docker-image airbyte/normalization:dev --name chart-testing &
wait

echo "Starting app..."

Expand Down Expand Up @@ -46,9 +48,10 @@ sleep 120s
server_logs () { echo "server logs:" && kubectl logs deployment.apps/airbyte-server; }
scheduler_logs () { echo "scheduler logs:" && kubectl logs deployment.apps/airbyte-scheduler; }
pod_sweeper_logs () { echo "pod sweeper logs:" && kubectl logs deployment.apps/airbyte-pod-sweeper; }
worker_logs () { echo "worker logs:" && kubectl logs deployment.apps/airbyte-worker; }
describe_pods () { echo "describe pods:" && kubectl describe pods; }
print_all_logs () { server_logs; scheduler_logs; pod_sweeper_logs; describe_pods; }

describe_nodes () { echo "describe nodes:" && kubectl describe nodes; }
print_all_logs () { server_logs; scheduler_logs; worker_logs; pod_sweeper_logs; describe_nodes; describe_pods; }
trap "echo 'kube logs:' && print_all_logs" EXIT

kubectl port-forward svc/airbyte-server-svc 8001:8001 &
Expand Down

0 comments on commit 0f93224

Please sign in to comment.