Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

In case you have issues while accessing your MySQL installation, please consult your sys admin to resolve the issue.

Starting WS API server

...

 Starting WS from source codes

To prepare Catalog QT environment run compile.sh script - it will create server application and basic components. 

...

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 run /compile.sh 

After this you can finally build and run the app!

Building docker-compose

In order to build and run container you have to do following:

Code Block
> cd docker-compose/build
> ./build.sh
> cd ..
> docker-compose up 


Starting the container is quite simple, all you have to do is to run:

Code Block
> docker-compose run

localhost:8080/swagger-ui.html to access Web Services via Swagger based UI.


Building single-container

Once Catalog QT 2 is in place, you can build the 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

> docker build -t catalogqt --build-arg INOTIFY_TAG=0.4 .


Starting the container is quite simple, all you have to do is to run

> docker run -i -t --name catalogqt_test catalogqt

Once inside, you are "logged in" as user imas. All Catalogue QT related services are started automatically.


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:

> docker run -i -t -p 8080:8080 --name catalogqt_test catalogqt


 Debugging

In our application we have several different debugging paths depending on the docker environment and what you want to debug.

...