Skip to content

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 app.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:

postgres:
  enabled: false

For backend, set the SQLite driver in app.envs:

app:
  envs:
    DATABASE_DRIVER: sqlite

For the auth service, also change DATABASE_DRIVER in the existing auth container env block:

app:
  deployments:
    auth:
      containers:
        - name: auth
          env:
            - name: DATABASE_DRIVER
              value: sqlite

Auth container overrides

Do not create a separate minimal override only with app.deployments.auth.containers, because containers is a list. With a partial override, Helm can replace the whole container block. Change these values in the existing values.yaml.

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 the AUTH_ADMIN_PASSWORD variable in the auth container env.

In the current values.yaml, the auth container env is defined as a name/value list, for example:

- name: AUTH_ADMIN_PASSWORD
  value: <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
Страница была полезна?