Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ED-1242 : Add OCI support superseeds PR 1603 #1608

Open
wants to merge 187 commits into
base: release-5.1.1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
12de5e6
added artifact upload role for oci oss
ddevadat Dec 22, 2022
ea2c778
overwrite file in oss if the file exists
ddevadat Dec 22, 2022
852a610
added artifact download for oci role
ddevadat Dec 22, 2022
3ee3b85
added role to install oci-cli
ddevadat Dec 23, 2022
3ee652e
added csp choice based cloud cli installation
ddevadat Dec 23, 2022
4ffea4d
added env variables for oci cli for analytics user
ddevadat Dec 23, 2022
8a70a47
install oci cli as analytics user
ddevadat Dec 23, 2022
69f2e83
adding oci cli in PATH variable for analytics user
ddevadat Dec 23, 2022
4ce637d
install oci-cli in analytics home location
ddevadat Dec 23, 2022
2733374
disabled cloud cli temporarlily
ddevadat Dec 23, 2022
2e4cf61
setting env variable with double quotes
ddevadat Dec 23, 2022
2bbab17
placed oci cli env variables in /etc/environment file
ddevadat Dec 23, 2022
d0d1b1d
added jinja2 template for oci cli config
ddevadat Dec 23, 2022
cc11113
renamed dir templates to template
ddevadat Dec 23, 2022
2e11eaf
disabled only oci cli temporarily
ddevadat Dec 23, 2022
054d9db
testing idempotency for oci cli
ddevadat Dec 23, 2022
b1de737
change Spark provision task with Ruby 2.6
heungheung Dec 25, 2022
07d4e5e
added apiversion selector
ddevadat Dec 27, 2022
17de1fa
Merge branch 'oci-5.1.0' of https://github.com/ocisunbird/sunbird-dat…
ddevadat Dec 27, 2022
9ba6497
added the oci oss bucket upload
ddevadat Dec 29, 2022
5fa0e00
added full path of oci from analaytics home
ddevadat Dec 29, 2022
329e820
correction in oci cli location
ddevadat Dec 29, 2022
86b024d
check bucket existence before creating
ddevadat Dec 29, 2022
51894db
testing the logic for register variable
ddevadat Dec 29, 2022
cbb93c1
using full path for oci cli
ddevadat Dec 29, 2022
47ccff0
testing the bucket check
ddevadat Dec 29, 2022
d3b24a9
added the always tag individually
ddevadat Dec 29, 2022
3c79310
place an oci os upload command for every upload
ddevadat Dec 29, 2022
5e4749e
corrected typo for oci cli command
ddevadat Dec 29, 2022
b7daec6
corrected typo for oci cli command
ddevadat Dec 29, 2022
4dbefc9
testing secor changes for oci oss
ddevadat Dec 30, 2022
7b7854d
added oci-bv as the storage class
ddevadat Dec 30, 2022
8fd5084
added storageclass selection
ddevadat Dec 30, 2022
6a4f551
added a condition to include secor.azure.properties
ddevadat Dec 30, 2022
ea1e665
using S3UploadManager in common.properties
ddevadat Dec 30, 2022
b80f4d0
update flink-conf for telemetry-extractor
ddevadat Jan 1, 2023
e46a818
hardcoding base.url
ddevadat Jan 1, 2023
0ec7478
hardcode base.url with double quotes
ddevadat Jan 1, 2023
61c4c17
updated flink-conf for telemetry extractor
ddevadat Jan 1, 2023
b9ddecd
removed changes from flink-conf
ddevadat Jan 1, 2023
e83136b
temporary change
ddevadat Jan 1, 2023
5ced039
temporary change
ddevadat Jan 1, 2023
426036f
temporary change
ddevadat Jan 1, 2023
3ffd0e4
added hard code value for region
ddevadat Jan 1, 2023
9a8e39f
removed the hardcode region for flink
ddevadat Jan 1, 2023
6d0fb19
added a trailing /
ddevadat Jan 1, 2023
4f6a9b0
removed trailing slash
ddevadat Jan 1, 2023
7c24828
changed base.url for s3
ddevadat Jan 1, 2023
d149abc
hardcode base.url
ddevadat Jan 1, 2023
3b55ac1
debug level only for hadoop
ddevadat Jan 1, 2023
ac6d377
using s3a
ddevadat Jan 2, 2023
60a50c3
using s3 url
ddevadat Jan 2, 2023
033b160
removed hadoop logging
ddevadat Jan 2, 2023
2a5050f
testing with sse-c values
ddevadat Jan 2, 2023
58dec82
corrected the typo
ddevadat Jan 2, 2023
f53d043
hardcoded endpoint
ddevadat Jan 2, 2023
898177c
hard coded endpoint url
ddevadat Jan 2, 2023
8a64d3e
endpoint as variable
ddevadat Jan 2, 2023
f451d45
removed hadoop specific logging
ddevadat Jan 2, 2023
0a4380a
added explicit region
ddevadat Jan 2, 2023
06a5bad
removed region flag
ddevadat Jan 2, 2023
bb5fa35
changed oci specific end point for s3
ddevadat Jan 2, 2023
0394d1b
removed customization from flink-conf.yaml
ddevadat Jan 2, 2023
bf7d6b6
Merge pull request #2 from ocisunbird/oci-5.1.0-secor
heungheung Jan 12, 2023
746aada
Merge pull request #1 from ocisunbird/oci-5.1.0-dp-flinkpipeline-jobs
heungheung Jan 12, 2023
214ee74
Merge remote-tracking branch 'upstream/release-5.1.0' into oci-5.1.0-…
ddevadat Jan 31, 2023
f808208
templated jinja templates
ddevadat Feb 1, 2023
7eff73f
updated storage type info
ddevadat Feb 1, 2023
6910f88
updated the store type as template value
ddevadat Feb 1, 2023
24ab958
added the endpoint variable for jobmanager
ddevadat Feb 1, 2023
458acc4
updated the condition of oss upload
ddevadat Feb 1, 2023
f546aea
added oci instance principal variable
ddevadat Feb 22, 2023
ddadf4c
bring bds changes from local repository
Apr 7, 2023
84b1b85
v2 base changes
ddevadat Apr 7, 2023
f779811
reverted data-products-deploy role
ddevadat Apr 7, 2023
230b286
removed unwanted env
ddevadat Apr 7, 2023
04bf9d4
Removed Restrat Cluster Logic - Done from Ambari
Apr 7, 2023
6604a0b
Handled Ambari Restart logic
Apr 8, 2023
366ad61
Merge branch 'oci-5.1.0-JAPACCOE-2839-release-5.1.0-bds' into oci-5.1…
ddevadat Apr 9, 2023
8e1f04a
updated jenkins.bds to consume credential from credstore
ddevadat Apr 9, 2023
00eef69
parametrized create cluster
ddevadat Apr 9, 2023
6c76fbf
corrected syntax
ddevadat Apr 9, 2023
cc12811
disabled delete playbook for testing
ddevadat Apr 9, 2023
ce11e92
removed workernode parameter redundant
ddevadat Apr 9, 2023
21b8166
testing create spark cluster
ddevadat Apr 9, 2023
15832a5
updated delete cluster jenkins
ddevadat Apr 9, 2023
20ca43d
updated the spark deploy job for bds
ddevadat Apr 10, 2023
e278a68
removed redundant role
ddevadat Apr 10, 2023
5ebf329
updated spark env
ddevadat Apr 10, 2023
d584d8f
python debug
ddevadat Apr 10, 2023
4c152bd
updated model to include storege keys
ddevadat Apr 10, 2023
6ae6963
updated spark db name
ddevadat Apr 10, 2023
47946eb
disabled verbose logging for ansible
ddevadat Apr 10, 2023
341ef4f
updated model parameters for userinfo-exhaust
ddevadat Apr 11, 2023
11d111c
added storage key and secret for response-exhaust-v2
ddevadat Apr 11, 2023
dfde179
added bucket as a parameter
ddevadat Apr 13, 2023
4a4de7e
added the bucket name to the sprk provisioning script
ddevadat Apr 13, 2023
640ff44
for testing added batchmodel in jars list
ddevadat Apr 13, 2023
36d96d5
testing change
ddevadat Apr 14, 2023
2fa3df1
corrected json
ddevadat Apr 14, 2023
444108d
removed the classpath params
subhashchandrab Apr 14, 2023
d53cdbd
added model params storageContainer for progress exhaust
ddevadat Apr 15, 2023
de04dd9
added store as s3 for testing
ddevadat Apr 15, 2023
3be2530
corrected json syntax for progress exhaust
ddevadat Apr 15, 2023
4325d72
removed store from model params for progress exhust
ddevadat Apr 15, 2023
3df3cbc
added store as s3 for progress exhaust
ddevadat Apr 16, 2023
70fc149
added store key and secret placeholders
ddevadat Apr 16, 2023
afec78c
updated model-config for endpoint addition
ddevadat Apr 16, 2023
9367598
variablized store type
ddevadat Apr 16, 2023
7f717db
updated model config for progress exhaust
ddevadat Apr 16, 2023
71531b4
changed the report container
ddevadat Apr 17, 2023
f63f5b9
updated progress-exhaust config
ddevadat Apr 18, 2023
eb653b2
updated model config for userinfo
ddevadat Apr 18, 2023
8ffb87f
added jets3t properties
ddevadat Apr 18, 2023
46f5d8a
updated the list of files
ddevadat Apr 18, 2023
729f6fa
added local jets3t files
ddevadat Apr 18, 2023
7cb0be4
added files for jets3t
ddevadat Apr 18, 2023
988b7bb
updated model config for userinfo-exhaust
ddevadat Apr 18, 2023
b84e7ea
updated for flexible sizing
ddevadat Apr 19, 2023
054e5c4
added jets3t properties for spark cluster run
ddevadat Apr 19, 2023
37ed411
corrected jinja syntax
ddevadat Apr 19, 2023
021c239
added download jets3t properties
ddevadat Apr 19, 2023
e823083
added additional jar download
ddevadat Apr 19, 2023
21c1327
corrected jinja
ddevadat Apr 19, 2023
223af2d
s3service.https-only to true for jets3t
ddevadat Apr 19, 2023
1d19f60
updated report bucket name
ddevadat Apr 25, 2023
8f99438
updated report verifiction bucket
ddevadat Apr 25, 2023
4399d57
updated jets3t prop
ddevadat Apr 25, 2023
fe2d983
updated upload.stream buffer value
ddevadat Apr 25, 2023
a0c9134
testing with added parameter to reset mark error
ddevadat Apr 25, 2023
5c70881
changed buffer size
ddevadat Apr 25, 2023
057b7d7
updated model-config for druid-dataset
ddevadat Apr 26, 2023
fe245ea
updated the model-config params
ddevadat Apr 26, 2023
0166b61
updted to replace the temp dir when run on spark bds cluster
ddevadat Apr 26, 2023
c4ca689
updated variable for analytics db name
ddevadat Apr 26, 2023
678b01d
added the properties fs.s3.buffer.dir
ddevadat Apr 27, 2023
d595656
updated the pg db name varible
ddevadat Apr 27, 2023
26838b5
added default value
ddevadat Apr 27, 2023
1f144b7
updated the python variable
ddevadat Apr 27, 2023
5a379ba
Updated the storage config for admin reports
subhashchandrab May 2, 2023
4f9883f
added templates for ingestion spec for collection and sourcing
ddevadat May 4, 2023
64a720e
used template command instead of copy
ddevadat May 4, 2023
039499c
copying as json file
ddevadat May 4, 2023
896410c
updated model-config.json.j2
ddevadat May 4, 2023
9418fb9
Updated model params
subhashchandrab May 4, 2023
8458fa9
Updated storage config
subhashchandrab May 4, 2023
e16a826
updated the right db name for druid rollup
ddevadat May 5, 2023
6091d89
Merge branch 'oci-5.1.0-JAPACCOE-2839-release-5.1.0-bds-v2' of https:…
ddevadat May 5, 2023
8594c4b
Merge remote-tracking branch 'upstream/release-5.1.1' into oci-5.1.0-…
ddevadat May 18, 2023
59603a6
Update cluster-config.json.j2
manojkumarsah13 Aug 3, 2023
1af0a3b
Merge pull request #12 from manojkumarsah13/oci-5.1.0-JAPACCOE-2839-r…
dicdiksha Aug 3, 2023
d3ff4e9
Update cluster-config.json.j2
manojkumarsah13 Aug 3, 2023
1f0a87b
Merge pull request #13 from manojkumarsah13/oci-5.1.0-JAPACCOE-2839-r…
dicdiksha Aug 3, 2023
dec6df5
Update cluster-config.json.j2
manojkumarsah13 Aug 3, 2023
87e6a7e
Merge pull request #14 from manojkumarsah13/oci-5.1.0-JAPACCOE-2839-r…
dicdiksha Aug 3, 2023
54c57ba
Update cluster-config.json.j2
manojkumarsah13 Aug 4, 2023
aafd6f4
Merge pull request #15 from manojkumarsah13/oci-5.1.0-JAPACCOE-2839-r…
dicdiksha Aug 4, 2023
3ddfa88
Update cluster-config.json.j2
manojkumarsah13 Aug 7, 2023
5bbee98
Merge pull request #16 from manojkumarsah13/oci-5.1.0-JAPACCOE-2839-r…
dicdiksha Aug 7, 2023
f505a60
Update cluster-config.json.j2
manojkumarsah13 Aug 25, 2023
acb3562
Merge pull request #17 from manojkumarsah13/oci-5.1.0-JAPACCOE-2839-r…
balasaheb-karjule Aug 25, 2023
4bd6cc7
Update cluster-config.json.j2
manojkumarsah13 Aug 30, 2023
7552d44
Merge pull request #18 from manojkumarsah13/patch-1
balasaheb-karjule Aug 30, 2023
e245128
Update cluster-config.json.j2
manojkumarsah13 Aug 31, 2023
b563b95
Merge pull request #19 from manojkumarsah13/patch-2
balasaheb-karjule Aug 31, 2023
43fc84f
Update cluster-config.json.j2
manojkumarsah13 Oct 10, 2023
4df0562
Merge pull request #22 from manojkumarsah13/patch-4
dicdiksha Oct 10, 2023
bd42a0c
Update cluster-config.json.j2
manojkumarsah13 Oct 14, 2023
c74ac58
Merge pull request #23 from manojkumarsah13/patch-5
dicdiksha Oct 14, 2023
1c2e97b
Update cluster-config.json.j2
manojkumarsah13 Oct 18, 2023
6238f3e
Merge pull request #24 from manojkumarsah13/patch-6
dicdiksha Oct 18, 2023
939269a
Update cluster-config.json.j2
manojkumarsah13 Oct 18, 2023
a467146
Merge pull request #25 from manojkumarsah13/patch-7
dicdiksha Oct 18, 2023
fa3d061
Update collection-summary-ingestion-spec.j2
manojkumarsah13 Nov 1, 2023
01933dc
Merge pull request #30 from manojkumarsah13/patch-8
dicdiksha Nov 1, 2023
d041265
Update cluster-config.json.j2 - Heap memory settings changes
manojkumarsah13 Nov 14, 2023
33a9436
Merge pull request #31 from manojkumarsah13/patch-9
balasaheb-karjule Nov 14, 2023
e329e2b
Update cluster-config.json.j2
shubham72a Nov 14, 2023
f634e64
Merge pull request #32 from shubham72a/patch-1
balasaheb-karjule Nov 14, 2023
a893537
Update cluster-config.json.j2-increase heap memory to 4G
shubham72a Nov 14, 2023
2523ee4
Merge pull request #34 from shubham72a/patch-2
balasaheb-karjule Nov 14, 2023
88e3840
Update jets3t.j2-increas buffer size to 10
shubham72a Nov 15, 2023
97af769
Merge pull request #35 from shubham72a/patch-3
dicdiksha Nov 15, 2023
942ffbb
Update jets3t.j2-set buffer-size to 8gb
shubham72a Nov 15, 2023
5e5472e
Merge pull request #36 from shubham72a/patch-4
lakshman-uppada1 Nov 15, 2023
faca646
Update jets3t.j2-revert buffer size
shubham72a Nov 15, 2023
e33c574
Merge pull request #37 from shubham72a/patch-5
balasaheb-karjule Nov 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ansible/artifacts-download.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,14 @@
aws_access_key_id: "{{ cloud_artifact_storage_accountname }}"
aws_secret_access_key: "{{ cloud_artifact_storage_secret }}"
when: cloud_service_provider == "aws"


