- I have configured a CJE 1 Anywhere cluster and I want to use one of the servers for another CJE 1 Anywhere cluster.
- I have configured a CJE 1 Anywhere cluster. I have destroyed the cluster and I want to recreate it again.
- I want to change the type of worker/controller of one of my nodes.
- Applications no longer properly provision on a worker and all other troublshooting steps have been unsuccessful.
- CloudBees Jenkins Enterprise
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Enterprise - Operations Center
When you are creating a cluster with CJE 1, the nodes are automatically created by CJE. In this context all the nodes are VMs that can be destroyed and created from scratch.
In CJE 1 Anywhere if you have a physical server or you don’t want to remove the VM and recreate it you’ll need to follow these steps in order to reuse a node:
- Perform a backup if you want to reuse the data of the docker images, containers and volumes.
- Remove the docker images, containers and volumes from your server.
# Delete all containers docker rm $(docker ps -a -q) # Delete all images docker rmi $(docker images -q)
- Stop all the services:
- If on a controller:
sudo service zookeeper stop sudo service mesos-master stop sudo service marathon stop sudo service docker stop
- If on a worker:
sudo service mesos-slave stop sudo service docker stop
- Delete the all the files with the pattern:
- Delete these folders and all the files inside:
/usr/sbin/mesos-master /etc/zookeeper /etc/jce /etc/mesos /etc/mesos-master /etc/mesos-slave /var/log/router /var/log/mesos /var/lib/docker /var/lib/mesos
If your worker was having issues provisioning applications, or has some other issue that other troubleshooting steps have not fixed, you can re-initialize it with the same configuration. After following the above steps to clean the worker, follow the steps below to re-initialize the worker.
- Restart all services on worker
sudo service mesos-slave start sudo service docker start
- Re-initialize the worker
dna init worker-<number>