From 3dadeb970bff78dc4f570da7b5581d00fb16555e Mon Sep 17 00:00:00 2001 From: Yao Xiao <108576690+Charlie-XIAO@users.noreply.github.com> Date: Fri, 6 Dec 2024 21:58:32 -0500 Subject: [PATCH] chore: do not skip rebuilding docker images by default (#73) --- .github/workflows/deploy-app.yaml | 2 +- .github/workflows/deploy-chromadb.yaml | 4 ++-- .github/workflows/deploy-pipeline.yaml | 2 +- deploy/README.md | 6 +++--- deploy/deploy-app.sh | 10 +++++----- deploy/deploy-pipeline.sh | 10 +++++----- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/deploy-app.yaml b/.github/workflows/deploy-app.yaml index bd5038b..0ee4ee0 100644 --- a/.github/workflows/deploy-app.yaml +++ b/.github/workflows/deploy-app.yaml @@ -7,7 +7,7 @@ on: description: Skip rebuilding images required: false type: boolean - default: true + default: false jobs: deploy-app: diff --git a/.github/workflows/deploy-chromadb.yaml b/.github/workflows/deploy-chromadb.yaml index 6fdf0c7..a14913b 100644 --- a/.github/workflows/deploy-chromadb.yaml +++ b/.github/workflows/deploy-chromadb.yaml @@ -7,12 +7,12 @@ on: description: Skip rebuilding app images required: false type: boolean - default: true + default: false skip-rebuild-images-pipeline: description: Skip rebuilding pipeline images required: false type: boolean - default: true + default: false jobs: deploy-chromadb: diff --git a/.github/workflows/deploy-pipeline.yaml b/.github/workflows/deploy-pipeline.yaml index 78d24b5..f30d3e3 100644 --- a/.github/workflows/deploy-pipeline.yaml +++ b/.github/workflows/deploy-pipeline.yaml @@ -7,7 +7,7 @@ on: description: Skip rebuilding images required: false type: boolean - default: true + default: false jobs: deploy-pipeline: diff --git a/deploy/README.md b/deploy/README.md index 7f0e5b9..45c4d44 100644 --- a/deploy/README.md +++ b/deploy/README.md @@ -12,8 +12,8 @@ make run The deployment uses Ansible. It will deploy the Docker images of the application and create/update the Kubernetes cluster to run the application. Inside the container, run: ```bash -./deploy-app.sh --skip-rebuild-images=false # Deploy app -./destroy-app.sh # Destroy app +./deploy-app.sh # Deploy app (optionally --skip-rebuild-images=true) +./destroy-app.sh # Destroy app ``` ## Pipeline @@ -21,7 +21,7 @@ The deployment uses Ansible. It will deploy the Docker images of the application The deployment uses Ansible and Vertex AI pipeline. It will deploy the Docker images of the pipeline and run `/src/data-pipeline/` and `/src/embedding-model/` steps. Inside the container, run: ```bash -./deploy-pipeline.sh --skip-rebuild-images=false # Deploy pipeline +./deploy-pipeline.sh # Deploy pipeline (optionally --skip-rebuild-images=true) ``` diff --git a/deploy/deploy-app.sh b/deploy/deploy-app.sh index 58a100a..a3da945 100755 --- a/deploy/deploy-app.sh +++ b/deploy/deploy-app.sh @@ -1,22 +1,22 @@ #!/bin/bash usage() { - echo "Usage: $0 [--skip-rebuild-images=true|false]" + echo "Usage: $0 [--skip-rebuild-images=false|true]" exit 1 } -SKIP_REBUILD_IMAGES="true" # Skip rebuilding images by default +SKIP_REBUILD_IMAGES="false" # Do not skip by default if [[ $# -gt 1 ]]; then usage elif [[ $# -eq 1 ]]; then case "$1" in - --skip-rebuild-images=true) - SKIP_REBUILD_IMAGES="true" - ;; --skip-rebuild-images=false) SKIP_REBUILD_IMAGES="false" ;; + --skip-rebuild-images=true) + SKIP_REBUILD_IMAGES="true" + ;; *) echo "Invalid argument: $1" usage diff --git a/deploy/deploy-pipeline.sh b/deploy/deploy-pipeline.sh index 64e4c54..41c4c8c 100755 --- a/deploy/deploy-pipeline.sh +++ b/deploy/deploy-pipeline.sh @@ -1,22 +1,22 @@ #!/bin/bash usage() { - echo "Usage: $0 [--skip-rebuild-images=true|false]" + echo "Usage: $0 [--skip-rebuild-images=false|true]" exit 1 } -SKIP_REBUILD_IMAGES="true" # Skip rebuilding images by default +SKIP_REBUILD_IMAGES="false" # Do not skip by default if [[ $# -gt 1 ]]; then usage elif [[ $# -eq 1 ]]; then case "$1" in - --skip-rebuild-images=true) - SKIP_REBUILD_IMAGES="true" - ;; --skip-rebuild-images=false) SKIP_REBUILD_IMAGES="false" ;; + --skip-rebuild-images=true) + SKIP_REBUILD_IMAGES="true" + ;; *) echo "Invalid argument: $1" usage