Skip to content

Commit

Permalink
Merge branch 'ironwood' into 'master'
Browse files Browse the repository at this point in the history
Ironwood release merge to main

See merge request sassoftware/viya-ark!341
  • Loading branch information
kevinlinglesas committed Oct 20, 2020
2 parents 2df79e4 + 0e02ba1 commit 8ff2d11
Show file tree
Hide file tree
Showing 7 changed files with 280 additions and 11 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/viya-ark-bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Viya ARK Bug report
about: Help us to improve our code.
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the issue is.

**Environment**
- [ ] Ansible version:
- [ ] Python version:
- [ ] OS version:
- [ ] Failed playbook tasks log (or entire playbook log) [Attach]
- [ ] What version of Viya 3.x is being deployed?

**To Reproduce**
Steps to reproduce the behavior:
1. Firstly, ...
2. Then, ...
3.

**Expected behavior**
A clear and concise description of what you expected to happen.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/viya-ark-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Viya ARK Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
# Changelog for SAS Viya ARK

<!-- LATEST RELEASE START -->
## Viya35-ark-1.10 - October 20, 2020
- **Summary**:
Changing range of Ansible versions supported. Enhancing obsolete log archiving.
- Issues addressed:
- General
- VIYAARK-188 - Support Ansible 2.10.
- VIYAARK-216 - Add Bug Report template to GitHub Issue submission.
- SAS Viya Upgrade Tasks Playbooks
- VIYAARK-104 - Produce summary report for Archive Obsolete Folders playbook.
- Ansible Support: Ansible 2.8 - Ansible 2.10

<!-- LATEST RELEASE END -->


## Viya35-ark-1.9 - September 30, 2020
- **Summary**:
Fix related to MMSU, Pre-Install & Post Upgrade.
Expand All @@ -13,7 +27,6 @@
- VIYAARK-103 - Add a confirmation before stopping
- Ansible Support: Ansible 2.7.2 - Ansible 2.9

<!-- LATEST RELEASE END -->

## Viya35-ark-1.8 - August 31, 2020
- **Summary**:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ sas_yum_urls:


## third-party software requirements
required_ansible_min_version: "2.7.2"
required_ansible_max_version: "2.9"
ansible_version_compare_max_version: "2.10" # Must be set one major version above required_ansible_max_version
required_ansible_min_version: "2.8"
required_ansible_max_version: "2.10"
ansible_version_compare_max_version: "2.11" # Must be set one major version above required_ansible_max_version
required_python_min_version: "2.6"


Expand Down
5 changes: 3 additions & 2 deletions playbooks/viya-upgrade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ The following plays are run separate from the pre-upgrade and post-upgrade playb
- The `archive_obsolete_log_folders.yml` playbook archives a specific set of directories that are related to services and components from previous SAS Viya versions that have now been discontinued or have merged with other services and components.
- The playbook contains the list of obsoleted directories for archiving. By default, the playbook looks for these directories under _/opt/sas/viya/config/var/log_ and moves them to _/opt/sas/viya/config/var/log/archived_.
- The playbook has `become_user` set to "sas" and all tasks are run as the sas user by default.
- The log directory path is set in variable `viya_log_path` and is _/opt/sas/viya/config/var/log_ by default. The archive path is set in variable `viya_log_archive_path` and is _/opt/sas/viya/config/var/log/archived_ by default. You can override the defaults by editing the variables in the playbook file, or on the command line by setting the variables using the -e option:
- The log directory path is set in variable `viya_log_path` and is _/opt/sas/viya/config/var/log_ by default. The archive path is set in variable `viya_log_archive_path` and is _/opt/sas/viya/config/var/log/archived_ by default. You can override the defaults by editing the variables in the playbook file, or on the command line by setting the variables using the -e option.
- The playbook creates an HTML report showing archive results. The report is written to the archive path by default. The report location can be overridden by editing the `report_output_path` variable in the playbook or on the command line using the -e option:
````
ansible-playbook archive_obsolete_log_folders.yml -i inventory -e "viya_log_archive_path=/example/writable/path"
ansible-playbook archive_obsolete_log_folders.yml -i inventory -e "viya_log_archive_path=/example/writable/path" -e "report_output_path=/path"
````

## Useful Optional Arguments
Expand Down
34 changes: 29 additions & 5 deletions playbooks/viya-upgrade/archive_obsolete_log_folders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
#
# This playbook is intended for use in SAS Viya 3.5 environments.
#
# By default these old service directories are archived to /opt/sas/viya/config/var/log/archived
# By default the old service directories are archived to /opt/sas/viya/config/var/log/archived
#
# By default the html report is written to /opt/sas/viya/config/var/log/archived
#
# This location can be overridden by passing an alternate path on the command line:
# These location can be overridden by passing an alternate path on the command line:
#
# ansible-playbook archive_obsolete_log_folders.yml -i inventory -e "viya_log_archive_path=/your/writable/path/folder"
# ansible-playbook archive_obsolete_log_folders.yml -i inventory -e "viya_log_archive_path=/your/writable/path/folder" -e "report_output_path=/path"
#
#
#####################################################################################################
Expand All @@ -33,6 +35,9 @@
vars:
viya_log_path: "/opt/sas/viya/config/var/log"
viya_log_archive_path: "{{viya_log_path}}/archived"
report_file_name: "archive_obsolete_log_folders_report"
report_output_path: "{{ viya_log_archive_path }}"
archival_report_file: "{{ report_output_path | realpath }}/{{ report_file_name + '_' + '%F_%H-%M-%S'|strftime(ansible_date_time.epoch) + '.html' }}"

folders_to_archive:
- analytics-components
Expand Down Expand Up @@ -128,7 +133,7 @@
- name: "***WARNING: This playbook is for use in SAS Viya 3.5 deployments. Please abort if you are running with a different version of SAS Viya."
pause:
seconds: 20
prompt: "Press 'Ctl+C' and then 'A' to abort the process. The playbook will continue after 20 seconds"
prompt: "Press 'Ctl+C' and then 'A' to abort the process. The playbook will continue after 20 seconds."
when: (ansible_check_mode == False) and (use_pause == True)

# On SUSE, if the package for the corresponding log folder is still installed then we will skip archiving the log folder.
Expand Down Expand Up @@ -168,6 +173,25 @@
args:
removes: "{{viya_log_path}}/{{item.item}}"
become: yes
become_user: root
become_user: root
register: moved_folder_status
when: item.rc != 0
with_items: "{% if ansible_os_family == suse_os_name|string %}{{package_status_suse.results}}{% else %}{{package_status_rhel.results}}{% endif %}"

- name: Get the value of hostname -f
shell: "hostname -f"
changed_when: False
register: full_hostname

- name: "Create Log Folder Archive HTML Report"
template:
src: templates/archive_obsolete_log_folders_report.html.j2
dest: "{{ archival_report_file }}"
mode: 0660
run_once: true

- name: "Log Folder Archive Report location"
debug:
msg: "Created {{ archival_report_file }}"
run_once: true

Loading

0 comments on commit 8ff2d11

Please sign in to comment.