# CI worker migration HOWTO ## Outline The main idea is to set up a second instance and test it (using one worker), then on "migration day", stop the old instance and scale up the new one. That way, the new instance gets tested, and only needs to be scaled up. The old instance stays configured (and then disabled), so we can roll back if we have to. Note: the new instance will use 8gb RAM for ccache tmpfs and another 2GB for the first worker, by default. If RAM is tight, having all old workers and the new instance running at the same time might not be feasible. In that case, I suggest to first reconfigure the old instance to use less workers. ## Steps 1. git clone https://github.com/RIOT-OS/murdock-worker to some_folder 2. copy `id_rsa_murdock-slave` from old installation to some_folder/ssh 3. copy .env.example to .env 4. change hostname in .env 5. docker-compose up -d At this point, this worker should start up, connect to ci-staging and start building with a single worker. (maybe, restart a build on ci-staging.riot-os.org to see something happening) If this is working fine, 6. change `MURDOCK_SSH_HOST` to ci-prod 7. restart the compose stack (`docker-compose up -d`) The worker should now reconnect to ci-prod. On "migration day": 9. stop old instance (to free RAM) 8. scale up new instance: `docker-compose up -d --scale worker=<N>` (start with N=half of *physical* cores)