Skip to content

Commit

Permalink
Added hotfix for sandbox (flyteorg#1424)
Browse files Browse the repository at this point in the history
Signed-off-by: Yuvraj <[email protected]>
  • Loading branch information
yindia authored Sep 3, 2021
1 parent cb658c8 commit 36a241b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Build & Push Sandbox Docker Image

on:
pull_request:
release:
types: [published]
push:
branches:
- master

jobs:
push-sandbox-image:
Expand All @@ -25,7 +26,7 @@ jobs:
build_extra_args: "--target=default --compress=true"
context: ./
dockerfile: docker/sandbox/Dockerfile
push_image_and_stages: ${{ github.event_name == 'release' }}
push_image_and_stages: ${{ github.event_name != 'pull_request' }}
push-sandbox-dind-image:
name: Push sandbox DinD image to GHCR
runs-on: ubuntu-latest
Expand All @@ -44,4 +45,4 @@ jobs:
build_extra_args: "--target=dind --compress=true"
context: ./
dockerfile: docker/sandbox/Dockerfile
push_image_and_stages: ${{ github.event_name == 'release' }}
push_image_and_stages: ${{ github.event_name != 'pull_request' }}
2 changes: 1 addition & 1 deletion docker/sandbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN wget -q -O - https://raw.githubusercontent.com/flyteorg/flytectl/master/inst
COPY --from=go_builder_ /install/linux/ /flyteorg/bin/

# Copy flyte chart
COPY charts/flyte/ /flyteorg/share/flyte
COPY charts/flyte/values-sandbox.yaml /flyteorg/share/values-sandbox.yaml

# Copy scripts
COPY docker/sandbox/kubectl docker/sandbox/cgroup-v2-hack.sh docker/sandbox/wait-for-flyte.sh /flyteorg/bin/
Expand Down
3 changes: 2 additions & 1 deletion docker/sandbox/flyte-entrypoint-default.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ echo "Done."

# Deploy flyte
echo "Deploying Flyte..."
helm install -n flyte -f /flyteorg/share/flyte/values-sandbox.yaml --create-namespace flyte /flyteorg/share/flyte --kubeconfig /etc/rancher/k3s/k3s.yaml
helm repo add flyteorg https://flyteorg.github.io/flyte
helm install -n flyte -f /flyteorg/share/values-sandbox.yaml --create-namespace flyte flyteorg/flyte --kubeconfig /etc/rancher/k3s/k3s.yaml

wait-for-flyte.sh

Expand Down
3 changes: 2 additions & 1 deletion docker/sandbox/flyte-entrypoint-dind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ echo "Done."

# Deploy flyte
echo "Deploying Flyte..."
helm install -n flyte -f /flyteorg/share/flyte/values-sandbox.yaml --create-namespace flyte /flyteorg/share/flyte --kubeconfig /etc/rancher/k3s/k3s.yaml
helm repo add flyteorg https://flyteorg.github.io/flyte
helm install -n flyte -f /flyteorg/share/values-sandbox.yaml --create-namespace flyte flyteorg/flyte --kubeconfig /etc/rancher/k3s/k3s.yaml

wait-for-flyte.sh

Expand Down
2 changes: 1 addition & 1 deletion docker/sandbox/wait-for-flyte.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ timeout 600 sh -c "until k3s kubectl rollout status deployment flytepropeller -n
k3s kubectl wait --for=condition=available deployment/datacatalog deployment/flyteadmin deployment/flyteconsole deployment/flytepropeller -n flyte --timeout=10m || ( echo >&2 "Timed out while waiting for the Flyte deployment to start"; exit 1 )

# Wait for envoy proxy to become ready
timeout 600 sh -c 'until [[ $(k3s kubectl get daemonset envoy -n projectcontour -o jsonpath="{.status.numberReady}") -eq 1 ]]; do sleep 1; done' || ( echo >&2 "Timed out while waiting for the Flyte envoy proxy to start"; exit 1 )
timeout 600 sh -c 'until [[ $(k3s kubectl get daemonset flyte-contour-envoy -n flyte -o jsonpath="{.status.numberReady}") -eq 1 ]]; do sleep 1; done' || ( echo >&2 "Timed out while waiting for the Flyte envoy proxy to start"; exit 1 )

echo "Flyte is ready! Flyte UI is available at http://localhost:30081/console."

0 comments on commit 36a241b

Please sign in to comment.