Telestax Blog

Hosting RVD External Services in the Cloud

This tutorial covers hosting RVD External Services in the Cloud. Since the introduction of the RestcommONE Visual Designer(RVD), a lot of developers have been able to experience first hand an unprecedented productivity in building telephony apps.

RestcommONE Visual Designer has inspired a number of more complex applications which inevitably require the ability to interact and integrate with third party systems and APIs. In order to support this requirement, RVD introduced the External Service function.

We will see how developers can leverage the power of the external service function by hosting their databases and business logic code on a public cloud machine.

For the purpose we will built a hypothetic phone system for a car service business. We will reuse the ABCauto app which was introduced a couple of weeks ago on our blog.

The database and scripts will be hosted on the Red Hat Openshift Cloud Application Platform. You may use any public or private cloud platform for your own RestcommONE apps.

Why host in the cloud?

  • When you build an app with RVD (RestcommONE Visual Designer) that is intended to be distributed to a variety of end users, , you may want those users to be immediately able to run it without the hassle of complex setup and configuration of a database and code on a local machine.
  • Having the data and code hosted on a centralized cloud service makes it easier to work and update your app remotely from anywhere.
  • Ultimately these improvements lead to better user experience and potential for more commercial success.

Requirements

  • RestcommONE AMI or Local Binary Install
  • Knowledge of RestcommONE Visual Designer
  • Openshift Account

Step 1

It is assumed that you have your application already built using Restcomm and all that is missing is linking the application to your database and script hosted in the cloud.

  • Get your free Openshift account
  • Go to the Openshift getting started page
  • The guide above will let you start an instance with a programming language like PHP, Python, Java, Ruby, etc.
  • In the example of the ABCauto RestcommONE app, the root page for the PHP instance on openshift is http://abcauto-telestax.rhcloud.com/
  • The page will be similar to the screen below

restcomm-openshift

  • Next, you must install a database on your Openshift cloud
  • With the ABCauto example,  Mysql was installed as shown HERE
  • The next step is to create your database and tables
  • You must also move all you files, in this case, php files to the cloud using git
  • check to make sure your files are accessible on the cloud through the http page (http://abcauto-telestax.rhcloud.com/XYZ.php)

You might get a mysql error when trying to connect to the new database hosted on Openshift. The error output could be similar to the one below

[alert type=”error”]Connect failed: Access denied for user ‘root’@’localhost’ (using password: YES)”.[/alert]

In order to resolve this issue,

  • log into your mysql DB installation,
  • go to the database mysql
  • check the table user

Make sure the Host and the User are the same as used in your php files. In some cases, you might need to use the IP address instead of localhost.

Step 2

This is where you need to point all your files stored in the cloud to the RVD External Services module. Below you we are going to show you an example of how it can be done.

This is the old External Services module hosted on a server running RestcommONE

When the External Services is hosted in the cloud like in the case of the abcauto, the Service URL will look like the one in the screen below:

 

restcomm-openshift-ES

 

 

 

 

 

 

 

 

 

 

 

 

 

No Comments

Post A Comment

Get awesome content in your inbox every week.

Give it a try. It only takes a click to unsubscribe.