Last active
December 9, 2020 18:21
-
-
Save cdmo/d14d76c85fcea7af60ec8ed656a35ef0 to your computer and use it in GitHub Desktop.
zk play
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# - name: Blacklight Solr | List zookeeper configsets | |
# uri: "{{ solr_install_path }}"/solr/admin/configs?action=LIST&omitHeader=true | |
# register: existing_configsets_list | |
- name: Blacklight Solr | Zip the current zookeeper configsets | |
archive: | |
path: | |
- "{{ rails_app_install_path }}/solr/conf/*" | |
dest: "{{ rails_app_install_path }}/solr/psulib_conf.zip" | |
format: zip | |
become: yes | |
when: solr_update_configset | |
- name: Blacklight Solr | Upload the zookeeper configset | |
uri: | |
url: "{{ solr_endpoint }}/solr/admin/configs?action=UPLOAD&name={{ solr_configset_name }}" | |
method: post | |
src: "{{ rails_app_install_path }}/solr/psulib_conf.zip" | |
remote_src: yes | |
headers: | |
Content-Type: application/octet-stream | |
become: yes | |
become_user: "{{ rails_app_user }}" | |
when: solr_update_configset | |
# - name: Blacklight Solr | List current collections | |
# uri: | |
# url: "{{ solr_endpoint }}/solr/admin/collections?action=LIST" | |
# register: existing_collections_list | |
- name: Blacklight Solr | Create a collection with the zookeeper config | |
uri: | |
url: "{{ solr_endpoint }}/solr/admin/collections?action=CREATE&name={{ solr_collection }}&numShards={{ zk_num_shards }}&replicationFactor={{ zk_replication_factor }}&maxShardsPerNode={{ zk_max_shards_per_node }}" | |
when: traject_index_now | |
- name: Blacklight Solr | Set config for the collection | |
uri: | |
url: "{{ solr_endpoint }}/solr/admin/collections?action=MODIFYCOLLECTION&collection={{ solr_collection }}&collection.configName={{ solr_configset_name }}" | |
when: traject_index_now | |
- name: Blacklight Solr | Update config for the collection | |
uri: | |
url: "{{ solr_endpoint }}/solr/admin/collections?action=MODIFYCOLLECTION&collection={{ solr_collection }}&collection.configName={{ solr_configset_name }}" | |
when: solr_update_configset | |
# - name: Blacklight Solr | List aliases | |
# uri: "{{ solr_install_path }}"/admin/collections?action=LISTALIASES | |
# register: existing_aliases_list | |
# - name: Blacklight Solr | Set alias | |
# uri: | |
# url: "{{ solr_endpoint }}/solr/admin/collections?action=CREATEALIAS&name={{ solr_alias_name }}&collections={{ solr_collection }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment