Skip to content

Commit

Permalink
Prodsette endringer i dev (#160)
Browse files Browse the repository at this point in the history
* Bump org.springdoc:springdoc-openapi-ui from 1.7.0 to 1.8.0 (#144)

Bumps org.springdoc:springdoc-openapi-ui from 1.7.0 to 1.8.0.

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump com.squareup.okhttp3:okhttp from 4.11.0 to 4.12.0 (#145)

* Bump com.squareup.okhttp3:okhttp from 4.11.0 to 4.12.0

Bumps [com.squareup.okhttp3:okhttp](https://github.com/square/okhttp) from 4.11.0 to 4.12.0.
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](square/okhttp@parent-4.11.0...parent-4.12.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* oppdatering prometheus

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Klara M Helgemo <[email protected]>

* Bump softprops/action-gh-release from 1 to 2 in /.github/workflows (#146)

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Klara M Helgemo <[email protected]>

* Legg til generativ KI merking

* Oppgrader til Java 21 (#153)

* Bump org.testcontainers:postgresql from 1.19.7 to 1.19.8 (#155)

Bumps [org.testcontainers:postgresql](https://github.com/testcontainers/testcontainers-java) from 1.19.7 to 1.19.8.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/main/CHANGELOG.md)
- [Commits](testcontainers/testcontainers-java@1.19.7...1.19.8)

---
updated-dependencies:
- dependency-name: org.testcontainers:postgresql
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Oppgraderer databasen til postgres 15 i dev (#159)

* Oppgrader til Java 21

* Prodsette oppgradering Java 21 (#154)

* Bump org.springdoc:springdoc-openapi-ui from 1.7.0 to 1.8.0 (#144)

Bumps org.springdoc:springdoc-openapi-ui from 1.7.0 to 1.8.0.

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump com.squareup.okhttp3:okhttp from 4.11.0 to 4.12.0 (#145)

* Bump com.squareup.okhttp3:okhttp from 4.11.0 to 4.12.0

Bumps [com.squareup.okhttp3:okhttp](https://github.com/square/okhttp) from 4.11.0 to 4.12.0.
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](square/okhttp@parent-4.11.0...parent-4.12.0)

---
updated-dependencies:
- dependency-name: com.squareup.okhttp3:okhttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* oppdatering prometheus

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Klara M Helgemo <[email protected]>

* Bump softprops/action-gh-release from 1 to 2 in /.github/workflows (#146)

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](softprops/action-gh-release@v1...v2)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Klara M Helgemo <[email protected]>

* Legg til generativ KI merking

* Oppgrader til Java 21 (#153)

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sondre Larsen Ovrid <[email protected]>
Co-authored-by: Mathias S. Müller <[email protected]>

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sondre Larsen Ovrid <[email protected]>
Co-authored-by: Mathias S. Müller <[email protected]>

* Postgres 15 (#161)

* Oppgrader til Java 21

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

* Forklarende tekst i Readme

* Migrering til Postgres 15 (#162)

* Oppgrader til Java 21

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

* Migrerer databasen i dev til pg15

* Forklarende tekst i Readme

* Forbereder appen for å kopiere data fra gammel til ny db i prod

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sondre Larsen Ovrid <[email protected]>
Co-authored-by: Mathias S. Müller <[email protected]>
  • Loading branch information
4 people authored Jul 5, 2024
1 parent a0f1c35 commit 7b5932a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .nais/application/application-config-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ metadata:
spec:
image: {{image}}
replicas:
min: 2
max: 4
min: 0
max: 0
cpuThresholdPercentage: 75
port: 8080
webproxy: true
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,19 @@ Interne henvendelser kan sendes via Slack i kanalen #po-arbeidsoppfølging.
## Kode generert av GitHub Copilot

Dette repoet bruker GitHub Copilot til å generere kode.
## PostgreSQL
Innloggingsinformasjon til databasen: https://vault.adeo.no/

Dev: vault read postgresql/preprod-fss/creds/veilarboppgave-pg15-dev-admin

Ting å passe på ved oppgradering av databasen:
1. Lag PR i repo database-iac, eksempel https://github.com/navikt/database-iac/pull/592 Ny database får gjerne nytt navn, eks veilarboppgave-pg15
I repoet database-iac finner du bla hostnavn og port
2. Lag PR i repo vault.iac, eksempel: https://github.com/navikt/vault-iac/pull/5514
Ny database må legges inn i terraform/teams/pto/apps/veilarboppgave.yml og i terraform/teams/pto/pto.yml, både under dev og prod
3. I dev: Du kan opprette tabeller i den nye databasen ved å ta ut DDlene fra gammel db, og tilpasse skriptet med nytt navn. Kjør skriptet.
4. I dev: Bruk Import/Export og Copy table to.. (F5) Dobbeltklikk på public i ny database, og kopier. Da kopieres data med riktig user (ikke deg selv)
5. I dev: Vault: Sjekk at url til ny database stemmer med det som er satt i database-iac. Gå inn i Secrets kv/preprod/fss og velg veilarboppgave , q1.
Hvis ikke VEILARBOPPGAVE_DB_URL er riktig, velg Edit secret og sett riktige verdier.
6. Oppdater koden med riktig databasenavn, se f.eks https://github.com/navikt/veilarboppgave/pull/160/files

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.19.7</version>
<version>1.19.8</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void migrateDb() {

Flyway.configure()
.dataSource(dataSource)
.initSql(format("SET ROLE \"veilarboppgave-%s-admin\"", environment))
.initSql(format("SET ROLE \"veilarboppgave-pg15-%s-admin\"", environment))
.load()
.migrate();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/no/nav/veilarboppgave/util/DbUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static HikariConfig createDataSourceConfig(String dbUrl) {
@SneakyThrows
private static DataSource createVaultRefreshDataSource(HikariConfig config) {
String environment = isProduction().orElse(false) ? "prod" : "dev";
String role = String.join("-", APPLICATION_NAME, environment, "admin");
String role = String.join("-", APPLICATION_NAME, "pg15", environment, "admin");

return HikariCPVaultUtil.createHikariDataSourceWithVaultIntegration(config, getMountPath(), role);
}
Expand Down

0 comments on commit 7b5932a

Please sign in to comment.