ScriptaGames / zorbio

A 3D multiplayer WebGL game
MIT License
8 stars 1 forks source link

Bash script to mass create Linodes #339

Closed Jared-Sprague closed 8 years ago

Jared-Sprague commented 8 years ago

using the linode cli makes this very easy.

Two scripts: 1 to create the linodes. second to add private IPs to NodeBalancer when they are ready to be put into rotation.

This is needed for #320

Jared-Sprague commented 8 years ago

Made a ton of progress on this!

@mwcz On of the things we need to be able to do create batches of servers and have them automatically be picked up by ansible. That is why linode provides a dynamic inventory system that ties into your cloud provider so you don't have to manually keep a static inventory file updated anytime you create or delete a server.

Ansible had a linode dynamic inventory already included in core yay! However, it assumest that your linode labels are a resolveable hostname yuk! So I had to create a pull request for this script that allows you to use the public IP instead of the label, which works perfectly: https://github.com/ansible/ansible/pull/17390

Now once I finish this script we'll be able to add a bunch of nodes in a location and ansible will automatically pick them up, because of the combination of the dynamic inventory, and the fact that the linode-cli installs the ssh-key!

So close!

mwcz commented 8 years ago

Nice!!! C'mon ansible, accept the PR!

Jared-Sprague commented 8 years ago

@mwcz Done with the script, check it out! https://github.com/Jared-Sprague/scripta-ansible/blob/master/scripts/create_node.sh

I still have to hook it up to #341