|
5 | 5 | tags:
|
6 | 6 | - always
|
7 | 7 |
|
| 8 | +- name: Ensure oci oss bucket exists |
| 9 | + command: "/home/{{analytics_user}}/bin/oci os bucket get --name {{ bucket }}" |
| 10 | + register: check_bucket |
| 11 | + when: dp_object_store_type == "oci" |
| 12 | + tags: |
| 13 | + - always |
| 14 | + |
| 15 | +- name: Create oci oss bucket |
| 16 | + command: "/home/{{analytics_user}}/bin/oci os bucket create -c {{oci_bucket_compartment}} --name {{bucket}}" |
| 17 | + when: dp_object_store_type == "oci" and check_bucket.rc !=0 |
| 18 | + tags: |
| 19 | + - always |
| 20 | + |
8 | 21 | - name: Copy Core Data Products
|
9 | 22 | copy: src={{ analytics_batch_module_artifact }} dest={{ analytics.home }}/models-{{ model_version }}
|
10 | 23 | tags:
|
|
14 | 27 | command: az storage blob upload --overwrite -c {{ bucket }} --name models-{{ model_version }}/{{ analytics_batch_module_artifact }} -f {{ analytics.home }}/models-{{ model_version }}/{{ analytics_batch_module_artifact }}
|
15 | 28 | async: 3600
|
16 | 29 | poll: 10
|
| 30 | + when: dp_object_store_type == "azure" |
| 31 | + tags: |
| 32 | + - dataproducts-spark-cluster |
| 33 | + |
| 34 | +- name: Copy Core Data Products to oci oss |
| 35 | + command: /home/{{analytics_user}}/bin/oci os object put -bn {{ bucket }} --name models-{{ model_version }}/{{ analytics_batch_module_artifact }} --file {{ analytics.home }}/models-{{ model_version }}/{{ analytics_batch_module_artifact }} --force |
| 36 | + async: 3600 |
| 37 | + poll: 10 |
| 38 | + when: dp_object_store_type == "oci" |
17 | 39 | tags:
|
18 | 40 | - dataproducts-spark-cluster
|
19 | 41 |
|
| 42 | + |
20 | 43 | - name: Unarchive Ed Data Products
|
21 | 44 | become: yes
|
22 | 45 | unarchive: src={{ playbook_dir}}/{{ analytics_ed_dataporducts_artifact }} dest={{ analytics.home }}/models-{{ model_version }} copy=yes group={{ analytics_group }} owner={{ analytics_user }}
|
|
27 | 50 | command: az storage blob upload --overwrite -c {{ bucket }} --name models-{{ model_version }}/lern-data-products-1.0.jar -f {{ analytics.home }}/models-{{ model_version }}/lern-data-products-1.0/lern-data-products-1.0.jar
|
28 | 51 | async: 3600
|
29 | 52 | poll: 10
|
| 53 | + when: dp_object_store_type == "azure" |
30 | 54 | tags:
|
31 | 55 | - lern-dataproducts-spark-cluster
|
32 | 56 |
|
| 57 | +- name: Copy Ed Data Products to oci oss |
| 58 | + command: /home/{{analytics_user}}/bin/oci os object put -bn {{ bucket }} --name models-{{ model_version }}/data-products-1.0.jar --file {{ analytics.home }}/models-{{ model_version }}/data-products-1.0/data-products-1.0.jar --force |
| 59 | + async: 3600 |
| 60 | + poll: 10 |
| 61 | + when: dp_object_store_type == "oci" |
| 62 | + tags: |
| 63 | + - lern-dataproducts-spark-cluster |
| 64 | + |
33 | 65 | - name: Copy Framework Library
|
34 | 66 | copy: src={{ analytics_core_artifact }} dest={{ analytics.home }}/models-{{ model_version }}
|
35 | 67 | tags:
|
|
39 | 71 | command: az storage blob upload --overwrite --debug -c {{ bucket }} --name models-{{ model_version }}/{{ analytics_core_artifact }} -f {{ analytics.home }}/models-{{ model_version }}/{{ analytics_core_artifact }}
|
40 | 72 | async: 3600
|
41 | 73 | poll: 10
|
| 74 | + when: dp_object_store_type == "azure" |
| 75 | + tags: |
| 76 | + - framework-spark-cluster |
| 77 | + |
| 78 | +- name: Copy Framework Library to oci oss |
| 79 | + command: /home/{{analytics_user}}/bin/oci os object put -bn {{ bucket }} --name models-{{ model_version }}/{{ analytics_core_artifact }} --file {{ analytics.home }}/models-{{ model_version }}/{{ analytics_core_artifact }} --force |
| 80 | + async: 3600 |
| 81 | + poll: 10 |
| 82 | + when: dp_object_store_type == "oci" |
42 | 83 | tags:
|
43 | 84 | - framework-spark-cluster
|
44 | 85 |
|
|
51 | 92 | command: az storage blob upload --overwrite -c {{ bucket }} --name models-{{ model_version }}/{{ scruid_artifact }} -f {{ analytics.home }}/models-{{ model_version }}/{{ scruid_artifact }}
|
52 | 93 | async: 3600
|
53 | 94 | poll: 10
|
| 95 | + when: dp_object_store_type == "azure" |
54 | 96 | tags:
|
55 | 97 | - framework-spark-cluster
|
56 | 98 |
|
| 99 | +- name: Copy Scruid Library to oci oss |
| 100 | + command: /home/{{analytics_user}}/bin/oci os object put -bn {{ bucket }} --name models-{{ model_version }}/{{ scruid_artifact }} --file {{ analytics.home }}/models-{{ model_version }}/{{ scruid_artifact }} --force |
| 101 | + async: 3600 |
| 102 | + poll: 10 |
| 103 | + when: dp_object_store_type == "oci" |
| 104 | + tags: |
| 105 | + - framework-spark-cluster |
| 106 | + |
57 | 107 | - name: Copy Job Manager
|
58 | 108 | copy: src={{ analytics_job_manager_artifact }} dest={{ analytics.home }}/models-{{ model_version }}
|
59 | 109 | tags:
|
|
92 | 142 | command: az storage blob upload --overwrite -c {{ bucket }} -f {{ analytics.home }}/models-{{ model_version }}/lernapplication.conf --name models-{{ model_version }}/lernapplication.conf
|
93 | 143 | async: 3600
|
94 | 144 | poll: 10
|
| 145 | + when: dp_object_store_type == "azure" |
95 | 146 | tags:
|
96 | 147 | - framework-spark-cluster
|
97 | 148 |
|
| 149 | +- name: Copy configuration file to oci oss |
| 150 | + command: /home/{{analytics_user}}/bin/oci os object put -bn {{ bucket }} --file {{ analytics.home }}/models-{{ model_version }}/application.conf --name models-{{ model_version }}/application.conf --force |
| 151 | + async: 3600 |
| 152 | + poll: 10 |
| 153 | + when: dp_object_store_type == "oci" |
| 154 | + tags: |
| 155 | + - framework-spark-cluster |
| 156 | + |
98 | 157 | - name: Copy log4j2 xml file
|
99 | 158 | template: src=log4j2.xml.j2 dest={{ analytics.home }}/models-{{ model_version }}/log4j2.xml mode=755 owner={{ analytics_user }} group={{ analytics_group }}
|
100 | 159 | tags: [ dataproducts, framework, lern-dataproducts ]
|
|
0 commit comments