Skip to content

Commit

Permalink
Refactoring project files to replace arkcd with ark and update refere…
Browse files Browse the repository at this point in the history
…nces based on the repo name change
  • Loading branch information
sasjowood committed Sep 4, 2020
1 parent 3994d75 commit 5586f18
Show file tree
Hide file tree
Showing 76 changed files with 120 additions and 119 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-validation.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Viya ARKcd Python CI Validation
name: Viya ARK Python CI Validation

on:
push:
Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# SAS Viya Administration Resource Kit for Container Deployments
# SAS Viya 4 Administration Resource Kit

The SAS Viya Administration Resource Kit for Container Deployments (SAS Viya ARKcd) provides tools and utilities to help SAS customers prepare for a SAS Viya deployment.
The SAS Viya Administration Resource Kit (SAS Viya ARK) provides tools and utilities to help SAS customers prepare for and gather information about a SAS Viya deployment.

## Introduction
SAS Viya ARKcd is a collection of resources that automate and streamline tasks that prepare an environment for a SAS Viya deployment. It also gathers information and generates reports about a deployment.
SAS Viya ARK is a collection of resources that automate and streamline tasks that prepare an environment for a SAS Viya deployment. It also gathers information and generates reports about a deployment.

The master branch supports the latest release of SAS Viya. Visit the releases page for specific information about SAS Viya ARKcd and related SAS Viya product releases.
The master branch supports the latest release of SAS Viya. Visit the releases page for specific information about SAS Viya ARK and related SAS Viya product releases.

SAS Viya ARKcd provides the following types of assistance:
SAS Viya ARK provides the following types of assistance:

* Pre-deployment assessment and optional configuration
* Post-deployment automation and utilities

## Prerequisites for SAS Viya ARKcd
Obtain the latest version of SAS Viya ARKcd with every new software order.
## Prerequisites for SAS Viya ARK
Obtain the latest version of SAS Viya ARK with every new software order.

Each tool that is included in the resource kit provides a readme that describes its specific prerequisites and functionality.

### Required Python Packages
SAS Viya ARKcd tools require third-party packages be installed before use. All required packages can be installed using the provided `requirements.txt`:
SAS Viya ARK tools require third-party packages be installed before use. All required packages can be installed using the provided `requirements.txt`:

