Steps to install Riak on Centos VMs using the Windows Azure platform.
Creating CentOS VMs
In order to create a virtual machine, you will first need to sign up for the Windows Azure Virtual Machines preview feature. You can also sign up for a free trial account if you do not have a Windows Azure account.
Navigate to https://account.windowsazure.com and sign in with your Windows Azure account.
Click “preview features” to view the available previews.
Scroll down to Virtual Machines & Virtual Networks and click “try it now”.
Select your subscription and click “Check”.
Create a virtual machine running CentOS Linux
Login to the Windows Azure (Preview) Management Portal using your Windows Azure account.
In the Management Portal, at the bottom left of the web page, click “”+New"“, click "Virtual Machine”, and then click “From Gallery”.
Select a CentOS virtual machine image from Platform Images, and then click the next arrow at the bottom right of the page.
On the VM Configuration page, provide the following information:
- Virtual Machine Name, such as “testlinuxvm”.
- New User Name, such as “newuser”, which will be added to the Sudoers list file.
- New Password box - type a strong password.
- In the Confirm Password box, retype the password.
- Select the appropriate Size from the drop down list.
- Click the next arrow to continue.
On the VM Mode page, provide the following information:
- If this is the first node, select the “STANDALONE VIRTUAL MACHINE” radio button. Otherwise, select the “CONNECT TO EXISTING VIRTUAL MACHINE” radio button, and select the first node in the drop down list.*
- In the DNS Name box, type a valid DNS address, e.g “testlinuxvm”.
- In the Storage Account box, select “Use Automatically Generated Storage Account”.
- In the Region/Affinity Group/Virtual Network box, select a region where this virtual image will be hosted.
- Click the next arrow to continue.
On the VM Options page, select “(none)” in the Availability Set box. Click the check mark to continue.
Wait while Windows Azure prepares your virtual machine.
Once the virtual machine is created you must configure endpoints in order to remotely connect.
In the Management Portal, click “Virtual Machines”, then click the name of your new VM, then click “Endpoints”.
If this is the first node, click “Add Endpoint”, leave “Add Endpoint” checked, hit the right arrow and fill out the next form as follows:
- Name: riak_web
- Protocol: leave set to 'TCP'
- Public Port: 8098
- private Port: 8098
Connect to CentOS VMs using PuTTY or SSH
When the virtual machine has been provisioned and the endpoints configured you can connect to it using SSH or PuTTY.
Connecting Using SSH
For Linux & Mac Users:
$ ssh firstname.lastname@example.org -o ServerAliveInterval=180
Enter the user's password.
For Windows Users, use PuTTY:
If you are using a Windows computer, connect to the VM using PuTTY. PuTTY can be downloaded from the PuTTY Download Page.
Download and save putty.exe to a directory on your computer. Open a command prompt, navigate to that folder, and execute putty.exe.
Enter the SSH DETAILS as found on the Node's Dashboard, i.e., “testlinuxvm.cloudapp.net” for the Host Name and “22” for the Port.
Configure Centos and Riak using a shell script
- On each node, once you've connected using the steps above:
sudo su - curl -s https://raw.github.com/glickbot/riak_on_azure/master/azure_install_riak.sh | sh
FOR THE FIRST NODE, note the “INTERNAL IP ADDRESS” listed on the right in the nodes dashboard.
FOR ALL OTHER NODES, use the “INTERNAL IP ADDRESS”“ of the first node:
riak-admin cluster join riak@<ip.of.first.node>
Cluster Riak & load test data
After all the nodes are installed, and joined using the steps above, connect to one of the nodes using SSH or PuTTY and execute the following:
riak-admin cluster plan
If this looks good:
riak-admin cluster commit
To check the status of clustering use:
You now have a Riak cluster on Azure
Load test data
Execute on any one of the nodes:
curl -s http://rekon.basho.com | sh
Visit DNS address listed on the dashboard, at the port we opened as an endpoint: