Installing the Datastore on Windows
To install the Analytics Datastore on Windows, follow the steps below.
To install the Datastore on Windows
-
Download PostgreSQL 9.4+ for Windows from www.postgresql.org/download/
To optimize database performance and efficiency installed PostgreSQL 9.6+. See: Maximizing Efficiency with the Datastore located in Sizing Requirements for all Analytics components.
- Follow the installation instructions for your target system. It's not necessary to install the "Stack builder".
-
Setup a master password and finish the installation.
Use the setup.psql script to create a user with a password and a database and grant all required privileges to the user for the created database. The script can be found here: <Automic>\Automation.Platform\Analytics\Datastore\setup.psql
You need the hostname/ip, port (default localhost:5432) and the postgres admin user to init the datastore.
The script will also create an api key that can be used to get data from the backend. The System API must be added to the webui-plugin-analytics properties as well as the required configuration for the backend to connect to the datastore.
Execute the script in the folder where the setup.psql was extracted with the following parameters:
[path to postgres bin]/psql -h {host} -p {db_port} -U {superuser} -v username="{db_user}" -v password="'{db_user_password}'" -v db_name="{db_name}" -f setup.psql
(line breaks for formatting purposes only)
Important:
- The usernameand db_name should always be in lowercase.
The superuser password will be prompted.
The default password is: postgres
PostgreSQL for Windows does not require Service Manager if installed with enterprise db or BigSQL installer, it is installed as a Windows service and will autostart via this.
Parameters
Parameter | Description |
---|---|
-h = {host} |
The hostname or ip where postgresql is running. |
-p = {db_port} | The port postgresql is using. Default: 5432. |
-U = {superuser} | Username for postgresql. Default: postgresassword will be prompted |
You can also choose the following parameters
Parameter | Description |
---|---|
-v username = {db_user} | The username that the script will create and use to set up the analytics database. |
-v password = {db_user_password} | The password for the created database user. |
-v db_name = {db_name} | The name of the created database. |
The setup script generates output that helps you to configure the webui plugin and the analytics backend.
Example output:
Set the following property in your plugin.properties of the webui-plugin-analytics:
backend.api_key=f4b7e4af-3d77-4cfc-a898-2c09a9318faa
The file is located in the awi directory:<Automic>\awi\config\webui-plugin-analytics\plugin.properties
Set the following properties in your application.properties file:
The file is located in the following directory:<automic>\Automation.Platform\Analytics\backend\application.properties
datasource.analytics.url=jdbc:postgresql://localhost:5432/analytics
datasource.analytics.username=analytics
datasource.analytics.password=analytics
See also: https://www.postgresql.org/docs for all options of the psql command.
Now the Analytics Datastore is installed and configured
To allow connection to all databases for all users and from anywhere, add the following line to your pg_hba.conf file (location depends on operating system; on Windows the file is located in the data directory of PostgreSQL): host all all 0.0.0.0/0 md5