Ephemeric cloud managed runtime allows you to map remote services like MongoDB to ephemeric instances which looks like the services run locally with the applications on the same host. It allows developer not to put any configuration to the application code but to use default local settings (as services will be mapped to the application at runtime).
The Ephemeric Cloud runtime environment uses
stunnel to create secure tunnel between the application and the resources thus making the communication secure. It becomes possible to map any remote services using the managed runtime environment.
This article shows how to connect your Ephemeric Pharo Image to MongoDB service hosted as droplet at Digital Ocean.
Please consider that the approach described here is versatile and you can connect your applications to any service provider or your own dedicated servers. Digital Ocean is used in this article just as an example.
First, let's run a Digital Ocean droplet with MongoDB and configure secure tunnel server side on it.
1. Run a MongoDB droplet. I used the version available as one-click installation option.
2. Follow the instruction to configure stunnel on the droplet:
2.1. Use the following
/etc/stunnel/stunnel.conf file on the droplet to have a tunnel to MongoDB server:
3. Copy the certificate you created (
stunnel.pem) to your local computer.
1. Create a client side
2. Create zip-archive with a Pharo Image,
stunnel.conf and the certificate (
stunnel.pem which was copied from the droplet).
For instance, archive file lists can be as follows:
3. Publish the archive to ephemeric cloud.