08.06.2015 Views

Building Machine Learning Systems with Python - Richert, Coelho

Building Machine Learning Systems with Python - Richert, Coelho

Building Machine Learning Systems with Python - Richert, Coelho

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Big(ger) Data<br />

Keys, keys, and more keys<br />

There are three completely different types of keys that are important<br />

when dealing <strong>with</strong> AWS:<br />

• A standard username/password combination, which you use to<br />

log in to the website<br />

• The SSH key system, which is a public/private key system<br />

implemented <strong>with</strong> files; <strong>with</strong> your public key file, you can log in<br />

to remote machines<br />

• The AWS access key/secret key system, which is just a form of<br />

username/password, which allows you to have multiple users on<br />

the same account (including adding different permissions to each<br />

one, but we will not cover those advanced features in this book)<br />

To look up our access/secret keys, we go back to the AWS console<br />

and click on our name in the top-right corner; then select Security<br />

Credentials. Now at the bottom of the screen, there should be our access<br />

key that may look something like AAKIIT7HHF6IUSN3OCAA, which we<br />

will use as an example in this chapter.<br />

Now edit the configuration file. This is a standard .ini file: a text file where sections<br />

start by having their names in brackets and options are specified in the name=value<br />

format. The first section is the aws info section and you should copy and paste your<br />

keys there:<br />

[aws info]<br />

AWS_ACCESS_KEY_ID = AAKIIT7HHF6IUSN3OCAA<br />

AWS_SECRET_ACCESS_KEY = <br />

Now, we come to the fun part that is defining a cluster. Starcluster allows you<br />

to define as many different clusters as you wish. The starting file has one called<br />

smallcluster. It is defined in the cluster smallcluster section. We will edit<br />

it to read as follows:<br />

[cluster mycluster]<br />

KEYNAME = mykey<br />

CLUSTER_SIZE = 16<br />

This changes the number of nodes to 16 instead of the default of two. We can<br />

additionally specify which type of instance each node will be and what the initial<br />

image is (remember, an image is the initial disk, which defines what operating<br />

system you will be running and what software is installed). Starcluster has a few<br />

predefined images, but you can also build your own.<br />

[ 256 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!