OpenEarth is dedicated to automate deployment of PG ()and its other components) in Azure, please assist us at https://github.com/openearth-stack.
Our goal is to offer a proper VM in Azure https://docs.microsoft.com/en-us/azure/marketplace-publishing/marketplace-publishing-vm-image-creation
There are detailed instructions on how to deploy a PG database in Azure on a Linux server:
Following all these instructions might take a few hours, due to human processing time as well as due to virtual machine spin-up time.
The next step is to automate the human processing time into a script, with our choice Ansible and Docker.
The most popular scripting tool for deployment at this moment is Ansible. As of oct 2016 Ansible has taken over Puppet as the most popular tool
In addition to being the most pupular, Ansible has some advantages over other the previous generation of tools soch as Puppet, notably the ease to start using it. You can find many blogs that compare Ansible to other system configuration tools, like
We hope this convinces you to use Ansible. Here is a high-level overview of Ansible:
After you automated the human processing time, the virtual machine spin-up time can be reduced by means of deploying containers. There are two ways to do this. First, there are classic tools to deploy full virtual machines, such as virtualbox or vmware. Vagrent is wrapper around these tools to automate them. However, very popular nowadays is Docker to launch mini-containers fast. The differences between Docker and Vargent are explained here
We prefer to combine Docker with Ansible: use Ansible scripting to make a Docker container.
This can be automated using
The Ansible scripts can be tested with Travis.
Vagrant might still come in very handy to launch the Ansible Management Node.
Some are sceptical of making a container/boxes of a database, but there are strong argument in favour of it
However, be aware that Docker containers are transient, so make sure you configure it to store your data outside the Docker container.
Note that fully functional Postgres Docker containers
as well as Vagrent boxes (http://www.pgdevbox.com/#) are already available for download. However, these do not contain the geospatial PostGis extension with is essential for OpenEarth applications. Hence it makes sense to script a Docker container ourselves.
A huge advantage of Ansible is also that it comes with tools to also automate database tasks, notably to set proper authorization. And perhaps to insert a data model.
Please note that you need to deploy tools like Barman for back-up and recovery of your database.
For DataBase admininstration (DBA) purposes, we recommend to deploy the python webtool PGAdmin 4 on the same Linux server.
Note that some day all of the above might become unnecesary, when Azure will offer PostgreSQL via Database-as-a-Service offerings:
Of course you can also use this fully functional Linux Data Science Virtual Machine which includes Postgres.
or a Postgres cluster