CouchDB

CouchDB

Getting Started with CouchDB on App42 PaaS

This quickstart guide will help you to create CouchDB service on App42 PaaS.


Glossary

Kontena – Kontena is a lightweight container that will run your apps and services in an isolated and secured manner. You can specify the power of the Kontena while setting up infra or creating services. One Kontena power specifies to 256 MB Memory and 128 MHz CPU.

Service – Services in the App42 PaaS are add-on components which are needed in an App. App42 PaaS supports multiple services like SQL databases, NoSQL databases and more.

Prerequisites

To get going with App42 PaaS, below are few prerequisites that will allow you to use AppHQ – App42 PaaS Management Console as well as Command Line Client.


Creating CouchDB service on App42 PaaS Platform

To create a service on App42 PaaS platform, you need to provide certain input parameters like dbname, Kontena Power, Service Type. Below is the screenshot of creating service using Command Line Client. You can also perform the same using AppHQ – App42 PaaS Management Console.

$ app42 createService
Enter Service Name: testCouch
Checking Service Name Availability... OK

1: MySQL 5.5.31
2: Mongodb 2.4.4
3: Couchdb 1.0.1
4: PostgreSQL 9.1.9
Select Service [MySQL 5.5.31]: 3

Enter Database Name: testdb

1: Shared
Select Instance Type [Shared]: 1

1: Amazon (Oregon)
Select IaaS Provider [Amazon (Oregon)]: 1

Specify Kontena Power: 1

Creating Service... OK

Operation is in progress, Please wait...-
Service created successfully.
+---------------+------------------+----------------------------------+-----------+---------+------------------+---------+---------------+----------------------------------+--------+--------------+
|                                                                                     === testCouch Details ===                          |
+---------------+------------------+----------------------------------+-----------+---------+------------------+---------+---------------+----------------------------------+--------+--------------+
| Database Name | Iaas Provider    | Token                            | Vm Ip     | State   | User Name        | Vm Port | Service Type  | Password                         | Memory | Service Name |
+---------------+------------------+----------------------------------+-----------+---------+------------------+---------+---------------+----------------------------------+--------+--------------+
| testdb        | Amazon (Oregon)  | 9zfs6ch0z8wb9um2wb9szqtwe1ystty7 | 10.0.2.12 | RUNNING | afy4oroa06t417w5 | 7028    | Couchdb 1.0.1 | abmgkn4l2ibcb1kn1gkrm8pbajbth1e4 | 256 MB | testCouch    |
+---------------+------------------+----------------------------------+-----------+---------+------------------+---------+---------------+----------------------------------+--------+--------------+
Accessing CouchDB service from anywhere

In order to access your CouchDB service from outside App42 PaaS platform, you need to bind the IP address with the service you want to access. You can use the provided credentials to access the service by using any client of your choice.

$ app42 bindIP
Enter Service Name: testCouch
Please Provide Source IP
(For public access, use '0.0.0.0'): 0.0.0.0

Binding IP to service... OK

Operation is in progress, Please wait...
Service bind with IP successfully.
+---------------+------------------+----------------------------------+---------------+-----------+---------+------------------+---------+---------------+----------------------------------+--------+--------------+
|                                                                                             === testCouch Details ===                                          |
+---------------+------------------+----------------------------------+---------------+-----------+---------+------------------+---------+---------------+----------------------------------+--------+--------------+
| Database Name | Iaas Provider    | Token                            | Vm Ip         | Source Ip | State   | User Name        | Vm Port | Service Type  | Password                         | Memory | Service Name |
+---------------+------------------+----------------------------------+---------------+-----------+---------+------------------+---------+---------------+----------------------------------+--------+--------------+
| testdb        | Amazon (Oregon)  | 9zfs6ch0z8wb9um2wb9szqtwe1ystty7 | 54.213.93.154 | 0.0.0.0   | RUNNING | afy4oroa06t417w5 | 7028    | Couchdb 1.0.1 | abmgkn4l2ibcb1kn1gkrm8pbajbth1e4 | 256 MB | testCouch    |
+---------------+------------------+----------------------------------+---------------+-----------+---------+------------------+---------+---------------+----------------------------------+--------+--------------+