You can convert agent nodes to public or private for an existing DC/OS cluster.
The following steps must be performed on a machine that is configured as a DC/OS node. Any tasks that are running on the node will be terminated during this conversion process.
- DC/OS is installed using the custom installation method and you have deployed at least one master and one private agent node.
- The archived DC/OS installer file (
dcos-install.tar) from your installation.
- The CLI JSON processor jq.
- SSH installed and configured. This is required for accessing nodes in the DC/OS cluster.
Note: Use the following steps to convert your agent node only. You will not be able to actually uninstall DC/OS here. In order to uninstall DC/OS, currently you must re-image the operating system on your nodes. The uninstalling process may change in future releases of DC/OS.
Determine the node type
You can determine the node type by running the following commands from the DC/OS CLI.
Run this command to determine how many private agents are there in the cluster. A result of
0indicates that there are no private agents.
dcos node --json | jq --raw-output '. | select(.reserved_resources.slave_public == null) | .id' | wc -l
Run this command to determine how many public agents are there in the cluster. A result of
0indicates that there are no public agents.
dcos node --json | jq --raw-output '. | select(.reserved_resources.slave_public != null) | .id' | wc -l
Disable DC/OS private agent software
Disable DC/OS on the agent node.
sudo /opt/mesosphere/bin/dcos-shell sudo -i pkgpanda uninstall sudo systemctl stop dcos-mesos-slave sudo systemctl disable dcos-mesos-slave
Remove the old directory structures on the agent node.
sudo rm -rf /etc/mesosphere /opt/mesosphere /var/lib/mesos /var/lib/dcos
Restart the machine.
Install DC/OS and convert agent node
Copy the archived DC/OS installer file (
dcos-install.tar) to the node that is being converted. This archive is created during the GUI or CLI installation method.
Copy the files to your agent node. For example, you can use Secure Copy (scp) to copy
dcos-install.tarto your home directory.
scp ~/dcos-install.tar $username@$node-ip:~/dcos-install.tar
SSH to the machine.
Create a directory for the installer files.
sudo mkdir -p /opt/dcos_install_tmp
sudo tar xf dcos-install.tar -C /opt/dcos_install_tmp
Run this command to install DC/OS on your agent nodes. You must designate your agent nodes as public or private.
Private agent nodes.
sudo bash /opt/dcos_install_tmp/dcos_install.sh slave
Public agent nodes.
sudo bash /opt/dcos_install_tmp/dcos_install.sh slave_public