5. Deployment
CoreAuto
To start Core Auto application it isrequired to prepare database and configuration. You can deploy using Docker or follow the instructions below:
Database
All commands below require administrativeprivileges (e.g. Postgres user).
1. Create user which will be the owner of the database:
CREATE USER <user> PASSWORD '<password>';
2. Create database:
CREATE DATABASE <dbname> OWNER <user>;
3. Connect to newly created database and install required database extensions:
CREATE EXTENSION IF NOT EXISTS pgcrypto SCHEMA public;
CREATE EXTENSION IF NOT EXISTS dblink SCHEMA public;
Application configuration file
Update configuration file with host, port and database name in spring.datasource.url, set username and password with previously created details.
spring:
datasource:
url: jdbc:postgresql://<hostname_or_ip>:<port>/<database_name>
username: <username>
password: <password>
Application initialization
First, run application with init parameter. This will create all required database schema and objects:
$ java-jarcoreauto.jar init --spring.config.location=<path>/application.yml
How to start / stop
$ java-jarcoreauto.jar --spring.config.location=<path>/application.yml
After start application will be available at http://<hostname_or_ip>
:
Port number is set in application.yml as server.port.
Logs
Coreauto logs are by default stored in coreauto.logs
file next to the coreauto.jar
file. It can be changed.
Collector
In order to start Collector application it is required to prepare configuration.
Application configuration file
Update configuration file with host, port and database name in spring.datasource.url, set username and password with previously created details.
spring:
datasource:
url: jdbc:postgresql://<hostname_or_ip>:<port>/<database_name>
username: <username>
password: <password>
How to start /stop
$ java-jar collector.jar--spring.config.location=<path>/application.yml
Logs
Collector logs are by default stored in collector.logs
file next to the collector.jar
file. It can be changed.
Manager
Configuration file
Coreauto Manager requires the .pg_service.conf
file to be placed in the user directory which run Core Auto Manager. The filre should be readable only for this user.
The content of the file:
[CAmeta]
host=<database_host>
port=<database_port>
dbname=<database_name>
user=<database_user>
password=<database_password>
How to start /stop
To stop the Core Auto you may either use the systemctl start coreauto-mngr
or you can use CArtstop <env> <service>
(e.g. CArtstop prod CAmeta
) program.
Logs
Core Auto Manager logs are by default stored in BatchLog catalog for batch processing and RealTimeLog catalog for real time processing. It can be changed in CoreAuto metadata.
Agents
Core Auto Manager can also use the remote agents installed on remote servers. To use the agents, we need to copy the CAagnt, CArtrwrkr, CArwrkr, CAag_start.sh and CAag_stop.sh programs to the remote host and install the postgresql-dev package.
To start the agent run command:
CAag_start.sh <name_of_the_agent_defined_in_metadata>
To stop the agent run command:
CAag_stop.sh <name_of_the_agent_defined_in_metadata>