-
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.
Flex template deployment after merge to main
- Loading branch information
Showing
11 changed files
with
116 additions
and
32 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Deploy | ||
|
||
on: | ||
workflow_dispatch: ~ | ||
workflow_run: | ||
workflows: ["CI"] | ||
types: [completed] | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup | ||
- run: sbt tollApplication/assembly | ||
- uses: google-github-actions/auth@v1 | ||
with: | ||
credentials_json: "${{ secrets.GOOGLE_CREDENTIALS }}" | ||
- uses: dflook/terraform-apply@v1 | ||
with: | ||
path: toll-infrastructure | ||
- uses: "google-github-actions/setup-gcloud@v1" | ||
- run: ./deploy-batch.sh | ||
working-directory: toll-application | ||
- run: ./deploy-streaming.sh | ||
working-directory: toll-application |
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
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,11 @@ | ||
#!/bin/bash | ||
|
||
PROJECT=playground-272019 | ||
REGION=europe-west1 | ||
|
||
gcloud dataflow flex-template build gs://$PROJECT-toll-application/templates/toll-application-batch.json \ | ||
--image-gcr-path "$REGION-docker.pkg.dev/$PROJECT/toll-application/toll-application-batch:latest" \ | ||
--sdk-language "JAVA" \ | ||
--flex-template-base-image JAVA17 \ | ||
--jar "target/scala-2.13/toll-application.jar" \ | ||
--env FLEX_TEMPLATE_JAVA_MAIN_CLASS="org.mkuthan.streamprocessing.toll.application.batch.TollBatchJob" |
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,11 @@ | ||
#!/bin/bash | ||
|
||
PROJECT=playground-272019 | ||
REGION=europe-west1 | ||
|
||
gcloud dataflow flex-template build gs://$PROJECT-toll-application/templates/toll-application-streaming.json \ | ||
--image-gcr-path "$REGION-docker.pkg.dev/$PROJECT/toll-application/toll-application-streaming:latest" \ | ||
--sdk-language "JAVA" \ | ||
--flex-template-base-image JAVA17 \ | ||
--jar "target/scala-2.13/toll-application.jar" \ | ||
--env FLEX_TEMPLATE_JAVA_MAIN_CLASS="org.mkuthan.streamprocessing.toll.application.streaming.TollStreamingJob" |
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,22 @@ | ||
#!/bin/bash | ||
|
||
PROJECT=playground-272019 | ||
REGION=europe-west1 | ||
|
||
gcloud dataflow flex-template run "toll-application-`date +%Y%m%d-%H%M%S`" \ | ||
--template-file-gcs-location "gs://$PROJECT-toll-application/templates/toll-application-streaming.json" \ | ||
--region "$REGION" \ | ||
--enable-streaming-engine \ | ||
--parameters entrySubscription="projects/$PROJECT/subscriptions/toll-booth-entry" \ | ||
--parameters entryDlq="gs://$PROJECT-toll-application/dlq/entry" \ | ||
--parameters exitSubscription="projects/$PROJECT/subscriptions/toll-booth-exit" \ | ||
--parameters exitDlq="gs://$PROJECT-toll-application/dlq/exit" \ | ||
--parameters vehicleRegistrationSubscription="projects/$PROJECT/subscriptions/vehicle-registration" \ | ||
--parameters vehicleRegistrationDlq="gs://$PROJECT-toll-application/dlq/vehicle-registration" \ | ||
--parameters vehicleRegistrationTable="$PROJECT.toll_application.vehicle-registration" \ | ||
--parameters entryStatsTable="$PROJECT.toll_application.toll-booth-entry-stats" \ | ||
--parameters totalVehicleTimesTable="$PROJECT.toll_application.total-vehicle-times" \ | ||
--parameters totalVehicleTimesDiagnosticTable="$PROJECT.toll_application.total-vehicle-times-diagnostic" \ | ||
--parameters vehiclesWithExpiredRegistrationTopic="projects/$PROJECT/topics/vehicle-registration" \ | ||
--parameters vehiclesWithExpiredRegistrationDiagnosticTable="$PROJECT.toll_application.vehicles-with-expired-registration-diagnostic" \ | ||
--parameters ioDiagnosticTable="$PROJECT.toll_application.io-diagnostic" |
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