Skip to content

Netcracker/qubership-testing-platform-environments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

270 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Qubership Testing Platform Environments Service

QSTP Environments is a microservice. It is designed to configure and store information about project environments and to provide this information to other services during test scenarios execution.

How to install and run the database

For local DB in Docker deployment, see the following instructions - DB in Docker

How to start Backend

This project uses Lombok. This means that the project has a code that is generated before compilation. To develop you need to install a plugin for your IDE.

Probably you would need running Hazelcast instance. You can find information like "How to run Hazelcast locally"

Build project: mvn -P github clean package

  1. In some cases with flag -DskipTests
  2. If you have not compiled q-classes:
    • check db-postgresql, migration-on-build-pg in profiles;
    • set settings for DB - jdbc.url, jdbc.user, jdbc.password in parent-db-properties (like in the step bellow)
    • and create extensions in db if not
  3. Check and enable maven profiles db-postgresql and migration-on-build-pg

Create run configuration

  1. Main class: org.qubership.atp.environments.Main
  2. VM options:
 -Djavax.net.ssl.keyStore=src/main/config/keystore.p12
 -Djavax.net.ssl.keyStorePassword=123456
 -Dspring.datasource.url=jdbc:postgresql://localhost:5432/dev_env?preferQueryMode=simple
 -Dspring.datasource.username=dev_env_user
 -Dspring.datasource.password=dev_env_pass
 -Dlogback.configurationFile=src/main/config/logback.xml
 -Dlog.graylog.on=false
  1. Working dir (for example): C:\Projects\env-backend
  2. VM options for logging define where is logback file and where log should be (console.log or graylog):
-Dlogback.configurationFile=src/main/config/logback.xml
-Dlog.graylog.on=false

Run Main

Just run Main#main with args from step above

How to create dump on production and restore it to local DB

Please follow common PostgreSQL instructions to do so, using pg_dump and pg_restore/psql command-line utilities bundled in PostgreSQL.

Local build without local PostgreSQL installation

Example for dev04 openshift server connection. For another project use correspond server and credentials.

  1. Go to [ATP Cloud]
  2. Find paragraph dev-atp-cloud > Base coordinates
  3. Find service Postgres in table with Base coordinates
  4. Copy External address with port, for example 127.0.0.1:98765
  5. Go to development environment with Environment service opened
  6. Go to src/test/config/application-test-rest-api.properties
  7. Set parameters:
   spring.datasource.url=${pg.jdbc.Url:jdbc:postgresql://127.0.0.1:98765/dev_env}
   spring.datasource.username=${pg.jdbc.User:dev_env_user}
   spring.datasource.password=${pg.jdbc.Password:dev_env_pass}
  1. Go to parent/parent-db-properties/pom.xml
  2. Set parameters:
   <pg.jdbc.Url>jdbc:postgresql://127.0.0.1:98765/dev_env?preferQueryMode=simple</pg.jdbc.Url>
   <pg.jdbc.User>dev_env_user</pg.jdbc.User>
   <pg.jdbc.Password>dev_env_pass</pg.jdbc.Password>
  1. Go to Maven, select lifecycle phases and click Run Maven Build

About

No description or website provided.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors