Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 1 | parameters: |
| 2 | _param: |
| 3 | docker_operations_api_replicas: 1 |
Adam Tengler | 9f568c5 | 2018-10-29 22:56:17 +0100 | [diff] [blame] | 4 | # FIXME: move cockroach image to defaults once it is uploaded to artifactory with proper tag |
| 5 | docker_image_cockroachdb: cockroachdb/cockroach: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} |
Adam Tengler | 9f568c5 | 2018-10-29 22:56:17 +0100 | [diff] [blame] | 11 | operations_api_jenkins_url: http://${_param:single_address}:18081 |
| 12 | operations_api_jenkins_username: admin |
| 13 | operations_api_pipeline_name: deploy_trymcp |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 14 | 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] | 15 | operations_api_model_remote: localfs |
| 16 | operations_api_model_path: /code/operations_api/workflow_definition.yml |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 17 | docker: |
| 18 | client: |
| 19 | stack: |
| 20 | operations_api: |
| 21 | service: |
| 22 | operations-api: |
| 23 | environment: |
Adam Tengler | e049e1d | 2018-10-24 22:18:56 +0000 | [diff] [blame] | 24 | OAPI_OIDC_CLIENT_SECRETS_OVERRIDE: ' |
| 25 | { |
| 26 | "web": { |
| 27 | "client_id": "operations-api", |
| 28 | "client_secret": "${_param:keycloak_operations_api_client_secret}", |
| 29 | "auth_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/auth", |
| 30 | "token_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token", |
| 31 | "token_introspection_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/token/introspect", |
| 32 | "issuer": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm", |
| 33 | "userinfo_uri": "${_param:operations_api_keycloak_url}/auth/realms/drivetrain-realm/protocol/openid-connect/userinfo" |
| 34 | } |
| 35 | }' |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 36 | OAPI_SQLALCHEMY_DATABASE_URI: ${_param:operations_api_sqlalchemy_database_uri} |
| 37 | OAPI_SQLALCHEMY_ECHO: ${_param:operations_api_sqlalchemy_echo} |
| 38 | OAPI_FLASK_DEBUG: ${_param:operations_api_flask_debug} |
| 39 | OAPI_FLASK_SECRET_KEY: ${_param:operations_api_flask_secret_key} |
| 40 | OAPI_FLASK_SERVER_HOST: ${_param:operations_api_bind_host} |
| 41 | OAPI_FLASK_SERVER_PORT: ${_param:operations_api_bind_port} |
Adam Tengler | 9f568c5 | 2018-10-29 22:56:17 +0100 | [diff] [blame] | 42 | OAPI_MODELFORM_JENKINS_URL: ${_param:operations_api_jenkins_url} |
| 43 | OAPI_MODELFORM_JENKINS_USERNAME: ${_param:operations_api_jenkins_username} |
| 44 | OAPI_MODELFORM_JENKINS_PASSWORD: ${_param:operations_api_jenkins_password} |
| 45 | OAPI_MODELFORM_PIPELINE_NAME: ${_param:operations_api_pipeline_name} |
| 46 | OAPI_MODELFORM_REMOTE: ${_param:operations_api_model_remote} |
| 47 | OAPI_MODELFORM_PATH: ${_param:operations_api_model_path} |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 48 | image: ${_param:docker_image_operations_api} |
| 49 | deploy: |
| 50 | replicas: ${_param:docker_operations_api_replicas} |
| 51 | restart_policy: |
| 52 | condition: any |
| 53 | ports: |
| 54 | - ${_param:haproxy_operations_api_exposed_port}:${_param:haproxy_operations_api_bind_port} |
| 55 | volumes: |
| 56 | - /srv/volumes/operations_api/logs/:/var/log/operations_api |
| 57 | cockroach-ui: |
| 58 | image: ${_param:docker_image_cockroachdb} |
| 59 | ports: |
| 60 | - ${_param:haproxy_cockroachdb_ui_exposed_port}:${_param:haproxy_cockroachdb_ui_bind_port} |
| 61 | command: start --insecure |
| 62 | cockroach-db-1: |
| 63 | image: cockroachdb/cockroach |
| 64 | command: start --insecure --join=cockroach-ui |
| 65 | depends_on: |
| 66 | - cockroach-ui |
| 67 | volumes: |
| 68 | - /srv/volumes/cockroachdb/cockroach-db-1:/cockroach/cockroach-data |
Pavel Cizinsky | 4a3bec4 | 2018-10-26 15:50:31 +0200 | [diff] [blame] | 69 | operations-ui: |
| 70 | environment: |
| 71 | REACT_APP_OPERATIONS_API_URL: 'http://${_param:cluster_public_host}:${_param:haproxy_operations_api_bind_port}' |
| 72 | REACT_APP_KEYCLOAK_AUTH_URL: 'http://${_param:cluster_public_host}:${_param:haproxy_keycloak_proxy_exposed_port}/auth' |
| 73 | REACT_APP_KEYCLOAK_REALM: 'drivetrain-realm' |
| 74 | REACT_APP_KEYCLOAK_CLIENT_ID: 'operations-ui' |
| 75 | image: ${_param:docker_image_operations_ui} |
| 76 | ports: |
| 77 | - ${_param:haproxy_operations_ui_exposed_port}:${_param:haproxy_operations_ui_bind_port} |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 78 | cockroach-init: |
| 79 | environment: |
| 80 | COCKROACH_HOST: cockroach-ui |
Pavel Cizinsky | 9e76098 | 2018-10-26 15:06:16 +0200 | [diff] [blame] | 81 | DB_NAME: oapi |
| 82 | DB_USER: oapi |
| 83 | image: atengler/cockroach-init |
Adam Tengler | 1d4af9a | 2018-10-18 21:51:44 +0000 | [diff] [blame] | 84 | deploy: |
| 85 | restart_policy: |
| 86 | condition: on-failure |
| 87 | depends_on: |
| 88 | - cockroach-db-1 |
| 89 | network: |
| 90 | default: |
| 91 | external: |
| 92 | name: operations_api_backend |