blob: fff4f18bebb2d5d70a5a616e85cd4716dd59b37c [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
Adam Tenglere049e1d2018-10-24 22:18:56 +00005 operations_api_sqlalchemy_database_uri: "cockroachdb://oapi@cockroach-ui:26257/oapi"
6 operations_api_sqlalchemy_echo: "false"
7 operations_api_flask_debug: "false"
Adam Tengler1d4af9a2018-10-18 21:51:44 +00008 operations_api_bind_host: 0.0.0.0
9 operations_api_bind_port: ${_param:haproxy_operations_api_bind_port}
10 docker_image_cockroachdb: cockroachdb/cockroach:latest
Adam Tenglere049e1d2018-10-24 22:18:56 +000011 operations_api_keycloak_url: "http://${_param:single_address}:${_param:haproxy_keycloak_exposed_port}"
Adam Tengler1d4af9a2018-10-18 21:51:44 +000012 docker:
13 client:
14 stack:
15 operations_api:
16 service:
17 operations-api:
18 environment:
Adam Tenglere049e1d2018-10-24 22:18:56 +000019 OAPI_OIDC_CLIENT_SECRETS_OVERRIDE: '
20 {
21 "web": {
22 "client_id": "operations-api",
23 "client_secret": "${_param:keycloak_operations_api_client_secret}",
24 "auth_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/auth",
25 "token_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token",
26 "token_introspection_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token/introspect",
27 "issuer": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm",
28 "userinfo_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/userinfo"
29 }
30 }'
Adam Tengler1d4af9a2018-10-18 21:51:44 +000031 OAPI_SQLALCHEMY_DATABASE_URI: ${_param:operations_api_sqlalchemy_database_uri}
32 OAPI_SQLALCHEMY_ECHO: ${_param:operations_api_sqlalchemy_echo}
33 OAPI_FLASK_DEBUG: ${_param:operations_api_flask_debug}
34 OAPI_FLASK_SECRET_KEY: ${_param:operations_api_flask_secret_key}
35 OAPI_FLASK_SERVER_HOST: ${_param:operations_api_bind_host}
36 OAPI_FLASK_SERVER_PORT: ${_param:operations_api_bind_port}
37 image: ${_param:docker_image_operations_api}
38 deploy:
39 replicas: ${_param:docker_operations_api_replicas}
40 restart_policy:
41 condition: any
42 ports:
43 - ${_param:haproxy_operations_api_exposed_port}:${_param:haproxy_operations_api_bind_port}
44 volumes:
45 - /srv/volumes/operations_api/logs/:/var/log/operations_api
46 cockroach-ui:
47 image: ${_param:docker_image_cockroachdb}
48 ports:
49 - ${_param:haproxy_cockroachdb_ui_exposed_port}:${_param:haproxy_cockroachdb_ui_bind_port}
50 command: start --insecure
51 cockroach-db-1:
52 image: cockroachdb/cockroach
53 command: start --insecure --join=cockroach-ui
54 depends_on:
55 - cockroach-ui
56 volumes:
57 - /srv/volumes/cockroachdb/cockroach-db-1:/cockroach/cockroach-data
58 cockroach-init:
59 environment:
60 COCKROACH_HOST: cockroach-ui
61 image: atengler/cockroach
62 deploy:
63 restart_policy:
64 condition: on-failure
65 depends_on:
66 - cockroach-db-1
67 network:
68 default:
69 external:
70 name: operations_api_backend