```commandline
$ python3 -m pip install -r requirements.txt
Expand All @@ -29,6 +29,7 @@ Tool support for the latest release of SAS Viya:

* [Pre-installation of SAS Viya System Requirements](pre_install_report)
* [SAS Viya Deployment Report](deployment_report)
* [SAS Viya Log Download Tool](download_pod_logs)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Support
We are providing support for all SAS Viya ARKcd content through GitHub. Please submit a GitHub issue for bugs, feature requests and any questions you may have concerning the functionality or usage of the tools.
We are providing support for all SAS Viya ARK content through GitHub. Please submit a GitHub issue for bugs, feature requests and any questions you may have concerning the functionality or usage of the tools.
30 changes: 15 additions & 15 deletions VERSIONS.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
# Versions in SAS Viya ARKcd
# Versions in SAS Viya ARK

## Rationale for numbering

* Over time, SAS Viya ARKcd will evolve
* Over time, SAS Viya ARK will evolve
* possibly, some bugs need to be corrected
* maybe some new features are added
* a new version of SAS Viya is available, and SAS Viya ARKcd needs to be updated
* For all these reasons, SAS Viya ARKcd needs its own numbering scheme, distinct, and yet related to the Versions of SAS Viya itself
* Whenever you use SAS Viya ARKcd, make sure that you know which version you are using
* a new version of SAS Viya is available, and SAS Viya ARK needs to be updated
* For all these reasons, SAS Viya ARK needs its own numbering scheme, distinct, and yet related to the Versions of SAS Viya itself
* Whenever you use SAS Viya ARK, make sure that you know which version you are using
* If you are unsure, check what the version at the top of the [ChangeLog](CHANGELOG.md) is
* If you contact SAS or Open an [issue](https://github.com/sassoftware/viya-arkcd/issues), make sure to mention the exact version of SAS Viya ARKcd you are using.
* If you contact SAS or Open an [issue](https://github.com/sassoftware/viya4-ark/issues), make sure to mention the exact version of SAS Viya ARK you are using.

## Numbering scheme

* Example version
* the first "modern" version of SAS Viya ARKcd was called **Viya401-arkcd-1.0**
* `<viya_version>-arkcd-<first-digit>-<second-digit>`
* the first "modern" version of SAS Viya ARK was called **Viya401-ark-1.0**
* `<viya_version>-ark-<first-digit>-<second-digit>`
* let's decompose that into its consituing parts:

| Viya401 | - | arkcd | - | 1 | . | 0 |
| Viya401 | - | ark | - | 1 | . | 0 |
|-----------------------|----|---------|----|-------------------|---|----------------------|
| SAS Viya Version |dash| |dash| Major Version |dot| Minor Version |

* SAS Viya Version is an indicator of the **highest** version of SAS Viya that this has been tested with.
* SAS Viya ARKcd will not be backwards-compatible across SAS Viya releases.
* In other words, you should aim to use the latest realease of SAS Viya ARKcd, as long as the ViyaXX portion matches the target software
* It will be impossible to have a version of SAS Viya ARKcd that is backwards compatible with much older versions of SAS Viya, and attempting it would prevent a healthy development of SAS Viya ARKcd
* `arkcd` is used as a starting marker to show that this is the actual version number of SAS Viya ARKcd, not of SAS Viya
* SAS Viya ARK will not be backwards-compatible across SAS Viya releases.
* In other words, you should aim to use the latest realease of SAS Viya ARK, as long as the ViyaXX portion matches the target software
* It will be impossible to have a version of SAS Viya ARK that is backwards compatible with much older versions of SAS Viya, and attempting it would prevent a healthy development of SAS Viya ARK
* `ark` is used as a starting marker to show that this is the actual version number of SAS Viya ARK, not of SAS Viya
* The Major Version number will be incremented when:
* There are some major changes in SAS Viya itself, such as an Upgrade within a SAS Viya Version.
* There are major changes in SAS Viya ARKcd itself, such as an important new feature
* There are major changes in SAS Viya ARK itself, such as an important new feature
* The Minor Version number will be incremented when:
* a bug is fixed
* some code is replaced with equivalent code that does not really change the behavior
* small improvements are made, such as adding tags, spacing, etc..
* When the next release of SAS Viya is available, the digits are "reset":
* we might go from **Viya401-arkcd-5.2** to **Viya402-arkcd-1.0**
* we might go from **Viya401-ark-5.2** to **Viya402-ark-1.0**
* Changes to the documentation (in the markdown files) will not necessarily trigger an increment in the version, as the documentation does not impact the way the softare runs.


Expand Down
14 changes: 7 additions & 7 deletions deployment_report/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ included in the report. Otherwise, un-retrievable information is omitted.

### Required Python Packages

SAS Viya ARKcd tools require third-party packages be installed before use. All required packages can be installed using the provided `requirements.txt`:
SAS Viya ARK tools require third-party packages be installed before use. All required packages can be installed using the provided `requirements.txt`:

```commandline
$ python3 -m pip install -r requirements.txt
Expand All @@ -35,7 +35,7 @@ deployment can be specified by including the `-n` or `--namespace` option.
deployment.

```commandline
$ python3 viya-arkcd.py deployment-report --namespace sas
$ python3 viya-ark.py deployment-report --namespace sas
```

### Including Log Snippets for All Pods
Expand All @@ -47,7 +47,7 @@ Using this option increases the runtime of the command as well as the size of th
deployment.

```commandline
$ python3 viya-arkcd.py deployment-report -n sas --include-pod-log-snips
$ python3 viya-ark.py deployment-report -n sas --include-pod-log-snips
```

