Configuring the Infrastructure Manager Backend

To configure the Infrastructure Manager backend, you can update the application.yml file located in the [Installation Directory]/config/ folder or configure environment variables.

Important!

  • The environment variables override the values specified in the application.yml (except the proxy settings).
  • The initial values in the application.yml serve just as an example. They must be updated with your configuration settings.

You can edit the following parameters:

  • server.port

    Infrastructure Manager REST API port.

    Default: 9000

  • server.ssl.key-store

    The absolute path to the key store file.

    Note: This key is not needed for the http protocol and should be removed.

  • server.ssl.key-store-password

    The key store password.

    Note: This key is not needed for the http protocol and should be removed.

  • spring.datasource.username

    PostgreSQL database user created after the database installation.

    Default: postgres

  • spring.datasource.password

    PostgreSQL database password.

    Default: postgres

  • spring.datasource.url

    Connection string to the Infrastructure Manager PostgreSQL database.

    Default: jdbc:postgresql://localhost:5432/provisioning_rest_api

  • imPath

    The Infrastructure Manager working folder. It holds execution logs, templates and other resources required for its operation.

    Default:/tmp/.im

    Examples:

    • Windows

      [Installation Directory]\tmp (for example, C:\Infrastructure Manager\IM REST API\tmp)

    • Linux

      [Installation Directory]/tmp (for example, /usr/share/Infrastructure Manager/tmp)

  • network:

    • proxy (the configuration of this parameter is optional):

      You can use Infrastructure Manager via a proxy, which can be configured in the application.yaml file (see details below) or as environment variables.

      Important! The proxy settings defined in the application.yml override the environment variables.

      • http_proxy: Use this option if your target GIT server uses HTTP (for example, http://my.git.server).

        Examples:

        • http_proxy url with authentication: http://user:password@proxy:port
        • http_proxy url without authentication: http://proxy:port, http://10.54.3.209:3128

      • https_proxy: Use this option if your target GIT server uses HTTPS (for example. https://my.git.server).

        Examples:

        • https_proxy url with authentication: http://user:password@my.proxy:port
        • https_proxy url without authentication: http://my.proxy:port, http://vvnappsrv04:3128
      • no_proxy: Use this option to provide a list of hosts that can be accessed without a proxy (separated by a comma). Example: github.com, bitbucket.yourcompany.com

      Notes:

      • The proxy protocol is the HTTP-based URL.
      • The use of HTTP_PROXY or HTTPS_PROXY depends on the server protocol. For example, if the URL is https://my.git.server, the HTTPS_PROXY value will be used. However, if the URL is http://docker.com, the HTTP_PROXY value will be used instead.
      • git clone with ssh protocol will fail, since the SOCKS proxy is not supported.

Environment Variables

The following parameters can be exposed as environment variables:

  • IM_DB
  • POSTGRES_HOST
  • POSTGRES_PORT
  • IM_DB_USER
  • IM_DB_PASSWORD
  • IM_PATH

Important! If these environment variables are defined, they will override the values specified in the application.yml

You can also configure proxy settings as environment variables:

  • HTTP_PROXY
  • HTTPS_PROXY
  • NO_PROXY

Important! If the proxy settings are configured as both environment variables and in the application.yml, the environment variables will be ignored.

Example: application.yml

info:
    app:
        name: Infrastructure Manager REST API
        description: The Infrastructure Manager API is built on HTTP and JSON, therefore, any standard HTTP client can send requests to it and parse the responses. It enables full-stack environment provisioning.
        version: 1.1.0
         build: 1937
 server:
     port: 9000
     servlet:
         context-path: /provisioning
     ssl:
         key-store: C:\Program Files\IM_https\im_keystore.p12
         key-store-password: '{cipher}303d64ee49308ec9dd906491aa035de73c781a16b2ff79bdecde0e46a30d83ac'
 spring:
     datasource:
         driverClassName: org.postgresql.Driver
         username: im
         password: '{cipher}043a498f922302386f4e51e87b864527dc91ac0215a4514dd4a3edf2fb555ed5'
         url: jdbc:postgresql://vvnpostgre01:5432/provisioning_rest_api
     jpa:
         properties:
             hibernate:
                 jdbc:
                     lob:
                         non_contextual_creation: true
         hibernate:
             jdbc:
                 lob:
                     non_contextual_creation: true
             ddl-auto: validate
             dialect: org.hibernate.dialect.PostgreSQLDialect
         show-sql: false
     mvc:
         throw-exception-if-no-handler-found: true
         static-path-pattern: /swagger*
     resources:
         static-locations: classpath:/swagger*
 logging:
     file: logs/InfrastructureManager.log
     level:
         root: INFO
 # Workaround for a bug of Swagger that raises the warning message when there is no default value for the integer API param
         io:
             swagger:
                 models:
                     parameters:
                         AbstractSerializableParameter: ERROR
 management:
     endpoints:
         web:
             base-path: /api/v2/management
             exposure:
                 include: health, info, logfile
 imPath: C:\Users\Administrator\Downloads\InfrastructureManager\IM_workingspace
 rest-api-prefix: api
 rest-api-version: v1
 rest-api-paging-max-results: 20
 template-collector:
     max-update-time: 900