Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -58,8 +55,6 @@ references:
create: true
metricsdb:
create: true
filestoredb:
create: true
jobsdb:
create: true
crowdb:
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions .do/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion .do/db-cluster/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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` |
Expand All @@ -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` |
Expand Down
2 changes: 1 addition & 1 deletion codacy/requirements-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion codacy/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 0 additions & 11 deletions codacy/values-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 --->
Expand Down
15 changes: 0 additions & 15 deletions codacy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down
15 changes: 7 additions & 8 deletions docs/maintenance/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion docs/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down