In this post I’ll show in detail how to configure Horizon Workspace to use an external database during the install process. This post is part of a series showing how to configure VMware Horizon Workspace in a production environment. You’ll need an external database to have multiple service virtual appliances, so this should be a requirement for your environment. This process was suprisingly not trivial for me, however it could have something to do with the fact that I haven’t used postgres sql in the past.
Some assumptions and prerequisites:
- You have horizon workspace 1.5.1 (at least) downloaded, deployed to your infrastructure successfully, and you’re ready to go through the web configuration.
- You have VMware vFabric Postgres downloaded and deployed to your infrastructure successfully, with no configuration added.
- Proceed through the web configuration until you get to step 2a, and select External Database. Stop here…
- Prepare your new external database
- SSH to the postgres server (I’ll assume the server is named hzn-db.test.in)
- Make changes to the postgres config: /var/vmware/vpostgres/9.2/pgdata/postgresql.conf.auto
- Max_connections = 300 (default is 100)
- Search_path = ‘saas’ (no value by default)
- You’ll have to prepare the postgre sql schema. Run these commands to configure it. VMware graciously has not provided the default password for the postgres user in any of their documentation, even after I opened a SR requesting the password. For your reference, it is “H0rizon!”. “myPassword” below should be replaced with the password you want to use for your horizon workspace postgres user.
- /opt/vmware/vpostgres/current/bin/psql -U postgres -W
- DROP SCHEMA IF EXISTS saas CASCADE;
- CREATE SCHEMA saas;
- CREATE USER horizon WITH PASSWORD ‘myPassword‘;
- ALTER ROLE horizon SET search_path TO saas;
- CREATE EXTENSION citext WITH SCHEMA saas;
- SSH to your service-va, and run the following command
- The wizard will ask you for a postgres admin user (postgres), and the horizon user (horizon). The password for the postgres user, unless you change it is “H0rizon!”, and the password for the horizon user is set in step 3.
This should work – if you run into any issues, please comment!