Skip to content

Commit f088a39

Browse files
authored
Deployer til dev-gcp. (#12)
* Deployer til dev-gcp. Legger til write permissions for id-token i kafka.yaml. * Fjerner init-app.sh fra Dockerfile. * Deploy manuelt til GCP * Endrer på DB-tiers.
1 parent 14f330d commit f088a39

File tree

7 files changed

+21
-38
lines changed

7 files changed

+21
-38
lines changed

.github/workflows/build.yaml

+14-14
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,20 @@ jobs:
7272
image_version: ${{ needs.build-app.outputs.build-version }}
7373

7474

75-
# deploy-dev:
76-
# name: Deploy dev
77-
# permissions:
78-
# id-token: write
79-
# contents: write
80-
# if: github.ref_name == 'master'
81-
# needs: [build-app]
82-
# uses: navikt/sif-gha-workflows/.github/workflows/maven-deploy.yml@main
83-
# with:
84-
# gar: true
85-
# image: ${{ needs.build-app.outputs.build-version }}
86-
# cluster: dev-gcp
87-
# naiserator_file: deploy/dev-gcp.yml
88-
# secrets: inherit
75+
deploy-dev:
76+
name: Deploy dev
77+
permissions:
78+
id-token: write
79+
contents: write
80+
if: github.ref_name == 'master'
81+
needs: [build-app]
82+
uses: navikt/sif-gha-workflows/.github/workflows/maven-deploy.yml@main
83+
with:
84+
gar: true
85+
image: ${{ needs.build-app.outputs.build-version }}
86+
cluster: dev-gcp
87+
naiserator_file: deploy/dev-gcp.yml
88+
secrets: inherit
8989

9090
# check-change-compat-typescript-client:
9191
# name: Change and compatibility check typescript client

.github/workflows/deploy-manuelt.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ jobs:
2525
gar: true
2626
image: ${{ inputs.image }}
2727
cluster: ${{ inputs.environment }}-gcp
28-
naiserator_file: deploy/${{ inputs.environment }}-fss.yml
28+
naiserator_file: deploy/${{ inputs.environment }}-gcp.yml
2929
namespace: k9saksbehandling
3030
secrets: inherit

.github/workflows/kafka.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88

99
jobs:
1010
deploy-kafka-topics-dev:
11-
# permissions:
12-
# id-token: write
11+
permissions:
12+
id-token: write
1313
name: Deploy to Aiven Dev
1414
if: startsWith(github.ref, 'refs/heads/master')
1515
runs-on: ubuntu-latest
@@ -32,8 +32,8 @@ jobs:
3232
RESOURCE: deploy/kafka/ung-vedtakhendelse-dev.yml
3333

3434
deploy-kafka-topics-prod:
35-
# permissions:
36-
# id-token: write
35+
permissions:
36+
id-token: write
3737
name: Deploy to Aiven Prod
3838
if: startsWith(github.ref, 'refs/heads/master') # If the branch is master
3939
runs-on: ubuntu-latest

Dockerfile

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ RUN mkdir /app/conf
77

88
ENV JAVA_OPTS="-XX:MaxRAMPercentage=75.0 -XX:ActiveProcessorCount=4 -Djdk.virtualThreadScheduler.parallelism=8 -Djava.security.egd=file:/dev/./urandom -Duser.timezone=Europe/Oslo "
99

10-
# Application Start Konfigurasjon
11-
COPY build/init-app.sh /init-scripts/init-app.sh
12-
1310
# Config
1411
COPY web/target/classes/logback.xml /app/conf/
1512

build/init-app.sh

-14
This file was deleted.

deploy/dev-gcp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ spec:
9797
sqlInstances:
9898
- type: POSTGRES_16
9999
name: ung-sak-db
100-
tier: db-custom-1-3840
100+
tier: db-g1-small # delt CPU, 1.7 RAM
101101
diskSize: 10
102102
diskAutoresize: false
103103
highAvailability: false

deploy/prod-gcp.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ spec:
9090
sqlInstances:
9191
- type: POSTGRES_16
9292
name: ung-sak-db
93-
tier: db-custom-2-7680
93+
tier: db-custom-1-3840 # 1 CPU, 3.75 GB RAM
9494
diskSize: 100
9595
diskAutoresize: true
9696
highAvailability: true

0 commit comments

Comments
 (0)