Skip to content

Commit

Permalink
Nye miljøer for q1, q2 og q4
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur93 committed Oct 4, 2024
1 parent f595b97 commit 7bcd717
Show file tree
Hide file tree
Showing 14 changed files with 416 additions and 23 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/deploy_q1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy q1
on:
workflow_dispatch:
push:
branches:
- 'q1/**'
- 'Q1/**'

jobs:
build_and_deploy:
name: "Build and deploy to q1"
permissions:
contents: "read"
id-token: "write"
uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main
secrets: inherit
with:
nais_variabler_filnavn: q1.yaml

19 changes: 19 additions & 0 deletions .github/workflows/deploy_q2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Deploy q2
on:
workflow_dispatch:
push:
branches:
- 'q2/**'
- 'Q2/**'

jobs:
build_and_deploy:
name: "Build and deploy to q2"
permissions:
contents: "read"
id-token: "write"
uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main
secrets: inherit
with:
nais_variabler_filnavn: q2.yaml

23 changes: 23 additions & 0 deletions .github/workflows/deploy_q4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Deploy q4
on:
workflow_dispatch:
push:
branches:
- '**'
- '!main'
- '!q1/**'
- '!Q1/**'
- '!q2/**'
- '!Q2/**'

jobs:
build_and_deploy:
name: "Build and deploy to q4"
permissions:
contents: "read"
id-token: "write"
uses: navikt/bidrag-workflow/.github/workflows/deploy.yaml@main
secrets: inherit
with:
nais_variabler_filnavn: q4.yaml

1 change: 1 addition & 0 deletions .nais/feature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: bidrag-behandling-feature
ingresses:
- https://bidrag-behandling-feature.intern.dev.nav.no
env:
SPRING_PROFILES_ACTIVE: live,nais,database-legacy
BIDRAG_PERSON_URL: https://bidrag-person-feature.dev-fss-pub.nais.io/bidrag-person
BIDRAG_PERSON_SCOPE: dev-fss.bidrag.bidrag-person-feature
BIDRAG_GRUNNLAG_URL: http://bidrag-grunnlag-feature
Expand Down
1 change: 1 addition & 0 deletions .nais/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: bidrag-behandling
ingresses:
- https://bidrag-behandling.intern.dev.nav.no
env:
SPRING_PROFILES_ACTIVE: live,nais,database-legacy
BIDRAG_PERSON_URL: https://bidrag-person.dev-fss-pub.nais.io/bidrag-person
BIDRAG_PERSON_SCOPE: dev-fss.bidrag.bidrag-person
BIDRAG_GRUNNLAG_URL: http://bidrag-grunnlag
Expand Down
1 change: 1 addition & 0 deletions .nais/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: bidrag-behandling
ingresses:
- https://bidrag-behandling.intern.nav.no
env:
SPRING_PROFILES_ACTIVE: live,nais,database-legacy
BIDRAG_PERSON_URL: https://bidrag-person.prod-fss-pub.nais.io/bidrag-person
BIDRAG_PERSON_SCOPE: prod-fss.bidrag.bidrag-person
BIDRAG_GRUNNLAG_URL: http://bidrag-grunnlag
Expand Down
71 changes: 71 additions & 0 deletions .nais/q1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: bidrag-behandling
ingresses:
- https://bidrag-behandling.intern.dev.nav.no
env:
SPRING_PROFILES_ACTIVE: live,nais,database-new
BIDRAG_PERSON_URL: https://bidrag-person-feature.dev-fss-pub.nais.io/bidrag-person
BIDRAG_PERSON_SCOPE: dev-fss.bidrag.bidrag-person-feature
BIDRAG_GRUNNLAG_URL: http://bidrag-grunnlag-feature
BIDRAG_GRUNNLAG_SCOPE: dev-gcp.bidrag.bidrag-grunnlag-feature
BIDRAG_FORSENDELSE_URL: http://bidrag-dokument-forsendelse-feature
BIDRAG_FORSENDELSE_SCOPE: dev-gcp.bidrag.bidrag-dokument-forsendelse-feature
BIDRAG_TILGANGSKONTROLL_URL: http://bidrag-tilgangskontroll-feature
BIDRAG_TILGANGGSKONTROLL_SCOPE: dev-gcp.bidrag.bidrag-tilgangskontroll-feature
BIDRAG_STONAD_URL: http://bidrag-stonad-q1
BIDRAG_STONAD_SCOPE: dev-gcp.bidrag.bidrag-stonad-q1
BIDRAG_VEDTAK_URL: http://bidrag-vedtak-q1
BIDRAG_VEDTAK_SCOPE: dev-gcp.bidrag.bidrag-vedtak-q1
BIDRAG_BBM_URL: https://bidrag-bbm-feature.dev-fss-pub.nais.io
BIDRAG_BBM_SCOPE: dev-fss.bidrag.bidrag-bbm-feature
BIDRAG_DOKUMENT_PRODUKSJON_URL: http://bidrag-dokument-produksjon
BIDRAG_DOKUMENT_PRODUKSJON_SCOPE: dev-gcp.bidrag.bidrag-dokument-produksjon
BIDRAG_DOKUMENT_URL: https://bidrag-dokument-feature.dev-fss-pub.nais.io/bidrag-dokument
BIDRAG_DOKUMENT_SCOPE: dev-fss.bidrag.bidrag-dokument-feature
BIDRAG_SAK_URL: https://bidrag-sak-feature.dev-fss-pub.nais.io/bidrag-sak
BIDRAG_SAK_SCOPE: dev-fss.bidrag.bidrag-sak-feature
TOPIC_VEDTAK: bidrag.vedtak-q1
BIDRAG_ORGANISASJON_SCOPE: dev-fss.bidrag.bidrag-organisasjon-feature
BIDRAG_ORGANISASJON_URL: https://bidrag-organisasjon-feature.dev-fss-pub.nais.io/bidrag-organisasjon
BIDRAG_SJABLON_URL: https://bidrag-sjablon.dev-fss-pub.nais.io/bidrag-sjablon
ARBEID_OG_INNTEKT_URL: https://arbeid-og-inntekt-q1.dev-fss-pub.nais.io/api/v2
GRUNNLAG_MIN_ANT_MINUTTER_SIDEN_FORRIGE_INNHENTING: 1
KODEVERK_URL: https://kodeverk-api.nav.no
JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
kafka:
pool: nav-dev
azure_access_inbound:
- application: bidrag-ui
namespace: bidrag
cluster: dev-fss
- application: bisys
namespace: bidrag
cluster: dev-fss
- application: bidrag-dokument-forsendelse
namespace: bidrag
cluster: dev-gcp
- application: bidrag-dokument-bestilling
namespace: bidrag
cluster: dev-gcp
database:
dbname: bidrag-behandling-main
autoResize: true
tier: db-f1-micro
outbound-access-apps:
- bidrag-grunnlag
- bidrag-stonad-q1
- bidrag-dokument-forsendelse
- bidrag-tilgangskontroll
- bidrag-vedtak-q1
- bidrag-dokument-produksjon
outbound-access-hosts:
- bidrag-dokument.dev-fss-pub.nais.io
- bidrag-person.dev-fss-pub.nais.io
- bidrag-organisasjon.dev-fss-pub.nais.io
- bidrag-sjablon.dev-fss-pub.nais.io
- arbeid-og-inntekt.dev-fss-pub.nais.io
- kodeverk-api.nav.no
- bidrag-unleash-api.nav.cloud.nais.io
- bidrag-bbm.dev-fss-pub.nais.io
unleash:
env: development
secret_name: bidrag-behandling-unleash-api-token
71 changes: 71 additions & 0 deletions .nais/q2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: bidrag-behandling
ingresses:
- https://bidrag-behandling.intern.dev.nav.no
env:
SPRING_PROFILES_ACTIVE: live,nais,database-new
BIDRAG_PERSON_URL: https://bidrag-person-feature.dev-fss-pub.nais.io/bidrag-person
BIDRAG_PERSON_SCOPE: dev-fss.bidrag.bidrag-person-feature
BIDRAG_GRUNNLAG_URL: http://bidrag-grunnlag-feature
BIDRAG_GRUNNLAG_SCOPE: dev-gcp.bidrag.bidrag-grunnlag-feature
BIDRAG_FORSENDELSE_URL: http://bidrag-dokument-forsendelse-feature
BIDRAG_FORSENDELSE_SCOPE: dev-gcp.bidrag.bidrag-dokument-forsendelse-feature
BIDRAG_TILGANGSKONTROLL_URL: http://bidrag-tilgangskontroll-feature
BIDRAG_TILGANGGSKONTROLL_SCOPE: dev-gcp.bidrag.bidrag-tilgangskontroll-feature
BIDRAG_STONAD_URL: http://bidrag-stonad-q2
BIDRAG_STONAD_SCOPE: dev-gcp.bidrag.bidrag-stonad-q2
BIDRAG_VEDTAK_URL: http://bidrag-vedtak-q2
BIDRAG_VEDTAK_SCOPE: dev-gcp.bidrag.bidrag-vedtak-q2
BIDRAG_BBM_URL: https://bidrag-bbm-feature.dev-fss-pub.nais.io
BIDRAG_BBM_SCOPE: dev-fss.bidrag.bidrag-bbm-feature
BIDRAG_DOKUMENT_PRODUKSJON_URL: http://bidrag-dokument-produksjon
BIDRAG_DOKUMENT_PRODUKSJON_SCOPE: dev-gcp.bidrag.bidrag-dokument-produksjon
BIDRAG_DOKUMENT_URL: https://bidrag-dokument-feature.dev-fss-pub.nais.io/bidrag-dokument
BIDRAG_DOKUMENT_SCOPE: dev-fss.bidrag.bidrag-dokument-feature
BIDRAG_SAK_URL: https://bidrag-sak-feature.dev-fss-pub.nais.io/bidrag-sak
BIDRAG_SAK_SCOPE: dev-fss.bidrag.bidrag-sak-feature
TOPIC_VEDTAK: bidrag.vedtak-q2
BIDRAG_ORGANISASJON_SCOPE: dev-fss.bidrag.bidrag-organisasjon-feature
BIDRAG_ORGANISASJON_URL: https://bidrag-organisasjon-feature.dev-fss-pub.nais.io/bidrag-organisasjon
BIDRAG_SJABLON_URL: https://bidrag-sjablon.dev-fss-pub.nais.io/bidrag-sjablon
ARBEID_OG_INNTEKT_URL: https://arbeid-og-inntekt-q1.dev-fss-pub.nais.io/api/v2
GRUNNLAG_MIN_ANT_MINUTTER_SIDEN_FORRIGE_INNHENTING: 1
KODEVERK_URL: https://kodeverk-api.nav.no
JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
kafka:
pool: nav-dev
azure_access_inbound:
- application: bidrag-ui
namespace: bidrag
cluster: dev-fss
- application: bisys
namespace: bidrag
cluster: dev-fss
- application: bidrag-dokument-forsendelse
namespace: bidrag
cluster: dev-gcp
- application: bidrag-dokument-bestilling
namespace: bidrag
cluster: dev-gcp
database:
dbname: bidrag-behandling-main
autoResize: true
tier: db-f1-micro
outbound-access-apps:
- bidrag-grunnlag
- bidrag-stonad-q2
- bidrag-dokument-forsendelse
- bidrag-tilgangskontroll
- bidrag-vedtak-q2
- bidrag-dokument-produksjon
outbound-access-hosts:
- bidrag-dokument.dev-fss-pub.nais.io
- bidrag-person.dev-fss-pub.nais.io
- bidrag-organisasjon.dev-fss-pub.nais.io
- bidrag-sjablon.dev-fss-pub.nais.io
- arbeid-og-inntekt.dev-fss-pub.nais.io
- kodeverk-api.nav.no
- bidrag-unleash-api.nav.cloud.nais.io
- bidrag-bbm.dev-fss-pub.nais.io
unleash:
env: development
secret_name: bidrag-behandling-unleash-api-token
71 changes: 71 additions & 0 deletions .nais/q4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: bidrag-behandling
ingresses:
- https://bidrag-behandling.intern.dev.nav.no
env:
SPRING_PROFILES_ACTIVE: live,nais,database-new
BIDRAG_PERSON_URL: https://bidrag-person-feature.dev-fss-pub.nais.io/bidrag-person
BIDRAG_PERSON_SCOPE: dev-fss.bidrag.bidrag-person-feature
BIDRAG_GRUNNLAG_URL: http://bidrag-grunnlag-feature
BIDRAG_GRUNNLAG_SCOPE: dev-gcp.bidrag.bidrag-grunnlag-feature
BIDRAG_FORSENDELSE_URL: http://bidrag-dokument-forsendelse-feature
BIDRAG_FORSENDELSE_SCOPE: dev-gcp.bidrag.bidrag-dokument-forsendelse-feature
BIDRAG_TILGANGSKONTROLL_URL: http://bidrag-tilgangskontroll-feature
BIDRAG_TILGANGGSKONTROLL_SCOPE: dev-gcp.bidrag.bidrag-tilgangskontroll-feature
BIDRAG_STONAD_URL: http://bidrag-stonad-q4
BIDRAG_STONAD_SCOPE: dev-gcp.bidrag.bidrag-stonad-q4
BIDRAG_VEDTAK_URL: http://bidrag-vedtak-q4
BIDRAG_VEDTAK_SCOPE: dev-gcp.bidrag.bidrag-vedtak-q4
BIDRAG_BBM_URL: https://bidrag-bbm-feature.dev-fss-pub.nais.io
BIDRAG_BBM_SCOPE: dev-fss.bidrag.bidrag-bbm-feature
BIDRAG_DOKUMENT_PRODUKSJON_URL: http://bidrag-dokument-produksjon
BIDRAG_DOKUMENT_PRODUKSJON_SCOPE: dev-gcp.bidrag.bidrag-dokument-produksjon
BIDRAG_DOKUMENT_URL: https://bidrag-dokument-feature.dev-fss-pub.nais.io/bidrag-dokument
BIDRAG_DOKUMENT_SCOPE: dev-fss.bidrag.bidrag-dokument-feature
BIDRAG_SAK_URL: https://bidrag-sak-feature.dev-fss-pub.nais.io/bidrag-sak
BIDRAG_SAK_SCOPE: dev-fss.bidrag.bidrag-sak-feature
TOPIC_VEDTAK: bidrag.vedtak-q4
BIDRAG_ORGANISASJON_SCOPE: dev-fss.bidrag.bidrag-organisasjon-feature
BIDRAG_ORGANISASJON_URL: https://bidrag-organisasjon-feature.dev-fss-pub.nais.io/bidrag-organisasjon
BIDRAG_SJABLON_URL: https://bidrag-sjablon.dev-fss-pub.nais.io/bidrag-sjablon
ARBEID_OG_INNTEKT_URL: https://arbeid-og-inntekt-q1.dev-fss-pub.nais.io/api/v2
GRUNNLAG_MIN_ANT_MINUTTER_SIDEN_FORRIGE_INNHENTING: 1
KODEVERK_URL: https://kodeverk-api.nav.no
JAVA_TOOL_OPTIONS: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
kafka:
pool: nav-dev
azure_access_inbound:
- application: bidrag-ui
namespace: bidrag
cluster: dev-fss
- application: bisys
namespace: bidrag
cluster: dev-fss
- application: bidrag-dokument-forsendelse
namespace: bidrag
cluster: dev-gcp
- application: bidrag-dokument-bestilling
namespace: bidrag
cluster: dev-gcp
database:
dbname: bidrag-behandling-main
autoResize: true
tier: db-f1-micro
outbound-access-apps:
- bidrag-grunnlag
- bidrag-stonad-q4
- bidrag-dokument-forsendelse
- bidrag-tilgangskontroll
- bidrag-vedtak-q4
- bidrag-dokument-produksjon
outbound-access-hosts:
- bidrag-dokument.dev-fss-pub.nais.io
- bidrag-person.dev-fss-pub.nais.io
- bidrag-organisasjon.dev-fss-pub.nais.io
- bidrag-sjablon.dev-fss-pub.nais.io
- arbeid-og-inntekt.dev-fss-pub.nais.io
- kodeverk-api.nav.no
- bidrag-unleash-api.nav.cloud.nais.io
- bidrag-bbm.dev-fss-pub.nais.io
unleash:
env: development
secret_name: bidrag-behandling-unleash-api-token
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ LABEL maintainer="Team Bidrag" \
email="[email protected]"

