blob: dd74899d9ac5a50970d4c7b5301e37a95cdf203b [file] [log] [blame]
Adam Tengler1d4af9a2018-10-18 21:51:44 +00001parameters:
2 _param:
3 docker_operations_api_replicas: 1
Adam Tengler9f568c52018-10-29 22:56:17 +01004 # FIXME: move cockroach image to defaults once it is uploaded to artifactory with proper tag
5 docker_image_cockroachdb: cockroachdb/cockroach: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}
Adam Tengler9f568c52018-10-29 22:56:17 +010011 operations_api_jenkins_url: http://${_param:single_address}:18081
12 operations_api_jenkins_username: admin
13 operations_api_pipeline_name: deploy_trymcp
Adam Tenglere049e1d2018-10-24 22:18:56 +000014 operations_api_keycloak_url: "http://${_param:single_address}:${_param:haproxy_keycloak_exposed_port}"
Adam Tengler9f568c52018-10-29 22:56:17 +010015 operations_api_model_remote: localfs
16 operations_api_model_path: /code/operations_api/workflow_definition.yml
Adam Tengler1d4af9a2018-10-18 21:51:44 +000017 docker:
18 client:
19 stack:
20 operations_api:
21 service:
22 operations-api:
23 environment:
Adam Tenglere049e1d2018-10-24 22:18:56 +000024 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 Tengler1d4af9a2018-10-18 21:51:44 +000036 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 Tengler9f568c52018-10-29 22:56:17 +010042 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 Tengler1d4af9a2018-10-18 21:51:44 +000048 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 Cizinsky4a3bec42018-10-26 15:50:31 +020069 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 Tengler1d4af9a2018-10-18 21:51:44 +000078 cockroach-init:
79 environment:
80 COCKROACH_HOST: cockroach-ui
Pavel Cizinsky9e760982018-10-26 15:06:16 +020081 DB_NAME: oapi
82 DB_USER: oapi
83 image: atengler/cockroach-init
Adam Tengler1d4af9a2018-10-18 21:51:44 +000084 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