CLOUD PAAS / APPLICATION SETTINGS

Endpoints: A Direct Connection to the Cloud

This guide has been reviewed and reformatted for Ruk-Com Cloud PaaS. Screens may vary slightly by platform version.

Click or tap a screenshot to view it at its original size.

Objective

This guide explains how to use Endpoints: A Direct Connection to the Cloud on Ruk-Com Cloud PaaS, with ordered procedures and practical verification points.

Before you begin

  • Sign in with an account permitted to manage the relevant environment.
  • Confirm the target environment, region and resources before saving changes.
  • Create a backup or rollback plan before changing a production system.

The Endpoints feature provides the possibility to map TCP/UDP ports through Shared Load Balancer, which aims to simplify interoperability of instances with third-party tools and resources by being able to establish direct connections. (via raw TCP or UDP protocol) to the corresponding node without attachingPublic IPaddress

Such bindings can be used to enable a variety of tasks, such as managing remote databases, deploying apps directly from the IDE (forIIS) Running multiple projects on a single instance, accessing the server admin panel without being tied to an external address, etc.

Tips:In addition to the added convenience, Endpoint reduces your costs for the external IP usage required to do so. It is evident that destinations cannot be completely replaced. But it can be useful in certain tasks and when working with other features (such as scaling).VerticalandHorizontalautomatic,Discount leveletc.) Such methods can help you save a lot of money.

Endpoints management

The list of endpoints can be accessed through the environment by clicking on the menu.Settings

Ruk-Com Cloud PaaS procedure screenshot

When the tab appears, switch to the endpoints menu. You can now start working on your mapping items:

  • Add a new endpoint
  • Edit/delete existing endpoints

To create a new destination, click the button.Addtop of the dashboard and fill in the information.Add Endpointthat appears with relevant information:

Ruk-Com Cloud PaaS procedure screenshot
  • Node- Select the instance where you want to set the endpoint (here only the selected environment and nodes will be shown).
  • Name- Type a name for the new destination or select one of the pre-configured options. (Relevant items are provided below.lowerthis)
  • Private port- Specify the desired node port to use for mapping. (It will be automatically replaced if a predefined name is selected.)
  • Protocol- Select TCP or UDP

The remaining fields, such asPublic portandAccess URLIt is automatically configured from Ruk-Com Cloud.

Press the buttonAddWhen available

For greater convenience, we have provided an embedded list of pre-configured items based on the protocol:

*Optional The available values depend on the selected node type:

  • database nodesPrepare default destination information Name it yourself and specify the appropriate port.
  • Windows-based containersThere is a connection.RDP(3389) more
  • IIS application serverThere is a DEPLOY connection (8172) for deploying projects directly from the IDE.
Ruk-Com Cloud PaaS procedure screenshot

Here you will seePublic portandAccess URLShown on this page You can use these parameters to perform desired actions, select on the string and copy it easily.

More:For binding functionality to work correctly with VPS and Docker® containers, you should enable the relevant Private ports. (specified during adding endpoints) manually at these nodes

Existing endpoints can be easily edited or removed if they are no longer needed. For that, select the button.Edit(either by double-clicking on the desired line) or a buttonRemoveIt's in the top tool pane.

Ruk-Com Cloud PaaS procedure screenshot
  • Edit- In the Edit Endpoint format (which is similar to Add), you can edit all settings. Except for node selection (Because it doesn't make sense - you can just add a new similar endpoint to the desired instance)
Ruk-Com Cloud PaaS procedure screenshot
Once the changes have been made, select Apply button.
  • Remove- A window will appear in which you will need to confirm the deletion.
Ruk-Com Cloud PaaS procedure screenshot
Wait a moment, the endpoint will be removed from the list.

Endpoints Use-Cases

Once the desired map is configured, you can use it to run various tasks. To make things easier, we'll explain some common uses of endpoints below:

Our example uses the Apache application server and MySQL database (you can create a similar environment following this guide):

Ruk-Com Cloud PaaS procedure screenshot

Now let's learn how to use endpoints for:

Database management

Remote access to DB instances becomes easy as this feature eliminates the need for additional options such as Public IP. There are two simple ways to do this: Viaembedded OS terminalandThird party DB client

The most common approach is to use your local terminal. Because it does not require additional installation or configuration and has enough functionality to create a simple connection - just one command is used:

mysql -h {host} -P {port} -u {user} -p
Ruk-Com Cloud PaaS procedure screenshot

where:

  • {host}- Access destination URL without specifying port suffix. (in our case node30292-env-with-endpoints.jelastic.com)
  • {port}- Set port number (For example:10011)
  • {user}- database username (will be sent to you via email during environment creation) - by default root for all new MySQL servers

After checking the correctness of the connection You will be asked for your DB user password (can be found at the email address above) to access your database.

Now you can start working with the database by executing the required SQL queries.

In case you need more functionality or if you are used to more convenient management of data stored in databases, the database desktop client type provides user-friendly graphics and a variety of features to speed up your work.

As an example of one such customer helping to establish a remote connection to our database through an endpoint created by us using a popular database management tool -MySQL Workbench

1. Run the MySQL Workbench application and click the button.New Connection

Ruk-Com Cloud PaaS procedure screenshot

2. In the frameSetup New Connectionthat appears, fill in the following fields at the top:

  • Connection Name- Set a name for your connection (e.g. jelastic-db)
  • Connection Method- Select standard method (TCP/IP)
Ruk-Com Cloud PaaS procedure screenshot

Then specify the required DB information within the parameters tab below:

  • Hostname- Endpoint URL without a port number specified at the end (e.g. node30292-endpoints.jelastic.com)
  • Port- destination public port (e.g. port 10011 that we got during adding)
  • Username- DB user administrator name (sent to you by email during environment creation - default is root for all new MySQL servers
  • Password- Click Store in Keychain to enter and save your password. (which can be found in the same email) or skip this field to specify during each connection.
  • Default Schema- database schema used by default (can be left blank) then clickOK

3. Double-click the connection record to begin creation and enter your password in the frame that appears. (If you haven't saved before)

Ruk-Com Cloud PaaS procedure screenshot

You can also mark Save password in keychain if you don't want to enter it manually every time you want to access your database. Click the button.OKto continue

4. Wait a moment, you will be connected to DB.

Ruk-Com Cloud PaaS procedure screenshot

Now you can start managing your data using all the benefits of a comprehensive client management feature.

As well you can connect to other database servers or backup and restore your data within the dump file.

Multiple development steps in a single app server

In addition to basic DB management operations, endpoints have the ability to implement several useful and interesting solutions for other servers. In the section below we will consider one possible useful feature - this method of having a single application server environment for production and development simultaneously (using the Apache Instance from our environment as an example).

1. Map the endpoint to your Apache server with any unused private ports open.

Ruk-Com Cloud PaaS procedure screenshot

More:Do not select port 80 as the private port for this task as Apache uses it by default for handling incoming HTTP requests, otherwise the entire process described below will be useless.

2. Now deploy your application twice with different contexts (e.g.prodanddev)

Ruk-Com Cloud PaaS procedure screenshot

3. The next step is to configure Apache itself - so click the button.Confignext to this server and open the main configuration file (conf > httpd.conf)

Ruk-Com Cloud PaaS procedure screenshot

4. In the httpd.conf file, scroll down to line 160 and add the following string to the listen port registry:

Listen0.0.0.0:{port}

Ruk-Com Cloud PaaS procedure screenshot

Here the {port} parameter should be replaced with the private port number that you specified during adding the endpoint (e.g. we added the number 81).

5. After that, move to the end of the file and duplicate the VirtualHost section, specifying the corresponding port number. (same as in the step above - number 81 in our case)

Ruk-Com Cloud PaaS procedure screenshot

Then adjust the positionDocumentRootMake it appropriate for both virtual hosts with associated projects (prod - for default and dev - for custom sections below).

6. Press the buttonSaveSave the changes made and restart the Apache server to apply them.

Ruk-Com Cloud PaaS procedure screenshot

7. Now you can connect to your prod project as usual, for example by pressing the button.Open in Browser(or entercustom domainexternally if it is additionally bound to your app) and for accessing the dev version you just specify the endpoint's Access URL

Ruk-Com Cloud PaaS procedure screenshot
Ruk-Com Cloud PaaS procedure screenshot

As a result, you have two connection points with two projects that allow you to perform any testing or development needs from one copy without affecting the other. They can also be switched with just a few clicks.