First steps: Automatic migration from CES-VM to CES-MN
1. Set up the source instance
- connect to the terminal of the instance (e.g. directly via the VM or via SSH).
- switch to superuser mode:
sudo su - determine the installed Dogus and their version:
cesapp list - install CES-exporter:
apt update && apt install ces-exporter - check if the ces-exporter is running:
docker ps | grep ces-exporter - configure the API key for a secure HTTPS connection:
etcdctl set /config/ces-exporter/authentication/api_key <my-api-key> - if no SSH key pair exists yet, one must be generated without a passphrase (e.g. on the host - the exporter only needs the public key):
ssh-keygen -
configure the public SSH key for the connection between importer & exporter:
- With a file (e.g. “mykey.pub”): `cat mykey.pub | etcdctl set /config/ces-exporter/authentication/public_key`
- Without a file:
etcdctl set /config/ces-exporter/authentication/public_key "<public key>"
- determine the FQDN for the subsequent configuration of the importer:
etcdctl get /config/_global/fqdn
2. Set up the target instance
- follow the k8s-ecosystem installation guide to set up a new multinode CES instance. a. The Dogus must be installed in the same versions as on the instance to be migrated.
- connect to the instance by setting the Kubernetes context accordingly.
-
create a Kubernetes secret with the following information for the importer:
- API key (see section 1.6)
- SSH private key (see section 1.7)
- Mail password (if required)
You can create the secret with the following
kubectlcommand:kubectl -n ecosystem create secret generic ces-importer-secret \ --from-file=privateKey=</path/to_my/Private-key> \ --from-literal=apiKey=<my-api-key> \ --from-literal=mailPassword=<your-mail-password>If the mail server is accessible without a password, an empty string is sufficient.
-
Install the ces-importer in the cluster by applying the following YAML:
apiVersion: k8s.cloudogu.com/v1 kind: Component metadata: labels: app: ces name: ces-importer namespace: ecosystem spec: name: ces-importer namespace: k8s version: 1.0.0 valuesYamlOverwrite: | config: api: host: <FQDN of the source instance without protocol, e.g. lop.example.com> skipTLSVerify: <true, if no certificate or a self-signed certificate is available> migration: regularSchedule: <Time of migration(s) in CRON format in server time> finalSchedule: <Timestamp when to start the final migration in RFC-3339 format. e.g. "2025-04-03T12:34:56Z" (server time)> smtp: enabled: <true, if mail notifications are required; if not, the rest of this section can be omitted> server: <smtp.example.com> port: <the port of the mail server, e.g. 25> username: <the user name for authentication on the mail server; an empty string if not required> from: <sender address> to: - <recipient address(es)> - check whether the component is ready:
kubectl get component/ces-importer.
3. Migration
- now just wait for the configured time in
config/migration/regularSchedule. The migration job then starts automatically and transfers the data and configuration of your source instance to the target instance. - Finally, check the migrated data.
In case of errors see Troubleshooting