CodeScoring.Save Hosted Installation

The hosted option is deployed in k3s and uses the SQLite profile. This option is suitable for testing, demonstrations, small teams, and quick start without separate PostgreSQL and S3 infrastructure.

Installing k3s

# Install k3s
curl -sfL https://get.k3s.io | sh -

# Check status
sudo systemctl status k3s

# Configure kubectl
mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $USER:$USER ~/.kube/config
export KUBECONFIG=~/.kube/config

# Check cluster
kubectl get nodes

Preparing Helm and Namespace

The Helm repository address and Docker Registry with CodeScoring.Save images are provided by the vendor. The examples below use the placeholders <HELM_REPOSITORY_URL> and <REGISTRY_HOST>.

# Add CodeScoring Helm repository
helm repo add codescoring <HELM_REPOSITORY_URL>
helm repo update

# Create namespace
kubectl create namespace codescoring-save --dry-run=client -o yaml | kubectl apply -f -

Create an imagePullSecret for access to the private registry. The secret name must match the image.pullSecrets value in values.yaml.

kubectl create secret docker-registry codescoring-pvt-regcred \
  --namespace codescoring-save \
  --docker-server=<REGISTRY_HOST> \
  --docker-username=<USERNAME> \
  --docker-password=<PASSWORD> \
  --dry-run=client -o yaml | kubectl apply -f -

SQLite Configuration

For the SQLite option, disable built-in PostgreSQL and S3:

postgres:
  enabled: false

minio:
  enabled: false

Set the registry, tag, and pull secret for Save images in image:

image:
  registry: <REGISTRY_HOST>
  tag: <SAVE_VERSION>
  pullSecrets:
    - name: codescoring-pvt-regcred

Environment variables are defined in envs. To pass them to Pods, enable the envs ConfigMap and attach it to deployments:

envs:
  DATABASE_DRIVER: "sqlite"
  STORAGE_TYPE: "filesystem"
  DATABASE_SQLITE_PATH: "./data/repository_manager.db"

configMaps:
  envs:
    enabled: true

deploymentsGeneral:
  envConfigmaps:
    - envs

deployments:
  auth:
    containers:
    - name: auth
      image:
        repository: repository-manager-auth
      env:
        - name: DATABASE_DRIVER
          value: "sqlite"
        - name: DATABASE_SQLITE_PATH
          value: "/app/data/auth.db"

Installation

helm install codescoring-save codescoring/save \
  --namespace codescoring-save \
  --create-namespace \
  --values values.yaml

Installation Check

# Check pod status
kubectl get pods -n codescoring-save

# Check backend logs
kubectl logs -n codescoring-save -l app=backend --tail=100

# Check auth logs
kubectl logs -n codescoring-save -l app=auth --tail=100

# Check frontend logs
kubectl logs -n codescoring-save -l app=frontend --tail=100

# Check services
kubectl get svc -n codescoring-save

# Check ingress
kubectl get ingress -n codescoring-save

Initial Setup

The administrator password is set in AUTH_ADMIN_PASSWORD:

envs:
  AUTH_ADMIN_PASSWORD: <STRONG_PASSWORD>

After installation, open the web interface at the address configured in ingress.

Next Steps

After installation:

  1. Create the first repository
  2. Configure cleanup policies
  3. Create users and assign roles
Was this page helpful?