/acuity-docker

Repository containing backbone for launching ACUITY applications using docker images

Primary LanguageShellApache License 2.0Apache-2.0

License

Overview

This is a primary ACUITY component to start application. This repository also contains project's Wiki

This project contains docker-compose configuration files and other configs that allow to run an ACUITY instance based on:

  • Prepared docker images downloaded from this repository (docker-compose.yml files)
  • If you prefer to build Docker images on the fly (for development or other purposes) - docker-compose_building-mode.yml

Here is a reminder how all ACUITY repositories work together. Repositories scheme


ACUITY run

You could run ACUITY as a cloud application (refer to this repository for this case) and as a local instance on your laptop or working station.

To start application locally on your Windows machine you can download this repository as a zip-archive and navigate to startup folder.

Please refer to steps described in readme for details.

In essence you should launch the following scripts in order:

  1. acuity-init-db-windows.bat
  2. install-SSL-certs-for-local-windows-start.bat

This step can be skipped if you manually created and installed SSL certs:

  • ca.crt to acuity-docker/ssl-certificates/certs/
  • ca.key to acuity-docker/ssl-certificates/keys/

3.acuity-start-windows.bat

You should already have docker and docker-compose installed. For manual and details please visit this page


Developers' section:

Installation flow is automated via deployment-scripts. Please refer to this repository to install application either in Cloud or locally.

Here is a description of app set up process which is automated and scripts. Also this section contains some instructions to apply database dumps and other possibilities

  • copy acuity-docker project content to your user directory subdirectory acuity-docker; you need to copy following directories and files:
    • env-configs
    • images
    • acuity-spring-configs
    • .env (if you plan to use this ACUITY instance for production purposes) or .env.dev (for development, demo and similar purposes) - it's your .env file
    • docker-compose.yml (if you plan to use ACUITY applications Docker images from a remote registry) or docker-compose_building-mode.yml (if you plan to use building mode, e.g. build you images yourself before use them) - it's your Docker Compose file
  • get to ~/acuity-docker directory using our command line tool (from here, all paths will be relative to this directory, unless mentioned different)
  • if you have a set of predefined config files for your environment (that may be Spring configs, or .env config(s), or <app>.env configs, or SSL certificates etc), place them to ~/acuity-docker directory or corresponding subdirectories; most likely, you'll be able just to copy all the content of your prepared config directory to the ~/acuity-docker dir.
  • if you a going to use default-state configs, make sure they are suitable for your purposes, and update them if needed; in particular, pay attention to the content of the .env/.env.dev file (there are some comments inside describing what can be changed and why).
  • if you have a data dump in .sql or tar format to upload to the new database, place it to /images/postgres/data directory; otherwise, update /images/postgres/data/add_global_admin.sql file setting everywhere global admin email instead of user@example.com.
  • if you decided to use building mode, you need built artifacts of ACUITY applications; place them into /building-mode/builds directory under names: adminui.war, acuity-config-server.war, acuity-flyway.jar, vasecurity.war, vahub.war.
  • run docker-compose -f <your_docker-compose_file>.yml --env-file <your_.env_file> --profile init_db up -d and wait acuity-flyway container to finish its work and exit (it will take a couple of minutes; to make sure it exited, run docker container ls --all; in the list of containers you should see something like artifactory.com:6285/acuity-flyway:9.0-beryllium-SNAPSHOT in state Exited)
  • run docker exec -i -t acuity-docker_postgres_1 /bin/bash
  • if you want to apply a DB dump in .sql format generated by acuity-data-oracle-to-pg-transformer utility, run the following commands:
psql -d acuity_db -U dbadmin
\i /usr/root/data/<your_dump_file>.sql
\q
  • if you want to apply a DB dump in .tar format, run the following commands:
psql -d acuity_db -U dbadmin
\i /usr/root/data/clear_data_tables.sql
\q
pg_restore --host=localhost --port=5432 --username=dbadmin --dbname=acuity_db --schema=acuity --data-only --disable-triggers --format=t /usr/root/data/<your_dump_file>.tar
psql -d acuity_db -U dbadmin
\i /usr/root/data/update_sequences.sql
\q
  • if you want to just add the global administrator user (without it, you won't be able to operate clear ACUITY instance), run the following commands:
psql -d acuity_db -U dbadmin
\i /usr/root/data/add_global_admin.sql
\q
  • run exit
  • run docker-compose -f <your_docker-compose_file>.yml down
  • run docker-compose -f <your_docker-compose_file>.yml --env-file <your_.env_file> --profile main up -d Wait for ACUITY applications to start (you may check it using logs in /logs directory). After that, they should be accessible through ports 80/443 (VAHub), 444 (VASecurity), 447 (AdminUI) on your environment (if you do it on your local machine, addresses will look like https://localhost:447).

More info

To find more info about ACUITY deployment and running please check main ACUITY wiki.