Ruk-Com PaaS Documentation

Build, deploy and operate applications on the platform.

RUK-COM PAAS / DATABASES

Remote Access to PostgreSQL

This guide is maintained for Ruk-Com PaaS. Screens and options may vary by platform version and account permissions.

Confirm the environment, region and account permissions, and back up current settings before changing a production system.

You have an opportunity to work with your databases remotely from your computer without having to login to our dashboard. Here’s a how-to for PostgreSQL users.

Create Environment

The database can be accessed either via public IP or endpoints (no public IP required). Let’s take a look at both options of creating database environment.

Environment with Public IP

  1. Log into the platform.

  2. Click the New Environment button at the top left of the dashboard.

Image 49: create new environment button 3. In the Environment Topology wizard pick PostgreSQL as the database you want to use. In case you want to get a database cluster just slide to the right the Auto-Clustering switch. Then add a Public IPv4. After that enter an environment name, for example, remotepostgres, and click Create button.

Image 50: wizard PostgreSQL auto-clustering It can take about a minute for creating your environment.

Image 51: environment created Both nodes have the public IP addresses attached to.

Environment without Public IP

The algorithm is the same as above and clustered database environment will be created but with no public IP attached.

Image 53: environment without public IP Once the environment is ready, go to the Endpoints at the Settings section and click on Add to create new port mapping.

Image 54: add endpoint Choose the Node you need to access and PostgreSQL service Name. The rest parameters will be generated automatically: Private Port, Protocol, Public Port, and Access URL.

Image 55: endpoints dialog A port mapping to the database master node may look like this.

Image 56: endpoint added If necessary do the same for the Slave node of the database cluster.

Remote Connection to PostgreSQL

Image 58: pgAdmin panel 1. If you have a database cluster it will be more convenient to create a group of all servers that belong to the cluster.

Image 59: create server group 2. Then enter Name of the group e.g., remotepostgres.

Image 60: server group name 3. After that add one by one all of the database servers to the group. Let’s see how to do that for the Master database. Make a right-click on the group (e.g., remotepostgres) and choose Create > Server.

Image 61: add server 4. Enter the server name (e.g., Master for the primary database of your cluster) at the General tab.

Image 62: create server dialog 5. At this step you have to specify server access settings depending on whether you created database with or without public IP as described above.

Connection to Public IP

Go to the Connection tab and enter public IP of your master database at the Host name/address field. Specify Username and Password you have obtained while creating the database environment via email.

Image 64: server connection public ip

Connection via Endpoints

Take the URL and Public Port from generated port mapping and set the database server connection settings. The Username and Password are the same as described above.

Image 66: server connection endpoint 6. You may change other specific options if you are rather confident in your actions.

  1. Finally, press the Save to apply the changes and you will see that connection is successfully established.

As for our example, both master and slave databases are displayed as follows:

Image 67: check connection Now PostgreSQL remote access is configured and you can start querying.