- name: download artifact from oci oss
include_role:
name: oci-cloud-storage
tasks_from: download.yml
vars:
local_file_or_folder_path: "{{ artifact_path }}"
oss_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
oss_object_name: "{{ artifact }}"
when: cloud_service_provider == "oci"
10 changes: 10 additions & 0 deletions ansible/artifacts-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@
aws_access_key_id: "{{ cloud_artifact_storage_accountname }}"
aws_secret_access_key: "{{ cloud_artifact_storage_secret }}"
when: cloud_service_provider == "aws"

- name: upload artifact to oci oss
include_role:
name: oci-cloud-storage
tasks_from: upload.yml
vars:
local_file_or_folder_path: "{{ artifact_path }}"
oss_bucket_name: "{{ cloud_storage_artifacts_bucketname }}"
oss_path: "{{ artifact }}"
when: cloud_service_provider == "oci"
1 change: 1 addition & 0 deletions ansible/lpa_data-products_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
environment:
AZURE_STORAGE_ACCOUNT: "{{sunbird_private_storage_account_name}}"
AZURE_STORAGE_KEY: "{{sunbird_private_storage_account_key}}"
OCI_CLI_AUTH: "instance_principal"
roles:
- data-products-deploy
18 changes: 18 additions & 0 deletions ansible/oci-bds-spark.provision.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
- hosts: local
become: yes
vars_files:
- "{{inventory_dir}}/secrets.yml"
roles:
- oci-bds-spark-cluster
tags:
- copy-script

- hosts: bds-livy-node
become: yes
gather_facts: no
vars_files:
- "{{inventory_dir}}/secrets.yml"
roles:
- provision-oci-spark-cluster
tags:
- spark-provision
3 changes: 2 additions & 1 deletion ansible/roles/analytics-bootstrap-always/meta/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
dependencies:
- { role: jdk11 , become: yes }
- { role: azure-cli , become: yes }
- { role: azure-cli , become: yes, when: cloud_service_provider == "azure" }
- { role: oci-cli , become: yes, when: cloud_service_provider == "oci" }


30 changes: 30 additions & 0 deletions ansible/roles/analytics-bootstrap-spark/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,36 @@
with_items:
- {var: 'azure_storage_key', value: '{{ sunbird_private_storage_account_name }}'}
- {var: 'azure_storage_secret', value: '{{ sunbird_private_storage_account_key }}'}


- name: Adding PATH for oci cli Vars to bashrc file of spark.
become: yes
become_user: "{{ analytics_user }}"
lineinfile:
path: '{{ analytics_user_home }}/.bashrc'
line: 'export PATH={{ analytics_user_home }}/bin:$PATH'
regexp: "export PATH={{ analytics_user_home }}/bin.*"
when: cloud_service_provider == "oci"

- name: Configure OCI cli
become: yes
become_user: "{{ analytics_user }}"
file:
path: "{{ analytics_user_home }}/.oci"
state: directory
when: cloud_service_provider == "oci"