### Including Resource Definitions for All Resources
Expand All @@ -59,7 +59,7 @@ definitions for all resources found in the deployment. Using this option increas
deployment.

```commandline
$ python3 viya-arkcd.py deployment-report -n sas --include-resource-definitions
$ python3 viya-ark.py deployment-report -n sas --include-resource-definitions
```

### Creating the Data File Only
Expand All @@ -71,7 +71,7 @@ is omitted.
deployment.

```commandline
$ python3 viya-arkcd.py deployment-report -n sas --data-file-only
$ python3 viya-ark.py deployment-report -n sas --data-file-only
```

### Redirecting Output
Expand All @@ -84,15 +84,15 @@ any file names.
deployment.

```commandline
$ python3 viya-arkcd.py deployment-report -n sas --output-dir="/path/to/report/"
$ python3 viya-ark.py deployment-report -n sas --output-dir="/path/to/report/"
```

### Help with the Command

The `-h` or `--help` option can be used to view usage information and list all options available for the report.

```commandline
$ python3 viya-arkcd.py deployment-report --help
$ python3 viya-ark.py deployment-report --help
```

## Report Output
Expand Down
6 changes: 3 additions & 3 deletions deployment_report/deployment_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

from deployment_report.model.viya_deployment_report import ViyaDeploymentReport

from viya_arkcd_library.command import Command
from viya_arkcd_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError, NamespaceNotFoundError
from viya_arkcd_library.k8s.sas_kubectl import Kubectl
from viya_ark_library.command import Command
from viya_ark_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError, NamespaceNotFoundError
from viya_ark_library.k8s.sas_kubectl import Kubectl

# command line options
_DATA_FILE_OPT_SHORT_ = "d"
Expand Down
8 changes: 4 additions & 4 deletions deployment_report/model/test/test_viya_deployment_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from deployment_report.model.static.viya_deployment_report_ingress_controller import \
ViyaDeploymentReportIngressController as ExpectedIngressController

from viya_arkcd_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError
from viya_arkcd_library.k8s.sas_k8s_objects import KubernetesResource
from viya_arkcd_library.k8s.test_impl.sas_kubectl_test import KubectlTest
from viya_ark_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError
from viya_ark_library.k8s.sas_k8s_objects import KubernetesResource
from viya_ark_library.k8s.test_impl.sas_kubectl_test import KubectlTest


