Many programmers have asked us recently to start developing projects with Instant Developer Cloud working from closed databases in private networks, and thus not accessible from the Cloud.
A solution to this problem exists, and it’s called Cloud Connector, a software agent that’s installed near the database to be published. It permits safe, high-performance access to the data from the Cloud, without any need to open the network to the outside.
For the sake of simplicity, we’ve made this component open source, so you can use it freely and evolve it however you need. You’ll find it on GitHub, along with the instruction files.
To install it, follow this procedure:
- Install version 6.2.1 of node.js (https://nodejs.org).
- Download the Cloud Connector from GitHub by clicking Clone or download and then Download ZIP.
- Unzip the contents to the Cloud Connector executable folder, which must be in a server that can access the database, the same one where you’ve installed node.js.
- Rename the config_example.json file as config.js and open it to start the configuration.
The Cloud Connector configuration, in the config.js file, consists of three main parts:
- The remoteServers list, which must specify all the production servers that can use the Cloud Connector. Each server must be specified using its URL, like this: https://myserver.instantdevelopercloud.com.
- The remoteUserNames list, which contains the names of the users who can see the Cloud Connector from their IDE during development. Specify only the user name (e.g., “johnsmith”) or the user name preceded by the organization (e.g., “mycompany/johnsmith”).
- The list of data models, which are the databases that the Cloud Connector has to publish. In the initial configuration file you’ll find an example for each type of supported database: Postgres, SQLServer, and Oracle. Delete the ones you don’t use and fill out the others with the correct information.
At this point, to run the instance of the Cloud Connector you just configured, just launch the node cloudServer.js terminal command and from your IDE session you’ll be able to select the name of the Cloud Connector to associate it with the data models for your projects.
Finally, to ensure that the Cloud Connector process continues to execute, you can use a management module called pm2, or other equivalents.
The whole procedure may seem complex, but in most cases it’s very simple. If you run into any snags, let me know by leaving a message on our forum.