- name: Create OCI cli config location
become: yes
become_user: "{{ analytics_user }}"
template: src=oci-key.j2 dest={{ analytics_user_home }}/.oci/oci-key.pem mode=600 owner={{ analytics_user }} group={{ analytics_group }}
when: cloud_service_provider == "oci"

- name: Create OCI cli config file
become: yes
become_user: "{{ analytics_user }}"
template: src=oci-cli-config.j2 dest={{ analytics_user_home }}/.oci/config mode=600 owner={{ analytics_user }} group={{ analytics_group }}
when: cloud_service_provider == "oci"

- name: Adding ENV Vars to spark servers environment.
become: yes
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[DEFAULT]
user={{oci_cli_user_ocid }}
fingerprint={{oci_cli_fingerprint}}
key_file=/home/analytics/.oci/oci-key.pem
tenancy={{oci_cli_tenancy}}
region={{oci_cli_region}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{ oci_cli_key_content }}
9 changes: 6 additions & 3 deletions ansible/roles/analytics-spark-provision/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,31 @@
recurse: yes
become: yes

# kenneth changed to install Ruby 2.6 as per R.4.6.0
- name: Install latest ruby
become: yes
become_user: "{{ analytics_user }}"
shell: "export PATH=$PATH:/home/analytics/.rvm/bin && rvm install ruby-2.5"
shell: "export PATH=$PATH:/home/analytics/.rvm/bin && rvm install ruby-2.6"

- name: Add ruby repository
become: yes
apt_repository:
repo: ppa:brightbox/ruby-ng

# kenneth changed to install ruby-dev 2.6 as per R.4.6.0 - there is no ruby2.2-dev in bionic
- name: Install latest ruby-dev
become: yes
apt:
name: "ruby2.5-dev"
name: "ruby2.6-dev"
state: installed
update_cache: true
cache_valid_time: 3600

# changed to ruby 2.6 as per R.4.6.0
- name: Install ruby-kafka
become: yes
become_user: "{{ analytics_user }}"
shell: "bash -ilc 'export PATH=$PATH:/home/analytics/.rvm/bin && rvm --default use ruby-2.5 && gem install ruby-kafka'"
shell: "bash -ilc 'export PATH=$PATH:/home/analytics/.rvm/bin && rvm --default use ruby-2.6 && gem install --user-install --no-document ruby-kafka'"

- name: Download Kafka-2.11
become: yes
Expand Down
14 changes: 13 additions & 1 deletion ansible/roles/data-products-deploy/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
analytics_user: analytics
analytics_group: analytics
spark_output_temp_dir: /mount/data/analytics/tmp/
oci_install_loc: /home/{{analytics_user}}/bin/

bucket: "telemetry-data-store"
secor_bucket: "telemetry-data-store"
Expand Down Expand Up @@ -279,4 +280,15 @@ assessment_metric_primary_category: "{{ exhaust_job_assessment_primary_category

