Last week we announced VMware vFabric Postgres 9.2 is now available. This new release standardizes its core with the open source PostgreSQL and further simplifies the installation, operation and management of PostgreSQL for virtualized and cloud environments.
You do not need more than a couple of minutes to have a Postgres server available for your applications. It will be deployed pre-configured to simplify operations on virtualized environments such as the VMware vSphere server. The download will come with several install steps completed automatically, including:
- postgresql.conf settings automatically tuned to the VM memory
- SSL configuration on server side immediately available
- Initial machine and database server accounts set up with the same single password
- User interface to control both the VM core and the database server
In order to set up this server and that many interfaces all at once, you do not need to spend that 5 minutes in front of your screen, and everything can be done in 3 simple steps.
Prepare the Virtual Machine
Start by first downloading the appliance available as an Open Source Virtual Appliance (OVA file) or RPM package.
I personally recommend the use of the OVA file as it is directly pluggable with one of available VMware virtualization platforms like vSphere, Fusion, Workstation or Player. Please refer to the product documentation for more details on the installation depending on the platform you use.
As a personal choice, importing the OVA file of vFabric Postgres to Fusion has not needed more than 30 seconds. It simply takes the time to click on File -> Import and load the OVA file.
You can find your vFabric Postgres in your list of virtual machines.
Launch the newly-created vFabric Postgres instance by double-clicking on its entry in the virtual machine list or power it on. What you will see next is a screen explaining the license agreement, be sure that you understood it, then scroll down and accept it to continue the setup process.
After setting some SSL certificates used by the virtual machine, it is time to set up the initial password for all the accounts available at the instance first boot. Those user accounts are “root” and “postgres” for the virtual machine itself and “postgres” for the database server.
NOTE: After the virtual machine is up, you can customize the password for the virtual machine with command “passwd” for each VM user, and for the database server by using ALTER COMMAND for database users.
Run Your Database
Now that the initial settings are done, the virtual machine will log into this screen at each boot.
The user interface of core server is available using a simple web browser by connecting to the port 5480 via https, so connect to it with the URL:
NOTE: In the example here, the IP was assigned by DHCP and became 192.168.11.11, so in this case the connection URL became https://192.168.11.11:5480.
Next, you will need to use a VM account to log in. At startup, this account needs to be “root”.
The user interface of database server is also available with a web interface by connecting to the port 8443 of the virtual machine via https, so connect to it with the URL:
NOTE: Again, in the example here the IP assigned by DHCP was 192.168.11.11, so the connection URL became https://192.168.11.11:5480/.
From the login screen, use account “postgres” and login.
Finally, connect to your database inside the virtual machine with this command:
Then you can begin and play with your ready-and-tuned server.
You can also connect to your server directly by using the same client applications or drivers as PostgreSQL without a problem. For example, use the following simple PSQL command to login:
psql -p $IP_ADDRESS -U postgres postgres
For the VM used in this post, IP_ADDRESS simply became 192.168.11.11.
|About the Author: Michael Paquier is a member of PostgreSQL technical staff at VMware. He is involved for many years with community development of PostgreSQL and Postgres-XC, and has worked on multi-master database technologies. He has also interest in parallel query processing and concurrent SQL processing.|