COPY ./target/bidrag-behandling-*.jar app.jar
ENV SPRING_PROFILES_ACTIVE=nais
EXPOSE 8080
7 changes: 6 additions & 1 deletion initEnv.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
#!/bin/bash
kubectx dev-gcp
kubectl exec --tty deployment/bidrag-behandling-feature printenv | grep -E 'AZURE_|_URL|SCOPE|UNLEASH' | grep -v -e 'BIDRAG_FORSENDELSE_URL' -e 'BIDRAG_TILGANGSKONTROLL_URL' -e 'BIDRAG_GRUNNLAG_URL' -e 'BIDRAG_VEDTAK_SCOPE' -e 'BIDRAG_VEDTAK_URL' -e 'BIDRAG_BBM_URL' > src/test/resources/application-lokal-nais-secrets.properties

deployment="deployment/bidrag-behandling"
[ "$1" == "q1" ] && deployment="deployment/bidrag-behandling-feature"
echo "Henter miljøparametere fra deployment: $deployment"
kubectl exec --tty $deployment printenv | grep -E 'AZURE_|_URL|SCOPE|UNLEASH' | grep -v -e 'BIDRAG_FORSENDELSE_URL' -e 'BIDRAG_TILGANGSKONTROLL_URL' -e 'BIDRAG_GRUNNLAG_URL' -e 'BIDRAG_VEDTAK_SCOPE' -e 'BIDRAG_VEDTAK_URL' -e 'BIDRAG_STONAD_URL' > src/test/resources/application-lokal-nais-secrets.properties
30 changes: 29 additions & 1 deletion src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ spring.kafka:
enableAutoCommit: false
listener:
ackMode: RECORD