# Default s3 variables
sunbird_private_s3_storage_key: ""
sunbird_private_s3_storage_secret: ""
sunbird_private_s3_storage_secret: ""


# jets3t s3 config, allows us to configure for s3-like object stores
jets3t_s3_request_signature_version: "{{ s3_request_signature_version }}"
jets3t_s3_endpoint_host: "{% if s3_storage_endpoint %}{{ s3_storage_endpoint | regex_replace('^[a-z]+://(.*)$', '\\1') }}{% endif %}"
jets3t_s3_disable_dns_buckets: "{{ s3_path_style_access }}"
jets3t_s3_https_only: "{{ s3_https_only }}"
jets3t_s3_default_bucket_location: "{{ s3_default_bucket_location }}"


spark_pg_db_name: "analytics"
97 changes: 92 additions & 5 deletions ansible/roles/data-products-deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@
tags:
- always

- name: Ensure oci oss bucket exists
command: "{{oci_install_loc}}/oci os bucket get --name {{ bucket }}"
register: check_bucket
when: dp_object_store_type == "oci"
tags:
- always

- name: Create oci oss bucket
command: "{{oci_install_loc}}/oci os bucket create -c {{oci_bucket_compartment}} --name {{bucket}}"
when: dp_object_store_type == "oci" and check_bucket.rc !=0
tags:
- always

