With the Codacy chart it is possible to run all Codacy components and its dependencies with a single command line.
Each service in Codacy has its chart published to our charts repository.
This chart bundles all the components and their dependencies. For the bundle, we make use of the requirements capability of Helm.
Our Docker images are currently private and you will not be able to run the chart by yourself without the necessary Docker credentials. If you are interested in trying out Codacy contact our support at [email protected].
Documentation on a per-chart basis is listed here. Some of these repositories are private and accessible to Codacy engineers only.
- MinIO
- RabbitMQ-HA
- PostgreSQL
- kube-fluentd-operator
- Codacy/Website
- Codacy/API
- Codacy/Ragnaros
- Codacy/Repository Listener
- Codacy/Portal
- Codacy/Worker Manager
- Codacy/Engine
- Codacy/Remote Provider Service
- Codacy/SPA
The following table lists the configurable parameters of the Codacy chart and their default values.
Global parameters apply to all sub-charts and make it easier to configure resources across different components.
Parameter | Description | Default |
---|---|---|
global.codacy.url |
Hostname to your Codacy installation | nil |
global.codacy.backendUrl |
Hostname to your Codacy installation | nil |
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 |
global.rabbitmq.rabbitmqUsername |
Username for rabbitmq. If you are using the bundled version, change the rabbitmq-ha.rabbitmqUsername also. |
nil |
global.rabbitmq.rabbitmqPassword |
Password for rabbitmq. If you are using the bundled version, change the rabbitmq-ha.rabbitmqPassword also. |
nil |
global.defaultdb.postgresqlUsername |
Username of the Postgresql server | codacy |
global.defaultdb.postgresqlDatabase |
Database name of the Postgresql server | default |
global.defaultdb.postgresqlPassword |
Hostname of the Postgresql server | nil |
global.defaultdb.host |
Hostname of the Postgresql server | nil |
global.defaultdb.service.port |
Port of the Postgresql server | 5432 |
global.analysisdb.postgresqlUsername |
Username of the Postgresql server | codacy |
global.analysisdb.postgresqlDatabase |
Database name of the Postgresql server | analysis |
global.analysisdb.postgresqlPassword |
Hostname of the Postgresql server | nil |
global.analysisdb.host |
Hostname of the Postgresql server | nil |
global.analysisdb.service.port |
Port of the Postgresql server | 5432 |
global.resultsdb.postgresqlUsername |
Username of the Postgresql server | codacy |
global.resultsdb.postgresqlDatabase |
Database name of the Postgresql server | results201709 |
global.resultsdb.postgresqlPassword |
Hostname of the Postgresql server | nil |
global.resultsdb.host |
Hostname of the Postgresql server | nil |
global.resultsdb.service.port |
Port of the Postgresql server | 5432 |
global.metricsdb.postgresqlUsername |
Username of the Postgresql server | codacy |
global.metricsdb.postgresqlDatabase |
Database name of the Postgresql server | metrics |
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 |
global.jobsdb.host |
Hostname of the Postgresql server | nil |
global.jobsdb.service.port |
Port of the Postgresql server | 5432 |
global.crowdb.postgresqlUsername |
Username of the Postgresql server | codacy |
global.crowdb.postgresqlDatabase |
Database name of the Postgresql server | crow |
global.crowdb.postgresqlPassword |
Hostname of the Postgresql server | nil |
global.crowdb.host |
Hostname of the Postgresql server | nil |
global.crowdb.service.port |
Port of the Postgresql server | 5432 |
global.github.enabled |
Enable GitHub | nil |
global.github.login |
Show login for GitHub | nil |
global.github.app.name |
The name of the GitHub app to integrate with. Only required if you use the GitHub integration. | nil |
global.github.app.id |
App id used in Codacy to integrate with GitHub Apps | nil |
global.github.app.privateKey |
Private key generated after the GitHub App's creation | nil |
global.github.clientId |
Client id generated when creating the GitHub App | nil |
global.github.clientSecret |
Client secret generated when creating the GitHub App | nil |
global.githubEnterprise.enabled |
Enable GitHub Enterprise | nil |
global.githubEnterprise.login |
Show login for GitHub Enterprise | nil |
global.githubEnterprise.hostname |
Hostname of GitHub Enterprise instance | nil |
global.githubEnterprise.protocol |
Protocol of GitHub Enterprise instance | nil |
global.githubEnterprise.port |
Port of GitHub Enterprise instance | nil |
global.githubEnterprise.isPrivateMode |
Status of private mode on GitHub Enterprise instance | nil |
global.githubEnterprise.disableSSL |
Disable certificate validation on interaction with GitHub Enterprise instance | nil |
global.githubEnterprise.app.name |
The name of the GitHub app to integrate with. Only required if you use the GitHub Enterprise integration. | nil |
global.githubEnterprise.app.id |
App id used in Codacy to integrate with GitHub Apps in GitHub Enterprise | nil |
global.githubEnterprise.app.privateKey |
Private key generated after the GitHub App's creation in GitHub Enterprise | nil |
global.gitlab.enabled |
Enable GitLab | nil |
global.gitlab.login |
Show login for GitLab | nil |
global.gitlab.clientId |
Client id generated when creating the GitLab App | nil |
global.gitlab.clientSecret |
Client secret generated when creating the GitLab App | nil |
global.gitlabEnterprise.enabled |
Enable GitLab Enterprise | nil |
global.gitlabEnterprise.login |
Show login for GitLab Enterprise | nil |
global.gitlabEnterprise.hostname |
Hostname of GitLab Enterprise instance | nil |
global.gitlabEnterprise.protocol |
Protocol of GitLab Enterprise instance | nil |
global.gitlabEnterprise.port |
Port of GitLab Enterprise instance | nil |
global.gitlabEnterprise.clientId |
Client id generated when creating the GitLab App | nil |
global.gitlabEnterprise.clientSecret |
Client secret generated when creating the GitLab App | nil |
global.bitbucket.enabled |
Enable Bitbucket | nil |
global.bitbucket.login |
Show login for Bitbucket | nil |
global.bitbucket.key |
Bitbucket key used for OAuth | nil |
global.bitbucket.secret |
Bitbucket secret used for OAuth | nil |
global.bitbucketEnterprise.enabled |
Enable Bitbucket Enterprise | nil |
global.bitbucketEnterprise.login |
Show login for Bitbucket Enterprise | nil |
global.bitbucketEnterprise.hostname |
Hostname of Bitbucket Enterprise instance | nil |
global.bitbucketEnterprise.protocol |
Protocol of Bitbucket Enterprise instance | nil |
global.bitbucketEnterprise.port |
Port of Bitbucket Enterprise instance | nil |
global.bitbucketEnterprise.consumerKey |
Codacy app name to be identified on Bitbucket Enterprise instance | nil |
global.bitbucketEnterprise.consumerPublicKey |
Public key to be set on Bitbucket Enterprise instance | nil |
global.bitbucketEnterprise.consumerPrivateKey |
Private key to sign requests made to the bitbucketEnteprise instance | nil |
global.features.cloneSubmodules |
Enable sharing of configuration files for the analysis tools placed on git submodules | false |
global.workerManager.workers.config.analysis.maxFileSizeBytes |
Analysis max file size in bytes | 150000 |
global.workerManager.workers.config.analysis.pluginTimeout.min |
Minimum plugin timeout value in seconds | 300 |
global.workerManager.workers.config.analysis.pluginTimeout.max |
Maximum plugin timeout value in seconds | 900 |
global.workers.config.dedicatedMax |
Number of concurrent worker pod instances | 5 |
global.workers.config.inactivityTimeout |
Inactivity timeout for a worker | 30 |
global.git.branchListTimeoutSeconds |
Timeout in seconds for listing branches in git | 30 |
global.codacy.portal.pullRequestListTimeoutSeconds |
Timeout in seconds for listing pull requests from a git provider | 30 |
global.codacy.license |
Codacy license for your installation | nil |
global.listenerdb.postgresqlUsername |
Username of the Postgresql server | codacy |
global.listenerdb.postgresqlDatabase |
Database name of the Postgresql server | listener |
global.listenerdb.postgresqlPassword |
Hostname of the Postgresql server | PLEASE_CHANGE_ME |
global.listenerdb.host |
Hostname of the Postgresql server | codacy-listenerdb.codacy.svc.cluster.local |
global.listenerdb.service.port |
Port of the Postgresql server | 5432 |
global.crow.passwordAuth.enable |
Enable password authentication on crow | true |
global.crow.passwordAuth.username |
Crow login username | codacy |
global.crow.passwordAuth.password |
Crow login password | PLEASE_CHANGE_ME |
global.metrics.serviceMonitor.enabled |
Enable instantiation of ServiceMonitors for prometheus metric scraping | false |
global.metrics.grafana.enabled |
Enable grafana metrics. | false |
The following parameters are specific to each Codacy component.
Parameter | Description | Default |
---|---|---|
portal.replicaCount |
Number of replicas | 1 |
portal.image.repository |
Image repository | from dependency |
portal.image.tag |
Image tag | from dependency |
portal.service.type |
Portal service type | ClusterIP |
portal.service.annotations |
Annotations to be added to the Portal service | {} |
remote-provider-service.replicaCount |
Number of replicas | 1 |
remote-provider-service.image.repository |
Image repository | from dependency |
remote-provider-service.image.tag |
Image tag | from dependency |
remote-provider-service.service.type |
Remote Provider service type | ClusterIP |
remote-provider-service.service.annotations |
Annotations to be added to the Remote Provider service | {} |
listener.replicaCount |
Number of replicas | 1 |
listener.image.repository |
Image repository | from dependency |
listener.image.tag |
Image tag | from dependency |
listener.service.type |
Service type | ClusterIP |
listener.service.annotations |
Annotations to be added to the service | {} |
listener.persistence.claim.size |
Each pod mounts and NFS disk and claims this size. | 100Gi |
listener.nfsserverprovisioner.enabled |
Creates an NFS server and a storage class to mount volumes in that server. | true |
listener.nfsserverprovisioner.persistence.enabled |
Creates an NFS provisioner | true |
listener.nfsserverprovisioner.persistence.size |
Size of the NFS server disk | 120Gi |
listener.cacheCleanup.olderThanDays |
Data retention policy in days | 30 |
listener.cache.name |
External NFS volume name | listener-cache |
listener.cache.path |
External NFS volume mount path | /data |
listener.cache.nfs.server |
IP address of external NFS server | 0.0.0.0 |
listener.cache.nfs.path |
External NFS server directory or file system to be mounted | / |
engine.replicaCount |
Number of replicas | 1 |
engine.image.repository |
Image repository | from dependency |
engine.image.tag |
Image tag | from dependency |
engine.service.type |
Service type | ClusterIP |
engine.service.annotations |
Annotations to be added to the service | {} |
engine.metrics.serviceMonitor.enabled |
Create the ServiceMonitor resource type to be read by prometheus operator. | false |
codacy-api.image.repository |
Image repository | from dependency |
codacy-api.image.tag |
Image tag | from dependency |
codacy-api.service.type |
Service type | ClusterIP |
codacy-api.service.annotations |
Annotations to be added to the service | {} |
codacy-api.metrics.serviceMonitor.enabled |
Create the ServiceMonitor resource type to be read by prometheus operator. | false |
crow.replicaCount |
Number of replicas | 1 |
crow.image.repository |
Image repository | from dependency |
crow.image.tag |
Image tag | from dependency |
codacy-spa.replicaCount |
Number of replicas | 1 |
codacy-spa.image.repository |
Image repository | from dependency |
codacy-spa.image.tag |
Image tag | from dependency |
codacy-spa.service.type |
SPA service type | ClusterIP |
codacy-spa.service.annotations |
Annotations to be added to the SPA service | {} |
codacy-spa.config.codacy.pagination.repositoriesLimit |
Amount of repositories to fetch on each page | 100 |
The following parameters refer to components that are not internal to Codacy, but go as part of this bundle so that you can bootstrap Codacy faster.
Parameter | Description | Default |
---|---|---|
fluentdoperator.enable |
Enable fluentd operator. It gathers logs from Codacy so that you can send it to our support if needed. | true |
fluentdoperator.expirationDays |
Number of days to retain logs. More time uses more disk on minio and retention over 7 days is not recommended. | 7 |
fluentdoperator.flushTimeout |
Maximum time until Fluentd stops retrying to flush the logs. Values must be expressed using a unit, e.g. 10s , 5h . |
1h |
rabbitmq-ha.rabbitmqUsername |
Username for the bundled RabbitMQ. | rabbitmq-codacy |
rabbitmq-ha.rabbitmqPassword |
Password for the bundled RabbitMQ. | rabbitmq-codacy |
rabbitmq-ha.rabbitmqErlangCookie |
The rabbitmq Erlang cookie RabbitMQ. | nil |
You can also configure values for the PostgreSQL database via the Postgresql README.md
For overriding variables see: Customizing the chart
These are some relevant processes we follow when adding/editing something in this repo.
Currently, we have these set of installations done through circleci
.
All of them serve different purposes.
Installation | Cluster | Namespace | Purpose | Url |
---|---|---|---|---|
Dev | codacy-doks-cluster | codacy-dev | Updated automatically on each component pipeline. Rolling release of unstable | http://dev.k8s.dev.codacy.org |
Sandbox | codacy-doks-cluster | codacy-sandbox | Used for development. Manually updated. Check out this process on how to update it. | http://sandbox.k8s.dev.codacy.org |
Release | codacy-doks-cluster | codacy-release | Used for releases. Updated when the process on the RELEASE.md is triggered. | http://release.k8s.dev.codacy.org |
Using a DOKS cluster has the following requirements:
On macOS you can install all these tools with brew:
$ brew install doctl kubectl
To configure the cli create a personal access token, then run:
$ doctl auth init
Replace the <codacy-doks-cluster>
with the name of your target cluster.
$ doctl kubernetes cluster kubeconfig save <codacy-doks-cluster> --set-current-context
You can deploy your version of a component using any of the .circleci
pipelines we have set up in this project. Currently, we use the hourly_pipeline
for this purpose.
- Checkout this repository
- Create a new branch with a name like
sandbox/....
- Change the
requirements-dev.yaml
to use your custom versions. git push
of your branch- Follow the circleci pipeline and use kubectl to see if your installation was successful
- Go to http://sandbox.k8s.dev.codacy.org/ and test it out
To add a new component on this chart, you need to:
- Change the
requirements.yaml
- use the
helm dep up codacy/
command to update therequirements.lock
git push
To install a custom Codacy version:
sudo git clone git://github.com/codacy/chart -b <YOUR-BRANCH>
helm dep build ./chart/codacy
helm upgrade --install codacy ./chart/codacy/ --namespace codacy --atomic --timeout=300 --values ./<YOUR-VALUES-FILE>
To upgrade a custom Codacy version:
(cd chart; sudo git fetch --all --prune --tags; sudo git reset --hard origin/<YOUR-BRANCH>;)
helm dep build ./chart/codacy
helm upgrade --install codacy ./chart/codacy/ --namespace codacy --atomic --timeout=300 --values ./<YOUR-VALUES-FILE>