diff --git a/.circleci/config.yml b/.circleci/config.yml index f40b6273..46ddc8c1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -42,9 +42,6 @@ references: cryptoSecret: "TEST_STRING_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789" akka: sessionSecret: "TEST_STRING_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789" - filestore: - contentsSecret: "TEST_STRING_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789" - uuidSecret: "TEST_STRING_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789" cacheSecret: "TEST_STRING_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789_0123456789" codacy: crow: @@ -58,8 +55,6 @@ references: create: true metricsdb: create: true - filestoredb: - create: true jobsdb: create: true crowdb: @@ -810,7 +805,7 @@ workflows: <<: *helm_values requires: - helm_push_incubator - + - codacy/microk8s_install: name: install_k8s-1.30_helm-3.16.3 helm_repo: "https://charts.codacy.com/incubator" diff --git a/.do/Makefile b/.do/Makefile index 2159fc68..fd9d0dbe 100644 --- a/.do/Makefile +++ b/.do/Makefile @@ -20,8 +20,6 @@ define call_helm_install --set global.imagePullSecrets[0].name=docker-credentials \ --set global.play.cryptoSecret=$${SHARED_PLAY_CRYPTO_SECRET} \ --set global.akka.sessionSecret=$${SHARED_AKKA_SESSION_SECRET} \ - --set global.filestore.contentsSecret=$${SHARED_PLAY_CRYPTO_SECRET} \ - --set global.filestore.uuidSecret=$${SHARED_PLAY_CRYPTO_SECRET} \ --set global.cacheSecret=$${SHARED_PLAY_CRYPTO_SECRET} \ --set codacy-api.config.license=$${CODACY_LICENSE} \ --set global.codacy.url=${4} \ diff --git a/.do/db-cluster/variables.tf b/.do/db-cluster/variables.tf index 7d42875a..d244f527 100644 --- a/.do/db-cluster/variables.tf +++ b/.do/db-cluster/variables.tf @@ -37,7 +37,7 @@ variable "environment" { variable "db_names" { type = list(string) - default = ["accounts", "analysis", "results", "metrics", "filestore", "jobs", "crow", "listener"] + default = ["accounts", "analysis", "results", "metrics", "jobs", "crow", "listener"] } variable "postgres_instance_type" { diff --git a/README.md b/README.md index df987bf5..60536a71 100644 --- a/README.md +++ b/README.md @@ -58,8 +58,6 @@ Global parameters apply to all sub-charts and make it easier to configure resour | `global.codacy.crow.url` | Hostname to Crow within your Codacy installation | `nil` | | `global.play.cryptoSecret` | Secrets used internally for encryption. Generate one with \`openssl rand -base64 128 \| tr -dc 'a-zA-Z0-9'\` | `nil` | | `global.akka.sessionSecret` | Secrets used internally for encryption. Generate one with \`openssl rand -base64 128 \| tr -dc 'a-zA-Z0-9'\` | `nil` | -| `global.filestore.contentsSecret` | Secrets used internally for encryption. Generate one with \`openssl rand -base64 128 \| tr -dc 'a-zA-Z0-9'\` | `nil` | -| `global.filestore.uuidSecret` | Secrets used internally for encryption. Generate one with \`openssl rand -base64 128 \| tr -dc 'a-zA-Z0-9'\` | `nil` | | `global.cacheSecret` | Secrets used internally for encryption. Generate one with \`openssl rand -base64 128 \| tr -dc 'a-zA-Z0-9'\` | `nil` | | `global.minio.create` | Create minio internally | `nil` | | `global.rabbitmq.create` | Create rabbitmq internally | `nil` | @@ -85,11 +83,6 @@ Global parameters apply to all sub-charts and make it easier to configure resour | `global.metricsdb.postgresqlPassword` | Hostname of the Postgresql server | `nil` | | `global.metricsdb.host` | Hostname of the Postgresql server | `nil` | | `global.metricsdb.service.port` | Port of the Postgresql server | `5432` | -| `global.filestoredb.postgresqlUsername` | Username of the Postgresql server | `codacy` | -| `global.filestoredb.postgresqlDatabase` | Database name of the Postgresql server | `filestore` | -| `global.filestoredb.postgresqlPassword` | Hostname of the Postgresql server | `nil` | -| `global.filestoredb.host` | Hostname of the Postgresql server | `nil` | -| `global.filestoredb.service.port` | Port of the Postgresql server | `5432` | | `global.jobsdb.postgresqlUsername` | Username of the Postgresql server | `codacy` | | `global.jobsdb.postgresqlDatabase` | Database name of the Postgresql server | `jobs` | | `global.jobsdb.postgresqlPassword` | Hostname of the Postgresql server | `nil` | diff --git a/codacy/requirements-dev.yaml b/codacy/requirements-dev.yaml index 871c140e..1270951e 100644 --- a/codacy/requirements-dev.yaml +++ b/codacy/requirements-dev.yaml @@ -16,7 +16,7 @@ dependencies: repository: https://raw.githubusercontent.com/bitnami/charts/pre-2022/bitnami alias: postgres condition: global.defaultdb.create, global.analysisdb.create, global.resultsdb.create, - global.metricsdb.create, global.filestoredb.create, global.jobsdb.create + global.metricsdb.create, global.jobsdb.create - name: log-router version: 0.6.4 diff --git a/codacy/requirements.yaml b/codacy/requirements.yaml index a6b86a1b..f00ee662 100644 --- a/codacy/requirements.yaml +++ b/codacy/requirements.yaml @@ -18,7 +18,7 @@ dependencies: repository: https://raw.githubusercontent.com/bitnami/charts/defb094c658024e4aa8245622dab202874880cbc/bitnami alias: postgres condition: global.defaultdb.create, global.analysisdb.create, global.resultsdb.create, - global.metricsdb.create, global.filestoredb.create, global.jobsdb.create + global.metricsdb.create, global.jobsdb.create - name: log-router version: 0.6.4 diff --git a/codacy/values-production.yaml b/codacy/values-production.yaml index bddaed44..a1f05f49 100644 --- a/codacy/values-production.yaml +++ b/codacy/values-production.yaml @@ -11,9 +11,6 @@ global: cryptoSecret: <--- generated-secret ---> # Generate one with `openssl rand -base64 128 | tr -dc 'a-zA-Z0-9'` akka: sessionSecret: <--- generated-secret ---> # Generate one with `openssl rand -base64 128 | tr -dc 'a-zA-Z0-9'` - filestore: - contentsSecret: <--- generated-secret ---> # Generate one with `openssl rand -base64 128 | tr -dc 'a-zA-Z0-9'` - uuidSecret: <--- generated-secret ---> # Generate one with `openssl rand -base64 128 | tr -dc 'a-zA-Z0-9'` cacheSecret: <--- generated-secret ---> # Generate one with `openssl rand -base64 128 | tr -dc 'a-zA-Z0-9'` workerManager: @@ -75,14 +72,6 @@ global: host: <--- codacy-db-host ---> service: port: <--- codacy-db-port ---> - filestoredb: - create: false - postgresqlUsername: <--- codacy-db-username ---> - postgresqlDatabase: filestore # You need to create the DB manually - postgresqlPassword: <--- codacy-db-password ---> - host: <--- codacy-db-host ---> - service: - port: <--- codacy-db-port ---> jobsdb: create: false postgresqlUsername: <--- codacy-db-username ---> diff --git a/codacy/values.yaml b/codacy/values.yaml index b186a993..466a8336 100644 --- a/codacy/values.yaml +++ b/codacy/values.yaml @@ -114,10 +114,6 @@ global: akka: {} # sessionSecret: "PLEASE_CHANGE_ME" # Generate one with `cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1` - filestore: - contentsSecret: "PLEASE_CHANGE_ME" # Generate one with `cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1` - uuidSecret: "PLEASE_CHANGE_ME" # Generate one with `cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1` - cacheSecret: "PLEASE_CHANGE_ME" # Generate one with `cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 128 | head -n 1` minio: @@ -188,16 +184,6 @@ global: service: port: 5432 - filestoredb: - create: false - imageTag: "9.6.2" - postgresqlUsername: codacy - postgresqlDatabase: filestore - postgresqlPassword: codacy - host: codacy-postgres - service: - port: 5432 - jobsdb: create: false imageTag: "9.6.2" @@ -319,7 +305,6 @@ postgres: CREATE DATABASE analysis WITH OWNER=codacy; CREATE DATABASE results WITH OWNER=codacy; CREATE DATABASE metrics WITH OWNER=codacy; - CREATE DATABASE filestore WITH OWNER=codacy; CREATE DATABASE jobs WITH OWNER=codacy; CREATE DATABASE listener WITH OWNER=codacy; CREATE DATABASE crow WITH OWNER=codacy; diff --git a/docs/maintenance/database.md b/docs/maintenance/database.md index 73d3c850..3711bec7 100644 --- a/docs/maintenance/database.md +++ b/docs/maintenance/database.md @@ -7,17 +7,16 @@ description: Instructions on how to migrate your Codacy Self-hosted database. Migrating databases between pods is a straightforward process with 3 steps: 1. Dump the databases to a dump file. -2. Apply the dump file. -3. Delete the dump file. +1. Apply the dump file. +1. Delete the dump file. You will have to dump all the following databases: 1. accounts -2. analysis -3. filestore -4. jobs -5. metrics -6. results +1. analysis +1. jobs +1. metrics +1. results ## Requirements @@ -71,7 +70,7 @@ DEST_HOSTPORT=$4 DB_USER=$5 DB_PASSWORD=$6 -declare -a dbs=(accounts analysis filestore jobs metrics results) +declare -a dbs=(accounts analysis jobs metrics results) for db in ${dbs[@]} do PGPASSWORD=$DB_PASSWORD pg_dump -h $SRC_HOSTNAME -p $SRC_HOSTPORT -U $DB_USER --clean -Fc $db > /tmp/$db.dump diff --git a/docs/requirements.md b/docs/requirements.md index 317b0742..7fce8713 100644 --- a/docs/requirements.md +++ b/docs/requirements.md @@ -155,7 +155,6 @@ Before installing Codacy you must create a set of databases that will be used by CREATE DATABASE analysis WITH OWNER=codacy; CREATE DATABASE results WITH OWNER=codacy; CREATE DATABASE metrics WITH OWNER=codacy; - CREATE DATABASE filestore WITH OWNER=codacy; CREATE DATABASE jobs WITH OWNER=codacy; CREATE DATABASE listener WITH OWNER=codacy; CREATE DATABASE crow WITH OWNER=codacy;