Skip to content

Upgrade

Prerequisites

1. Review the release notes

Read the release notes of the target release. Apply any action listed under Breaking changes.

2. Back up

Create a backup with Backup and Restore.

3. Upgrade

sudo snap refresh ella-core

In docker-compose.yaml, set the image tag to the target release:

image: ghcr.io/ellanetworks/ella-core:<target-version>

Recreate the container:

docker compose up -d

Download the manifests of the target release:

git clone --depth 1 --branch <target-version> https://github.com/ellanetworks/core.git core-<target-version>

Reapply your changes to core-<target-version>/k8s/core-ran-nad.yaml and core-<target-version>/k8s/core-configmap.yaml.

Apply the manifests:

kubectl apply -k core-<target-version>/k8s

Wait for the rollout to complete:

kubectl -n ella rollout status statefulset/ella-core

Upgrade the followers first and the leader last. Repeat these steps for each node:

  1. Open the Cluster page on any healthy node other than the one you are about to upgrade.
  2. Click Drain next to the node. Wait until its Drain State is drained.
  3. On that host, refresh the snap:

    sudo snap refresh ella-core
    
  4. On the Cluster page, wait for the node to return to Healthy.

  5. Click Resume next to the node. Wait until its Drain State is active.

4. Verify

curl -k <ella-core-api-url>/api/v1/status

Confirm version is the target release and ready is true.

On the Cluster page, confirm:

  • Every node's Version is the target release.
  • Every node is Healthy and its Drain State is active.
  • Schema shows a single version.

Roll back

  1. Stop Ella Core:

    sudo snap stop --disable ella-core.cored
    
  2. Revert to the previous release:

    sudo snap revert ella-core
    
  3. Restore the backup with Offline Restore.

  1. In docker-compose.yaml, set the image tag back to the previous release.
  2. Stop the container:

    docker compose stop
    
  3. Delete the database from the data volume:

    docker run --rm -v <project>_ella-data:/data alpine sh -c 'rm -rf /data/ella.db /data/ella.db-wal /data/ella.db-shm /data/raft /data/cluster-tls'
    
  4. Copy the backup into the data volume as restore.bundle:

    docker compose cp backup.tar.gz ella-core:/data/restore.bundle
    
  5. Recreate the container:

    docker compose up -d
    
  1. Scale Ella Core down:

    kubectl -n ella scale statefulset/ella-core --replicas=0
    
  2. Start a pod that mounts the data volume:

    kubectl -n ella run restore --image=alpine --restart=Never \
      --overrides='{"spec":{"containers":[{"name":"restore","image":"alpine","command":["sleep","3600"],"volumeMounts":[{"name":"data","mountPath":"/data"}]}],"volumes":[{"name":"data","persistentVolumeClaim":{"claimName":"data-ella-core-0"}}]}}'
    kubectl -n ella wait --for=condition=Ready pod/restore
    
  3. Delete the database and copy the backup as restore.bundle:

    kubectl -n ella exec restore -- sh -c 'rm -rf /data/ella.db /data/ella.db-wal /data/ella.db-shm /data/raft /data/cluster-tls'
    kubectl -n ella cp backup.tar.gz restore:/data/restore.bundle
    kubectl -n ella delete pod restore
    
  4. Download the manifests of the previous release:

    git clone --depth 1 --branch <previous-version> https://github.com/ellanetworks/core.git core-<previous-version>
    
  5. Reapply your changes to core-<previous-version>/k8s/core-ran-nad.yaml and core-<previous-version>/k8s/core-configmap.yaml.

  6. Apply the manifests:

    kubectl apply -k core-<previous-version>/k8s
    
  7. Scale Ella Core up:

    kubectl -n ella scale statefulset/ella-core --replicas=1
    
  1. On every node, stop Ella Core and revert to the previous release:

    sudo snap stop --disable ella-core.cored
    sudo snap revert ella-core
    
  2. Restore the backup with Offline Restore.