Getting started with Cloud DB for PostgreSQL
    • PDF

    Getting started with Cloud DB for PostgreSQL

    • PDF

    Article Summary

    Available in VPC

    The Getting started with Cloud DB for PostgreSQL guide describes what you need to do to properly use Cloud DB for PostgreSQL after checking the Cloud DB for PostgreSQL use environment and supported specifications and fully understanding the overall Usage scenario and Glossary. The items described in Getting started with Cloud DB for PostgreSQL are as follows.

    • How to create an application server (app server) from the NAVER Cloud Platform console
    • How to test application server connection
    • How to create a PostgreSQL server from the NAVER Cloud Platform console
    • How to test PostgreSQL server connection

    If you completed the above, then you've completed the basic procedure for using Cloud DB for PostgreSQL. Afterward, you have the option of proceeding with the following tasks for more efficient server management and operation.

    • Event and notification settings using NAVER Cloud Platform's Cloud Insight product
    • Management of administration permissions using NAVER Cloud Platform's Sub Account
    • Storage of log files and backup files using NAVER Cloud Platform's Object Storage
    • DB server's read load balancing settings using NAVER Cloud Platform's Load Balancer

    The above tasks can be done from Cloud Insight, Sub Account, Object Storage, or Load Balancer after requesting subscription, rather than in Cloud DB for PostgreSQL. They are not explained in detail in this guide. For detailed instructions, please refer to the Cloud Insight Guide, Sub Account Guide, Object Storage Guide, and Load Balancer Guide.

    Create application server

    The following describes how to create an application server from the NAVER Cloud Platform console.

    Caution

    In this section, we will briefly introduce how to create an application server. For details about full creation methods, please refer to Server Guide.

    1. Please connect to the NAVER Cloud Platform console.
    2. Click the Services > Compute > Server menus, in that order.
    3. Click the [Create server] button.
    4. Select the server image and click the [Next] button.
    5. Enter the required information, and then click the [Next] button.
    6. If you do not have an existing authentication key, then create a new authentication key and click the [Next] button.
    7. If you do not have any ACGs, then create a new ACG.
    8. After the final confirmation, click the [Create server] button.
    Caution

    The ACG name of the application server from Step 7 is used when adding the ACG to the PostgreSQL Server later on.

    Set access environment

    From the NAVER Cloud Platform console, you can set up the access environment for application servers by either setting up a public IP, or SSL VPN.

    Caution

    In this section, we will briefly introduce how to set up the access environment. For details about setting up the access environment, please refer to Public IP Guide and SSL VPN Guide.

    Set public IP

    The following describes how to set up a public IP.

    1. From the NAVER Cloud Platform console, click the Services > Compute > Server menus in order.
    2. Click the Public IP menu.
    3. Click the [Request for public IP] button.
    4. Select the target server, enter notes, and then click the [Next] button.
    5. Click the [Create] button.

    Get admin password

    After setting up the public IP, you can get the admin (root) password required for accessing the application server through the following steps:

    1. From the NAVER Cloud Platform console, click the Services > Compute > Server menus in order.
    2. Click the [Manage servers] button, and then click the Get admin password menu.
    3. Enter the authentication key generated while creating the server.
    4. Click the [Get password] button.
    5. Check the password.

    Set SSL VPN

    You can allow external access to the PostgreSQL server to be created by using SSL VPN through the following steps:

    1. Create SSL VPN
    2. Add VPN range to subnet's route table
    3. Set ACG for PostgreSQL Server
    4. Set DB user for PostgreSQL Server
    5. Check access information of PostgreSQL Server

    1. Create SSL VPN

    The following describes how to create SSL VPN.

    1. From the NAVER Cloud Platform console, click the Services > Security > SSL VPN menus, in that order.
    2. Click the SSL VPN menu.
    3. Click the [Request subscription to SSL VPN] button.
    4. When the Create SSL VPN pop-up window appears, enter the required information, and then click the [Create] button.
    5. After creation, check the SSL VPN IP address bandwidth from the delivered email or the SSL VPN page of the console.

    2. Add VPN range to subnet's route table

    The following describes how to add a VPN range to the subnet's route table.

    1. From the NAVER Cloud Platform console, click the Services > Networking > VPC menus, in that order.
    2. Click the Route table menu.
    3. Register the range of each SSL VPN the route table of the subnet to be used.
    4. Click and select the route table to set up, and then click the [Set routes] button.
    5. When the Set route table pop-up window appears, enter the required information.
      • Destination: SSL VPN's IP pool
      • Target Type: SSL VPN
      • Target name: name of the SSL VPN created
    6. Click the [OK] button.

    3. Set ACG for PostgreSQL Server

    The following shows how to set ACG for a PostgreSQL Server.

    1. From the NAVER Cloud Platform console, click the Services > Storage > Cloud DB for PostgreSQL menus, in that order.
    2. Click the DB server menu.
    3. From the details page of the server to be configured, click the clouddbforredis_ico-01_vpc_ko button of the ACG.
    4. Click the [Set ACG] button.
    5. Add settings to allow the access of SSL VPN.
      • Access source: IP address bandwidth of SSL VPN
      • Allowed port: DB server port
    6. Click the [Apply] button.

    4. Set DB user for PostgreSQL Server

    The following describes how to set a DB user for a PostgreSQL Server.

    1. From the NAVER Cloud Platform console, click the Services > Storage > Cloud DB for PostgreSQL menus, in that order.
    2. Click the DB server menu.
    3. Click to select the server to configure, and then click the Manage DB > Manage DB user buttons, in that order.
    4. Add DB user to allow access from the VPN bandwidth.
    5. Click the [Save] button.

    5. Check access information of PostgreSQL Server

    After completing the external access settings using SSL VPN, check the access information of the PostgreSQL Server. The following describes how to view the information.

    1. From the NAVER Cloud Platform console, click the Services > Storage > Cloud DB for PostgreSQL menus, in that order.
    2. Click the DB server menu.
    3. Click to select the server you want to check, and check the necessary information from the View details page.
      • Private domain: It is a domain that can only be accessed from NAVER Cloud Platform servers, and is used similarly as the DB server host name.
      • DB access port

    Test application server connection

    You can use the terminal program, PuTTY, to test if you can properly connect to the application server through the following steps:

    1. Run PuTTY.
    2. Enter the IP address and port number acquired from the access environment settings for Host name (or IP address) and Port.
      clouddbforpostgresql-start_01_vpc_ko
    3. Click the [Open] button.
    4. When the PuTTY security alert pop-up window appears, click the [Accept] button.
      clouddbforpostgresql-start_02_vpc_ko
    5. When the cmd window for server connection appears, enter the password you got from Get admin password.
      clouddbforpostgresql-start_03_vpc_ko
    Note

    passwd You can change a password using a command.

    Create PostgreSQL Server

    Some of the products provided by NAVER Cloud Platform require you to go through the subscription request procedure from the console before the start of actual usage. However, for Cloud DB for PostgreSQL, you can start using it upon creation of a PostgreSQL Server without a separate subscription request step. The following describes how to create a PostgreSQL Server from the NAVER Cloud Platform console.

    Note
    • In this section, we will briefly introduce how to create a PostgreSQL Server. For details about full creation methods, please refer to PostgreSQL Server.
    • Since an additional subscription request step does not exist for Cloud DB for PostgreSQL, an additional subscription cancellation step also does not exist. If you want to stop using Cloud DB for PostgreSQL and prevent charges from incurring, then delete the PostgreSQL Server you created and were operating. For more details about how to delete PostgreSQL Servers, refer to PostgreSQL Server.
    1. From the NAVER Cloud Platform console, click the Services > Database > Cloud DB for PostgreSQL menus, in that order.
    2. Click the DB server menu.
    3. Click the [Create DB server] button.
    4. When the subscription request page appears, enter the required information, and then click the [Next] button.
    5. Click the [Create] button.

    Set ACG

    The following describes how to set up Access Control Group (ACG) of a PostgreSQL Server from the NAVER Cloud Platform console.

    Note

    In this section, we will briefly introduce how to set up ACG. Please refer to ACG Guide for more information about setting up ACG.

    1. From the NAVER Cloud Platform console, click the Services > Database > Cloud DB for PostgreSQL menus, in that order.
    2. Click the ACG menu.
      clouddbforpostgresql-start_04_vpc_en
    3. Click and select the ACG to set up, and then click the [Set ACG] button.
      • Select the ACG of the PostgreSQL server automatically created
    4. Enter the ACG name of the application server in Access source.
    5. Enter the port number in Allowed port.
    6. Click the [Add] button.
    7. Click the [Apply] button.

    Test PostgreSQL Server connection

    The following describes how to test if you can connect properly to the created PostgreSQL Server by installing the PostgreSQL client.

    Note

    In this section, we will briefly introduce how to test connection using pgAdmin. For more details about how to use pgAdmin, refer to pgAdmin Documentation.

    1. Access pgAdmin.org.
    2. Click the Download menu.
    3. Download a version for your OS, and install it on your local PC.
    4. Add information of the PostgreSQL Server to connect to.
    5. Access the PostgreSQL Server.

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.