Migrate Cyberwatch from Docker Swarm to MicroK8s

The following procedure explains in a generic way how to migrate from a Cyberwatch installation using Docker Swarm to an installation using MicroK8s.

  1. Connect to the Cyberwatch machine with SSH and a root account.

  2. If the database is managed internally by Cyberwatch, back up the database:

    sudo cyberwatch backup save
    
  3. Stop Cyberwatch:

    sudo cyberwatch stop
    
  4. Install MicroK8s according to your context:

  5. In file /etc/cyberwatch/config.env, replace the value of the key CBW_ORCHESTRATOR from swarm to microk8s.

    -CBW_ORCHESTRATOR=swarm
    +CBW_ORCHESTRATOR=microk8s
    
  6. Reconfigure Cyberwatch:

    sudo cyberwatch configure
    

    The configuration script should detect the existence of a secrets.env file. It will then offer to import the content of the file to a new file named secrets.yml. It is important in the case of a migration from Docker Swarm to accept.

  7. If the database is managed internally by Cyberwatch, restore the backup:

    sudo cyberwatch backup restore