blob: a584f37dfd1aaecb0bafaaaba77362421e2baf32 [file] [log] [blame]
Adam Tengler1d4af9a2018-10-18 21:51:44 +00001parameters:
2 _param:
3 docker_operations_api_replicas: 1
Denis Egorenko54e38b22019-05-27 15:38:44 +04004 operations_api_sqlalchemy_database_uri: "cockroachdb://oapi@cockroach-db-1:26257/oapi"
Adam Tenglere049e1d2018-10-24 22:18:56 +00005 operations_api_sqlalchemy_echo: "false"
6 operations_api_flask_debug: "false"
Adam Tengler1d4af9a2018-10-18 21:51:44 +00007 operations_api_bind_host: 0.0.0.0
8 operations_api_bind_port: ${_param:haproxy_operations_api_bind_port}
Adam Tengler9f568c52018-10-29 22:56:17 +01009 operations_api_jenkins_url: http://${_param:single_address}:18081
10 operations_api_jenkins_username: admin
11 operations_api_pipeline_name: deploy_trymcp
Adam Tenglere049e1d2018-10-24 22:18:56 +000012 operations_api_keycloak_url: "http://${_param:single_address}:${_param:haproxy_keycloak_exposed_port}"
Adam Tengler9f568c52018-10-29 22:56:17 +010013 operations_api_model_remote: localfs
14 operations_api_model_path: /code/operations_api/workflow_definition.yml
Adam Tengler1d4af9a2018-10-18 21:51:44 +000015 docker:
16 client:
17 stack:
18 operations_api:
19 service:
20 operations-api:
21 environment:
Adam Tenglere049e1d2018-10-24 22:18:56 +000022 OAPI_OIDC_CLIENT_SECRETS_OVERRIDE: '
23 {
24 "web": {
25 "client_id": "operations-api",
26 "client_secret": "${_param:keycloak_operations_api_client_secret}",
27 "auth_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/auth",
28 "token_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token",
29 "token_introspection_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token/introspect",
30 "issuer": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm",
31 "userinfo_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/userinfo"
32 }
33 }'
Adam Tengler1d4af9a2018-10-18 21:51:44 +000034 OAPI_SQLALCHEMY_DATABASE_URI: ${_param:operations_api_sqlalchemy_database_uri}
35 OAPI_SQLALCHEMY_ECHO: ${_param:operations_api_sqlalchemy_echo}
36 OAPI_FLASK_DEBUG: ${_param:operations_api_flask_debug}
37 OAPI_FLASK_SECRET_KEY: ${_param:operations_api_flask_secret_key}
38 OAPI_FLASK_SERVER_HOST: ${_param:operations_api_bind_host}
39 OAPI_FLASK_SERVER_PORT: ${_param:operations_api_bind_port}
Adam Tengler9f568c52018-10-29 22:56:17 +010040 OAPI_MODELFORM_JENKINS_URL: ${_param:operations_api_jenkins_url}
41 OAPI_MODELFORM_JENKINS_USERNAME: ${_param:operations_api_jenkins_username}
42 OAPI_MODELFORM_JENKINS_PASSWORD: ${_param:operations_api_jenkins_password}
43 OAPI_MODELFORM_PIPELINE_NAME: ${_param:operations_api_pipeline_name}
44 OAPI_MODELFORM_REMOTE: ${_param:operations_api_model_remote}
45 OAPI_MODELFORM_PATH: ${_param:operations_api_model_path}
Adam Tengler1d4af9a2018-10-18 21:51:44 +000046 image: ${_param:docker_image_operations_api}
47 deploy:
48 replicas: ${_param:docker_operations_api_replicas}
49 restart_policy:
50 condition: any
51 ports:
52 - ${_param:haproxy_operations_api_exposed_port}:${_param:haproxy_operations_api_bind_port}
53 volumes:
54 - /srv/volumes/operations_api/logs/:/var/log/operations_api
Adam Tengler1d4af9a2018-10-18 21:51:44 +000055 cockroach-db-1:
Denis Egorenko54e38b22019-05-27 15:38:44 +040056 image: ${_param:docker_image_cockroachdb}
57 command: start --insecure
Adam Tengler1d4af9a2018-10-18 21:51:44 +000058 volumes:
Denis Egorenko54e38b22019-05-27 15:38:44 +040059 - /srv/volumes/cockroachdb/cockroach-db-1:/cockroach/cockroach-data
60 cockroach-db-2:
61 image: ${_param:docker_image_cockroachdb}
62 command: start --insecure --join=cockroach-db-1
63 depends_on:
64 - cockroach-db-1
65 volumes:
66 - /srv/volumes/cockroachdb/cockroach-db-2:/cockroach/cockroach-data
Pavel Cizinsky4a3bec42018-10-26 15:50:31 +020067 operations-ui:
68 environment:
69 REACT_APP_OPERATIONS_API_URL: 'http://${_param:cluster_public_host}:${_param:haproxy_operations_api_bind_port}'
70 REACT_APP_KEYCLOAK_AUTH_URL: 'http://${_param:cluster_public_host}:${_param:haproxy_keycloak_proxy_exposed_port}/auth'
71 REACT_APP_KEYCLOAK_REALM: 'drivetrain-realm'
72 REACT_APP_KEYCLOAK_CLIENT_ID: 'operations-ui'
73 image: ${_param:docker_image_operations_ui}
74 ports:
75 - ${_param:haproxy_operations_ui_exposed_port}:${_param:haproxy_operations_ui_bind_port}
Adam Tengler1d4af9a2018-10-18 21:51:44 +000076 cockroach-init:
77 environment:
Denis Egorenko54e38b22019-05-27 15:38:44 +040078 COCKROACH_HOST: cockroach-db-1
Pavel Cizinsky9e760982018-10-26 15:06:16 +020079 DB_NAME: oapi
80 DB_USER: oapi
Denis Egorenko54e38b22019-05-27 15:38:44 +040081 image: ${_param:docker_image_cockroachdb_init}
Adam Tengler1d4af9a2018-10-18 21:51:44 +000082 deploy:
83 restart_policy:
84 condition: on-failure
85 depends_on:
86 - cockroach-db-1
87 network:
88 default:
89 external:
90 name: operations_api_backend