How to setup Aerospike on Windows

Step 1: Install Vagrant

Aerospike is supported on Windows in a virtual machine managed by Vagrant. If you do not already have Vagrant installed, please download and install Vagrant from: Vagrant Website. I have downloaded and installed: vagrant_2.1.2_x86_64.msi
After install, machine restart is required.

Step 2: Install VirtualBox

VirtualBox is a free virtualization product available from Oracle. Vagrant has good integration with VirtualBox, so you can expect it to work with little effort.
If you do not already have VirtualBox installed, please download and install VirtualBox from: VirtualBox Website.

Step 3: Install Git for Windows

Git for Windows provides a simple UNIX shell emulator called Git Bash, which is needed for running Vagrant commands.
If you do not already have Git for Windows installed, please download and install it from: Git Website

Step 4: Create Aerospike Directory

Vagrant requires each virtual machine to have its own working directory. You can create the working directory anywhere in your machine.
I have used the following location: D:\Programs\aerospike-vm
To manage the Aerospike virtual machine, all Vagrant commands must be run from within this directory. For this you need to start Git Bash and execute the command:
cd /d/Programs/aerospike-vm/
Please execute the commands in the next steps in this folder location using Git Bash

Step 5: Initialize the Aerospike Virtual Machine

To initialize the virtual machine, execute the following command:
vagrant init aerospike/aerospike-ce
The Aerospike image will be downloaded from Vagrant Cloud.

Step 6: Start Aerospike

To start Aerospike, execute the following command:
vagrant up
This will got through several stages to startup the virtual machine, operating system and asd. The status of each stage will be displayed in the console.

Step 7: Verify Aerospike and Aerospike Management Console (AMC) are Running

Verify Aerospike and AMC are Running using the following commands:
$ vagrant ssh -c "sudo service aerospike status"
asd (pid XXXX) is running...
Connection to 127.0.0.1 closed.
$ vagrant ssh -c "sudo service amc status"
Retrieving AMC status....
AMC is running.
Connection to 127.0.0.1 closed.
Step 8: Access Aerospike Host
To access your swanky new Aerospike host, open Oracle VM VirtualBox Manger and double click on the Aerospike Host, as shown in the image below
Enter:
localhost login: vagrant
Password: vagrant
Check Aerospike logs:
cd /var/logs/aerospike
vi aerospike.log
Aerospike uses a number of directories to store tools, system files, and data files. To check the Aerospike directory structure please check: Aerospike Directory Structure Website.

Step 9: Check Aerospike Management Console (AMC)

The Aerospike Management Console (AMC) is a web-based tool to monitor/manage an Aerospike cluster. It provides live updates to the current status of a cluster.
Open a browser and enter the URL: http://localhost:8081/
In the pop up, in the box: Host Name or IP, enter localhost and click on Connect
This brings up the AMC
Step 10: Stop Aerospike

To halt the virtual machine and stop asd, execute the following command:
vagrant halt

Comments

Popular Posts

Elasticsearch, Logstash, Kibana Tutorial: Load MySQL Data into Elasticsearch

Dropwizard MySQL Integration Tutorial

Send Email in Java