Installing Couchdb on GCP Compute Engine
This article covers the steps that needed to install Apache Couchdb on Google Cloud Platform.
There are various way of how to achieve this, that is having a Compute Engine (VM) installed with Couchdb.
One option is to use the the Marketplace in GCP which offers quick option to deploy on Cloud Platform.
Login to GCP and click on the Marketplace Icon and then search for CouchDB. Although we would still need to perform some additional steps like Creating Firewall Rule etc so that we can access the instance after getting VM with CouchDB installed from Marketplace.
Rather than using the Marketplace, we would do everything manually on the VM Instance.
Following are the steps in details that i had to take to lunch an instance of CouchDB, do configuration update and create Firewall Rules to allow access to the instance.
High level steps as covered bellow are
Normally the CouchDB listens to port 127.0.0.1 which is localhost.
When we deploy the CouchDB on VM on GCP we would like it to be accessed from outside the VM also, for that we need to modify the bind address. We do that by updating CouchDB configuration file
Now we we should be able to access the instance over internet
There are various way of how to achieve this, that is having a Compute Engine (VM) installed with Couchdb.
One option is to use the the Marketplace in GCP which offers quick option to deploy on Cloud Platform.
Login to GCP and click on the Marketplace Icon and then search for CouchDB. Although we would still need to perform some additional steps like Creating Firewall Rule etc so that we can access the instance after getting VM with CouchDB installed from Marketplace.
Rather than using the Marketplace, we would do everything manually on the VM Instance.
Following are the steps in details that i had to take to lunch an instance of CouchDB, do configuration update and create Firewall Rules to allow access to the instance.
High level steps as covered bellow are
- Create an Instance of Google Cloud Engine Instance
- Install Apache CouchDB in the VM
- Configure the Database Instance
- Configure Firewall Access
Create Google Cloud compute Engine instance.
SSH to the VM Instance.
Before installing the Apache CouchDB we will install some useful software that we would need like nano editor.
sudo apt-get install nano
Install CouchDB
sudo apt updatesudo apt-get install apache2 couchdb
Check Status of CouchDB
Following commands are useful to check the status of CouchDB instance, start it and stop it etc.
sudo systemctl stop couchdb.servicesudo systemctl start couchdb.servicesudo systemctl enable couchdb.servicesudo systemctl status couchdb.service
Change the bind address of CouchDB
When we deploy the CouchDB on VM on GCP we would like it to be accessed from outside the VM also, for that we need to modify the bind address. We do that by updating CouchDB configuration file
nano /etc/couchdb/default.ini
port = 5984 bind_address = 0.0.0.0
Add Firewall rule for the VM instance
We will now add a new Firewall rule to allow access to the VM on which we have CouchDB installed.
For that go to Navigation Menu -> VPC Networks -> Firewall Rule and click on
For that go to Navigation Menu -> VPC Networks -> Firewall Rule and click on
Create Firewall rule
Add the necessary details like follows,
Access the Instance
Open a browser and go to external-ip:port/_util/, we should be able to see a page like as bellow
great tutorial.
ReplyDeleteI think the futon address is: external-ip:port/_utils/
Your guide to installing CouchDB on GCP Compute Engine is a lifesaver. Understanding Mitiga Ting Your expertise in navigating cloud platforms and databases shines through, making this resource an invaluable asset for those seeking a seamless setup.
ReplyDelete