...
You will be asked for a user name and password. If you don't have it, contact developer of this project.
Make sure you can access dashboard-ReactJS
Docker image that contains Dashboard application can be downloaded from a Docker registry registry.apps.man.poznan.pl
. Before you proceed, make sure you can access the registry. You can test it by executing following command:
...
Code Block |
---|
127.0.0.1 localhost.dashboard-ui.pl |
Make sure you can access imas-watchdog project
This repository is publicly available. All you have to do, is to double check whether you can clone it in docker-compose/build
folder.
...
Code Block |
---|
> git clone --single-branch master https://github.com/tzok/imas-watchdog.git |
Anatomy of application.properties file
Spring based Web Services are run inside Tomcat server. Configuration of services can be done using application.properties
file.
Code Block |
---|
# location of database - typically, it will point at localhost, but
# it's also possible to change location of MySQL server.
# Docker based installation (docker-compose) will change it to db:3306
# In case of docker-compose based installation, MySQL is visible as another host
# Note that you don't have to change anything
spring.datasource.url=jdbc:mysql://localhost:3306/itm_catalog_qt?serverTimezone=UTC
# Default user name and password for database connection. Note that this connection
# will not work (by default) for external hosts. This is why we don't quite care about
# user/pass - however, you can alter these and make sure they don't contain default values
spring.datasource.username=itm_catalog_rw
spring.datasource.password=itm_catalog_rw
spring.jpa.properties.hibernate.jdbc.time_zone=UTC
# In case of errors we want to embed error message as well (so we better know what went wrong)
server.error.include-message=always
# We definitely don't want to log SQL queries. However, if you want to see them, feel free
# to enable this property
spring.jpa.show-sql=false
# We don't want to generate DB schema from bean classes
spring.jpa.hibernate.ddl-auto=none
# This is additional http handler, on another port
# We need this one, in case we plan to use https
# This is tricky :)
# If server.ssl fields are set, this field defines https port
# If server.ssl fields are not set, this field defines http port
server.port=8080
# However, we need http port anyway (for some components). This is why we expose services on
# http anyway. At the and we can end up with two different configurations
# http (8080) and http (8081) - no certificates
# https (8443) and http (8081) - certificates
server.http.port=8081
server.http.interface=0.0.0.0
# ------- Keycloak settings -------
keycloak.realm = fair4fusion-docker-demo
keycloak.auth-server-url=https://sso.apps.paas-dev.psnc.pl/
keycloak.resource= catalogqt-cli
keycloak.realm-key= MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjOCDGJsBi7rxVjf0RQb8pm0LAGsEKFcH7g7mKSqpFvp1uOypUeiYe5dwlwkXAXaYeYs0J70LB8E6mtVUcykbmp+XrqD1nn3yfPxlVLSg7iCvJqMUq8udsUbsyT3M/32/kssXurgY7rX5JhdtkYeAgq+9ifIjLQZhALg+FvEsX9C+D30WQDAChEljlReb+Y4UTz2aIqz9C+90bqG1ZIX4o3Dli1PZDosTNM444CwDTbrFrenctOTDtGPodo9k2jze8McZFAIrdUYi9mKD8v0frs8NUUW/TQj9h62swXdvVAfzYTd+R7aMRG0eXMV3rJc38DfsCsF7bkqSg0b4l8GcaQIDAQAB
keycloak.bearer-only = true
keycloak.public-client=true
keycloak.principal-attribute=preferred_username
spring.mvc.dispatch-options-request=true
# ------- HTTPS settings --------
# If you plan to use HTTPS, make sure to uncomment this one
# You have to make sure to generate and configure SSL certificate for your domain
#server.ssl.key-store=file:///home/imas/cert/keystore.p12
#server.ssl.key-store-password=catalogqt
#server.ssl.keyStoreType=PKCS12
#server.ssl.keyAlias=tomcat
# ------- Bearer token authorization --------
# Should we check authorisation header or not. This feature toggle enables sort of "single user mode"
# It's useful in case you don't have Keycloak and don't care about user roles. Once set to "false"
# it will make Web Services behave as if there is only one user
swagger-ui.authorization.header=true |
We have few alternative path to run our app:
docker compose:
Warning |
---|
in every docker-compose path the first line should be changed to spring.datasource.url=jdbc:mysql://db:3306/itm_catalog_qt?serverTimezone=UTC -localhost:3306 +db:3306 |
- docker-compose with keycloak authentication and HTTPS settings both enabled, swagger-ui.authorization.header=true
- docker-compose with keycloak authentication enabled and HTTPS settings disabled, swagger-ui.authorization.header=true
- docker-compose with keycloak authentication disabled and HTTPS settings enabled, swagger-ui.authorization.header=false
- docker-compose with keycloak authentication and generated HTTPS settings both disabled, swagger-ui.authorization.header=false
Example of application.properties file for docker-compose:
Info |
---|
Look at the structure:
|
Code Block |
---|
# The host is 'db' not localhost!
spring.datasource.url=jdbc:mysql://db:3306/itm_catalog_qt?serverTimezone=UTC
spring.datasource.username=itm_catalog_rw
spring.datasource.password=itm_catalog_rw
spring.jpa.properties.hibernate.jdbc.time_zone=UTC
server.error.include-message=always
spring.mvc.dispatch-options-request=true
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=none
# This is additional http handler, on another port
server.port=8080
server.http.port=8081
server.http.interface=0.0.0.0
# ------ Keycloak settings -------
# If you plan to use Keycloak authorization, make sure to uncomment this one
keycloak.realm = fair4fusion-docker-demo
keycloak.auth-server-url=https://sso.apps.paas-dev.psnc.pl/
keycloak.resource= catalogqt-cli
keycloak.realm-key= MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjOCDGJsBi7rxVjf0RQb8pm0LAGsEKFcH7g7mKSqpFvp1uOypUeiYe5dwlwkXAXaYeYs0J70LB8E6mtVUcykbmp+XrqD1nn3yfPxlVLSg7iCvJqMUq8udsUbsyT3M/32/kssXurgY7rX5JhdtkYeAgq+9ifIjLQZhALg+FvEsX9C+D30WQDAChEljlReb+Y4UTz2aIqz9C+90bqG1ZIX4o3Dli1PZDosTNM444CwDTbrFrenctOTDtGPodo9k2jze8McZFAIrdUYi9mKD8v0frs8NUUW/TQj9h62swXdvVAfzYTd+R7aMRG0eXMV3rJc38DfsCsF7bkqSg0b4l8GcaQIDAQAB
keycloak.bearer-only = true
keycloak.public-client=true
keycloak.principal-attribute=preferred_username
# ------ Bearer token authorization settings -------
# If you plan to send autorization token, make sure to make this one 'true'
swagger-ui.authorization.header=true
# ------ HTTPS settings -------
# If you plan to use HTTPS, make sure to uncomment this one
#server.ssl.key-store=file:///home/imas/cert/keystore.p12
#server.ssl.key-store-password=catalogqt
#server.ssl.keyStoreType=PKCS12
#server.ssl.keyAlias=tomcat
|
the same for single container:
- single-container with keycloak authentication and HTTPS settings both enabled, swagger-ui.authorization.header=true
- single-container with keycloak authentication enabled and HTTPS settings disabled, swagger-ui.authorization.header=true
- single-container with keycloak authentication disabled and HTTPS settings enabled, swagger-ui.authorization.header=false,
- single-container with keycloak authentication and generated HTTPS settings both disabled, swagger-ui.authorization.header=false
Example of application.properties file for single-container:
Info |
---|
Look at the structure:
|
Code Block |
---|
# The host is localhost
spring.datasource.url=jdbc:mysql://localhost:3306/itm_catalog_qt?serverTimezone=UTC
spring.datasource.username=itm_catalog_rw
spring.datasource.password=itm_catalog_rw
spring.jpa.properties.hibernate.jdbc.time_zone=UTC
server.error.include-message=always
spring.mvc.dispatch-options-request=true
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=none
# This is additional http handler, on another port
server.port=8080
server.http.port=8081
server.http.interface=0.0.0.0
# ------ Keycloak settings -------
# If you plan to use Keycloak authorization, make sure to uncomment this one
#keycloak.realm = fair4fusion-docker-demo
#keycloak.auth-server-url=https://sso.apps.paas-dev.psnc.pl/
#keycloak.resource= catalogqt-cli
#keycloak.realm-key= MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjOCDGJsBi7rxVjf0RQb8pm0LAGsEKFcH7g7mKSqpFvp1uOypUeiYe5dwlwkXAXaYeYs0J70LB8E6mtVUcykbmp+XrqD1nn3yfPxlVLSg7iCvJqMUq8udsUbsyT3M/32/kssXurgY7rX5JhdtkYeAgq+9ifIjLQZhALg+FvEsX9C+D30WQDAChEljlReb+Y4UTz2aIqz9C+90bqG1ZIX4o3Dli1PZDosTNM444CwDTbrFrenctOTDtGPodo9k2jze8McZFAIrdUYi9mKD8v0frs8NUUW/TQj9h62swXdvVAfzYTd+R7aMRG0eXMV3rJc38DfsCsF7bkqSg0b4l8GcaQIDAQAB
#keycloak.bearer-only = true
#keycloak.public-client=true
#keycloak.principal-attribute=preferred_username
# ------ Bearer token authorization settings -------
# If you plan to send autorization token, make sure to make this one 'true'
#swagger-ui.authorization.header=true
# ------ HTTPS settings -------
# If you plan to use HTTPS, make sure to uncomment this one
server.ssl.key-store=file:///home/imas/cert/keystore.p12
server.ssl.key-store-password=catalogqt
server.ssl.keyStoreType=PKCS12
server.ssl.keyAlias=tomcat
|
Building and running
The checklist you should make before building the app:
...
Can I succesfully login to rhus-71.man.poznan.pl?
...
Do I have catalog_qt_2 codes?
Did I changed application properties? If yes in your /catalog_qt_2 run script
Code Block |
---|
> ./compile.sh |
After this you can finally build and run the app!
Docker compose
In order to build and run docker-compose container you have to do following:
Code Block |
---|
> cd docker-compose/build
> ./build.sh
> cd ..
> docker-compose up |
...
Code Block |
---|
> docker-compose run |
localhost:8080/swagger-ui.html to access Web Services via Swagger based UI.
Single-container
Once Catalog QT 2
is in place, you can build the single-container.
Code Block |
---|
> docker build -t catalogqt . |
...
Please note that for tagged release you have to specify tag of the imas-notify
project. You can do it following way
Code Block |
---|
> docker build -t catalogqt --build-arg INOTIFY_TAG=0.4 . |
Starting the container is quite simple, all you have to do is to run
Code Block |
---|
> docker run -i -t --name catalogqt_test catalogqt |
...
Building container
In order to build and run container you have to do following:
Code Block |
---|
> cd docker-compose/build
> ./build.sh |
Starting container
Catalogue QT 2 Docker can be run using multiple configurations. By default we provide following configurations
Info |
---|
|
You can run given configuration by calling:
Code Block |
---|
> cd docker-compose
# ./run.sh -s <configuration file suffix> e.g.
> ./run.sh -s notoken |
To access our application please paste this urls in your browser:
- http://localhost:8080/swagger-ui.html to access Web Services via Swagger based UI.
- http://localhost.dashboard-ui.pl:9100/dashboard/ to access Dashboard-ReactJS
Configuration
Docker-compose Configuration
You can edit docker-compose._deployment_name_.yml
to change:
- The path where MySQL will store the data (default:
$(pwd)/db-data
) - The path where pulsefiles are stored on the host (default:
$(pwd)/imasdb
) - To map MySQL port to host port, so you can access the database from the container (by deafult no ports are exposed)
- To add custom configuration of Web Services:
application.properties
file
Additionally you can edit existing configuration, or create your own e.g docker-compose.myconf.yml
and run it!
Code Block |
---|
> ./run.sh -s myconf |
Catalog QT 2 Web Services Configuration
Moreover, in our catalog-ws-server
we have application.properties
file, which is a configuration for our Web Services in Springboot.
These Web Services are run inside Tomcat server.
Anatomy of application.properties file
Code Block |
---|
# location of database - typically, it will point at localhost, but
# it's also possible to change location of MySQL server.
# Docker based installation (docker-compose) will change it to db:3306
# In case of docker-compose based installation, MySQL is visible as another host
# Note that you don't have to change anything
spring.datasource.url=jdbc:mysql://localhost:3306/itm_catalog_qt?serverTimezone=UTC
# Default user name and password for database connection. Note that this connection
# will not work (by default) for external hosts. This is why we don't quite care about
# user/pass - however, you can alter these and make sure they don't contain default values
spring.datasource.username=itm_catalog_rw
spring.datasource.password=itm_catalog_rw
spring.jpa.properties.hibernate.jdbc.time_zone=UTC
# In case of errors we want to embed error message as well (so we better know what went wrong)
server.error.include-message=always
# We definitely don't want to log SQL queries. However, if you want to see them, feel free
# to enable this property
spring.jpa.show-sql=false
# We don't want to generate DB schema from bean classes
spring.jpa.hibernate.ddl-auto=none
# This is additional http handler, on another port
# We need this one, in case we plan to use https
# This is tricky :)
# If server.ssl fields are set, this field defines https port
# If server.ssl fields are not set, this field defines http port
server.port=8080
# However, we need http port anyway (for some components). This is why we expose services on
# http anyway. At the and we can end up with two different configurations
# http (8080) and http (8081) - no certificates
# https (8443) and http (8081) - certificates
server.http.port=8081
server.http.interface=0.0.0.0
# ------- Keycloak settings -------
keycloak.enabled=true
keycloak.realm = fair4fusion-docker-demo
keycloak.auth-server-url=https://sso.apps.paas-dev.psnc.pl/
keycloak.resource= catalogqt-cli
keycloak.realm-key= MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjOCDGJsBi7rxVjf0RQb8pm0LAGsEKFcH7g7mKSqpFvp1uOypUeiYe5dwlwkXAXaYeYs0J70LB8E6mtVUcykbmp+XrqD1nn3yfPxlVLSg7iCvJqMUq8udsUbsyT3M/32/kssXurgY7rX5JhdtkYeAgq+9ifIjLQZhALg+FvEsX9C+D30WQDAChEljlReb+Y4UTz2aIqz9C+90bqG1ZIX4o3Dli1PZDosTNM444CwDTbrFrenctOTDtGPodo9k2jze8McZFAIrdUYi9mKD8v0frs8NUUW/TQj9h62swXdvVAfzYTd+R7aMRG0eXMV3rJc38DfsCsF7bkqSg0b4l8GcaQIDAQAB
keycloak.bearer-only = true
keycloak.public-client=true
keycloak.principal-attribute=preferred_username
spring.mvc.dispatch-options-request=true
# ------- HTTPS settings --------
# If you plan to use HTTPS, make sure to uncomment this one
# You have to make sure to generate and configure SSL certificate for your domain
#server.ssl.key-store=file:///home/imas/cert/keystore.p12
#server.ssl.key-store-password=catalogqt
#server.ssl.keyStoreType=PKCS12
#server.ssl.keyAlias=tomcat
# ------- Bearer token authorization --------
# Should we check authorisation header or not. This feature toggle enables sort of "single user mode"
# It's useful in case you don't have Keycloak and don't care about user roles. Once set to "false"
# it will make Web Services behave as if there is only one user
swagger-ui.authorization.header=true |
The default configuration is inside our project, but (before building) if you want to use a diffrent configuration (e.g enabling SSL certificates, enabling Keycloak) you can paste in folder /catalogue_qt_docker/docker-compose/build/files/server
another application.properties
file, which will have higher priority and would override existing file in source codes and then you can build and run our docker.
If you have already build container, and want to change Web Services configuration, you can do that without rebuilding docker!
All you need to do is to add application.properties
file to this folder docker-compose/volumes/server-properties
.
When the container is taken off, it will have the highest priority.
After changing the settings, it may be necessary to restart from scratch:
Code Block |
---|
> docker-compose rm
> docker-compose up |
Setting up SSL certificate
The best way to obtain SSL certificate is to use certbot. You can get certbot in multiple ways described here.
After installation, you need to obtain raw .pem
certificate and convert it to .p12
. Do this by running
Code Block |
---|
certbot certonly --standalone |
Provide required information about your domain.
Required files will be located in /etc/letsencrypt/live/name_of_your_domain
.
Go to this folder and run the command below.
Code Block |
---|
openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out keystore.p12 -name tomcat -CAfile chain.pem -caname root |
You will be asked to provide a password. Remember it as you will have to enter it in application.properties. The output file keystore.p12 is the file that has all the required information to set up SSL.
In application.properties enter this information:
Code Block |
---|
server.ssl.key-store="path to your keystore.p12 file"
server.ssl.key-store-password="password to keystore.p12 file" |
Congratulations! You have set up an SSL certificate!
Adding persistent storage
You can add persistent storage by setting it up inside docker-compose.yml
file
Code Block |
---|
services:
db:
volumes:
- ./volumes/mysql:/var/lib/mysql |
It is not required to link ./volumes/mysql
location. In case you are using some other location for persistent data, feel free to use it instead.
Importing data from pulse file
Catalog QT Demonstrator allows to import MDSPlus based data automatically into SQL database. In order to do this you have to bind mount a volume. In a plain text it means that you have to tell Docker that you want to make your local filesystem to be available inside Docker container. Easiest way to do it is to create directory (or symbolic link) to a MDSPlus compatible local database.
First of all, make sure you have MDSPlus
like directory structure with pulse files. The easiest way to execute Docker container with sample data is to get sample data from box.psnc.pl
- these are completely artificially created data prepared by testing framework.
Code Block |
---|
> curl -s -o f4f_data.tar.gz \
https://box.psnc.pl/seafhttp/files/01953e73-8ad3-4277-be71-57b69c395355/f4f_data.tar.gz |
Make sure your directories structure looks like this:
Code Block |
---|
.
`-- catalogue_qt_docker
`-- docker-compose
`-- volumes
`-- imasdb
|-- f4f
| `-- 3
| |-- 0
| | |-- ids_11062020.characteristics
| | |-- ids_11062020.datafile
| | |-- ids_11062020.populate
| | |-- ids_11062020.tree
| | |-- ids_11062021.characteristics
| | |-- ids_11062021.datafile
| | |-- ids_11062021.populate
| | `-- ids_11062021.tree
| |-- 1
| |-- 2
| |-- 3
| |-- 4
| |-- 5
| |-- 6
| |-- 7
| |-- 8
| `-- 9
`-- script.sh |
Directory catalogue_qt_docker/docker-compose/volumes/imasdb
is automatically mounted inside Docker container. It means that anything you have put in it, will be visible inside Docker container whenever it is running. Once Docker is running you can schedule data population by creating file with *.populate
extension. You can do it following way. Inside directory with data execute script.sh
with the name of database you want to have populated.
Code Block |
---|
> cd catalogue_qt_docker/docker-compose/volumes/imasdb
> ./script.sh f4f |
If anything goes wrong, please delete all the .populate
files by executing this command on linux:
Code Block |
---|
> find . -type f -name "*.populate" -delete |
Debugging in docker-compose
You can debug either all the Java based components, inside Docker container, or you can specify which one should be started in debug more. For debugging Java code inside Docker containers we are using JDWP
protocol, and by default we are using following ports
Info |
---|
|
In order to enable debbug mode you can either use predefined docker-compose.debug.yml
or enable debug mode for each service separatelly by adding sections inside your YAML file of choice.
Catalog-ws-server
To debug catalog-ws-server you need to add following lines to docker-compose.####.yml
in server
section
Code Block |
---|
server:
volumes:
- ./volumes/imasdb:/home/imas/public/imasdb
ports:
- 32889:32889
environment:
- DEBUG_SPRING_BOOT=true |
Update process
To debug update-process you need to add following lines to docker-compose.####.yml
in updateprocess
section
Code Block |
---|
updateprocess:
volumes:
- ./volumes/imasdb:/home/imas/public/imasdb
ports:
- 32888:32888
environment:
- DEBUG_UPDATE_PROCESS=true |
Watchdog
To debug imas-watchdog you need to add following lines to docker-compose.####.yml
in updateprocess
section
Code Block |
---|
watchdog:
volumes:
- ./volumes/imasdb:/home/imas/public/imasdb
- ./volumes/fair4fusion-docker-demo:/docker-entrypoint-properties.d
ports:
- 32887:32887
environment:
- DEBUG_IMAS_WATCHDOG=true |
Exposing Spring Boot based Web Services to the outside world
If you want to access Catalog QT WS API
outside of the container, you can expose its ports:
Code Block |
---|
> docker run -i -t -p 8080:8080 --name catalogqt_test catalogqt |
localhost:8080/swagger-ui.html to access Web Services via Swagger based UI.
Setting up SSL certificate
The best way to obtain SSL certificate is to use certbot. You can get certbot in multiple ways described here.
After installation, you need to obtain raw .pem
certificate and convert it to .p12
. Do this by running
Code Block |
---|
certbot certonly --standalone |
Provide required information about your domain.
Required files will be located in /etc/letsencrypt/live/name_of_your_domain
.
Go to this folder and run the command below.
Code Block |
---|
openssl pkcs12 -export -in fullchain.pem -inkey privkey.pem -out keystore.p12 -name tomcat -CAfile chain.pem -caname root |
You will be asked to provide a password. Remember it as you will have to enter it in application.properties. The output file keystore.p12 is the file that has all the required information to set up SSL.
In application.properties enter this information:
Code Block |
---|
server.ssl.key-store="path to your keystore.p12 file"
server.ssl.key-store-password="password to keystore.p12 file" |
Congratulations! You have set up an SSL certificate!
Debugging
In our application we have several different debugging paths depending on the docker environment and what you want to debug.
You can debug our app locally on your local machine using e g. Intellij IDE.
Let's get through each debbuging path.
Local docker-compose debugging
Warning |
---|
Things you must do BEFORE building the image: |
Catalog WS in docker-compose debugging
To debug catalog-ws-server you need to have docker-compose.override.yaml
file that looks like this (just copy and paste it in your empty file)
Code Block | ||
---|---|---|
| ||
version: "3.6"
services:
server:
volumes:
- ./imasdb:/home/imas/public/imasdb
- ./cert:/home/imas/cert
- ./build/catalog_qt_2:/catalog_qt_2 #1
ports:
- 5005:5005 #2
environment:
- DEBUG=1 #3
updateprocess:
volumes:
- ./imasdb:/home/imas/public/imasdb
inotify:
volumes:
- ./imasdb:/home/imas/public/imasdb |
Info |
---|
#1 Maps your code on host machine to the code inside container, allowing you to use your favourite IDE debugger capabilities. Also, you can change your code and run #2 Exposes port for Java debugger, usually #3 Enables debugging on catalog-ws-server. |
You also need to clear patch file:
Code Block |
---|
true '' > build/files/server/application.properties.patch |
and in catalog_qt_2/server/catalog-ws-server/src/main/resources/application.properties
change the first line to second line
Code Block | ||||
---|---|---|---|---|
| ||||
-spring.datasource.url=jdbc:mysql://localhost:3306/itm_catalog_qt?serverTimezone=UTC
+spring.datasource.url=jdbc:mysql://db:3306/itm_catalog_qt?serverTimezone=UTC |
After that you can build the image with debugging WS turned on.
Local single-container debugging
If you are a Catalog WS developer the easiest and most comfortable way to debug code is use single container as a base image.
You can debug code in two ways:
- in IDE - you can see only the stack trace of WebServices, which is relevant in most cases
- inside container - it helps you find out what's happening inside docker while all of the components are working.
IDE debugging
To debug code in IDE you should prepare your enviroment in such way:
your c
atalog_qt_2/server/catalog-ws-server/src/main/resources/application.properties
should look like this:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
spring.datasource.url=jdbc:mysql://localhost:3306/itm_catalog_qt?serverTimezone=UTC
spring.datasource.username=itm_catalog_rw
spring.datasource.password=itm_catalog_rw
spring.jpa.properties.hibernate.jdbc.time_zone=UTC
server.error.include-message=always
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=none
# This is additional http handler, on another port
# We need this one, in case we plan to use https
server.port=8081 # We have to change ports on our local instance, because 8080 is taken by container
server.http.port=8082 # This one as well
server.http.interface=0.0.0.0
keycloak.realm = fair4fusion-docker-demo
keycloak.auth-server-url=https://sso.apps.paas-dev.psnc.pl/
keycloak.resource= catalogqt-cli
keycloak.realm-key= MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjOCDGJsBi7rxVjf0RQb8pm0LAGsEKFcH7g7mKSqpFvp1uOypUeiYe5dwlwkXAXaYeYs0J70LB8E6mtVUcykbmp+XrqD1nn3yfPxlVLSg7iCvJqMUq8udsUbsyT3M/32/kssXurgY7rX5JhdtkYeAgq+9ifIjLQZhALg+FvEsX9C+D30WQDAChEljlReb+Y4UTz2aIqz9C+90bqG1ZIX4o3Dli1PZDosTNM444CwDTbrFrenctOTDtGPodo9k2jze8McZFAIrdUYi9mKD8v0frs8NUUW/TQj9h62swXdvVAfzYTd+R7aMRG0eXMV3rJc38DfsCsF7bkqSg0b4l8GcaQIDAQAB
keycloak.bearer-only = true
keycloak.public-client=true
keycloak.principal-attribute=preferred_username
spring.mvc.dispatch-options-request=true
# These need to be commented
# If you plan to use HTTPS, make sure to uncomment this one
#server.ssl.key-store=file:///home/imas/cert/keystore.p12
#server.ssl.key-store-password=catalogqt
#server.ssl.keyStoreType=PKCS12
#server.ssl.keyAlias=tomcat
swagger-ui.authorization.header=true |
Warning |
---|
Change both ports in lines 14 and 15 because ports 8080 and 8081 are already taken by running docker container. |
and then run this command:
Code Block |
---|
docker run -i \
-p 8080:8080 \
-p 3306:3306 \
-v `pwd`/imasdb:/home/imas/public/imasdb \
--name catalogqt_debug_ide -t catalogqt |
...
Running tests
You can run unit tests by changing directory to: ws/catalog-ws
and running.
...