---
spring:
config.activate.on-profile: database-legacy
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/${DB_DATABASE}?user=${DB_USERNAME}&password=${DB_PASSWORD}
Expand All @@ -158,4 +162,28 @@ spring:
enabled: true
locations: classpath:/db/migration
jpa:
database: postgresql
database: postgresql

---
spring:
config.activate.on-profile: database-new
datasource:
type: com.zaxxer.hikari.HikariDataSource
url: ${DB_JDBC_URL}
hikari:
idle-timeout: 10001
max-lifetime: 30001
connectionTimeout: 1000
maximum-pool-size: 10
minimum-idle: 1
data-source-properties:
ssl: true
sslmode: ${DB_SSLMODE}
sslcert: ${DB_SSLCERT}
sslkey: ${DB_SSLKEY_PK8}
sslrootcert: ${DB_SSLROOTCERT}
flyway:
enabled: true
locations: classpath:/db/migration
jpa:
database: postgresql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class BidragBehandlingLocal

fun main(args: Array<String>) {
val app = SpringApplication(BidragBehandlingLocal::class.java)
app.setAdditionalProfiles("local", "nais", "Lokal-nais-secrets")
app.setAdditionalProfiles("local", "nais", "Lokal-nais-secrets", "database-legacy")
app.run(*args)
}
Loading

0 comments on commit 7bcd717

Please sign in to comment.