Installing Codacy Self-hosted¶
This documentation guides you on how to install Codacy Self-hosted on Kubernetes or MicroK8s.
To install Codacy you must complete these main steps:
Setting up the system requirements
Ensure that your infrastructure meets the hardware and system requirements to run Codacy.
Install Codacy on the cluster using our Helm chart that includes all the necessary components and dependencies.
Configure integrations with Git providers and set up monitoring.
The next sections include detailed instructions on how to complete each step of the installation process. Make sure that you complete each step before advancing to the next one.
1. Setting up the system requirements¶
Before you start, you must prepare and and provision the database server and Kubernetes or MicroK8s cluster that will host Codacy.
Carefully review and set up the system requirements to run Codacy by following the instructions on the page below:
Optionally, you can follow one of the guides below to quickly create a new Kubernetes or MicroK8s cluster that satisfies the characteristics described in the system requirements:
2. Installing Codacy¶
Install Codacy on an existing cluster using our Helm chart:
Make sure that you have the following tools installed on your machine:
Create a cluster namespace called
codacythat will group all resources related to Codacy.
kubectl create namespace codacy
Add the Docker registry credentials provided by Codacy together with your license to a cluster Secret. This is necessary because some Codacy Docker images are currently private.
<docker_password>with the Docker registry username and password and run the following command:
kubectl create secret docker-registry docker-credentials \ --docker-username=<docker_username> \ --docker-password=<docker_password> \ --namespace codacy
Download the template file
values-production.yamland use a text editor of your choice to edit the value placeholders as described in the comments.
Create an address record on your DNS provider mapping the hostname you used in the previous step to the IP address of your Ingress controller.
If you are using MicroK8s you must map the hostname to the public IP address of the machine running MicroK8s.
Add Codacy's chart repository to your Helm client and install the Codacy chart using the file
If you are using MicroK8s you must download and use the file
values-microk8s.yamltogether with the file
values-production.yamlby uncommenting the last line in the
helm upgradecommand below.
helm repo add codacy-stable https://charts.codacy.com/stable/ helm repo update helm upgrade --install codacy codacy-stable/codacy \ --namespace codacy \ --version 3.2.0 \ --values values-production.yaml # --values values-microk8s.yaml
By now all the Codacy pods should be starting in the cluster. Run the following command and wait for all the pods to have the status Running, which can take several minutes:
$ kubectl get pods -n codacy NAME READY STATUS RESTARTS AGE codacy-activities-6d9db9499-stk2k 1/1 Running 2 8m57s codacy-activitiesdb-0 1/1 Running 0 8m57s codacy-api-f7897b965-fgn67 1/1 Running 0 8m57s codacy-api-f7897b965-kkqsx 1/1 Running 0 8m57s codacy-crow-7c957d45f6-b8zp2 1/1 Running 2 8m57s codacy-crowdb-0 1/1 Running 0 8m57s codacy-engine-549bcb69d9-cgrqf 1/1 Running 1 8m57s codacy-engine-549bcb69d9-sh5f4 1/1 Running 1 8m57s codacy-fluentdoperator-x5vr2 2/2 Running 0 8m57s codacy-hotspots-api-b7b9db896-68gxx 1/1 Running 2 8m57s codacy-hotspots-worker-76bb45b4d6-8gz45 1/1 Running 3 8m57s codacy-hotspotsdb-0 1/1 Running 0 8m57s codacy-listener-868b784dcf-npdfh 1/1 Running 0 8m57s codacy-listenerdb-0 1/1 Running 0 8m57s codacy-minio-7cfdc7b4f4-254gz 1/1 Running 0 8m57s codacy-nfsserverprovisioner-0 1/1 Running 0 8m57s codacy-portal-774d9fc596-rwqj5 1/1 Running 2 8m56s codacy-rabbitmq-ha-0 1/1 Running 0 8m57s codacy-ragnaros-69459775b5-hmj4d 1/1 Running 3 8m57s codacy-remote-provider-service-8fb8556b-rr4ws 1/1 Running 0 8m56s codacy-worker-manager-656dbf8d6d-n4j7c 1/1 Running 0 8m57s
3. Configuring Codacy¶
After successfully installing Codacy on your cluster, you are now ready to perform the post-install configuration steps:
Use a browser to navigate to the Codacy hostname previously configured on the file
Log in using your Git provider account. This automatically creates a Codacy administrator account with your credentials.
Follow Codacy's onboarding process, which will guide you through the following steps:
As a last step we recommend that you set up monitoring on your Codacy instance.
If you run into any issues while configuring Codacy, be sure to check our troubleshooting guide for more help.
Did this page help you?
Thank you for the feedback!