Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 1 | parameters: |
| 2 | _param: |
| 3 | docker_operations_api_replicas: 1 |
Denis Egorenko | 54e38b2 | 2019-05-27 15:38:44 +0400 | [diff] [blame] | 4 | operations_api_sqlalchemy_database_uri: "cockroachdb://oapi@cockroach-db-1:26257/oapi" |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 5 | operations_api_sqlalchemy_echo: "false" |
| 6 | operations_api_flask_debug: "false" |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 7 | operations_api_bind_host: 0.0.0.0 |
| 8 | operations_api_bind_port: ${_param:haproxy_operations_api_bind_port} |
Adam Tengler | 9f568c5 | 2018-10-29 22:56:17 +0100 | [diff] [blame] | 9 | operations_api_jenkins_url: http://${_param:single_address}:18081 |
| 10 | operations_api_jenkins_username: admin |
| 11 | operations_api_pipeline_name: deploy_trymcp |
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 | 9f568c5 | 2018-10-29 22:56:17 +0100 | [diff] [blame] | 13 | operations_api_model_remote: localfs |
| 14 | operations_api_model_path: /code/operations_api/workflow_definition.yml |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 15 | docker: |
| 16 | client: |
| 17 | stack: |
| 18 | operations_api: |
| 19 | service: |
| 20 | operations-api: |
| 21 | environment: |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 22 | 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 Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 34 | 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 Tengler | 9f568c5 | 2018-10-29 22:56:17 +0100 | [diff] [blame] | 40 | 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 Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 46 | 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 Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 55 | cockroach-db-1: |
Denis Egorenko | 54e38b2 | 2019-05-27 15:38:44 +0400 | [diff] [blame] | 56 | image: ${_param:docker_image_cockroachdb} |
| 57 | command: start --insecure |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 58 | volumes: |
Denis Egorenko | 54e38b2 | 2019-05-27 15:38:44 +0400 | [diff] [blame] | 59 | - /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 Cizinsky | 4a3bec4 | 2018-10-26 15:50:31 +0200 | [diff] [blame] | 67 | 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 Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 76 | cockroach-init: |
| 77 | environment: |
Denis Egorenko | 54e38b2 | 2019-05-27 15:38:44 +0400 | [diff] [blame] | 78 | COCKROACH_HOST: cockroach-db-1 |
Pavel Cizinsky | 9e76098 | 2018-10-26 15:06:16 +0200 | [diff] [blame] | 79 | DB_NAME: oapi |
| 80 | DB_USER: oapi |
Denis Egorenko | 54e38b2 | 2019-05-27 15:38:44 +0400 | [diff] [blame] | 81 | image: ${_param:docker_image_cockroachdb_init} |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 82 | 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 |