Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu May 22, 2014 1:03 am 
Offline
Newbie

Joined: Thu May 22, 2014 12:26 am
Posts: 2
Hi,

Each time I need to clone some (Ubuntu/Debian) Linodes to add more capacity to a Nodebalancer it's a process fraught with lots of potential for human error. Looking for a way to automate this.

Has anyone had any success automating this? I'm thinking a client-side script that interacts with the Linode API seems to be what's needed.


The process (when I do it manually) is:
1. Shutdown linode 1
2. Create linode 2
3. Clone the linode
4. Boot both linodes
5. Login to linode 2, via Lish or SSH
6. Setup /etc/network/interfaces to the new static network details
7. Set the new machine's hostname
8. Reboot
9. Add the new linode to the Nodebalancer

In Linode API terms I guess that's going to be something like:
1. linode.shutdown
2+3. linode.clone
4. linode.boot
5. login via ssh [note: the linode needs DHCP enabled for its primary web-facing IP]
6. network details are available at linode.ip.list, if I understand correctly
7. hostname is user-supplied
8. linode.reboot
9. nodebalancer.node.create


Top
   
PostPosted: Fri May 23, 2014 6:46 am 
Offline
Senior Member

Joined: Mon Jul 05, 2010 5:13 pm
Posts: 392
Why not use a config management tool so that deploying a new Linode doesn't involve using an old one as a gold master? Then you're looking at "create / deploy / boot a new Linode via the API, then point your config management tool at it". Bonus points if it self-configures via a StackScript.

There are a whole variety of tools that do this, like Puppet, Chef, Ansible, and Salt.

- Les


Top
   
PostPosted: Sun May 25, 2014 7:30 pm 
Offline
Newbie

Joined: Thu May 22, 2014 12:26 am
Posts: 2
Makes sense; it's clearly the best general-purpose solution both for cloning instances, and for obviating the need for cloning by building them from scratch.

Ok, this gives me the kick i need to put the time in to learn Ansible and ditch ClusterSSH. Thanks!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group