Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add additional agents to mesosphere dc/os cluster?

We have Mesosphere DC/OS version 1.7 running on 6 vmware vm's with rhel7 and we would now like to add more agents. We were able to increase from our initial 2 agents(vms) to 6 agents(vms) by running dcos_generate_confg.sh --uninstall from the boot node. We then added the new ip addresses to the agent list in genconf/config.yaml and ran --genconf, --preflight, --deploy, --postflight. This worked however the --uninstall blew away our existing public agent, which we had to go back in and re-install.

Is there another way to add agents without running the --uninstall? Very nervous about what that's doing under the hood. Thank you!

like image 951
grayzzz Avatar asked Mar 12 '23 21:03

grayzzz


1 Answers

For my part, I also had trouble understanding how to add a node to a cluster, then I found this link that allowed me to do this:

The Mesosphere guide to getting started with DC/OS: Part 2

Go to the "Adding an internet-facing HAproxy load balancer" chapter.

To summarize what I did and which worked:

  • BootStrap Node:

    sudo vi ~/genconf/config.yaml ## add node slave IP
    
    sudo ./dcos_generate_config.sh --install-prereqs
    
    sudo ./dcos_generate_config.sh --preflight
    

You can ignore errors from the existing agents and masters—DC/OS is just telling you it’s already installed, and you probably don’t want to clobber that installation in-place.

sudo scp -r -i genconf/ssh_key genconf/serve $NEW_NODE_IP:~ ## Copy to the node

  • New node:

    sudo mkdir /opt/dcos_install_tmp
    
    sudo cp -r serve/* /opt/dcos_install_tmp/
    
    cd /opt/dcos_install_tmp/
    chmod +x dcos_install.sh
    
    Agent Private
    
         sudo ./dcos_install.sh slave
    
    Agent Public
    
         sudo ./dcos_install.sh slave_public
    
  • BootStrap node:

    sudo ./dcos_generate_config.sh --postflight
    

I hope that this can help you!

like image 182
Benjamin Carriou Avatar answered Apr 28 '23 13:04

Benjamin Carriou