Using Amazon AMI Images of MapR-DB Document Database Developer Preview to Start Writing JSON-based Applications

MapR-DB is a powerful NoSQL database built into the MapR Distribution including Apache Hadoop with a proven record of performance, scale, and reliability. It recently gained document database capabilities with native JSON support, and is now available as a developer preview package. You can freely download it as a VMware image, a VirtualBox image, and a Docker container, and it also can be run as an Amazon Web Services AMI.

This blog describes how to get an instance of the MapR-DB Document Database Developer Preview image running on Amazon AWS using one of the pre-configured AMI images supplied by MapR. With this AMI, you can start writing JSON-based applications on MapR-DB using the open source Open JSON Application Interface, or OJAI (pronounced OH-hy, like the idyllic town in Southern California).

Part 1: Launch and Setup of the Instance

First, connect and login to your Amazon AWS account and select the EC2 Dashboard. Begin launching a new instance by pressing “Launch Instance.”

Depending on your preference of AWS region and/or availability zone, you may deploy one of the following three AMI options:

  • ami-bdb171f9 for US-West-1 (N. California)
  • ami-62c32251 for US-West-2 (Oregon)
  • ami-59e1b43c for US-East-1 (Virginia)

Ensure that you are using the correct region before performing the below step. For example, if you prefer to use the US-West-1 region, be sure the region shows on the upper right hand side of the screen as “N. California.” This is what we will use for this example, other regions will appear similarly.

Enter one of the AMI IDs from your selection above in the search box, after selecting “Community AMIs.” You should see an entry showing the MapR-DB/OJAI image. Press “Select.”

Next, select the Instance Type. We recommend using the m4.xlarge instance type for this configuration to ensure that you have enough RAM and CPU resources to explore the functionality. You can choose use a larger instance type if you want more resources.

You may now select “Configure Instance Details” to configure parameters specific to your environment and/or configuration. For example, you may want to optionally change parameters such as these:

  • Adding the VM to a network or VPC
  • Configure interfaces
  • Enable other parameters such as monitoring or termination protection

After pressing “Review and Launch,” you may get a screen regarding SSD options. You can leave this as the default/recommended setting.

The last step in launching the AMI is to review the details on the final screen, then press “Launch.”

You will now be prompted to select which keypair to use for the image. You can either select an existing keypair or create a new one. This will be used to configure ssh access to the image.

If you are creating a new key pair, you must download the key pair to your local machine before proceeding.

Part 2: Access and Explore the Instance

You should now be able to use “ssh” to access the Developer Preview, using a Linux, Mac, or Windows machine running an ssh client.

For example, if you are connecting from an external machine outside of AWS, you can connect to the external IP address shown in the EC2 Dashboard as follows:

ssh -i ./maprdb.pem -l mapr 

where “maprdb.pem” is the keyfile you downloaded during launch, and is the address shown in the EC2 Dashboard.

You should now have access to a shell on the machine.

The machine image contains a running instance of MapR-DB with the OJAI interface. The API is implemented in Java but bindings for other languages, such as Python and Node.js. are available. Visit the Developer Preview web page for pointers.

The following information can help you get started persisting JSON data to the image and programmatically using the API:

Questions? Consult the Developer Forum here: https://groups.google.com/forum/#!forum/maprdb-user

no

Streaming Data Architecture:

New Designs Using Apache Kafka and MapR Streams

 

 

 

Download for free