Skip to content

Commit

Permalink
Attempting to start google runners.
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Benusovich <[email protected]>
  • Loading branch information
dbenusov committed Nov 5, 2024
1 parent 1b69813 commit d291588
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 84 deletions.
172 changes: 89 additions & 83 deletions .github/workflows/deploy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,86 +117,92 @@ jobs:
docker tag image $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
# basic-server-review:
# runs-on: ubuntu-latest
# needs: [artifact-registry]
# steps:
# - uses: actions/checkout@v4
# - name: Authenticate to Google Cloud
# uses: google-github-actions/[email protected]
# with:
# credentials_json: ${{ secrets.GOOGLE_KEY }}
# - uses: google-github-actions/setup-gcloud@v2
# - name: 'Deploy'
# id: 'deploy'
# run: |-
# gcloud components install beta --quiet
# gcloud run deploy basic-server \
# --image=docker.io/flyingmonkeys1996/collision-mapper:latest \
# --allow-unauthenticated \
# --port=8080 \
# --service-account=320300059816-compute@developer.gserviceaccount.com \
# --set-env-vars='APP=opt/applications/basic-server.jar' \
# --region=us-central1 \
# --project=collision-mappter
# gcloud beta run services add-iam-policy-binding basic-server \
# --region=us-central1 \
# --member=allUsers \
# --role=roles/run.invoker \
# --project=collision-mappter
#
# deploy-data-analyzer-review:
# runs-on: ubuntu-latest
# needs: [artifact-registry]
# steps:
# - uses: actions/checkout@v4
# - name: Authenticate to Google Cloud
# uses: google-github-actions/[email protected]
# with:
# credentials_json: ${{ secrets.GOOGLE_KEY }}
# - uses: google-github-actions/setup-gcloud@v2
# - id: 'gcloud'
# name: 'gcloud'
# run: |-
# gcloud components install beta --quiet
# gcloud run deploy data-analyzer \
# --image=docker.io/flyingmonkeys1996/collision-mapper:latest \
# --allow-unauthenticated \
# --port=8080 \
# --service-account=320300059816-compute@developer.gserviceaccount.com \
# --set-env-vars='APP=opt/applications/data-analyzer-server.jar' \
# --region=us-central1 \
# --project=collision-mappter
# gcloud beta run services add-iam-policy-binding data-analyzer \
# --region=us-central1 \
# --member=allUsers \
# --role=roles/run.invoker \
# --project=collision-mappter
#
# data-collector-review:
# runs-on: ubuntu-latest
# needs: [artifact-registry]
# steps:
# - uses: actions/checkout@v4
# - name: Authenticate to Google Cloud
# uses: google-github-actions/[email protected]
# with:
# credentials_json: ${{ secrets.GOOGLE_KEY }}
# - uses: google-github-actions/setup-gcloud@v2
# - id: 'gcloud'
# name: 'gcloud'
# run: |-
# gcloud components install beta --quiet
# gcloud run deploy data-collector \
# --image=docker.io/flyingmonkeys1996/collision-mapper:latest \
# --allow-unauthenticated \
# --port=8080 \
# --service-account=320300059816-compute@developer.gserviceaccount.com \
# --set-env-vars='APP=opt/applications/data-collector-server.jar' \
# --region=us-central1 \
# --project=collision-mappter
# gcloud beta run services add-iam-policy-binding data-collector \
# --region=us-central1 \
# --member=allUsers \
# --role=roles/run.invoker \
# --project=collision-mappter
basic-server-review:
runs-on: ubuntu-latest
needs: [artifact-registry]
steps:
- uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/[email protected]
with:
credentials_json: ${{ secrets.GOOGLE_KEY }}
- uses: google-github-actions/setup-gcloud@v2
- name: 'Deploy'
id: 'deploy'
run: |-
gcloud components install beta --quiet
gcloud run deploy basic-server \
--image=docker.io/flyingmonkeys1996/collision-mapper:latest \
--allow-unauthenticated \
--port=8080 \
--service-account=320300059816-compute@developer.gserviceaccount.com \
--set-env-vars='APP=opt/applications/basic-server.jar,POSTGRES_USER=${{ env.POSTGRES_USER }},POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }},USE_SSL=true' \
--region=us-central1 \
--project=collision-mappter \
--vpc-connector=projects/collision-mappter/locations/us-central1/connectors/collision-mapper \
--add-cloudsql-instances=collision-mappter:us-central1:collision-mapper-db
gcloud beta run services add-iam-policy-binding basic-server \
--region=us-central1 \
--member=allUsers \
--role=roles/run.invoker \
--project=collision-mappter
deploy-data-analyzer-review:
runs-on: ubuntu-latest
needs: [artifact-registry]
steps:
- uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/[email protected]
with:
credentials_json: ${{ secrets.GOOGLE_KEY }}
- uses: google-github-actions/setup-gcloud@v2
- id: 'gcloud'
name: 'gcloud'
run: |-
gcloud components install beta --quiet
gcloud run deploy data-analyzer \
--image=docker.io/flyingmonkeys1996/collision-mapper:latest \
--allow-unauthenticated \
--port=8080 \
--service-account=320300059816-compute@developer.gserviceaccount.com \
--set-env-vars='APP=opt/applications/data-analyzer-server.jar,POSTGRES_USER=${{ env.POSTGRES_USER }},POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }},USE_SSL=true' \
--region=us-central1 \
--project=collision-mappter \
--vpc-connector=projects/collision-mappter/locations/us-central1/connectors/collision-mapper \
--add-cloudsql-instances=collision-mappter:us-central1:collision-mapper-db
gcloud beta run services add-iam-policy-binding data-analyzer \
--region=us-central1 \
--member=allUsers \
--role=roles/run.invoker \
--project=collision-mappter
data-collector-review:
runs-on: ubuntu-latest
needs: [artifact-registry]
steps:
- uses: actions/checkout@v4
- name: Authenticate to Google Cloud
uses: google-github-actions/[email protected]
with:
credentials_json: ${{ secrets.GOOGLE_KEY }}
- uses: google-github-actions/setup-gcloud@v2
- id: 'gcloud'
name: 'gcloud'
run: |-
gcloud components install beta --quiet
gcloud run deploy data-collector \
--image=docker.io/flyingmonkeys1996/collision-mapper:latest \
--allow-unauthenticated \
--port=8080 \
--service-account=320300059816-compute@developer.gserviceaccount.com \
--set-env-vars='APP=opt/applications/data-collector-server.jar,POSTGRES_USER=${{ env.POSTGRES_USER }},POSTGRES_PASSWORD=${{ env.POSTGRES_PASSWORD }},USE_SSL=true' \
--region=us-central1 \
--project=collision-mappter \
--vpc-connector=projects/collision-mappter/locations/us-central1/connectors/collision-mapper \
--add-cloudsql-instances=collision-mappter:us-central1:collision-mapper-db
gcloud beta run services add-iam-policy-binding data-collector \
--region=us-central1 \
--member=allUsers \
--role=roles/run.invoker \
--project=collision-mappter
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class DatabaseConfiguration() {
jdbcUrl = url
username = database_user
password = database_password
addDataSourceProperty("ssl", use_ssl.toString())
if (use_ssl)
addDataSourceProperty("sslmode", "require")
}
private val ds = HikariDataSource(config)

Expand Down

0 comments on commit d291588

Please sign in to comment.