- name: Copy Core Data Products
copy: src={{ analytics_batch_module_artifact }} dest={{ analytics.home }}/models-{{ model_version }}
tags:
Expand All @@ -14,6 +27,15 @@
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 }}
async: 3600
poll: 10
when: dp_object_store_type == "azure"
tags:
- dataproducts-spark-cluster

- name: Copy Core Data Products to oci oss
command: "{{oci_install_loc}}/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"
async: 3600
poll: 10
when: dp_object_store_type == "oci"
tags:
- dataproducts-spark-cluster

Expand All @@ -27,8 +49,17 @@
command: az storage blob upload --overwrite -c {{ bucket }} --name models-{{ model_version }}/data-products-1.0.jar -f {{ analytics.home }}/models-{{ model_version }}/data-products-1.0/data-products-1.0.jar
async: 3600
poll: 10
when: dp_object_store_type == "azure"
tags:
- ed-dataproducts-spark-cluster
- ed-dataproducts-spark-cluster

- name: Copy Ed Data Products to oci oss
command: "{{oci_install_loc}}/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"
async: 3600
poll: 10
when: dp_object_store_type == "oci"
tags:
- ed-dataproducts-spark-cluster

- name: Copy Framework Library
copy: src={{ analytics_core_artifact }} dest={{ analytics.home }}/models-{{ model_version }}
Expand All @@ -39,6 +70,15 @@
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 }}
async: 3600
poll: 10
when: dp_object_store_type == "azure"
tags:
- framework-spark-cluster

- name: Copy Framework Library to oci oss
command: "{{oci_install_loc}}/oci os object put -bn {{ bucket }} --name models-{{ model_version }}/{{ analytics_core_artifact }} --file {{ analytics.home }}/models-{{ model_version }}/{{ analytics_core_artifact }} --force"
async: 3600
poll: 10
when: dp_object_store_type == "oci"
tags:
- framework-spark-cluster

Expand All @@ -51,6 +91,15 @@
command: az storage blob upload --overwrite -c {{ bucket }} --name models-{{ model_version }}/{{ scruid_artifact }} -f {{ analytics.home }}/models-{{ model_version }}/{{ scruid_artifact }}
async: 3600
poll: 10
when: dp_object_store_type == "azure"
tags:
- framework-spark-cluster

- name: Copy Scruid Library to oci oss
command: "{{oci_install_loc}}/oci os object put -bn {{ bucket }} --name models-{{ model_version }}/{{ scruid_artifact }} --file {{ analytics.home }}/models-{{ model_version }}/{{ scruid_artifact }} --force"
async: 3600
poll: 10
when: dp_object_store_type == "oci"
tags:
- framework-spark-cluster

Expand Down Expand Up @@ -87,6 +136,17 @@
line: 'spark_output_temp_dir="/var/log/sparkapp/tmp/"'
tags:
- framework-spark-cluster
when: dp_object_store_type != "oci"

- name: Update spark temp dir value for cluster
lineinfile:
path: '{{ analytics.home }}/models-{{ model_version }}/application.conf'
regexp: '^spark_output_temp_dir="/mount/data/analytics/tmp/"'
line: 'spark_output_temp_dir="/var/log/spark/"'
tags:
- framework-spark-cluster
when: dp_object_store_type == "oci"


