Create an ArangoDB cluster on Microsoft Azure
During the last weeks we’ve released our new deployment tool for cloud computing platforms with how-to’s for Google Compute Engine, Digital Ocean and Amazon Web Services support.
Today we show how to deploy an ArangoDB cluster on Azure with a single command.
Azure
To easy-deploy an ArangoDB cluster on Azure you just need to install the official azure-cli, download a single bash script and watch the tool take care of the rest for you. Your azure account needs permission for creating instances, adding ssh-keypairs and managing virtual networks.
wget https://raw.githubusercontent.com/ArangoDB/deployment/publish/Azure_ArangoDB_Cluster.sh
chmod 755 Azure_ArangoDB_Cluster.sh
Azure CLI Settings:
The script needs the azure-cli installed and configured. You can skip this part if azure-cli is already installed and fully configured. Otherwise please follow these steps:
Install npm (skip if npm already is installed):
sudo apt-get install nodejs-legacy
sudo apt-get install npm
Install azure-cli (skip if azure-cli already is installed) :
sudo npm install -g azure-cli
Then authorize with azure-cli (skip if azure-cli already is installed AND configured):
There are two ways in order to authenticate:
a) Login via publish settings file
azure account download
Then launch the browser with the given url (example: http://go.microsoft.com/fwlink/?LinkId=12345). After a successful login, a file with your credentials will be downloaded. In the next step, import the file to your azure-cli.
azure account import <path-to-downloaded-file> (example: /tmp/BizSpark\ Plus-5-26-2015-credentials.publishsettings)
or
b) Login via organizational account (if available)
azure login
ArangoDB Script:
Create an ArangoDB cluster on Azure:
./Azure_ArangoDB_Cluster.sh
When the script is finished, you’ll get a screen with all the info you need to be able to work with the cluster.
Also this will create a directory called ./azure
that contains information about the cluster. You can easily get rid of the cluster as well as of the virtual machines by doing
./Azure_ArangoDB_Cluster.sh -r
Feel free to try it out! See below for information on how to configure things.
Some background information for the curious
This script will use the azure-cli authentication for Azure to deploy a number of VM instances running CoreOS. If you do not already have one, it will first create a SSH keypair for you and deploy it to Azure and your ssh-agent. Once the machines are running, the script uses Docker images to start up all components of an ArangoDB cluster and link them to each other. In the end, it will print out access information.
No installation of ArangoDB is needed neither on the VM instances nor on your machine. All deployment issues are taken care of by Docker. You can simply sit back and enjoy.
The whole process will take a few minutes and will print out some status reports.
Some switches to configure a few things
Use the -h switch to get this help page.
Optional prerequisites The following environment variables are used:
- SIZE : size/machine-type of the instance (e.g. -m Medium)
- NUMBER : count of machines to create (e.g. -n 3)
- OUTPUT : local output log folder (e.g.
-d /my/directory
) - ZONE : site of the server (e.g. -z “US West”)
Discover more about ArangoDB
Want to learn more about the possibilities of ArangoDB?
Take a look at our Documentation, Tutorials and Cookbook recipes.
2 Comments
Leave a Comment
Get the latest tutorials, blog posts and news:
Hi Heiko,
I tried to follow your guide but unfortunately I only got to the error message “No SSH-Agent running”. I am using a vanilla Ubuntu 14.04 VM in Azure and followed every step you mentioned.
Any ideas of what’s going wrong?
Sorry Martin, the script takes for granted that your environment already has this agent process running, which it does by default if you log into a linux machine via GUI.
You’re using putty to access that Azzure Ubuntu VM and you’re trying to run Azure_ArangoDB_Cluster.sh in there, right?
If you want to make the agent persistently available, you can edit your .bash_profile loginscript and add it there:
http://stackoverflow.com/questions/18880024/start-ssh-agent-on-login
and re-login to find it running.
You can also run it by hand on each login:
me@ubuntu:~$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-mJiV6G50CDvQ/agent.12345; export SSH_AUTH_SOCK;
SSH_AGENT_PID=12345; export SSH_AGENT_PID;
echo Agent pid 12345;
You then cut’n’paste the first two lines it printed back into your shell, and you’re ready to continue with Heikos script.