####################################################################
Expand Down Expand Up @@ -147,7 +147,7 @@ def test_get_api_versions(report: ViyaDeploymentReport) -> None:
"""
# get the static api-versions list
test_data_file: Text = os.path.join(os.path.dirname(os.path.abspath(__file__)),
f"..{os.sep}..{os.sep}..{os.sep}viya_arkcd_library{os.sep}k8s{os.sep}test_impl"
f"..{os.sep}..{os.sep}..{os.sep}viya_ark_library{os.sep}k8s{os.sep}test_impl"
f"{os.sep}response_data{os.sep}api_versions.json")
with open(test_data_file, "r") as test_data_file_pointer:
expected_api_versions: List = json.load(test_data_file_pointer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
from deployment_report.model.static.viya_deployment_report_keys import ITEMS_KEY
from deployment_report.model.utils.viya_deployment_report_utils import ViyaDeploymentReportUtils

from viya_arkcd_library.k8s.sas_k8s_objects import KubernetesApiResources, KubernetesResource
from viya_arkcd_library.k8s.test_impl.sas_kubectl_test import KubectlTest
from viya_ark_library.k8s.sas_k8s_objects import KubernetesApiResources, KubernetesResource
from viya_ark_library.k8s.test_impl.sas_kubectl_test import KubectlTest

# alias to KubectlTest.Values to shorten name
TestVals: KubectlTest.Values = KubectlTest.Values()
Expand Down
4 changes: 2 additions & 2 deletions deployment_report/model/utils/viya_deployment_report_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
from deployment_report.model.static.viya_deployment_report_ingress_controller \
import ViyaDeploymentReportIngressController
from deployment_report.model.static.viya_deployment_report_keys import ViyaDeploymentReportKeys as Keys
from viya_arkcd_library.k8s.sas_k8s_objects import KubernetesApiResources, KubernetesResource
from viya_arkcd_library.k8s.sas_kubectl_interface import KubectlInterface
from viya_ark_library.k8s.sas_k8s_objects import KubernetesApiResources, KubernetesResource
from viya_ark_library.k8s.sas_kubectl_interface import KubectlInterface


class ViyaDeploymentReportUtils(object):
Expand Down
8 changes: 4 additions & 4 deletions deployment_report/model/viya_deployment_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
ViyaDeploymentReportIngressController as IngressController
from deployment_report.model.utils.viya_deployment_report_utils import ViyaDeploymentReportUtils

from viya_arkcd_library.jinja2.sas_jinja2 import Jinja2TemplateRenderer
from viya_arkcd_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError
from viya_arkcd_library.k8s.sas_k8s_objects import \
from viya_ark_library.jinja2.sas_jinja2 import Jinja2TemplateRenderer
from viya_ark_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError
from viya_ark_library.k8s.sas_k8s_objects import \
KubernetesApiResources, KubernetesObjectJSONEncoder, KubernetesResource
from viya_arkcd_library.k8s.sas_kubectl_interface import KubectlInterface
from viya_ark_library.k8s.sas_kubectl_interface import KubectlInterface

# templates for string-formatted timestamp values #
_READABLE_TIMESTAMP_TMPL_ = "%A, %B %d, %Y %I:%M%p"
Expand Down
2 changes: 1 addition & 1 deletion deployment_report/templates/viya_deployment_report.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{# ----------------------------------------------------------- #}

{# Viya Deployment Report Template #}
{% extends "viya_arkcd_report_base.html.j2" %}
{% extends "viya_ark_report_base.html.j2" %}


{# GLOBAL MACRO DEFINITIONS #}
Expand Down
18 changes: 9 additions & 9 deletions download_pod_logs/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SAS Viya Pod Log Download Tool
# SAS Viya Log Download Tool

The SAS Viya pod log download tool collects recent log activity for some or all SAS component pods deployed
The SAS Viya log download tool collects recent log activity for some or all SAS component pods deployed
in a Kubernetes cluster. The collected logs are written to disk for easy access. Log files are prepended with the status
information available for the pod when the tool is executed.
information available for the pod container when the tool is executed.

## Prerequisites

Expand All @@ -11,7 +11,7 @@ information available for the pod when the tool is executed.

### Required Python Packages

SAS Viya ARKcd tools require that third-party packages be installed before use. You can install all the required packages by using the provided requirements.txt file in the following command:
SAS Viya ARK tools require that third-party packages be installed before use. You can install all the required packages by using the provided requirements.txt file in the following command:

```commandline
$ python3 -m pip install -r requirements.txt
Expand All @@ -33,7 +33,7 @@ Viya deployment should be specified by including the `-n` or `--namespace` optio
deployment.

```commandline
$ python3 viya-arkcd.py download-pod-logs --namespace sas
$ python3 viya-ark.py download-pod-logs --namespace sas
```

### Controlling Log Size
Expand All @@ -45,7 +45,7 @@ The following example limits the returned log lines to 1000.
deployment.

```commandline
$ python3 viya-arkcd.py download-pod-logs --namespace sas --tail 1000
$ python3 viya-ark.py download-pod-logs --namespace sas --tail 1000
```

### Selecting SAS Component Pods
Expand All @@ -60,7 +60,7 @@ The following example returns logs from the sas-visual-analytics-app and sas-con
deployment.

```commandline
$ python3 viya-arkcd.py download-pod-logs --namespace sas --tail 100 sas-visual-analytics-app sas-consul-server
$ python3 viya-ark.py download-pod-logs --namespace sas --tail 100 sas-visual-analytics-app sas-consul-server
```

### Redirecting Output
Expand All @@ -73,13 +73,13 @@ timestamped directory inside of the `output-dir` location to allow for multiple
deployment.

```commandline
$ python3 viya-arkcd.py download-pod-logs -n sas --output-dir="/path/to/report/"
$ python3 viya-ark.py download-pod-logs -n sas --output-dir="/path/to/report/"
```

### Help with the Command

The `-h` or `--help` option can be used to view usage information and list all options available for this tool.

```commandline
$ python3 viya-arkcd.py download-pod-logs --help
$ python3 viya-ark.py download-pod-logs --help
```
10 changes: 5 additions & 5 deletions download_pod_logs/download_pod_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
from argparse import ArgumentParser
from typing import List, Text

from viya_arkcd_library.command import Command
from viya_arkcd_library.lrp_indicator import LRPIndicator
from viya_arkcd_library.k8s.sas_kubectl import Kubectl
from viya_arkcd_library.k8s.sas_k8s_errors import NamespaceNotFoundError
from viya_ark_library.command import Command
from viya_ark_library.lrp_indicator import LRPIndicator
from viya_ark_library.k8s.sas_kubectl import Kubectl
from viya_ark_library.k8s.sas_k8s_errors import NamespaceNotFoundError

from download_pod_logs.model import NoMatchingPodsError, NoPodsError, PodLogDownloader

Expand Down Expand Up @@ -71,7 +71,7 @@ def main(argv: List):
:param argv: The parameters passed to the script at execution.
"""
# configure ArgumentParser
arg_parser = ArgumentParser(prog=f"viya-arkcd.py {DownloadPodLogsCommand.command_name()}",
arg_parser = ArgumentParser(prog=f"viya-ark.py {DownloadPodLogsCommand.command_name()}",
description=DownloadPodLogsCommand.command_desc())

# add optional arguments
Expand Down
8 changes: 4 additions & 4 deletions download_pod_logs/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
from subprocess import CalledProcessError
from typing import Any, Dict, List, Optional, Text, Tuple

from viya_arkcd_library.k8s.sas_kubectl_interface import KubectlInterface
from viya_arkcd_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError
from viya_arkcd_library.k8s.sas_k8s_objects import KubernetesResource
from viya_arkcd_library.structured_logging.parser import SASStructuredLoggingParser
from viya_ark_library.k8s.sas_kubectl_interface import KubectlInterface
from viya_ark_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError
from viya_ark_library.k8s.sas_k8s_objects import KubernetesResource
from viya_ark_library.structured_logging.parser import SASStructuredLoggingParser


####################################################################
Expand Down
6 changes: 3 additions & 3 deletions download_pod_logs/test/data/expected_usage_output.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
usage: viya-arkcd.py download-pod-logs [-h] [-n NAMESPACE] [-o OUTPUT_DIR]
[-p PROCESSES] [-t TAIL] [-w WAIT]
[selected_components [selected_components ...]]
usage: viya-ark.py download-pod-logs [-h] [-n NAMESPACE] [-o OUTPUT_DIR]
[-p PROCESSES] [-t TAIL] [-w WAIT]
[selected_components [selected_components ...]]

Download log files for all or a select list of pods.

Expand Down
6 changes: 3 additions & 3 deletions download_pod_logs/test/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
from download_pod_logs.model import PodLogDownloader, NoPodsError, NoMatchingPodsError, _ContainerStatus, \
_LogDownloadProcess

from viya_arkcd_library.k8s.sas_kubectl_interface import KubectlInterface
from viya_arkcd_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError
from viya_arkcd_library.k8s.test_impl.sas_kubectl_test import KubectlTest
from viya_ark_library.k8s.sas_kubectl_interface import KubectlInterface
from viya_ark_library.k8s.sas_k8s_errors import KubectlRequestForbiddenError
from viya_ark_library.k8s.test_impl.sas_kubectl_test import KubectlTest


####################################################################
Expand Down
Loading

0 comments on commit 5586f18

Please sign in to comment.