Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 1 | parameters: |
| 2 | _param: |
| 3 | docker_operations_api_replicas: 1 |
| 4 | docker_image_operations_api: mirantis/python-operations-api:latest |
Pavel Cizinsky | 4a3bec4 | 2018-10-26 15:50:31 +0200 | [diff] [blame] | 5 | docker_image_operations_ui: mirantis/operations-ui:latest |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 6 | operations_api_sqlalchemy_database_uri: "cockroachdb://oapi@cockroach-ui:26257/oapi" |
| 7 | operations_api_sqlalchemy_echo: "false" |
| 8 | operations_api_flask_debug: "false" |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 9 | 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 Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 12 | operations_api_keycloak_url: "http://${_param:single_address}:${_param:haproxy_keycloak_exposed_port}" |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 13 | docker: |
| 14 | client: |
| 15 | stack: |
| 16 | operations_api: |
| 17 | service: |
| 18 | operations-api: |
| 19 | environment: |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 20 | 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 Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 32 | 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 Cizinsky | 4a3bec4 | 2018-10-26 15:50:31 +0200 | [diff] [blame] | 59 | 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 Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 68 | cockroach-init: |
| 69 | environment: |
| 70 | COCKROACH_HOST: cockroach-ui |
Pavel Cizinsky | 9e76098 | 2018-10-26 15:06:16 +0200 | [diff] [blame] | 71 | DB_NAME: oapi |
| 72 | DB_USER: oapi |
| 73 | image: atengler/cockroach-init |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 74 | 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 |