blob: 74426ada31ce996406579b243df0c6d49db4ccbc [file] [log] [blame]
Adam Tengler1d4af9a2018-10-18 21:51:44 +00001parameters:
2 _param:
3 docker_operations_api_replicas: 1
4 docker_image_operations_api: mirantis/python-operations-api:latest
Pavel Cizinsky4a3bec42018-10-26 15:50:31 +02005 docker_image_operations_ui: mirantis/operations-ui:latest
Adam Tenglere049e1d2018-10-24 22:18:56 +00006 operations_api_sqlalchemy_database_uri: "cockroachdb://oapi@cockroach-ui:26257/oapi"
7 operations_api_sqlalchemy_echo: "false"
8 operations_api_flask_debug: "false"
Adam Tengler1d4af9a2018-10-18 21:51:44 +00009 operations_api_bind_host: 0.0.0.0
10 operations_api_bind_port: ${_param:haproxy_operations_api_bind_port}
11 docker_image_cockroachdb: cockroachdb/cockroach:latest
Adam Tenglere049e1d2018-10-24 22:18:56 +000012 operations_api_keycloak_url: "http://${_param:single_address}:${_param:haproxy_keycloak_exposed_port}"
Adam Tengler1d4af9a2018-10-18 21:51:44 +000013 docker:
14 client:
15 stack:
16 operations_api:
17 service:
18 operations-api:
19 environment:
Adam Tenglere049e1d2018-10-24 22:18:56 +000020 OAPI_OIDC_CLIENT_SECRETS_OVERRIDE: '
21 {
22 "web": {
23 "client_id": "operations-api",
24 "client_secret": "${_param:keycloak_operations_api_client_secret}",
25 "auth_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/auth",
26 "token_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token",
27 "token_introspection_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token/introspect",
28 "issuer": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm",
29 "userinfo_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/userinfo"
30 }
31 }'
Adam Tengler1d4af9a2018-10-18 21:51:44 +000032 OAPI_SQLALCHEMY_DATABASE_URI: ${_param:operations_api_sqlalchemy_database_uri}
33 OAPI_SQLALCHEMY_ECHO: ${_param:operations_api_sqlalchemy_echo}
34 OAPI_FLASK_DEBUG: ${_param:operations_api_flask_debug}
35 OAPI_FLASK_SECRET_KEY: ${_param:operations_api_flask_secret_key}
36 OAPI_FLASK_SERVER_HOST: ${_param:operations_api_bind_host}
37 OAPI_FLASK_SERVER_PORT: ${_param:operations_api_bind_port}
38 image: ${_param:docker_image_operations_api}
39 deploy:
40 replicas: ${_param:docker_operations_api_replicas}
41 restart_policy:
42 condition: any
43 ports:
44 - ${_param:haproxy_operations_api_exposed_port}:${_param:haproxy_operations_api_bind_port}
45 volumes:
46 - /srv/volumes/operations_api/logs/:/var/log/operations_api
47 cockroach-ui:
48 image: ${_param:docker_image_cockroachdb}
49 ports:
50 - ${_param:haproxy_cockroachdb_ui_exposed_port}:${_param:haproxy_cockroachdb_ui_bind_port}
51 command: start --insecure
52 cockroach-db-1:
53 image: cockroachdb/cockroach
54 command: start --insecure --join=cockroach-ui
55 depends_on:
56 - cockroach-ui
57 volumes:
58 - /srv/volumes/cockroachdb/cockroach-db-1:/cockroach/cockroach-data
Pavel Cizinsky4a3bec42018-10-26 15:50:31 +020059 operations-ui:
60 environment:
61 REACT_APP_OPERATIONS_API_URL: 'http://${_param:cluster_public_host}:${_param:haproxy_operations_api_bind_port}'
62 REACT_APP_KEYCLOAK_AUTH_URL: 'http://${_param:cluster_public_host}:${_param:haproxy_keycloak_proxy_exposed_port}/auth'
63 REACT_APP_KEYCLOAK_REALM: 'drivetrain-realm'
64 REACT_APP_KEYCLOAK_CLIENT_ID: 'operations-ui'
65 image: ${_param:docker_image_operations_ui}
66 ports:
67 - ${_param:haproxy_operations_ui_exposed_port}:${_param:haproxy_operations_ui_bind_port}
Adam Tengler1d4af9a2018-10-18 21:51:44 +000068 cockroach-init:
69 environment:
70 COCKROACH_HOST: cockroach-ui
Pavel Cizinsky9e760982018-10-26 15:06:16 +020071 DB_NAME: oapi
72 DB_USER: oapi
73 image: atengler/cockroach-init
Adam Tengler1d4af9a2018-10-18 21:51:44 +000074 deploy:
75 restart_policy:
76 condition: on-failure
77 depends_on:
78 - cockroach-db-1
79 network:
80 default:
81 external:
82 name: operations_api_backend