Couchbase Cluster inside Docker Container within Jelastic

By December 23, 2015 HowTo No Comments
Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Couchbase is an open-source distributed NoSQL database that is optimized for interactive applications. Such applications create, store, retrieve, manipulate and present data, serving many concurrent users. A big part of the latest Couchbase 4.x release is Multi Dimensional Scaling that makes the database scalable vertically and horizontally. That is why Couchbase team paid special attention to the cloud vendors that can offer the same flexibility for their customers. Jelastic offers automatic vertical and horizontal scaling that makes it a great place to deploy Couchbase.

Laurent Doguin, Developer Advocate at Couchbase, prepared a great video tutorial how to easily deploy and configure Couchbase cluster within Jelastic based on Docker containers. The initial blog post you can see following this link and below you can watch the video and go through step-by-step instruction.

Environment Creation

1. Click the New Environment button at the top of the Jelastic dashboard, switch to the Docker tab within the opened wizard and proceed with Select Container at the middle section.image00

2. Using the embedded Search at the dedicated tab, find and select the couchbase/server image.image08

Click Next to continue.

3. Now, set the required amount of servers within the Horizontal scaling section using the +/- buttons (we’ll create 3 nodes as an example), and resource limits for them with the cloudlet sliders in the Vertical scaling per node part.image10

Finish pre-configurations by choosing the desired environment region, specifying name (e.g. couchbase) for it and clicking the Create button.

4. In a few minutes, your environment will appear at the dashboard. To ensure everything passed successfully and there weren’t any problems, you can click the Show Logs button in the appeared pop up message.image01As you can see, logs doesn’t show errors and just informs us that the web-UI can be accessed at the 8091 port.

Access Couchbase

In order to access the Couchbase web interface and start managing it, you can either attach the Public IP to your environment (which is a paid option) and open it at the mentioned 8091 port or just add the corresponding endpoint (free of charge). We’ll consider the letter case:

1. Click Settings (the wrench pictogram) next to your environment, move to the Endpoints menu point at the appeared tab and hit the Add button in the central tools pane.image07

2. At the displayed frame, specify the following data:

  • Node – select the node you’d like to set the endpoint for (any of 3 servers your environment contains)
  • Name – type the appellation for your endpoint
  • Private port – specify the local node’s port (we require the 8091 one to access web UI)
  • Protocol – select the TCP protocolimage03

Confirm the creation with the Add button.

3. Endpoint will be added in a moment, so just click on the Access URL field to easily copy the link.image11

4. Open this address within a new browser tab to launch the Couchbase web interface.image05 As you can see, it needs to be Setup before being used.

5. Here, you’ll be guided through five configurations steps, intended to help you to adjust Couchbase up to your needs.

For this example installation, we’ll keep the settings without changes and will just click the Next button, accepting the terms of use at the 4th step and specifying the password at the last one.image04

That’s it! Now the server is configured and ready for work.

Configure Couchbase Cluster

As the final step, let’s link the remained two servers to the currently used one in order to create a DB cluster.

1. Switch to the Server Nodes tab at the top pane and click the Add Server button.image06

2. At the appeared frame, fill in the required fields.image02 where:

  • Server IP Address – IP address of the server you’d like to add to the cluster (can be found within the nodes’ Additionally list at the dashboard)image09
  • Username / Password – administrator credentials you’ve specified during setup

Then, untick the Index and Query services and proceed with the Add Server button.

3. Repeat the previous step for the remaining server(s). As a result, all the newly added nodes will be displayed at the Pending Rebalance tab for being included to the cluster after clicking the Rebalance button.image12

Wait a while for the process completion to receive a ready-to-go Couchbase Docker-based DB cluster, hosted at the Jelastic Cloud.

That’s all! Now you can enjoy working with Couchbase. Try out by yourself and leave your feedback in the comments below.

P.S. Thank you, Laurent, for an informative instruction!

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInEmail this to someone

Leave a Reply

Subscribe to get the latest updates