- name: Update logger kafka config for cluster
lineinfile:
Expand All @@ -100,9 +160,18 @@
command: az storage blob upload --overwrite -c {{ bucket }} -f {{ analytics.home }}/models-{{ model_version }}/application.conf --name models-{{ model_version }}/application.conf
async: 3600
poll: 10
when: dp_object_store_type == "azure"
tags:
- framework-spark-cluster

- name: Copy configuration file to oci oss
command: "{{oci_install_loc}}/oci os object put -bn {{ bucket }} --file {{ analytics.home }}/models-{{ model_version }}/application.conf --name models-{{ model_version }}/application.conf --force"
async: 3600
poll: 10
when: dp_object_store_type == "oci"
tags:
- framework-spark-cluster

- name: Copy log4j2 xml file
template: src=log4j2.xml.j2 dest={{ analytics.home }}/models-{{ model_version }}/log4j2.xml mode=755 owner={{ analytics_user }} group={{ analytics_group }}
tags: [ dataproducts, framework, ed-dataproducts ]
Expand Down Expand Up @@ -271,7 +340,7 @@
- spark-jobs

- name: Copy collection-summary ingestion spec
copy: src="collection-summary-ingestion-spec.json" dest={{ analytics.home }}/scripts/ mode=755 owner={{ analytics_user }} group={{ analytics_group }}
template: src="collection-summary-ingestion-spec.j2" dest={{ analytics.home }}/scripts/collection-summary-ingestion-spec.json mode=755 owner={{ analytics_user }} group={{ analytics_group }}
tags:
- ed-dataproducts

Expand Down Expand Up @@ -300,7 +369,7 @@
- spark-jobs

- name: Copy sourcing-summary ingestion spec
copy: src="sourcing-ingestion-spec.json" dest={{ analytics.home }}/scripts/ mode=755 owner={{ analytics_user }} group={{ analytics_group }}
template: src="sourcing-ingestion-spec.j2" dest={{ analytics.home }}/scripts/sourcing-ingestion-spec.json mode=755 owner={{ analytics_user }} group={{ analytics_group }}
tags:
- ed-dataproducts

Expand Down Expand Up @@ -335,6 +404,24 @@
- run-job
- config-update

- name: Copy jets3t.properties file
template: src=jets3t.j2 dest={{ analytics_cluster.home }}/jets3t.properties
delegate_to: localhost
tags:
- replay-job
- run-job
- config-update

- name: Copy JetS3t.properties to oci oss
command: "{{oci_install_loc}}/oci os object put -bn {{ bucket }} --name models-{{ model_version }}/jets3t.properties --file {{ analytics_cluster.home }}/jets3t.properties --content-type auto --force"
async: 3600
poll: 10
when: dp_object_store_type == "oci"
tags:
- replay-job
- run-job
- config-update

- name: Replay Job
shell: "nohup {{ analytics_cluster.home }}/submit-script.sh --job {{ job_id }} --mode {{ mode }} --partitions {{ partitions }} --parallelisation {{ parallelisation }} --startDate {{ start_date }} --endDate {{ end_date }} --sparkMaster {{ sparkMaster }} --selectedPartitions {{ selected_partitions }} &"
async: "{{ (pause_min * 60) }}"
Expand Down Expand Up @@ -376,10 +463,10 @@
shell: |
if echo "{{jobs}}" | grep 'druid'
then
python {{ analytics_cluster.home }}/update-job-requests.py {{ jobs }} {{ batch_size }} druid {{env}}_report_config
python {{ analytics_cluster.home }}/update-job-requests.py {{ jobs }} {{ batch_size }} druid {{spark_env}}_report_config
elif echo "{{jobs}}" | grep 'exhaust'
then
python {{ analytics_cluster.home }}/update-job-requests.py {{ jobs }} {{ batch_size }} exhaust {{env}}_job_request
python {{ analytics_cluster.home }}/update-job-requests.py {{ jobs }} {{ batch_size }} exhaust {{spark_env}}_job_request
fi
tags:
- parallel-jobs-submit
Expand Down
Loading