-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy_couchbase_indexes.yml
40 lines (27 loc) · 1.65 KB
/
deploy_couchbase_indexes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# deploy_couchbase.yml
- name: Deploy Couchbase Indexes
hosts: couchbase_servers # Replace with the appropriate host/group name from your inventory
gather_facts: true
become: true
vars:
index_manager_user: index_manager
index_manager_pw: ChangeMe3
#Don't add defer build to the query, the ansible task does that for us.
#These must be defined in a single line, the fixes for yaml blocks are all less desireable than just defining the index in a single line.
indexes:
- bucket: 'beyond'
query: 'CREATE INDEX `corr_id` ON `beyond`.`pnl`.`daily`(`corr_id`) USING GSI '
- bucket: 'beyond'
query: 'CREATE INDEX `doc_type` ON `beyond`.`pnl`.`daily`(`doc_type`) USING GSI '
- bucket: 'beyond'
query: 'CREATE INDEX `display_name` ON `beyond`.`user`.`permissions`(`display_name`) USING GSI '
- bucket: 'beyond'
query: 'CREATE INDEX `job_type` ON `beyond`.`system`.`cachelogs`(`display_name`) USING GSI '
- bucket: 'beyond'
query: 'CREATE INDEX `sub_type_product_trade_date_to_number_daily_pnl_doc_type` ON `beyond`.`pnl`.`daily`(`sub_type`,`product`,`trade_date`,`daily_pnl`) USING GSI '
- bucket: 'beyond'
query: 'CREATE INDEX `trade_year_trade_date_doc_type` ON `beyond`.`pnl`.`daily`(`trade_year`,`trade_date`) WHERE (`doc_type` = ''invoiced-pnl'') USING GSI '
- bucket: 'beyond'
query: 'CREATE INDEX `doc_type_sub_type_trade_year` ON `beyond`.`pnl`.`daily`(`doc_type`, `sub_type`, `trade_year`) PARTITION BY HASH (doc_type, sub_type, trade_year) USING GSI '
roles:
- couchbase_index_creation