Spaces:
Sleeping
Sleeping
Commit
·
ad8da65
1
Parent(s):
aa6591a
Upload 184 files
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- files/.DS_Store +0 -0
- files/arthur-docs-markdown/.DS_Store +0 -0
- files/arthur-docs-markdown/api/.DS_Store +0 -0
- files/arthur-docs-markdown/api/openapi_v3.md.txt +0 -0
- files/arthur-docs-markdown/index.rst.txt +75 -0
- files/arthur-docs-markdown/internal/how-to-images.md.txt +19 -0
- files/arthur-docs-markdown/more-info/FAQs.md.txt +88 -0
- files/arthur-docs-markdown/more-info/algorithms.md.txt +171 -0
- files/arthur-docs-markdown/more-info/glossary.md.txt +599 -0
- files/arthur-docs-markdown/more-info/index.md.txt +26 -0
- files/arthur-docs-markdown/not-found.rst.txt +6 -0
- files/arthur-docs-markdown/platform-management/.DS_Store +0 -0
- files/arthur-docs-markdown/platform-management/access-control-overview/index.md.txt +43 -0
- files/arthur-docs-markdown/platform-management/access-control-overview/sso-access-control/custom_rbac.md.txt +133 -0
- files/arthur-docs-markdown/platform-management/access-control-overview/sso-access-control/index.md.txt +322 -0
- files/arthur-docs-markdown/platform-management/access-control-overview/sso-access-control/setting_up_oidc_idp.md.txt +555 -0
- files/arthur-docs-markdown/platform-management/access-control-overview/sso-access-control/setting_up_saml_idp.md.txt +479 -0
- files/arthur-docs-markdown/platform-management/access-control-overview/standard_access_control.md.txt +76 -0
- files/arthur-docs-markdown/platform-management/access-control/authenticating_with_multiple_organizations.md.txt +3 -0
- files/arthur-docs-markdown/platform-management/access-control/authentication.md.txt +3 -0
- files/arthur-docs-markdown/platform-management/access-control/authorization_custom.md.txt +3 -0
- files/arthur-docs-markdown/platform-management/access-control/authorization_standard.md.txt +3 -0
- files/arthur-docs-markdown/platform-management/access-control/index.md.txt +19 -0
- files/arthur-docs-markdown/platform-management/index.md.txt +33 -0
- files/arthur-docs-markdown/platform-management/installation/.DS_Store +0 -0
- files/arthur-docs-markdown/platform-management/installation/externalize_postgres.md.txt +38 -0
- files/arthur-docs-markdown/platform-management/installation/high_availability.md.txt +54 -0
- files/arthur-docs-markdown/platform-management/installation/index.md.txt +34 -0
- files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/index.md.txt +31 -0
- files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/k8s_install_airgapped.md.txt +166 -0
- files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/k8s_install_airgapped_cli.md.txt +35 -0
- files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/k8s_install_namespace_scoped.md.txt +71 -0
- files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/k8s_install_online.md.txt +59 -0
- files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/kubernetes-preparation/index.md.txt +19 -0
- files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/kubernetes-preparation/k8s_install_prep.md.txt +135 -0
- files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/kubernetes-preparation/k8s_install_prep_aws.md.txt +126 -0
- files/arthur-docs-markdown/platform-management/installation/platform_readiness_faq.md.txt +96 -0
- files/arthur-docs-markdown/platform-management/installation/requirements.md.txt +84 -0
- files/arthur-docs-markdown/platform-management/installation/vm-installation/index.md.txt +21 -0
- files/arthur-docs-markdown/platform-management/installation/vm-installation/vm_install_airgapped.md.txt +49 -0
- files/arthur-docs-markdown/platform-management/installation/vm-installation/vm_install_airgapped_cli.md.txt +24 -0
- files/arthur-docs-markdown/platform-management/installation/vm-installation/vm_install_online.md.txt +41 -0
- files/arthur-docs-markdown/platform-management/ongoing-maintenance/audit_log.md.txt +112 -0
- files/arthur-docs-markdown/platform-management/ongoing-maintenance/backup.md.txt +845 -0
- files/arthur-docs-markdown/platform-management/ongoing-maintenance/index.md.txt +31 -0
- files/arthur-docs-markdown/platform-management/ongoing-maintenance/organizations_and_users.md.txt +182 -0
- files/arthur-docs-markdown/platform-management/ongoing-maintenance/post_install.md.txt +33 -0
- files/arthur-docs-markdown/platform-management/ongoing-maintenance/upgrade.md.txt +8 -0
- files/arthur-docs-markdown/platform-management/reference/config_dump.md.txt +11 -0
- files/arthur-docs-markdown/platform-management/reference/config_template.md.txt +371 -0
files/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
files/arthur-docs-markdown/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
files/arthur-docs-markdown/api/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
files/arthur-docs-markdown/api/openapi_v3.md.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
files/arthur-docs-markdown/index.rst.txt
ADDED
@@ -0,0 +1,75 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Arthur Docs Home
|
2 |
+
===========================================================
|
3 |
+
|
4 |
+
`Arthur <https://arthur.ai>`_ is the platform for centralized monitoring of production models.
|
5 |
+
We help data scientists, product owners, and business leaders accelerate model operations to optimize for accuracy,
|
6 |
+
explainability, and fairness. As a model- and infrastructure-agnostic platform,
|
7 |
+
Arthur adds a layer of intelligence to your AI stack and scales with your deployments.
|
8 |
+
|
9 |
+
This documentation website is meant to help new users get started with Arthur, and to provide helpful
|
10 |
+
guides to existing users so they can get the most out of their production models with Arthur.
|
11 |
+
|
12 |
+
For complete references for the Arthur API or the Python SDK, see our :doc:`API & SDK References <api-references>`.
|
13 |
+
|
14 |
+
.. container:: nav-card
|
15 |
+
|
16 |
+
:doc:`Quickstart <user-guide/arthur_quickstart>`
|
17 |
+
|
18 |
+
.. container:: nav-card
|
19 |
+
|
20 |
+
:doc:`User Guide <user-guide/index>`
|
21 |
+
|
22 |
+
.. container:: nav-card
|
23 |
+
|
24 |
+
:doc:`Platform Management <platform-management/index>`
|
25 |
+
|
26 |
+
.. container:: nav-card
|
27 |
+
|
28 |
+
:doc:`API & SDK References <api-references>`
|
29 |
+
|
30 |
+
*****
|
31 |
+
|
32 |
+
========
|
33 |
+
Contents
|
34 |
+
========
|
35 |
+
|
36 |
+
|
37 |
+
:doc:`Arthur User Guide <user-guide/index>`
|
38 |
+
***********************************************************
|
39 |
+
|
40 |
+
The Arthur User Guide contains everything you need to know to use the Arthur platform. If you're an Arthur end user,
|
41 |
+
start here.
|
42 |
+
|
43 |
+
:doc:`Platform Management <platform-management/index>`
|
44 |
+
***********************************************************
|
45 |
+
|
46 |
+
The Platform Management section contains information for Arthur product and infrastructure administrators, with guides
|
47 |
+
for on-prem deployments and organization management.
|
48 |
+
|
49 |
+
:doc:`More Information <more-info/index>`
|
50 |
+
***********************************************************
|
51 |
+
|
52 |
+
Additional details about algorithms used in the Arthur platform, frequently asked questions, and a glossary of Arthur
|
53 |
+
terms.
|
54 |
+
|
55 |
+
.. _API and SDK References:
|
56 |
+
|
57 |
+
:doc:`API & SDK References <api-references>`
|
58 |
+
***********************************************************
|
59 |
+
See our `Arthur REST API Reference <https://docs.arthur.ai/api-documentation/v3-api-docs.html>`_ for a complete
|
60 |
+
outline of the endpoints available in the Arthur API.
|
61 |
+
|
62 |
+
See our `Arthur Python SDK Reference <https://docs.arthur.ai/sdk/sdk_v3/index.html>`_ for a complete outline of the
|
63 |
+
functions available in the Arthur Python SDK.
|
64 |
+
|
65 |
+
.. toctree::
|
66 |
+
:hidden:
|
67 |
+
:maxdepth: 2
|
68 |
+
|
69 |
+
self
|
70 |
+
user-guide/index
|
71 |
+
platform-management/index
|
72 |
+
more-info/index
|
73 |
+
api-references
|
74 |
+
Example Projects <https://github.com/arthur-ai/arthur-sandbox>
|
75 |
+
|
files/arthur-docs-markdown/internal/how-to-images.md.txt
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
orphan: true
|
3 |
+
---
|
4 |
+
|
5 |
+
# Markdown Syntax
|
6 |
+
|
7 |
+
All image use the same syntax regarding of the file extension. The structure is `[alt text][image path]`
|
8 |
+
|
9 |
+
## Jpg
|
10 |
+

|
11 |
+
|
12 |
+
## Gif
|
13 |
+

|
14 |
+
|
15 |
+
# HTML syntax
|
16 |
+
|
17 |
+
We can also use regular HTML image tags if we want to add styling to our image.
|
18 |
+
|
19 |
+
<img src="https://uploads-ssl.webflow.com/5a749d2c4f343700013366d4/607481fec86baf2a8cb273d8_monitor.gif" alt="Alt text in case source link is broken" style="height: 200px; width: 200px; object-fit: contain" />
|
files/arthur-docs-markdown/more-info/FAQs.md.txt
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# FAQs
|
2 |
+
|
3 |
+
**1. Can I use Arthur without using the Python SDK?**
|
4 |
+
|
5 |
+
Yes! The Arthur platform is API-first. You can use our
|
6 |
+
[REST API](https://docs.arthur.ai/api-documentation/v3-api-docs.html) to onboard models,
|
7 |
+
send predictions, and query metrics and insights.
|
8 |
+
***
|
9 |
+
|
10 |
+
**2. Does Arthur need a copy of my model?**
|
11 |
+
|
12 |
+
Arthur doesn’t generally need access to your actual model, but only captures the inputs to the model
|
13 |
+
and predictions it makes. This means that you can even use Arthur to monitor models you have no access to,
|
14 |
+
such as models hosted by third-party services.
|
15 |
+
|
16 |
+
In order to enable explainability, Arthur _does_ need access to your model.
|
17 |
+
When {ref}`enabling this feature <enrichments_explainability>`,
|
18 |
+
you will need to provide access to the model's `predict` function.
|
19 |
+
***
|
20 |
+
|
21 |
+
**3. What if my data is proprietary? Can I still use Arthur?**
|
22 |
+
|
23 |
+
Yes! Arthur offers on-premises installation for customers with data security requirements. By integrating Arthur
|
24 |
+
into your business's on-premises stack, you can be confident that all security requirements are met while still
|
25 |
+
getting the benefits of the computation and analytics Arthur provides.
|
26 |
+
***
|
27 |
+
|
28 |
+
**4. What if I don’t have ground truth labels for my data? Or what if I will have the ground truth labels in the future,
|
29 |
+
but they are not available yet?**
|
30 |
+
|
31 |
+
You don't need ground truth labels to log your model's inferences with Arthur.
|
32 |
+
|
33 |
+
If your ground truth labels become available after your model's inferences, whether seconds later or years later,
|
34 |
+
Arthur can link these new ground truth values to your model's past predictions, linking the new values by ID to
|
35 |
+
their corresponding inferences already in the Arthur system.
|
36 |
+
|
37 |
+
In the meantime, Arthur’s data drift metrics can offer leading indicators of model underperformance to keep you
|
38 |
+
covered if your ground truth labels are delayed or never become available.
|
39 |
+
***
|
40 |
+
|
41 |
+
**5. I got an error using the SDK. What do I do?**
|
42 |
+
|
43 |
+
If the error message says "an internal exception occurred, please report to Arthur" that means there was a problem
|
44 |
+
on our side. Please email the Arthur support team at `support@arthur.ai` to let us know what happened.
|
45 |
+
|
46 |
+
Otherwise, the error message should provide helpful instructions for how to resolve the issue. If you don’t find
|
47 |
+
the error message actionable, please let Arthur know so that we can improve it.
|
48 |
+
***
|
49 |
+
|
50 |
+
**6. Do I have to type my credentials in every time I use the SDK?**
|
51 |
+
|
52 |
+
No! Instead of manually entering them you can specify an `ARTHUR_ENDPOINT_URL` and `ARTHUR_API_KEY`
|
53 |
+
environment variable to be used to create the ArthurAI connection object.
|
54 |
+
***
|
55 |
+
|
56 |
+
**7. What are streaming and batch models?**
|
57 |
+
|
58 |
+
{ref}`Streaming and batch models <basic_concepts_streaming_vs_batch>` are two model types with different
|
59 |
+
patterns of ingesting data to send to Arthur.
|
60 |
+
|
61 |
+
A streaming model processes data as a stream of individual inferences: data is logged with Arthur directly as
|
62 |
+
individual inferences when the data flows into the model.
|
63 |
+
|
64 |
+
A batch model processes data as a sequence of grouped inferences, which are usually grouped over time: data is
|
65 |
+
logged with Arthur as a group of inferences as the model processes the batch.
|
66 |
+
***
|
67 |
+
|
68 |
+
**8. Which drift metric should I use?**
|
69 |
+
|
70 |
+
Population stability index (PSI) is typically a good default drift metric to use.
|
71 |
+
|
72 |
+
There are some cases where one wants a drift metric with a certain property, e.g. using a drift metric with the unit
|
73 |
+
nats for interpretability, or using a drift metric bounded between 0 and 1 so that drift values don't increase
|
74 |
+
arbitrarily for outliers. In these cases, other metrics may be preferable to PSI.
|
75 |
+
|
76 |
+
For a review of the data drift metrics Arthur offers and their properties, see the
|
77 |
+
{ref}`data drift section of our glossary <glossary_data_drift>`. Furthermore, see
|
78 |
+
[our blog post](https://www.arthur.ai/blog/automating-data-drift-thresholding-in-machine-learning-systems) for an
|
79 |
+
overview of data how Arthur automates the choice of thresholding for drift metrics.
|
80 |
+
|
81 |
+
**9. Do I need to configure my attribute ranges in order to onboard my model?**
|
82 |
+
|
83 |
+
No - none of Arthur's model performance metrics or monitoring capabilities are impacted by the `range` property of an
|
84 |
+
attribute. So, if you observe the attribute looks off when you are reviewing your model during onboarding, you should feel fine
|
85 |
+
going ahead and saving your model to the platform.
|
86 |
+
|
87 |
+
The `range` property of an attribute - the min/max values of numerical attributes - is only a measurement taken by
|
88 |
+
Arthur for making decisions on how to format plots in the online dashboard.
|
files/arthur-docs-markdown/more-info/algorithms.md.txt
ADDED
@@ -0,0 +1,171 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Arthur Algorithms
|
2 |
+
|
3 |
+
(arthur_algorithms_anomaly_detection)=
|
4 |
+
## Anomaly Detection
|
5 |
+
|
6 |
+
For an explanation of how to enable Anomaly Detection with Arthur, please see the {ref}`enrichments guide <enrichments_anomaly_detection>`.
|
7 |
+
|
8 |
+
Anomaly scores are computed by training a model on the reference set you provide to Arthur, and using that model to assign
|
9 |
+
an Anomaly Score to each inference you send to Arthur. Scores of 0.5 are given to "typical" examples from your reference
|
10 |
+
set, while higher scores are given to more anomalous inferences and lower scores are given to instances that the model
|
11 |
+
judges as similar to the reference data with high confidence.
|
12 |
+
|
13 |
+
### How Anomaly Detection Works
|
14 |
+
We calculate Anomaly Scores with an Isolation Forest algorithm. This algorithm works by building what is essentially a density model of the data by iteratively isolating data points from one another. Because anomalies tend to be farther away from other points and occur less frequently, they are easier to isolate from other points, so we can use a data point's "ease of isolation" to describe its anomaly. The method is based on the paper linked [here](https://cs.nju.edu.cn/zhouzh/zhouzh.files/publication/icdm08b.pdf?q=isolation-forest).
|
15 |
+
|
16 |
+
The Isolation Forest "method takes advantage of two [quantitative properties of anomalies]:
|
17 |
+
i) they are the minority consisting of fewer instances and
|
18 |
+
ii) they have attribute-values that are very different from those of normal instances.
|
19 |
+
In other words, anomalies are 'few and different', which make them more susceptible to isolation than normal points."
|
20 |
+
|
21 |
+
The idea is to build a binary tree which randomly segments the data until each instance can be uniquely selected (or a maximum height is reached). Anomalous instances will take fewer steps to become isolated on the tree, because of the properties mentioned above.
|
22 |
+
|
23 |
+

|
24 |
+
|
25 |
+
In the example above, we can see that the in-distribution $x_i$ takes many more steps to reach than the out-of-distribution $x_0$
|
26 |
+
|
27 |
+
Of course using a single randomly generated tree would be noisy. So we train multiple trees to construct an Isolation Forest of multiple trees and use the average path length, noting that average path lengths converge:
|
28 |
+
|
29 |
+

|
30 |
+
|
31 |
+
The Isolation Forest algorithm is highly efficient compared to other density estimation techniques because the individual trees can be built from samples of the data without losing performance.
|
32 |
+
|
33 |
+
When you add a reference set to your model in Arthur, we fit an Isolation Forest model to that data, so that we can compute an anomaly score for the inferences your model receives.
|
34 |
+
|
35 |
+
### Generating Anomaly Scores
|
36 |
+
|
37 |
+
The path length, or number of steps taken to reach the partition that a data point belongs to, varies between $0$ and $n-1$ where $n$ is the number of datapoints in the training set. Following our intuition above, the shorter the path length, the more anomalous a point is. In order to measure anomaly, an anomaly score between $0$ and $1$ is generated by normalizing the path length by the average path length and applying an inverse logarithmic scale.
|
38 |
+
|
39 |
+
In particular, anomaly score $s(x,n) = 2^{-\frac{E(h(x))}{c(n)}}$, where $E(h(x))$ is the average path length to datapoint $x$from a collection of isolation trees and $c(n)$ is the average path length given the number of datapoints in the dataset $n$.
|
40 |
+
|
41 |
+
Every inference you send to Arthur will be evaluated against the trained Isolation Forest model and given an anomaly score.
|
42 |
+
|
43 |
+
This can be seen in the anomaly score contour of 64 normally distributed points:
|
44 |
+
|
45 |
+

|
46 |
+
|
47 |
+
At Arthur, we also visualize the distribution of anomaly scores among all of the inferences your model has retrieved since training. When you select an inference in our UI you'll see where it falls on this distribution:
|
48 |
+
|
49 |
+

|
50 |
+
|
51 |
+
### Interpreting Anomaly Scores
|
52 |
+
|
53 |
+
The resulting anomaly scores can be interpreted in the following way:
|
54 |
+
- if instances return $s$ very close to $1$, then they are definitely anomalies
|
55 |
+
- if instances have $s$ smaller than $0.5$, then they are quite safe to be regarded as normal instances
|
56 |
+
- if all the instances return $s \approx 0.5$, then the entire sample does not really have any distinct anomaly
|
57 |
+
|
58 |
+
-----------
|
59 |
+
(arthur_algorithms_bias_mitigation)=
|
60 |
+
## Bias Mitigation
|
61 |
+
|
62 |
+
If you are interested in mitigation capabilities, we're happy to have a conversation about your needs and what approaches would work best for you.
|
63 |
+
Within the Arthur product, we offer postprocessing methods; we do encourage exploration of alternate (pre- or in- processsing) methods if your data science team has the bandwidth to do so.
|
64 |
+
|
65 |
+
We currently have one postprocessing method available for use in the product: the Threshold Mitigator.
|
66 |
+
|
67 |
+
### Threshold Mitigator
|
68 |
+
This algorithm is an extension of the Threshold Optimizer implemented in the `fairlearn` library, which in turn is based on Moritz Hardt's 2016 paper introducing the method.
|
69 |
+
|
70 |
+
The intuition behind this algorithm is based on the idea that if the underlying black-box is biased, then different groups have different predicted probability distributions — let's call the original predicted probability for some example $x$ the score $s_x$. Then, for a *fixed threshold* $t$, $P(s_x > t | x \in A) > P(s_x > t | x \in B)$, where $B$ indicates membership in the disadvantaged group. For example, the default threshold is $t = 0.5$, where we predict $\hat Y = 1$ if $s > 0.5$.
|
71 |
+
|
72 |
+
However, we might be able to **mitigate bias in the predictions by choosing group-specific thresholds for the decision rule.**
|
73 |
+
|
74 |
+
So, this algorithm generally proceeds as follows:
|
75 |
+
|
76 |
+
- Try every possible threshold $t$ from 0 to 1, where for any $x$, we predict $\hat Y = 1$ if and only if $s_x > t$.
|
77 |
+
- At each of those thresholds, calculate the group-specific positivity, true positive, and false positive rates.
|
78 |
+
|
79 |
+
Let's say we're trying to satisfy demographic parity. We want the group-wise *positivity rates* to be equal — $P(\hat Y = 1 | A) = P(\hat Y = 1 | B)$. Then, for any given *positivity rate*, the threshold $t_a$ that achieves this positivity rate might be different from the threshold $t_b$ that achieves this positivity rate. 12*
|
80 |
+
|
81 |
+
This also hints at why we need the notion of *tradeoff curves*, rather than a single static threshold: if we want to achieve a positivity rate of $0.3$, we'll need different $t_a, t_b$ than if we wanted to achieve a positivity rate of $0.4$.
|
82 |
+
|
83 |
+
Then, once we've generated the curves, we pick a specific *point on the curve*, such as positivity rate of $0.3$. When making predictions on future and use the corresponding $t_a, t_b$ to make predictions
|
84 |
+
|
85 |
+
#### What's Compatible?
|
86 |
+
|
87 |
+
**Fairness constraints:** We can generate curves satisfying each of the following constraints (fairness metrics):
|
88 |
+
|
89 |
+
- Demographic Parity (equal positivity rate)
|
90 |
+
- Equal Opportunity (equal true positive rate)
|
91 |
+
- Equalized Odds (equal TPR and FPR)
|
92 |
+
|
93 |
+
**Sensitive attributes:** This algorithm can handle sensitive attributes that take on any number of discrete values (i.e. is not limited to binary sensitive attributes). For continuous sensitive attributes, we can specify buckets for the continuous values, then treat them like categorical attributes.
|
94 |
+
|
95 |
+
#### The tradeoff curve
|
96 |
+
|
97 |
+
**Generating the Curve**
|
98 |
+
|
99 |
+
- Each *group* has its own curve.
|
100 |
+
- To generate a single curve, we generate all possible thresholds (i.e. `[0, 0.001, 0.002, 0.003, ..., 0.999, 1.00]`) — default 1000 total thresholds; as described above, for each of those thresholds, we calculate many common fairness metrics for the result *if* we were to use that threshold to determine predictions.
|
101 |
+
|
102 |
+
**Visualizing the Curve**
|
103 |
+
|
104 |
+
Depending on the fairness constraint we're trying to satisfy, the tradeoff curve will look different.
|
105 |
+
For equal opportunity and demographic parity, where there is a *single* quantity that must be equalized across the two groups, the tradeoff curve plots the quantity to equalize on the x-axis, and accuracy on the y-axis.
|
106 |
+
|
107 |
+
<!--  -->
|
108 |
+
|
109 |
+
**Understanding the Curve Artifact**
|
110 |
+
|
111 |
+
The curve artifact can be pulled down according to our docs [here](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/bias-mitigation). This mitigation approach is somewhat constrained in the sense that we will generate a separate set of curves *for each sensitive attribute to mitigate on; for each constraint to follow.* Then, each *set* of curves entails a single curve for each sensitive attribute *value*.
|
112 |
+
|
113 |
+
- Conceptually, the curves are organized something like the below; in the API, however, you'll be getting a single `< list of (x, y) coordinate pairs that define the curve >` at a time, with additional information about the attribute being mitigated; the constraint being targeted; and the feature value the specific list of pairs is for.
|
114 |
+
|
115 |
+
```
|
116 |
+
**mitigating on gender -- demographic parity**
|
117 |
+
gender == male
|
118 |
+
< list of (x, y) coordinate pairs that define the curve >
|
119 |
+
gender == female
|
120 |
+
< list of (x, y) coordinate pairs that define the curve >
|
121 |
+
gender == nb
|
122 |
+
< list of (x, y) coordinate pairs that define the curve >
|
123 |
+
|
124 |
+
**mitigating on gender -- equalized odds**
|
125 |
+
gender == male
|
126 |
+
< list of (x, y) coordinate pairs that define the curve >
|
127 |
+
gender == female
|
128 |
+
< list of (x, y) coordinate pairs that define the curve >
|
129 |
+
gender == nb
|
130 |
+
< list of (x, y) coordinate pairs that define the curve >
|
131 |
+
|
132 |
+
**mitigating on age -- demographic parity**
|
133 |
+
age < 35
|
134 |
+
< list of (x, y) coordinate pairs that define the curve >
|
135 |
+
age >= 35
|
136 |
+
< list of (x, y) coordinate pairs that define the curve >
|
137 |
+
```
|
138 |
+
|
139 |
+
**Summary of Curves by Constraint**
|
140 |
+
|
141 |
+
- Equal opportunity (equal TPR): TPR vs accuracy; accuracy-maximizing solution is the point along the x-axis with the highest accuracy (y-axis) for both groups.
|
142 |
+
- Demographic parity (equal selection rates): selection rate vs accuracy; accuracy-maximizing solution is the point along the x-axis with the highest accuracy (y-axis) for both groups.
|
143 |
+
- Equalized odds (equal TPR *and* FPR): FPR vs TPR (canonical ROC curve); accuracy-maximizing solution is the point on the curves that are closest to the top left corner of the graph (i.e. low FPR and high TPR).
|
144 |
+
|
145 |
+
#### Choosing a Set of Thresholds (Point on Curve)
|
146 |
+
|
147 |
+
As mentioned above, a single "point" on the solution curve for a given constraint and sensitive attribute corresponds to several thresholds mapping feature value to threshold. But how do we choose which point on the curve to use?
|
148 |
+
|
149 |
+
The default behavior — and, in fact, the default in fairlearn — is to automatically choose the accuracy-maximizing thresholds subject to a particular fairness constraint. This might work in most cases; however, accuracy is not necessarily the only benchmark that an end-user will care about. One client, for example, needs to satisfy a particular positivity rate, and is fine with sacrificing accuracy to do so. What our feature introduces that goes beyond what's available in fairlearn is the ability to try different thresholds; see what hypothetical predictions would be; and see what hypothetical results/metrics (eg positivity rate, TPR, etc) would look like *if* a certain set of thresholds was applied. Ultimate choice of thresholds is up to data scientists' needs, etc.
|
150 |
+
|
151 |
+
---------
|
152 |
+
(arthur_algorithms_hotspots)=
|
153 |
+
## Hotspots
|
154 |
+
|
155 |
+
|
156 |
+
For an explanation of how to enable Hotspots with Arthur, please see the {ref}`enrichments guide <enrichments_hotspots>`.
|
157 |
+
|
158 |
+
We might have a ML model deployed in production and some monitoring in place. We might notice that performance is degrading from classic performance metrics or from drift monitoring combined with explainability techniques. We’ve identified that our model is failing, and the next step is to identify why our model is failing.
|
159 |
+
|
160 |
+
This process would involve slicing and dicing our input data that caused model degradation. That is, we want to see which particular input regions are associated with poor performance and work on a solution from there, such as finding pipeline breaks or retraining our models on those regions.
|
161 |
+
|
162 |
+
This basically boils down to a time-consuming task of finding needles in a haystack. What if we could reverse engineer the process and surface all of the needles, i.e. input regions associated with poor performance, directly to the user?
|
163 |
+
|
164 |
+
We can with Hotspots!
|
165 |
+
|
166 |
+
### How Hotspots Works
|
167 |
+
The outputs of a model are encoded as a special classification task to partition data to separate out the poor performing datapoints from the correct predictions/classifications, on a per batch basis for batch models or on a per 7-day window for streaming models.
|
168 |
+
|
169 |
+
Hotspot enrichments are used to surface input regions where the model is currently under performing on for inferences. Hotspots are extracted from a custom Arthur tree model, where nodes are associated with particular input regions and have associated performance metrics, e.g. a node with 70% accuracy that has datapoints where variable X is less than 1000. Nodes are candidates for hotspots. Depending on user-specified thresholds, e.g. a threshold of 71% accuracy, the tree is traversed until all nodes with less than 71%, such as our node with 70% accuracy, have been identified and returned to the user as hotspots, not including the hotspot nodes' children, which would be either (1) more pure than the hotspot node and therefore in further violation of the e.g. 71% threshold or (2) pure nodes with correct inferences, which are not of interest to the user for remediation purposes.
|
170 |
+
|
171 |
+
For a more in depth overview, see our blog post [here](https://www.arthur.ai/blog/hotspots-automating-underperformance-regions-surfacing-in-machine-learning-systems).
|
files/arthur-docs-markdown/more-info/glossary.md.txt
ADDED
@@ -0,0 +1,599 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Glossary
|
2 |
+
|
3 |
+
The following definitions are specific to the Arthur platform, though in most cases are applicable to ML more broadly.
|
4 |
+
|
5 |
+
## Arthur Inference<a name="arthur-inference"></a>
|
6 |
+
Container class for inferences uploaded to the Arthur platform. An inference is composed of input features, prediction values, and (optionally) ground truth values and any Non-Input data.
|
7 |
+
|
8 |
+
Example:
|
9 |
+
```python
|
10 |
+
ground_truth = {
|
11 |
+
"Consumer Credit Score": 652.0
|
12 |
+
}
|
13 |
+
inference = arthur_model.get_inference(external_id)
|
14 |
+
inference.update(ground_truth)
|
15 |
+
```
|
16 |
+
|
17 |
+
Related terms: [inference](#inference-data), [ArthurModel](#arthur-model)
|
18 |
+
|
19 |
+
## Arthur Model<a name="arthur-model"></a>
|
20 |
+
Model object used for sending and retrieving data pertinent to a deployed ML system. The `ArthurModel` object is separate from the underlying model that is trained and which makes predictions; it serves as a wrapper for the underlying model to access Arthur platform functionality.
|
21 |
+
|
22 |
+
An ArthurModel contains at least a `name`, an `InputType` and a `OutputType`.
|
23 |
+
|
24 |
+
Examples:
|
25 |
+
```python
|
26 |
+
arthur_model = connection.model(name="New_Model",
|
27 |
+
input_type=InputType.Tabular,
|
28 |
+
model_type=OutputType.Regression)
|
29 |
+
```
|
30 |
+
|
31 |
+
```python
|
32 |
+
arthur_model = connection.get(model_id)
|
33 |
+
arthur_model.send_inference(...)
|
34 |
+
```
|
35 |
+
|
36 |
+
## Arthur Model Group<a name="arthur-model-group"></a>
|
37 |
+
|
38 |
+
Arthur Model Groups are an organizational construct the Arthur platform uses to track different versions of an Arthur model. Every Arthur Model is a version of one Model Group and a Model Group will always have at least one Arthur Model. The Model Group for an Arthur Model can only be specified during on-boarding, and once the Arthur Model is saved, its group cannot be changed. If an Arthur Model is created without specifying a Model Group, a new Model Group will be created automatically with the new model as its single version. When adding a model to a model group, the model is assigned a unique, incrementing Version Sequence Number (starting at 1) corresponding to the order in which it was added to the model group. Additionally, you can provide a Version Label to store a custom version string label along with the Version Sequence Number.
|
39 |
+
|
40 |
+
Example:
|
41 |
+
|
42 |
+
```python
|
43 |
+
# retrieve the first version of a model
|
44 |
+
arthur_model_v1 = connection.get(model_id)
|
45 |
+
model_group = arthur_model_v1.model_group
|
46 |
+
|
47 |
+
# create the new version of the model
|
48 |
+
arthur_model_v2 = connection.model(name="Model_V2",
|
49 |
+
input_type=InputType.Tabular,
|
50 |
+
model_type=OutputType.Regression)
|
51 |
+
|
52 |
+
# add the new model to the model group
|
53 |
+
model_group.add_version(arthur_model_v2, label="2.0.1")
|
54 |
+
arthur_model_v2.save()
|
55 |
+
```
|
56 |
+
|
57 |
+
Related terms: [Version Label](#version-label), [Version Sequence Number](#version-sequence-number)
|
58 |
+
|
59 |
+
## Attribute<a name="attribute"></a>
|
60 |
+
A variable associated with a model. Can be input, prediction, ground truth or ancillary information (these groupings are known as [Stages](#stage) in the Arthur platform). Can be categorical or continuous.
|
61 |
+
Example:
|
62 |
+
> The attribute `age` is an input to the model, whereas the attribute `creditworthy` is the target for the model.
|
63 |
+
|
64 |
+
Synonyms: variable, {predictor, input}, {ouput, target}, prediction.
|
65 |
+
|
66 |
+
Related terms: [input](#input), [stage](#stage), [prediction](#prediction), [ground truth](#ground-truth)
|
67 |
+
|
68 |
+
|
69 |
+
## Bias<a name="bias"></a>
|
70 |
+
While bias is an overloaded term in stats&ML, we refer specifically to where a model's outcomes have the potential to differentially harm certain subgroups of a population.
|
71 |
+
|
72 |
+
Example:
|
73 |
+
> This credit approval model tends to lead to biased outcomes: men are approved for loans at a rate 50% higher than women are.
|
74 |
+
|
75 |
+
|
76 |
+
Related terms: [bias detection](#bias-detection-a-name-bias-detection-a), [bias mitigation](#bias-mitigation-a-name-bias-mitigation-a), [disparate impact](#disparate-impact-a-name-disparate-impact-a)
|
77 |
+
|
78 |
+
|
79 |
+
## Bias Detection<a name="bias-detection"></a>
|
80 |
+
The detection and quantification of {doc}`algorithmic bias </user-guide/walkthroughs/bias_monitoring>` in an ML system, typically as evaluated on a model's outputs (predictions) across different populations of a sensitive attribute.
|
81 |
+
[Many definitions](http://fairware.cs.umass.edu/papers/Verma.pdf) of algorithmic bias have been proposed, including group fairness and individual fairness defintions.
|
82 |
+
Group fairness definitions are often defined by comparing group-conditional statistics about the model's predictions.
|
83 |
+
In the below definitions, the group membership feature is indicated by $G$ and a particular group membership value is indicated by $g$.
|
84 |
+
|
85 |
+
Example:
|
86 |
+
> Common metrics for group fairness include Demographic Parity, Equalized Odds, and Equality of Opportunity.
|
87 |
+
|
88 |
+
Related terms: [bias mitigation](#bias-mitigation)
|
89 |
+
|
90 |
+
### Demographic Parity
|
91 |
+
|
92 |
+
A fairness metric which compares group-conditional selection rates. The quantity being compared is:
|
93 |
+
|
94 |
+
$$
|
95 |
+
\begin{align*}
|
96 |
+
\mathbb P(\hat Y = 1 | G = g)
|
97 |
+
\end{align*}
|
98 |
+
$$
|
99 |
+
|
100 |
+
There is not necessarily a normative ideal relationship between the selection rates for each group:
|
101 |
+
in some situations, such as the allocation of resources, it may be important to minimize the disparity
|
102 |
+
in selection rates across groups; in others, metrics based on group-conditional accuracy may be more relevant.
|
103 |
+
However, even in the latter case, understanding group-conditional selection rates, especially when
|
104 |
+
compared against the original training data, can be useful contextualization for the model and its task as a whole.
|
105 |
+
|
106 |
+
Related term: [disparate impact](#disparate-impact-a-name-disparate-impact-a)
|
107 |
+
|
108 |
+
### Equal Opportunity
|
109 |
+
|
110 |
+
A fairness metric which compares group-conditional true positive rates. The quantity being compared is:
|
111 |
+
|
112 |
+
$$
|
113 |
+
\begin{align*}
|
114 |
+
\mathbb P(\hat Y = 1 | Y = 1, G = g)
|
115 |
+
\end{align*}
|
116 |
+
$$
|
117 |
+
|
118 |
+
For all groups, a true positive rate closer to 1 is better.
|
119 |
+
|
120 |
+
### Equalized Odds
|
121 |
+
|
122 |
+
A fairness metric which incorporates both group-conditional true positive rates and false positive rates,
|
123 |
+
or, equivalently, true positive rates and true negative rates. There are a variety of implementations (due
|
124 |
+
to the fact that some quadrants of the confusion matrix are complements of one another); here is one possible quantity to compare across groups:
|
125 |
+
|
126 |
+
$$
|
127 |
+
\begin{align*}
|
128 |
+
\mathbb P (\hat Y = 1 | Y = 1, G = g) + \mathbb P(\hat Y = 0 | Y = 0, G = g)
|
129 |
+
\end{align*}
|
130 |
+
$$
|
131 |
+
|
132 |
+
In this implementation, this quantity should be as close to 2 as possible for all groups.
|
133 |
+
|
134 |
+
|
135 |
+
## Bias Mitigation<a name="bias-mitigation"></a>
|
136 |
+
Automated techniques to mitigating bias in a discriminatory model. Can be characterized by where the technique sits in the model lifecycle:
|
137 |
+
* **Pre-Processing**: Techniques that analyze datasets and often modify/resample training datasets so that the learned classifier is less discriminatory.
|
138 |
+
* **In-Processing**: Techniques for training a fairness-aware classifier (or regressor) that explicitly trades off optimizing for accuracy and also maintaining fairness across sensitive groups.
|
139 |
+
* **Post-Processing**: Techniques that only adjust the output predictions from a discriminatory classifier, without modifying the training data or the classifier.
|
140 |
+
|
141 |
+
Related terms: [bias detection](#bias-detection)
|
142 |
+
|
143 |
+
|
144 |
+
|
145 |
+
|
146 |
+
## Binary Classification<a name="binary-classification"></a>
|
147 |
+
A modeling task where the target variable belongs to a discrete set with two possible outcomes.
|
148 |
+
|
149 |
+
Example:
|
150 |
+
> This binary classifier will predict whether or not a person is likely to default on their credit card.
|
151 |
+
|
152 |
+
|
153 |
+
Related terms: [output type](#output-type), [classification](#classification), [multilabel classification](#multilabel-classification)
|
154 |
+
|
155 |
+
|
156 |
+
|
157 |
+
## Categorical Attribute<a name="categorical-attribute"></a>
|
158 |
+
An attribute whose value is taken from a discrete set of possibilities.
|
159 |
+
|
160 |
+
Example:
|
161 |
+
> A person's blood type is a categorical attribute: it can only be A, B, AB, or O.
|
162 |
+
|
163 |
+
Synonyms: discrete attribute
|
164 |
+
|
165 |
+
Related terms: [attribute](#attribute), [continuous](#continuous-attribute), [classification](#classification)
|
166 |
+
|
167 |
+
## Classification<a name="classification"></a>
|
168 |
+
A modeling task where the target variable belongs to a discrete set with a fixed number of possible outcomes.
|
169 |
+
|
170 |
+
Example:
|
171 |
+
> This classification model will determine whether an [input](#input) image is of a cat, a dog, or fish.
|
172 |
+
|
173 |
+
Related terms: [output type](#output-type), [binary classification](#binary-classification), [multilabel classification](#multilabel-classification)
|
174 |
+
|
175 |
+
## Continuous Attribute<a name="continuous-attribute"></a>
|
176 |
+
An attribute whose value is taken from an ordered continuum, which can be bounded or unbounded.
|
177 |
+
|
178 |
+
Example:
|
179 |
+
> A person's height, weight, income, IQ can all be through of as continuous attributes.
|
180 |
+
|
181 |
+
Synonyms: numeric attribute
|
182 |
+
|
183 |
+
Related terms: [attribute](#attribute), [continuous](#continuous-attribute), [regression](#regression)
|
184 |
+
|
185 |
+
(glossary_custom_role)=
|
186 |
+
## Custom Role<a name="custom-role"></a>
|
187 |
+
Custom Roles are a resource in the Arthur platform used for managing access control policies when SSO authentication has been enabled. For more instructions on configuring Custom Roles, view the {doc}`custom authorization documentation section </platform-management/access-control-overview/sso-access-control/custom_rbac>`.
|
188 |
+
|
189 |
+
(glossary_data_drift)=
|
190 |
+
## Data Drift
|
191 |
+
Refers to the problem arising when, after a trained model is deployed, changes in the external world lead to degradation of model performance and the model becoming stale. Detecting data drift will provide a leading indicator about data stability and integrity.
|
192 |
+
|
193 |
+
Data drift can be quantified with respect to a specific reference set (eg. the model's training data), or more generally over any temporal shifts in a variable with respect to past time windows.
|
194 |
+
|
195 |
+
Your project can {doc}`query data drift metrics through the Arthur API </user-guide/api-query-guide/data_drift>`. This section will provide overview of the available data drift metrics in Arthur's query service.
|
196 |
+
|
197 |
+
Related terms: [out of distribution](#ood-detection)
|
198 |
+
|
199 |
+
### Definitions
|
200 |
+
|
201 |
+
#### P and Q<a name="p-and-q"></a>
|
202 |
+
|
203 |
+
We establish some mathematical housekeeping for the below metrics. Let $P$ be the reference distribution and $Q$ be the target distribution. These are both probability distributions that can be approximated by binning the underlying reference and target sets. Generally, $P$ is an older dataset and $Q$ is a new dataset of interest. We'd like to quantify how far the distributions differ to see if the reference set has gone stale and algorithms trained on it should not be used to perform inferences on the target dataset.
|
204 |
+
|
205 |
+
#### Entropy<a name="entropy"></a>
|
206 |
+
|
207 |
+
Let $\text{H}(P)$ be the entropy of distribution $P$. It is interpreted as the expected (i.e. average) number of bits (if log base 2) or nats (if log base $e$) required to encode information of a datapoint from distribution $P$. Arthur applications use log base $e$, so interpretation will be in nats.
|
208 |
+
|
209 |
+
$$
|
210 |
+
\begin{align*}
|
211 |
+
\text{H}(P)
|
212 |
+
= -\sum_{k=1}^K P(x_k)*\text{log}P(x_k)
|
213 |
+
= -\text{E}_P[\text{log}P(x_k)]
|
214 |
+
\end{align*}
|
215 |
+
$$
|
216 |
+
|
217 |
+
### KL Divergence<a name="kl-divergence"></a>
|
218 |
+
|
219 |
+
Let $\text{D}(P \parallel Q)$ be the Kullback-Leibler (KL) Divergence from $P$ to $Q$. It is interpreted as the nats of information we expect to lose in using $Q$ instead of $P$ for modeling data $X$, discretized over probability space $K$. KL Divergence is not symmetrical, i.e. $\text{D}(P \parallel Q) \neq \text{D}(Q \parallel P)$, and should not be used as a distance metric.
|
220 |
+
|
221 |
+
$$
|
222 |
+
\begin{align*}
|
223 |
+
\text{D}(P||Q)
|
224 |
+
= \sum_{k=1}^K P(x_k)*(\text{log}P(x_k)-\text{log}Q(x_k)) \\
|
225 |
+
= \text{E}_P[\text{log}P(x)-\text{log}Q(x)]
|
226 |
+
\end{align*}
|
227 |
+
$$
|
228 |
+
|
229 |
+
### Population Stability Index (PSI)<a name="psi"></a>
|
230 |
+
|
231 |
+
Let $\text{PSI}(P,Q)$ be the Population Stability Index (PSI) between $P$ and $Q$. It is interpreted as the roundtrip loss of nats of information we expect to lose from $P$ to $Q$ and then from $Q$ returning back to $P$, and vice versa. PSI smooths out KL Divergence since the return trip information loss is included, and this metric is popular in financial applications.
|
232 |
+
|
233 |
+
$$
|
234 |
+
\begin{align*}\text{PSI}(P,Q)
|
235 |
+
= \text{D}(P||Q) + \text{D}(Q||P) \\
|
236 |
+
= \sum_{k=1}^K (P(x_k)-Q(x_k))*(\text{log}P(x_k)-\text{log}Q(x_k)) \\
|
237 |
+
= \text{E}_P[\text{log}P(x)-\text{log}Q(x)]+\text{E}_Q[\text{log}Q(x)-\text{log}P(x)]
|
238 |
+
\end{align*}
|
239 |
+
$$
|
240 |
+
|
241 |
+
### JS Divergence<a name="js-divergence"></a>
|
242 |
+
|
243 |
+
Let $\text{JSD}(P,Q)$ be the Jensen-Shannon (JS) Divergence between $P$ and $Q$. It smooths out KL divergence using a mixture of the base and target distributions and is interpreted as the entropy of the mixture $M=\frac{P+Q}{2}$ minus the mixture of the entropies of the individual distributions.
|
244 |
+
|
245 |
+
$$
|
246 |
+
\begin{align*}\text{JSD}(P,Q)
|
247 |
+
= \frac{1}{2}\text{D}(P||M) + \frac{1}{2}\text{D}(Q||M) \\
|
248 |
+
= \text{H}(\frac{P+Q}{2})-\frac{\text{H}(P)+H(Q)}{2}
|
249 |
+
\end{align*}
|
250 |
+
$$
|
251 |
+
|
252 |
+
### Hellinger Distance<a name="hellinger-distance"></a>
|
253 |
+
|
254 |
+
Let $\text{HE}(P,Q)$ be the Hellinger Distance between $P$ and $Q$. It is interpreted as the Euclidean norm of the difference of the square root distributions of $P$ and $Q$.
|
255 |
+
|
256 |
+
$$
|
257 |
+
\begin{align*}
|
258 |
+
\text{HE}(P,Q)
|
259 |
+
= {\frac {1}{\sqrt {2}}}{\bigl \|}{\sqrt {P}}-{\sqrt {Q}}{\bigr \|}_{2} \\
|
260 |
+
= {\frac {1}{\sqrt {2}}}{\sqrt {\sum _{k=1}^{K}\left({\sqrt {P(x_k)}}-{\sqrt {Q(x_k)}}\right)^{2}}}
|
261 |
+
\end{align*}
|
262 |
+
$$
|
263 |
+
|
264 |
+
(glossary_hypothesis_test)=
|
265 |
+
### Hypothesis Test
|
266 |
+
|
267 |
+
Hypothesis testing uses different tests depending on whether a feature is categorical or continuous.
|
268 |
+
|
269 |
+
For categorical features, let $\chi_{\text{K}-1}^2(P,Q)$ be the chi-squared test statistic for $P$ and $Q$, with $\text{K}$ being the number of categories of the feature, i.e. $\text{K}-1$ are the degrees of freedom. Let $\text{N}_{Pk}$ and $\text{N}_{Qk}$ be the count of occurrences of feature being $k$, with $1\leq k \leq K$, for $P$ and $Q$ respectively. The chi-squared test statistic is the summation of the standardized differences of expected counts between $P$ and $Q$.
|
270 |
+
|
271 |
+
$$
|
272 |
+
\begin{align*}
|
273 |
+
\chi_{K-1}^2(P,Q)
|
274 |
+
= \sum_{k=1}^K \frac{(\text{N}_{Qk}-\text{N}_{Pk})^2}{\text{N}_{Pk}}\\
|
275 |
+
\end{align*}
|
276 |
+
$$
|
277 |
+
|
278 |
+
For continuous features, let $\text{KS}(P, Q)$ be the Kolmogorov-Smirnov test statistic for $P$ and $Q$. Let $F_P$ and $F_Q$ be the empirical cumulative density, for $P$ and $Q$ respectively. The Kolmogorov-Smirnov test is a nonparametric, i.e. distribution-free, test that compares the empirical cumulative density functions of $P$ and $Q$.
|
279 |
+
|
280 |
+
$$
|
281 |
+
\begin{align*}
|
282 |
+
\text{KS}(P,Q)
|
283 |
+
= \sup_x (F_P(x) - F_Q(x)) \\
|
284 |
+
\end{align*}
|
285 |
+
$$
|
286 |
+
|
287 |
+
The returned test statistic is then compared to cutoffs for significance. A higher test statistic indicates more data drift. We've abstracted the calculations away for you in our query endpoint.
|
288 |
+
|
289 |
+
For `HypothesisTest`, the returned value is transformed as -log_10(P_value) to maintain directional parity with the other data drift metrics. That is, lower P_value is more significant and implies data drift, reflected in a higher -log_10(P_value).
|
290 |
+
|
291 |
+
### Multivariate<a name="multivariate"></a>
|
292 |
+
|
293 |
+
Arthur also offers a multivariate Anomaly Score which you can configure via the steps detailed {ref}`here <enrichments_anomaly_detection>`.
|
294 |
+
See {ref}`here <arthur_algorithms_anomaly_detection>` for an explanation of how these scores are calculated.
|
295 |
+
|
296 |
+
## Disparate Impact<a name="disparate-impact"></a>
|
297 |
+
Legal terminology orginally from Fair Lending case law. This constraint is strictly harder than [Disparate Treatment](#disparate-treatment) and asserts that model outcomes must not be discriminatory across protected groups. That is, the outcome of a decisioning process should not be substantially higher (or lower) for one group of a protected class over another.
|
298 |
+
|
299 |
+
While there does not exist a single threshold for establishing the presence or absence of disparate impact, the so-called ["80% rule"](https://www.eeoc.gov/laws/guidance/questions-and-answers-clarify-and-provide-common-interpretation-uniform-guidelines) is commonly referenced. However, we strongly recommend against adopting this rule-of-thumb, as these analyses should be grounded in use-case specific analysis and the legal framework pertinent to a given industry.
|
300 |
+
|
301 |
+
Example:
|
302 |
+
> Even though the model didn't take `gender` as input, it still results in disparate impact when we compare outcomes for males and females.
|
303 |
+
|
304 |
+
Related terms: [bias](#bias), [disparate treatment](#disparate-treatment)
|
305 |
+
|
306 |
+
|
307 |
+
## Disparate Treatment<a name="disparate-treatment"></a>
|
308 |
+
Legal terminology originally from Fair Lending case law. Disparate Treatment asserts that you are not allowed to consider protected variables (eg race, age, gender) when approving or denying an applicant for a credit card loan.
|
309 |
+
In practical terms, this means that a data scientist cannot include these attributes as [inputs](#input) to a credit decisioning model.
|
310 |
+
|
311 |
+
Adherence to Disparate Treatment is not a sufficient condition for actually acheiving a fair model (see [proxy](#proxy) and [bias detection](#bias-detection)). "Fairness through unawareness" is not good enough.
|
312 |
+
|
313 |
+
Related terms: [bias](#bias), [disparate impact](#disparate-impact)
|
314 |
+
|
315 |
+
## Enrichment<a name="enrichment"></a>
|
316 |
+
Generally used to describe data or metrics added to raw data after ingestion. Arthur provides various enrichments such as Anomaly Detection and Explainability. See {doc}`/user-guide/walkthroughs/enrichments` for details around using enrichments within Arthur.
|
317 |
+
|
318 |
+
## Feature<a name="feature"></a>
|
319 |
+
An individual attribute that is an input to a [model](#arthur-model)
|
320 |
+
|
321 |
+
Example:
|
322 |
+
> The credit scoring model has features like `“home_value”`, `“zip_code”`, `“height"`.
|
323 |
+
|
324 |
+
## Ground Truth<a name="ground-truth"></a>
|
325 |
+
The true label or target-variable (Y) corresponding to inputs (X) for a dataset.
|
326 |
+
|
327 |
+
|
328 |
+
Examples:
|
329 |
+
```
|
330 |
+
pred = sklearn_model.predict_proba(X)
|
331 |
+
arthur_model.send_inference(
|
332 |
+
model_pipeline_input=X,
|
333 |
+
predicted_values={1:pred, 0: 1-pred})
|
334 |
+
```
|
335 |
+
|
336 |
+
Related terms: [prediction](#prediction)
|
337 |
+
|
338 |
+
|
339 |
+
## Image Data<a name="image-data"></a>
|
340 |
+
Imagery data commonly used for computer vision models.
|
341 |
+
|
342 |
+
Related terms: [attribute](#attribute), [output type](#output-type), [Stage](#stage)
|
343 |
+
|
344 |
+
|
345 |
+
|
346 |
+
## Inference<a name="inference-data"></a>
|
347 |
+
One row of a dataset. An inference refers to passing a single input into a model and computing the model's prediction. Data associated with that inference might include (1) input data, (2) model's prediction, (3) corresponding ground truth.
|
348 |
+
With respect to the Arthur platform, the term inference denotes any and all of those related components of data for a single input&prediction.
|
349 |
+
|
350 |
+
|
351 |
+
Related terms: [ArthurInference](#arthur-inference), [stage](#stage)
|
352 |
+
|
353 |
+
|
354 |
+
|
355 |
+
## Input<a name="input"></a>
|
356 |
+
A single instance of data, upon which a model can calculate an output [prediction](#prediction). The input consists of all relevant [features](#feature) together.
|
357 |
+
|
358 |
+
Example:
|
359 |
+
> The input features for the credit scoring model consist of `“home_value”`, `“zip_code”`, `“height"`.
|
360 |
+
|
361 |
+
Related terms: [feature](#feature), [model](#arthur-model)
|
362 |
+
|
363 |
+
## Input Type<a name="input-type"></a>
|
364 |
+
For an [ArthurModel](#arthur-model), this field declares what kind of input datatype will be flowing into the system.
|
365 |
+
|
366 |
+
Allowable values are defined in the `InputType` enum:
|
367 |
+
* [`Tabular`](#tabular-data)
|
368 |
+
* [`Image`](#image-data)
|
369 |
+
* [`NLP`](#nlp-data)
|
370 |
+
|
371 |
+
Example:
|
372 |
+
```python
|
373 |
+
arthur_model = connection.model(name="New_Model",
|
374 |
+
input_type=InputType.Tabular,
|
375 |
+
model_type=OutputType.Regression)
|
376 |
+
```
|
377 |
+
|
378 |
+
Related terms: [output type](#output-type), [tabular data](#tabular-data), [nlp data](#nlp-data)
|
379 |
+
|
380 |
+
|
381 |
+
|
382 |
+
## Model Health Score<a name="model-health-score"></a>
|
383 |
+
On the UI dashboard, you will see a model health score between 0-100 for each of your models.
|
384 |
+
The score is an aggregation based on the following metrics: performance, drift and ingestion.
|
385 |
+
Each metric for a model is computed every hour, combined, and then aggregated by computing the average over a 30-day window.
|
386 |
+
The thresholds for model-health are (0-32, 33-65, 66-100) for (Red, Yellow, Green) respectively.
|
387 |
+
|
388 |
+
* Performance:
|
389 |
+
* Regression: 1 - Normalized MAE
|
390 |
+
* Classification: F1 Score
|
391 |
+
|
392 |
+
* Drift
|
393 |
+
* 1 - Average Anomaly Score
|
394 |
+
|
395 |
+
* Ingestion
|
396 |
+
* Variance of normalized time periods between ingestion events
|
397 |
+
* Variance of normalized volume differences between ingestion events
|
398 |
+
|
399 |
+
|
400 |
+
You can extract the health score via an API [call](../api-documentation/v3-api-docs.html#tag/models/paths/~1models~1health/get) as well.
|
401 |
+
|
402 |
+
|
403 |
+
## Model Onboarding<a name="model-onboarding"></a>
|
404 |
+
Model onboarding refers to the process of defining an `ArthurModel`, preparing it with the necessary reference dataset, passing it through a validation check, and saving it to the Arthur system.
|
405 |
+
|
406 |
+
Once your model is onboarded onto Arthur, you can use the Arthur system to track the model and view all its performance and analytics in your online Arthur dashboard.
|
407 |
+
|
408 |
+
Related terms: [ArthurModel](#arthur-model), [reference dataset](#reference-data)
|
409 |
+
|
410 |
+
|
411 |
+
## Multiclass Classification<a name="multiclass-classification"></a>
|
412 |
+
A modeling task where each [input](#input) is associated with one label, from a fixed set of possible labels.
|
413 |
+
Often this is a binary classifier (the output is either 0 or 1), but the output can also have more than 2 possible labels.
|
414 |
+
|
415 |
+
Example:
|
416 |
+
> This NLP model applies the most relevant tag to news articles. The model is trained on example articles which are tagged with a topic like `Congress`.
|
417 |
+
|
418 |
+
Related terms: [multilabel clasification](#multilabel-classification), [output type](#output-type),
|
419 |
+
|
420 |
+
|
421 |
+
## Multilabel Classification<a name="multilabel-classification"></a>
|
422 |
+
A modeling task where each [input](#input) is associated with two or more labels, from a fixed set of possible labels.
|
423 |
+
|
424 |
+
Example:
|
425 |
+
> This NLP model applies relevant tags to news articles. The model is trained on example articles which are tagged with multiple topics like `Politics, Elections, Congress`.
|
426 |
+
|
427 |
+
Related terms: [output type](#output-type), [multiclass clasification](#multiclass-classification)
|
428 |
+
|
429 |
+
|
430 |
+
## NLP Data<a name="nlp-data"></a>
|
431 |
+
Unstructured text sequences commonly used for Natural Language Processing models.
|
432 |
+
|
433 |
+
Related terms: [attribute](#attribute), [output type](#output-type), [Stage](#stage)
|
434 |
+
|
435 |
+
|
436 |
+
## Non-Input Attribute <a name="non-input-attribute"></a>
|
437 |
+
|
438 |
+
A non-input attribute is an attribute that an ArthurModel will track that does not actually enter the model as an input.
|
439 |
+
|
440 |
+
Common non-input attributes are protected class attributes such as age, race, or sex. By sending such non-input attributes to Arthur, you can track model performance based on these groups in your data to evaluate model bias and fairness.
|
441 |
+
|
442 |
+
Related terms: [attribute](#attributea-nameattributea), [bias](#biasa-namebiasa)
|
443 |
+
|
444 |
+
|
445 |
+
## Object Detection<a name="object-detection"></a>
|
446 |
+
The OutputType for computer vision models with the purpose of detecting an object within an image and outputting a box which bounds the object.
|
447 |
+
|
448 |
+
This bounding box is used to identify _where_ the object resides in the image.
|
449 |
+
|
450 |
+
Related terms: [image](#image-dataa-nameimage-dataa)
|
451 |
+
|
452 |
+
(glossary_organization)=
|
453 |
+
## Organization<a name="organization"></a>
|
454 |
+
An Organization is a structural entity utilized by the Arthur platform to organize and manage access to resources that exist on the platform. Users are added to Arthur Organizations with a given role that provides them with Read and/or Write access to some subset of that Organization's resources, as defined by the User's role.
|
455 |
+
|
456 |
+
Each Organization has its own:
|
457 |
+
- [Models](#arthur-modela-namearthur-modela)
|
458 |
+
- [Model Groups](#arthur-model-groupa-namearthur-model-groupa)
|
459 |
+
- [Service Accounts](#service-accounta-nameservice-accounta)
|
460 |
+
- {ref}`Custom Roles <glossary_custom_role>`
|
461 |
+
|
462 |
+
## Out of Distribution Detection<a name="ood-detection"></a>
|
463 |
+
Refers to the challenge of detecting when an input (or set of inputs) is substantially different from the distribution of a larger set of reference inferences. This term commonly arises in the context of data drift, where we want to detect if new inputs are different from the training data (and distribution thereof) for a particular model. OOD Detection is a relevant challenge for Tabular data as well as unstructured data such as images and sequences.
|
464 |
+
|
465 |
+
|
466 |
+
Related terms: {ref}`glossary_data_drift`
|
467 |
+
|
468 |
+
## Output Type<a name="output-type"></a>
|
469 |
+
For an [ArthurModel](#arthur-model), this field declares what kind of output predictions will be flowing out of the system.
|
470 |
+
|
471 |
+
Allowable values are defined in the `OutputType` enum:
|
472 |
+
* [`Regression`](#regression)
|
473 |
+
* appropriate for continuous-valued targets
|
474 |
+
* [`Multiclass`](#classification)
|
475 |
+
* appropriate for both binary classiers and multiclass classifiers
|
476 |
+
* [`Multilabel`](#multilabel-classification)
|
477 |
+
* appropriate for multilabel classifiers
|
478 |
+
* [`ObjectDetection`](#object-detection)
|
479 |
+
* only available for computer vision models
|
480 |
+
|
481 |
+
Example:
|
482 |
+
```python
|
483 |
+
arthur_model = connection.model(name="New_Model",
|
484 |
+
input_type=InputType.Tabular,
|
485 |
+
output_type=OutputType.Regression)
|
486 |
+
```
|
487 |
+
|
488 |
+
|
489 |
+
Related terms: [input type](#input-type)
|
490 |
+
|
491 |
+
## Prediction<a name="prediction"></a>
|
492 |
+
The output prediction (y_hat) of a trained model for any input.
|
493 |
+
|
494 |
+
Related terms: [ground truth](#ground-truth)
|
495 |
+
|
496 |
+
## Protected Attribute<a name="protected-attribute"></a>
|
497 |
+
An attribute of an inference that is considered sensitive with respect to model bias. Common examples include race, age, and gender. The term "protected" comes from the Civil Rights Act of 1964.
|
498 |
+
|
499 |
+
Synonyms: sensitive attribute
|
500 |
+
|
501 |
+
Related terms: [bias](#bias), [proxy](#proxy)
|
502 |
+
|
503 |
+
|
504 |
+
## Proxy<a name="proxy"></a>
|
505 |
+
An input attribute in a model (or combination thereof) that is highly correlated with a protected attribute such as race, age, or gender. The presence of proxies in a dataset makes it difficult to rely only on [Disparate Treatment] as a standard for fair ML.
|
506 |
+
|
507 |
+
Example:
|
508 |
+
> In most US cities, zip code is a strong proxy for race. Therefore, one must be cautious when using zip code as an input to a model.
|
509 |
+
|
510 |
+
Related terms: [bias](#bias), [disparate impact](#disparate-impact), [disparate treatment](#disparate-treatment)
|
511 |
+
|
512 |
+
|
513 |
+
## Reference <a name="reference-data"></a>
|
514 |
+
The dataset used as a baseline reference for an ArthurModel.
|
515 |
+
|
516 |
+
A reference dataset must include a sample of the input features a model receives.
|
517 |
+
|
518 |
+
A reference dataset can optionally include a sample of model outputs, ground truth values, and other non-input attributes as metadata.
|
519 |
+
|
520 |
+
The reference dataset for a model is used to compute drift: the distribution of input features in the reference dataset makes up the baseline against which future inferences are compared to compute anomaly scores.
|
521 |
+
|
522 |
+
Related terms: [inference](#inference)
|
523 |
+
|
524 |
+
## Regression<a name="regression"></a>
|
525 |
+
A modeling task (or model) where the [target variable](#ground-truth) is a continuous variable.
|
526 |
+
|
527 |
+
Example:
|
528 |
+
> This regression model predicts what the stock price of $AAPL will be tomorrow.
|
529 |
+
|
530 |
+
Related terms: [output type](#output-type)
|
531 |
+
|
532 |
+
## Sensitive Attribute<a name="sensitive-attribute"></a>
|
533 |
+
See [protected attribute](#protected-attribute)
|
534 |
+
|
535 |
+
## Service Account<a name="service-account"></a>
|
536 |
+
Service Accounts are entities within the Arthur Platform that provide access to Arthur APIs for automated systems (machine-to-machine communication). They represent both an identity as well as a set of permissions for that identity. Each Service Account has an access token that includes a specific role, which grants access to the Arthur APIs. The roles used in Service Accounts provide access within a single Arthur {ref}`Organization <glossary_organization>`.
|
537 |
+
|
538 |
+
## Stage<a name="stage"></a>
|
539 |
+
Taxonomy used by the Arthur platform to delineate how [attributes](#attribute) contribute to the model computations.
|
540 |
+
Allowable values are defined in the `Stage` enum:
|
541 |
+
* `ModelPipelineInput` : Input to the entire model pipeline. This will most commonly be the Stage used to represent all model inputs. Will contain base input features that are familiar to the data scientist: categorical and continuous columns of a tabular dataset.
|
542 |
+
* `PredictedValue`: The predictions coming out of the model.
|
543 |
+
* `GroundTruth`: The ground truth (or target) attribute for a model. Must be one-hot for classifiers
|
544 |
+
* `GroundTruthClass`: The ground truth class for classification models, not one-hot encoded
|
545 |
+
* `NonInput`: Ancillary data that can be associated with each inference, but not necessarily a direct input to the model. For example, sensitive attributes like `age`, `sex`, or `race` might not be direct model inputs, but will useful to associate with each prediction.
|
546 |
+
|
547 |
+
## Tabular Data<a name="tabular-data"></a>
|
548 |
+
Data type for model inputs where the data can be thought of as a table (or spreadsheet) composed of rows and columns. Each column represents an input [attribute](#attribute) for the model and each row represents a separate record that composes the training data. In supervised learning, exactly one of the columns acts as the [target](#ground-truth).
|
549 |
+
|
550 |
+
Example:
|
551 |
+
> This credit scoring model is trained on tabular data. The [input](#input) attributes are `income`, `country`, and `age` and the [target](#ground-truth) is FICO score.
|
552 |
+
|
553 |
+
|
554 |
+
Related terms: [Attribute](#attribute), [output type](#output-type), [Stage](#stage)
|
555 |
+
|
556 |
+
## Version Label<a name="version-label"></a>
|
557 |
+
|
558 |
+
A Version Label is a string that can represent a custom version for your Arthur Model within its Arthur Model Group. Version Labels are not required and the platform will default to using the Version Sequence Number when not provided.
|
559 |
+
|
560 |
+
Example:
|
561 |
+
|
562 |
+
```python
|
563 |
+
# retrieve the model group
|
564 |
+
model_group = connection.get_model_group(model_group_id)
|
565 |
+
|
566 |
+
# create the new version of the model
|
567 |
+
arthur_model_v2 = connection.model(name="Model_V2",
|
568 |
+
input_type=InputType.Tabular,
|
569 |
+
model_type=OutputType.Regression)
|
570 |
+
|
571 |
+
# add the new model to the model group
|
572 |
+
model_group.add_version(arthur_model_v2, label="2.0.1")
|
573 |
+
label = arthur_model_v2.version_label
|
574 |
+
arthur_model_v2.save()
|
575 |
+
# label == "2.0.1"
|
576 |
+
```
|
577 |
+
|
578 |
+
Related terms: [Arthur Model](#arthur-model), [Arthur Model Group](#arthur-model-group), [Version Sequence Number](#version-sequence-number)
|
579 |
+
|
580 |
+
## Version Sequence Number<a name="version-sequence-number"></a>
|
581 |
+
|
582 |
+
A Version Sequence Number is a unique, auto-incrementing (starting at 1) integer that is assigned to Arthur Models in an Arthur Model Group. This number uniquely represents an Arthur Model’s Version within the Model Group. In the case a Version Label is not provided, the platform will show the Version Sequence Number instead.
|
583 |
+
|
584 |
+
Example:
|
585 |
+
|
586 |
+
```python
|
587 |
+
# retrieve the first version of a model
|
588 |
+
arthur_model_v1 = connection.get(model_id)
|
589 |
+
num = arthur_model_v1.version_sequence_num
|
590 |
+
# num == 1
|
591 |
+
|
592 |
+
# retrieve the second version of a model
|
593 |
+
model_group = arthur_model_v1.model_group
|
594 |
+
arthur_model_v2 = model_group.get_version(sequence_num=2)
|
595 |
+
num = arthur_model_v2.version_sequence_num
|
596 |
+
# num == 2
|
597 |
+
```
|
598 |
+
|
599 |
+
Related terms: [Arthur Model](#arthur-model), [Arthur Model Group](#arthur-model-group), [Version Label](#version-label)
|
files/arthur-docs-markdown/more-info/index.md.txt
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# More Information
|
2 |
+
|
3 |
+
## {doc}`algorithms`
|
4 |
+
|
5 |
+
The {doc}`algorithms` page describes the math behind the algorithms Arthur implements for
|
6 |
+
calculating performance-related metrics and insights for your models.
|
7 |
+
|
8 |
+
## {doc}`FAQs`
|
9 |
+
|
10 |
+
Visit our {doc}`FAQs` page to see answers to common questions about Arthur and model
|
11 |
+
monitoring.
|
12 |
+
|
13 |
+
## {doc}`glossary`
|
14 |
+
|
15 |
+
Our {doc}`glossary` contains a definition of terms used throughout the Arthur documentation, as well as
|
16 |
+
related links to other terms and guides to get familiar with Arthur.
|
17 |
+
|
18 |
+
|
19 |
+
```{toctree}
|
20 |
+
:maxdepth: 2
|
21 |
+
:hidden:
|
22 |
+
|
23 |
+
Arthur Algorithms <algorithms>
|
24 |
+
FAQs <FAQs>
|
25 |
+
Glossary <glossary>
|
26 |
+
```
|
files/arthur-docs-markdown/not-found.rst.txt
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
:orphan:
|
2 |
+
|
3 |
+
Not Found
|
4 |
+
=========
|
5 |
+
|
6 |
+
The page you're looking for wasn't found.
|
files/arthur-docs-markdown/platform-management/.DS_Store
ADDED
Binary file (8.2 kB). View file
|
|
files/arthur-docs-markdown/platform-management/access-control-overview/index.md.txt
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Access Control Overview
|
2 |
+
|
3 |
+
Arthur has supports a variety of mechanisms for authentication, who a user is, and authorization, what a user can do
|
4 |
+
(RBAC).
|
5 |
+
By default, Arthur will use a built-in authentication and authorization system. In on-prem installations, cluster
|
6 |
+
administrators can optionally configure an external Identity Provider (IdP) to control user authentication and
|
7 |
+
authorization. See the sections below for an overview of Arthur Standard Access Control and Arthur SSO Access Control.
|
8 |
+
|
9 |
+
## {doc}`Arthur Standard Access Control <standard_access_control>`
|
10 |
+
|
11 |
+
The {doc}`Arthur Standard Access Control <standard_access_control>` page shows how to use the default access control
|
12 |
+
system in Arthur.
|
13 |
+
|
14 |
+
## {doc}`Single-Sign-On (SSO) Access Control <sso-access-control/index>` (On-prem only)
|
15 |
+
|
16 |
+
The {doc}`Single-Sign-On (SSO) Access Control <sso-access-control/index>` page shows how to set up and use an external
|
17 |
+
IdP for access
|
18 |
+
control.
|
19 |
+
|
20 |
+
## Access Control Paradigm Comparison
|
21 |
+
|
22 |
+
The following table shows a high level comparison of the different capabilities in
|
23 |
+
{doc}`Arthur Standard Access Control <standard_access_control>`
|
24 |
+
and {doc}`Arthur SSO Access Control <sso-access-control/index>`.
|
25 |
+
|
26 |
+
| Capability | Arthur Standard Access Control | SSO Access Control |
|
27 |
+
|--------------------------------------------------------|--------------------------------|----------------------------|
|
28 |
+
| User creation | In the Arthur UI | In the IdP |
|
29 |
+
| User sign-in | In the Arthur UI | In the IdP |
|
30 |
+
| User password reset | In the Arthur UI | In the IdP |
|
31 |
+
| Can use Arthur API Keys | Yes | No |
|
32 |
+
| Supports Custom Roles and RBAC | No | Yes |
|
33 |
+
| Users can have access to multiple Arthur organizations | Yes | Yes |
|
34 |
+
| Availability | All Arthur installations | On-prem only |
|
35 |
+
| Required permissions to configure | Organization Admin | Installation/Cluster Admin |
|
36 |
+
|
37 |
+
```{toctree}
|
38 |
+
:maxdepth: 2
|
39 |
+
:hidden:
|
40 |
+
|
41 |
+
Default Access Control <standard_access_control>
|
42 |
+
SSO Access Control <sso-access-control/index>
|
43 |
+
```
|
files/arthur-docs-markdown/platform-management/access-control-overview/sso-access-control/custom_rbac.md.txt
ADDED
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Custom RBAC
|
2 |
+
|
3 |
+
(custom_rbac_managing_orgs_and_roles)=
|
4 |
+
## Managing RBAC and Organizations for SSO users
|
5 |
+
|
6 |
+
For customers using SSO (on-prem only), Arthur provides the ability to set up a fully customizable RBAC.
|
7 |
+
Please follow the below:
|
8 |
+
|
9 |
+
1. When setting up your identity provider via the YAML configuration, supply a global
|
10 |
+
role name and set of permissions under `globalRoleDefs` that your identity provider will authenticate users with.
|
11 |
+
This configuration will create the global role in the Arthur authorization system when it is applied. See the
|
12 |
+
{ref}`Creating Global Roles for Managing Organizations and RBAC Policies Guide <creating_global_roles_in_arthur_config>` for
|
13 |
+
more information.
|
14 |
+
2. That global role can then create custom role mappings for each organization:
|
15 |
+
* During organization creation, include the role configuration JSON (see below for example) in the request body when
|
16 |
+
calling [`POST /organizations`](../../../../api-documentation/v3-api-docs.html#tag/organizations/paths/~1organizations/post).
|
17 |
+
* After an organization is created, create or add custom_roles by sending the role configuration JSON (see below for
|
18 |
+
example) in the request body when
|
19 |
+
calling [`POST /autorization/custom_roles`](../../../../api-documentation/v3-api-docs.html#tag/authorization/paths/~1authorization~1custom_roles/post).
|
20 |
+
3. Users logging in through your IdP must now have a valid known role in their token when accessing the Arthur
|
21 |
+
Platform. Arthur will use this role to both authenticate that the user is a member of the organization and to
|
22 |
+
determine the permissions they have.
|
23 |
+
|
24 |
+
## Managing Roles and Permissions
|
25 |
+
|
26 |
+
### Understanding Permissions
|
27 |
+
|
28 |
+
* A permission is a combination of a resource and an action. For
|
29 |
+
example `raw_data read`, `users write`, `models delete`.
|
30 |
+
* For a full list of available permissions. please see {doc}`here </platform-management/reference/permissions_set>`.
|
31 |
+
* For a directory of permissions by API endpoint, please see
|
32 |
+
{doc}`here </platform-management/reference/permissions_by_endpoint>`.
|
33 |
+
|
34 |
+
### Create Custom Roles
|
35 |
+
|
36 |
+
The [`POST /autorization/custom_roles`](../../../../api-documentation/v3-api-docs.html#tag/authorization/paths/~1authorization~1custom_roles/post)
|
37 |
+
endpoint is available for customers using SSO to operate on custom roles for each organization. A few notes:
|
38 |
+
|
39 |
+
* This endpoint only operates on permission scopes within each organization. Permissions that have global scope (such as
|
40 |
+
creating a new organization) cannot be granted via this endpoint, those permissions must be assigned to a role with
|
41 |
+
global privileges via the Arthur IdP configuration YAML. See
|
42 |
+
{ref}`Creating Global Roles for Managing Organizations and RBAC Policies Guide <creating_global_roles_in_arthur_config>` for more
|
43 |
+
information.
|
44 |
+
* Roles can have a list of permissions to allow and/or a list of other roles to inherit permissions from.
|
45 |
+
* Role names cannot conflict with {doc}`default roles </platform-management/reference/permissions_by_standard_roles>`.
|
46 |
+
* Supplied permissions must be valid known Arthur permissions.
|
47 |
+
* Roles can inherit the permissions of other roles that are either
|
48 |
+
{doc}`default roles </platform-management/reference/permissions_by_standard_roles>`, or roles also defined in the same
|
49 |
+
organization. Unknown inherited role names will be rejected.
|
50 |
+
|
51 |
+
### Get Custom Roles
|
52 |
+
|
53 |
+
To retrieve a list of roles defined for an organization,
|
54 |
+
use: [`GET /autorization/custom_roles`](../../../../api-documentation/v3-api-docs.html#tag/authorization/paths/~1authorization~1custom_roles/get).
|
55 |
+
To filter on specific roles pass a comma separated list of role names in a roles query parameter. For
|
56 |
+
example:`/authorization/custom_roles?roles=role1,role2`. If you wish to return all roles simply leave out the query
|
57 |
+
parameter or pass `"*"` as role.
|
58 |
+
|
59 |
+
### Delete Custom Roles
|
60 |
+
|
61 |
+
To delete a role or multiple roles from an organization,
|
62 |
+
use [`DELETE /autorization/custom_roles`](../../../../api-documentation/v3-api-docs.html#tag/authorization/paths/~1authorization~1custom_roles/delete).
|
63 |
+
Specify which roles to delete in the JSON request body. For example, to delete a single role:
|
64 |
+
|
65 |
+
```json
|
66 |
+
{
|
67 |
+
"roles": [
|
68 |
+
"role3"
|
69 |
+
]
|
70 |
+
}
|
71 |
+
```
|
72 |
+
|
73 |
+
To delete all roles pass "*".
|
74 |
+
|
75 |
+
```{warning} If you do not specify an organization_id, this will delete all custom roles you have created
|
76 |
+
```
|
77 |
+
|
78 |
+
```json
|
79 |
+
{
|
80 |
+
"roles": [
|
81 |
+
"*"
|
82 |
+
]
|
83 |
+
}
|
84 |
+
```
|
85 |
+
|
86 |
+
### Example Role Configuration JSON
|
87 |
+
|
88 |
+
Below is an example JSON request body that creates three roles. role1 has 3 permissions defined, role2 gets an
|
89 |
+
additional permission and then inherits the 3 permissions from role1, and role3 inherits the permissions from Arthur's
|
90 |
+
default "Model Owner" role. For more details on the expected schema for each endpoint,
|
91 |
+
see [Authorization API documenation](../../../../api-documentation/v3-api-docs.html#tag/authorization).
|
92 |
+
|
93 |
+
```json
|
94 |
+
{
|
95 |
+
"roles": [
|
96 |
+
{
|
97 |
+
"role_name": "role1",
|
98 |
+
"permissions": [
|
99 |
+
{
|
100 |
+
"resource": "metric_data",
|
101 |
+
"action": "read"
|
102 |
+
},
|
103 |
+
{
|
104 |
+
"resource": "metric_data",
|
105 |
+
"action": "write"
|
106 |
+
},
|
107 |
+
{
|
108 |
+
"resource": "tag",
|
109 |
+
"action": "read"
|
110 |
+
}
|
111 |
+
]
|
112 |
+
},
|
113 |
+
{
|
114 |
+
"role_name": "role2",
|
115 |
+
"permissions": [
|
116 |
+
{
|
117 |
+
"resource": "user_self",
|
118 |
+
"action": "read"
|
119 |
+
}
|
120 |
+
],
|
121 |
+
"inherited_role_names": [
|
122 |
+
"role1"
|
123 |
+
]
|
124 |
+
},
|
125 |
+
{
|
126 |
+
"role_name": "role3",
|
127 |
+
"inherited_role_names": [
|
128 |
+
"Model Owner"
|
129 |
+
]
|
130 |
+
}
|
131 |
+
]
|
132 |
+
}
|
133 |
+
```
|
files/arthur-docs-markdown/platform-management/access-control-overview/sso-access-control/index.md.txt
ADDED
@@ -0,0 +1,322 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Arthur SSO Access Control Overview
|
2 |
+
|
3 |
+
In on-prem installations, cluster administrators have the ability to configure their Arthur install to use a 3rd party
|
4 |
+
identity provider (IdP) to manage Arthur users and access. Arthur can work with any IdP that supports the Open ID
|
5 |
+
Connect (OIDC) or SAML protocols.
|
6 |
+
|
7 |
+
## User and App Authentication
|
8 |
+
|
9 |
+
Regardless of if your IdP is using OIDC or SAML, the IdP will be responsible for authenticating users and system access
|
10 |
+
to Arthur. As a result, applications or downstream systems that need to authenticate with Arthur will require working
|
11 |
+
with your IdP to get access. Some IdPs provide support for AppID's or service accounts, but it will depend on the
|
12 |
+
specific IdP and how your organization supports it.
|
13 |
+
|
14 |
+
```{warning}
|
15 |
+
Important! Arthur API keys cannot be used when SSO in enabled.
|
16 |
+
Instead, users will rely on their own authentication tokens, which are validated by the IdP and enforce the custom
|
17 |
+
permissions assigned to their roles.
|
18 |
+
```
|
19 |
+
|
20 |
+
## Authorization (RBAC)
|
21 |
+
|
22 |
+
Arthur installations with SSO are able to use custom role-based access control policies (RBAC) for
|
23 |
+
users authenticated via the IdP. Arthur's custom RBAC system uses two kinds of roles. The first kind are organization
|
24 |
+
level roles, which grant a user the specified permissions within a single Arthur organization. The second kind are
|
25 |
+
global roles, which grant the specified privileges across all organizations in the system. Global roles are intended for
|
26 |
+
administrators, so they can perform actions like managing organizations and roles at the global level. They should not
|
27 |
+
be used to grant non-admin users cross-organization access. Instead, users that need access to more than one
|
28 |
+
organization should have a distinct role for each organization. Commonly, the global administrator role only has
|
29 |
+
permissions to create new organizations and to manage custom roles for the platform. All model and data access should
|
30 |
+
be configured using organization scoped roles. See the {doc}`custom_rbac` for an overview of how to configure
|
31 |
+
custom roles for your Arthur installation.
|
32 |
+
|
33 |
+
### Linking IdP Groups to Arthur Roles
|
34 |
+
|
35 |
+
Roles are the link between the IdP's user groups and the Arthur access control system. As shown
|
36 |
+
in [Set Up an Identity Provider](#set-up-an-identity-provider), when you
|
37 |
+
configure an IdP, you will tell Arthur how to parse a user's groups out of the IdP response. The group, or list of
|
38 |
+
groups, returned from your IdP must match the names of custom roles configured in Arthur. For this reason, Arthur
|
39 |
+
enforces all custom roles to have unique names, so the platform can map a user group from an
|
40 |
+
external IdP to a specific set of permissions. This means **all roles in the system must have unique names, even across
|
41 |
+
organizations.**
|
42 |
+
|
43 |
+
For example, if using OIDC and the IdP returns a JWT token of the following format, Arthur must be configured with roles
|
44 |
+
that match the groups listed under the "groups" field in the token. The group names are used to look up the roles that
|
45 |
+
apply for the user in Arthur. More examples of how to configure the OIDC JWT claim parsing can be found in
|
46 |
+
{doc}`setting_up_oidc_idp`.
|
47 |
+
|
48 |
+
```json
|
49 |
+
{
|
50 |
+
"sub": "1234567890",
|
51 |
+
"name": "John Doe",
|
52 |
+
"iat": 1516239022,
|
53 |
+
// this field in the token corresponds to the user's groups in the IdP
|
54 |
+
"groups": [
|
55 |
+
// an "idp-admin" role must be created in Arthur to match this group
|
56 |
+
"idp-admin",
|
57 |
+
// an "org-1-user" role must be created in Arthur to match this group
|
58 |
+
"org-1-user"
|
59 |
+
]
|
60 |
+
}
|
61 |
+
```
|
62 |
+
|
63 |
+
```{note}
|
64 |
+
It is ok if the OIDC token contains extra groups that are not matched to roles in Arthur.
|
65 |
+
It is not required that every group have a corresponding role, but at least one group must.
|
66 |
+
```
|
67 |
+
|
68 |
+
Similarly if using SAML, the SAML assertion from the IdP must contain some attribute values that contains the user's
|
69 |
+
groups in the IdP. More examples of how to configure the SAML attribute parsing can be found in
|
70 |
+
{doc}`Setting Up a SAML IdP <setting_up_saml_idp>`.
|
71 |
+
|
72 |
+
```xml
|
73 |
+
|
74 |
+
<saml2:AttributeStatement>
|
75 |
+
<saml2:Attribute Name="email">
|
76 |
+
<saml2:AttributeValue>support@arthur.ai</saml2:AttributeValue>
|
77 |
+
</saml2:Attribute>
|
78 |
+
<saml2:Attribute Name="firstName">
|
79 |
+
<saml2:AttributeValue>John</saml2:AttributeValue>
|
80 |
+
</saml2:Attribute>
|
81 |
+
<saml2:Attribute Name="lastName">
|
82 |
+
<saml2:AttributeValue>Doe</saml2:AttributeValue>
|
83 |
+
</saml2:Attribute>
|
84 |
+
// this field in the assertion corresponds to the user's groups in the IdP
|
85 |
+
<saml2:Attribute Name="groups">
|
86 |
+
// an "idp-admin" role must be created in Arthur to match this group
|
87 |
+
<saml2:AttributeValue>idp-admin</saml2:AttributeValue>
|
88 |
+
// an "org-1-user" role must be created in Arthur to match this group
|
89 |
+
<saml2:AttributeValue>org-1-user</saml2:AttributeValue>
|
90 |
+
</saml2:Attribute>
|
91 |
+
</saml2:AttributeStatement>
|
92 |
+
```
|
93 |
+
|
94 |
+
```{note}
|
95 |
+
It is ok if the SAML assertion contains extra groups that are not matched to roles in Arthur.
|
96 |
+
It is not required that every group have a corresponding role, but at least one group must.
|
97 |
+
```
|
98 |
+
|
99 |
+
## Set Up an Identity Provider
|
100 |
+
|
101 |
+
### {doc}`OIDC <setting_up_oidc_idp>`
|
102 |
+
|
103 |
+
See {doc}`Setting Up an OIDC IdP <setting_up_oidc_idp>` for the steps to configure an OIDC IdP with Arthur.
|
104 |
+
|
105 |
+
### {doc}`SAML <setting_up_saml_idp>`
|
106 |
+
|
107 |
+
See {doc}`Setting Up a SAML IdP <setting_up_saml_idp>` for the steps to configure a SAML IdP with Arthur.
|
108 |
+
|
109 |
+
## Creating Custom Roles
|
110 |
+
|
111 |
+
As mentioned above, custom roles can be used to grant either permissions within an organization or permissions across
|
112 |
+
all organizations. This section will first cover how to create global roles, then it will cover how to create roles for
|
113 |
+
an organization. The steps outlined here are sufficient to get SSO working. For more details about managing custom RBAC
|
114 |
+
access control, please see the {doc}`custom_rbac` guide.
|
115 |
+
|
116 |
+
(creating_global_roles_in_arthur_config)=
|
117 |
+
|
118 |
+
### Creating Global Roles for Managing Organizations and RBAC Policies
|
119 |
+
|
120 |
+
```{note}
|
121 |
+
In order to complete this section, you must have access to the Arthur Admin Console config page.
|
122 |
+
```
|
123 |
+
|
124 |
+
Global roles are intended to be used by a cluster administrator to manage organizations and roles in the Arthur
|
125 |
+
application. Global roles should be scoped with the minimal privileges and should be given out with caution.
|
126 |
+
**It is not recommended to grant model or data access with global roles as that would give access to every model in the
|
127 |
+
system.** Global roles can be created in the Arthur installer Admin Console configuration in the "Use a 3rd Party
|
128 |
+
Global Identity Provider" section where the IdP configuration YAML is set. A list of custom global roles can be provided
|
129 |
+
in the Identity Provider YAML under the `globalRoleDefs` key. The following
|
130 |
+
example shows a global role for an Arthur cluster admin to manage organizations and RBAC for the
|
131 |
+
installation:
|
132 |
+
|
133 |
+
```yaml
|
134 |
+
globalRoleDefs:
|
135 |
+
# Here we specify a list to define multiple global roles
|
136 |
+
- name: "idp-admin" # change the name of this role to match the cluster administrator group name in your IdP
|
137 |
+
# this role grants a user permissions to manage organizations and RBAC policies in Arthur
|
138 |
+
permissions:
|
139 |
+
custom_roles:
|
140 |
+
- read
|
141 |
+
- write
|
142 |
+
- delete
|
143 |
+
organization_global:
|
144 |
+
- read
|
145 |
+
- write
|
146 |
+
organization:
|
147 |
+
- read
|
148 |
+
- delete
|
149 |
+
```
|
150 |
+
|
151 |
+
Once you add a role to your config, be sure to click "Save" at the bottom of the page and then deploy the change. After
|
152 |
+
the update completes, the new global role should be created.
|
153 |
+
|
154 |
+
(creating_organization_roles)=
|
155 |
+
|
156 |
+
### Creating Organization Scoped Roles for Non-admin Users
|
157 |
+
|
158 |
+
Completing this section will require either access to the Arthur superadmin user, or access to a previously created,
|
159 |
+
custom global role assumable via an IdP
|
160 |
+
(see [above](#creating-global-roles-for-managing-organizations-and-rbac-policies)).
|
161 |
+
Additionally, only installations with SSO configured can use custom RBAC policies. If you do not have SSO configured,
|
162 |
+
please see {doc}`../standard_access_control`.
|
163 |
+
|
164 |
+
The section below assumes an organization already exists that you would like to give users access to. If you would like
|
165 |
+
to create a new Arthur organization, please check out the
|
166 |
+
{ref}`Managing RBAC and Organizations for SSO users <custom_rbac_managing_orgs_and_roles>`,
|
167 |
+
then come back here to add roles to that new organization.
|
168 |
+
|
169 |
+
Using either the Arthur superadmin user or having assumed a custom RBAC role with global scope to manage RBAC,
|
170 |
+
organization scoped roles can be created using the Arthur API. The following is an example of a request to create a new
|
171 |
+
role in an organization. Be sure to fill in the missing values for the hostname,
|
172 |
+
authorization token (must be a superadmin or your token from a custom global role), organization ID, and change the role
|
173 |
+
names to match your IdP user groups. See
|
174 |
+
{ref}`Managing RBAC and Organizations for SSO users <custom_rbac_managing_orgs_and_roles>` for an overview of role
|
175 |
+
permissions and some example roles.
|
176 |
+
|
177 |
+
```shell
|
178 |
+
curl --location 'https://<YOUR ARTHUR HOST HERE>/api/v3/authorization/custom_roles' \
|
179 |
+
--header 'Arthur-Organization-ID: <YOUR ORGANIZATION ID HERE>' \
|
180 |
+
--header 'Content-Type: application/json' \
|
181 |
+
--header 'Authorization: Bearer <YOUR AUTH TOKEN HERE>' \
|
182 |
+
--data '{
|
183 |
+
"roles": [
|
184 |
+
{
|
185 |
+
"role_name": "my-idp-group-1",
|
186 |
+
"inherited_role_names": [
|
187 |
+
"Administrator"
|
188 |
+
]
|
189 |
+
},
|
190 |
+
{
|
191 |
+
"role_name": "my-idp-group-2",
|
192 |
+
"inherited_role_names": [
|
193 |
+
"Model Owner"
|
194 |
+
]
|
195 |
+
}
|
196 |
+
]
|
197 |
+
}'
|
198 |
+
```
|
199 |
+
|
200 |
+
This sample API call will create two custom roles in the `<YOUR ORGANIZATION ID HERE>` organization. These
|
201 |
+
roles will apply to users in the "my-idp-group-1" or "my-idp-group-2" groups managed by the IdP.
|
202 |
+
|
203 |
+
### Granting Users Access to Multiple Organizations
|
204 |
+
|
205 |
+
Users can be given access to multiple organizations by creating a unique custom role in each organization, then adding
|
206 |
+
them to the associated groups in the IdP. For example, if you have two organizations, `org-1` and `org-2`, the Arthur
|
207 |
+
cluster administrator will need to create a custom role in each organization. Let's call them `role-1` and `role-2`
|
208 |
+
respectively. As described above, these role names will need to correspond to user groups in the IdP so please name them
|
209 |
+
according to your group names. With two organizations and a role created in each, the last step is to add your users to
|
210 |
+
both groups in your IdP, and they will be able to access both organizations.
|
211 |
+
|
212 |
+
```{note}
|
213 |
+
If users have access to more than one organization, they will need to specify one to use during API calls.
|
214 |
+
See the next section for more information on how to specify an organization when using the Arthur API.
|
215 |
+
```
|
216 |
+
|
217 |
+
## API Authentication with Multiple Organization Users
|
218 |
+
|
219 |
+
The Arthur platform separates resources logically by Arthur {ref}`Organizations <glossary_organization>`. When an Arthur
|
220 |
+
deployment is configured with Arthur's Standard Authentication mechanism, user access is granted to one organization at
|
221 |
+
a time, so all interactions with the platform are automatically scoped with that organization.
|
222 |
+
|
223 |
+
However, when SSO is enabled, SSO tokens can grant access to one or more Arthur organizations at a time. They do this by
|
224 |
+
listing multiple roles for a user within the token, each with access to a distinct organization. As a result, users can
|
225 |
+
have access to more than one organization at a time, and Arthur cannot determine which organization the user intends to
|
226 |
+
take an action in. Therefore, when SSO users have access to more than one organization, they must select a specific
|
227 |
+
Arthur Organization in each request to the platform via the methods described in this section.
|
228 |
+
|
229 |
+
### Alternatives for Selecting an Organization in the Arthur API
|
230 |
+
|
231 |
+
1. Request Header
|
232 |
+
2. Session-Based Organization Tracking
|
233 |
+
3. Arthur SDK Client
|
234 |
+
4. Deep Linking to an Organization in the UI
|
235 |
+
|
236 |
+
### Request Header
|
237 |
+
|
238 |
+
In an API call made by an SSO-authenticated user with access to more than one organization, the platform will first
|
239 |
+
check for a request header with an `Arthur-Organization-ID` key. If one is found, the platform will parse it and,
|
240 |
+
assuming the organization exists and the calling user can access it, continue the request with the specified ID as its
|
241 |
+
target organization. If the header is not found, it will fall back to one of the other methods described below.
|
242 |
+
If the header is present and the user does not have access to the organization, the API will return a 404 status code.
|
243 |
+
|
244 |
+
### Session-Based Organization Tracking
|
245 |
+
|
246 |
+
If no organization-specifying request header is included in the request, the platform will then use session information
|
247 |
+
to determine one.
|
248 |
+
|
249 |
+
Sessions enable users to establish a long-lived association with an organization that can be used to automatically scope
|
250 |
+
all requests to a specific organization. Users can establish a session using the
|
251 |
+
[PUT /organizations/current](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/organizations/paths/~1organizations~1current/put)
|
252 |
+
endpoint. Similarly, they can retrieve the organization from their current session with the
|
253 |
+
[GET /organizations/current](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/organizations/paths/~1organizations~1current/get)
|
254 |
+
endpoint.
|
255 |
+
|
256 |
+
By calling `PUT /organizations/current` with a target organization specified, a user receives an `_arthur_session`
|
257 |
+
cookie that associates future requests with the target organization. Any future calls to `PUT /organizations/current`
|
258 |
+
will return a new `_arthur_session` cookie to track your new session for whichever organization is specified in
|
259 |
+
the `PUT` call.
|
260 |
+
|
261 |
+
By calling `GET /organizations/current` with an `_arthur_session` cookie included in the request, users can retrieve the
|
262 |
+
organization their current session is associated with.
|
263 |
+
|
264 |
+
```{note}
|
265 |
+
Sessions do not provide any access to Arthur on their own. They only keep track of the user's association with a
|
266 |
+
specific organization. Users must also have an access token to authenticate with the Arthur APIs.
|
267 |
+
Since sessions do not grant any access to the Arthur platform, they expire after 30 days to prevent
|
268 |
+
users from repeatedly having to specify an organization.
|
269 |
+
```
|
270 |
+
|
271 |
+
### Arthur SDK Client
|
272 |
+
|
273 |
+
For SSO-authenticated users with access to more than one organization working with the Arthur SDK, the SDK client allows
|
274 |
+
selecting a specific organization. _Note: SDK users with access to a single Arthur organization will automatically have
|
275 |
+
their one organization set._
|
276 |
+
|
277 |
+
When an SDK user is instantiating the
|
278 |
+
[`ArthurAI` client](https://docs.arthur.ai/sdk/sdk_v3/apiref/arthurai.client.client.ArthurAI.html#arthurai.client.client.ArthurAI)
|
279 |
+
, they can first specify which organization they want that client to be associated with by passing in that
|
280 |
+
organization's ID as the `organization_id` optional parameter.
|
281 |
+
|
282 |
+
```python
|
283 |
+
connection = ArthurAI(organization_id=org_id: str, ...)
|
284 |
+
```
|
285 |
+
|
286 |
+
After the `ArthurAI` client has been instantiated, users can update the client's current organization by calling
|
287 |
+
the [`set_current_org()`](https://docs.arthur.ai/sdk/sdk_v3/apiref/arthurai.client.client.ArthurAI.html#arthurai.client.client.ArthurAI.set_current_org)
|
288 |
+
method.
|
289 |
+
|
290 |
+
```python
|
291 |
+
connection.set_current_org(org_id: str)
|
292 |
+
```
|
293 |
+
|
294 |
+
At any point, SDK users can access their `ArthurAI` client's current organization by calling
|
295 |
+
the [`get_current_org()`](https://docs.arthur.ai/sdk/sdk_v3/apiref/arthurai.client.client.ArthurAI.html#arthurai.client.client.ArthurAI.get_current_org)
|
296 |
+
method.
|
297 |
+
|
298 |
+
```python
|
299 |
+
current_org = connection.get_current_org()
|
300 |
+
```
|
301 |
+
|
302 |
+
### Deep Linking to an Organization in the UI
|
303 |
+
|
304 |
+
If an SSO-authenticated user has access to more than one organization, Arthur allows them to bypass manual organization
|
305 |
+
selection through deep linking. A user can append the url parameter `?organization_id=<ORG-ID>` to the Arthur
|
306 |
+
platform host name, where `<ORG-ID>` is equal to one of the organization IDs to which the user has access. This
|
307 |
+
will tie the users session to that organization ID upon authentication through SSO.
|
308 |
+
|
309 |
+
N.B. This will only work when appended to the platform host name.
|
310 |
+
E.g. `https://[Arthur hostname]/?organization_id=<ORG-ID>` This will not work if you are attempting to apply the
|
311 |
+
parameter to any other path on the Arthur host. E.g. `https://[Arthur hostname]/login/?organization_id=<ORG-ID>` will
|
312 |
+
NOT work.
|
313 |
+
|
314 |
+
```{toctree}
|
315 |
+
:maxdepth: 2
|
316 |
+
:hidden:
|
317 |
+
|
318 |
+
OIDC <setting_up_oidc_idp>
|
319 |
+
SAML <setting_up_saml_idp>
|
320 |
+
Custom RBAC <custom_rbac>
|
321 |
+
```
|
322 |
+
|
files/arthur-docs-markdown/platform-management/access-control-overview/sso-access-control/setting_up_oidc_idp.md.txt
ADDED
@@ -0,0 +1,555 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Setting Up an OIDC IdP
|
2 |
+
|
3 |
+
```{note}
|
4 |
+
SSO configurations are only supported in on-prem Arthur installations.
|
5 |
+
```
|
6 |
+
|
7 |
+
This page provides a walk-through for how to configure your Arthur installation to work with an OIDC compatible IdP.
|
8 |
+
In order to complete this guide, you need
|
9 |
+
administrator access to your IdP and access to your Arthur installation's admin console configuration. Additionally, you
|
10 |
+
will either need access to the Arthur superadmin user or be able to assume a role in your IdP to give yourself RBAC
|
11 |
+
management permissions in Arthur.
|
12 |
+
|
13 |
+
This guide will walk through the following steps:
|
14 |
+
|
15 |
+
1. Configure the IdP user groups and OIDC token claims
|
16 |
+
2. Configure the IdP OIDC Settings
|
17 |
+
3. Configure Arthur to work with your IdP
|
18 |
+
4. Apply the Arthur IdP YAML configuration
|
19 |
+
5. Create organization user roles to match the IdP user groups
|
20 |
+
6. Test Access
|
21 |
+
7. Cleaning Up
|
22 |
+
|
23 |
+
## 1. Configure the IdP user groups and OIDC token claims
|
24 |
+
|
25 |
+
In order to properly map users to permissions, Arthur requires a claim in your OIDC JSON Web Token (JWT) that contains
|
26 |
+
information about the group memberships of the user. Each group in the IdP should correspond to a role in Arthur's
|
27 |
+
{doc}`custom_rbac` permission system.
|
28 |
+
|
29 |
+
This process can vary depending on your IdP, but most IdP's should have a user grouping mechanism, and a mechanism to
|
30 |
+
configure attributes in the JWT claims. For example using Okta, admins can
|
31 |
+
configure the JWT claims to include group information under their account's Security -> API -> default -> Claims then
|
32 |
+
the "Add Claim" button. From the popup, give the claim a name, "Groups" in this example, set the "Include in token type"
|
33 |
+
to "Access Token", select "Value type" as "Groups", and include a "Matches regex" filter to select the groups to
|
34 |
+
include:
|
35 |
+
|
36 |
+

|
37 |
+
|
38 |
+
Retrieving an example OIDC token is IdP-specific and may involve completing the sign-in flow via a script or API client.
|
39 |
+
An alternative can be to use a 3rd party like [https://oidcdebugger.com](https://oidcdebugger.com), but that will
|
40 |
+
require
|
41 |
+
whitelisting `https://oidcdebugger.com/debug` as a valid redirect URL for your Arthur SSO app (this could be enabled
|
42 |
+
temporarily for debugging, then removed). Here is an example JWT after setting the group claims field:
|
43 |
+
|
44 |
+
```json
|
45 |
+
{
|
46 |
+
"iss": "https://dev.okta.com/oauth2/default",
|
47 |
+
"aud": "api://default",
|
48 |
+
"scp": [
|
49 |
+
"openid"
|
50 |
+
],
|
51 |
+
"Groups": [
|
52 |
+
"idp-admin",
|
53 |
+
"org-1-model-owner",
|
54 |
+
"org-2-model-owner"
|
55 |
+
],
|
56 |
+
"FirstName": "John",
|
57 |
+
"LastName": "Doe",
|
58 |
+
"Login": "john.doe@arthur.ai"
|
59 |
+
}
|
60 |
+
```
|
61 |
+
|
62 |
+
As the example token shows, the user's groups in the IdP are populated as a string list in the "Groups" field in the
|
63 |
+
token. Arthur will use this list of groups to match the user to the corresponding roles in Arthur by name.
|
64 |
+
|
65 |
+
## 2. Configure the IdP OIDC Settings
|
66 |
+
|
67 |
+
In order for your IdP to speak to Arthur, it needs to know where to find it. Enter the following URL in your IdP's
|
68 |
+
configuration to whitelist Arthur's callback endpoint (sign-in redirect
|
69 |
+
URL): `https://<YOUR ARTHUR HOST>/login/callback`.
|
70 |
+
|
71 |
+
Additionally, the IdP will need to know what OIDC protocol to speak with Arthur. Today, Arthur supports two protocol
|
72 |
+
flows:
|
73 |
+
|
74 |
+
1. `implicit`
|
75 |
+
2. `PKCE`
|
76 |
+
|
77 |
+
Both flows are intended to be used with "Single Page Applications" or SPAs. Follow the configuration for your IdP that
|
78 |
+
matches one of those two flows with SPAs. Additionally, note the following settings from your IdP in order to use in
|
79 |
+
the Arthur configuration below:
|
80 |
+
|
81 |
+
- Client ID
|
82 |
+
- Resource ID (if available)
|
83 |
+
- OIDC flow (PKCE or implicit)
|
84 |
+
- Audience (value that is set in the token by the IdP)
|
85 |
+
|
86 |
+
## 3. Configure Arthur to work with your IdP
|
87 |
+
|
88 |
+
Next, Arthur needs to know how to handshake with your IdP. To do that, Arthur requires the following
|
89 |
+
information:
|
90 |
+
|
91 |
+
1. Your IdP's discovery URL, typically in the format `<IdP path>/.well-known/openid-configuration` URL that contains the
|
92 |
+
relevant endpoints for your IdP.
|
93 |
+
```{note}
|
94 |
+
If this page isn't accessible to Arthur due to CORS or other restrictions, the values can be provided manually.
|
95 |
+
```
|
96 |
+
2. One or more IdP administrator user groups that will be paired to global custom roles in Arthur
|
97 |
+
(see [here](#configure-the-arthur-global-roles) for a description of what these are for)
|
98 |
+
3. An understanding of your OIDC token claims (values) and how to parse user information out of it
|
99 |
+
4. The four configuration values captured above from your IdP
|
100 |
+
|
101 |
+
With that information available, it is possible to fill out Arthur's IdP configuration YAML. The next subsections
|
102 |
+
explain each subsection of the Arthur YAML configuration, and is followed by some complete examples further down.
|
103 |
+
|
104 |
+
### Configuring the IdPs discovery URL
|
105 |
+
|
106 |
+
Almost all OIDC IdP's have accessible discovery URLs, but some do not provide CORS support for them, so their contents
|
107 |
+
need to be filled out manually. To support either option, Arthur has two configurations that can be
|
108 |
+
used, `discoveryBaseURL` or `endpointOverrides`. If your IdP has CORS restrictions,
|
109 |
+
see [Appendix B](#appendix-b-setup-for-idps-with-cors-restrictions) for additional
|
110 |
+
setup that is required.
|
111 |
+
|
112 |
+
```yaml
|
113 |
+
# use this option if your IdP has an accessible discovery URL
|
114 |
+
# IMPORTANT: don't include the /.well-known/openid-configuration suffix!!
|
115 |
+
# for example, if the full URL is https://<HOST>/oauth2/default/.well-known/openid-configuration
|
116 |
+
# only specify: https://<HOST>/oauth2/default
|
117 |
+
discoveryBaseURL: "https://<HOST>/oauth2/default"
|
118 |
+
# use this option if your IdP has CORS restrictions on the discovery URL, otherwise comment this out.
|
119 |
+
# fill in the values manually from the discovery endpoint's contents
|
120 |
+
endpointOverrides:
|
121 |
+
issuer: "issuer string for the IDP"
|
122 |
+
authorization_endpoint: "URL ending in /authorize"
|
123 |
+
token_endpoint: "URL ending in /token"
|
124 |
+
jwks_uri: "URL ending in /keys"
|
125 |
+
userinfo_endpoint: "URL ending in /userinfo"
|
126 |
+
# note not all IdPs will have the following endpoints, fill in as many as you can
|
127 |
+
end_session_endpoint: "URL ending in /logout"
|
128 |
+
device_authorization_endpoint: "URL ending in /devicecode"
|
129 |
+
revocation_endpoint: "URL ending in /revoke"
|
130 |
+
introspection_endpoint: "URL ending in /introspect"
|
131 |
+
registration_endpoint: "URL ending in /clients"
|
132 |
+
```
|
133 |
+
|
134 |
+
### Configure the Arthur Global Roles
|
135 |
+
|
136 |
+
Arthur has the ability to create roles for the cluster administrators during the configuration of the IdP. These roles
|
137 |
+
are often needed by admins to configure RBAC and create organizations for other users in the system. See
|
138 |
+
{ref}`creating_global_roles_in_arthur_config` for a deep dive on how to use global roles.
|
139 |
+
|
140 |
+
This section of the YAML config is under the `globalRoleDefs` field. It accepts a list of role definitions that will be
|
141 |
+
created when the configuration is applied. The names of the roles in this section must match the user groups in your IdP
|
142 |
+
in order to be able to assume them in Arthur.
|
143 |
+
|
144 |
+
```yaml
|
145 |
+
globalRoleDefs:
|
146 |
+
# Here we can specify a list to define multiple global roles
|
147 |
+
- name: "idp-admin" # change this name to match the cluster administrator group name in your IdP
|
148 |
+
permissions:
|
149 |
+
custom_roles:
|
150 |
+
- read
|
151 |
+
- write
|
152 |
+
- delete
|
153 |
+
organization_global:
|
154 |
+
- read
|
155 |
+
- write
|
156 |
+
organization:
|
157 |
+
- read
|
158 |
+
- delete
|
159 |
+
model:
|
160 |
+
- read
|
161 |
+
- write
|
162 |
+
- delete
|
163 |
+
```
|
164 |
+
|
165 |
+
### Parsing the IdP JWT claims
|
166 |
+
|
167 |
+
In order for Arthur to communicate with your IdP, it needs to understand the format of the JWT claims your IdP uses.
|
168 |
+
This section of the config falls under the `accessTokenValidation` YAML field. This section is designed to be flexible
|
169 |
+
to
|
170 |
+
support a variety of claim formats, so it has a lot of options. At its core, the goal is to tell Arthur how to be
|
171 |
+
able to extract the following information from the claims:
|
172 |
+
|
173 |
+
- user roles/groups
|
174 |
+
- first name
|
175 |
+
- last name
|
176 |
+
- email
|
177 |
+
- user ID
|
178 |
+
|
179 |
+
Each field has a corresponding YAML configuration that defines where to find the information in the JWT claims. For
|
180 |
+
example:
|
181 |
+
|
182 |
+
```yaml
|
183 |
+
claimMapping:
|
184 |
+
firstName: FirstName
|
185 |
+
```
|
186 |
+
|
187 |
+
This configuration tells Arthur that it can find the user's first name under the "FirstName" claim in the
|
188 |
+
JWT. Such a token might look like this:
|
189 |
+
|
190 |
+
```json
|
191 |
+
{
|
192 |
+
"iss": "https://dev.okta.com/oauth2/default",
|
193 |
+
"aud": "api://default",
|
194 |
+
"scp": [
|
195 |
+
"openid"
|
196 |
+
],
|
197 |
+
"Groups": [
|
198 |
+
"idp-admin",
|
199 |
+
"org-1-model-owner",
|
200 |
+
"org-2-model-owner"
|
201 |
+
],
|
202 |
+
"FirstName": "John",
|
203 |
+
"LastName": "Doe",
|
204 |
+
"Login": "john.doe@arthur.ai"
|
205 |
+
}
|
206 |
+
```
|
207 |
+
|
208 |
+
More examples of how to parse user information out of the JWT claims can be
|
209 |
+
found [below](#appendix-a-more-examples-of-jwt-claims-and-how-to-parse-them).
|
210 |
+
|
211 |
+
### Full Configuration Examples
|
212 |
+
|
213 |
+
Here is an example of a full configuration, combining each section described above.
|
214 |
+
|
215 |
+
```yaml
|
216 |
+
version: v2
|
217 |
+
kind: OIDC
|
218 |
+
config:
|
219 |
+
# discovery URL without the /.well-known/openid-configuration suffix
|
220 |
+
discoveryBaseURL: https://example.com/oauth2/default
|
221 |
+
# Either "implicit" or "PKCE"
|
222 |
+
flowType: PKCE
|
223 |
+
# client ID from your IdP for the Arthur SSO application
|
224 |
+
clientID: "client id string"
|
225 |
+
# optional: resource ID from your IdP for the Arthur SSO application if required by the IdP
|
226 |
+
resourceID: ""
|
227 |
+
authorizeScopes:
|
228 |
+
- openid # required for OIDC
|
229 |
+
# use this section to define global roles
|
230 |
+
# one example role would be to give the cluster admin permissions to create organizations and manage custom roles
|
231 |
+
globalRoleDefs:
|
232 |
+
- name: "iam-admin" # change this to match the user group name in your IdP for administrators
|
233 |
+
permissions:
|
234 |
+
custom_roles:
|
235 |
+
- read
|
236 |
+
- write
|
237 |
+
- delete
|
238 |
+
organization_global:
|
239 |
+
- read
|
240 |
+
- write
|
241 |
+
organization:
|
242 |
+
- read
|
243 |
+
- delete
|
244 |
+
# this section describes how to parse the user information out of the JWT returned from the IdP
|
245 |
+
# this is used by Arthur to understand who the user is and what their roles are
|
246 |
+
accessTokenValidation:
|
247 |
+
type: JWT # only JWT is supported today
|
248 |
+
# fields in the token Arthur will use to extract the authentication information
|
249 |
+
claimMapping:
|
250 |
+
roles: Groups # this is telling Arthur to look in the "Groups" claim to find the list of user's roles
|
251 |
+
userID: EmployeeID
|
252 |
+
username: Login
|
253 |
+
firstName: FirstName
|
254 |
+
lastName: LastName
|
255 |
+
email: Login
|
256 |
+
|
257 |
+
# one or more audiences to validate, this should match your IdP's configuration
|
258 |
+
audience:
|
259 |
+
- api://default
|
260 |
+
|
261 |
+
# optional override signature algo
|
262 |
+
# signatureAlgo: RS256
|
263 |
+
|
264 |
+
```
|
265 |
+
|
266 |
+
Here is an additional descriptions of the fields that need to be set in the config YAML above:
|
267 |
+
|
268 |
+
* `discoveryBaseURL`: This is the base URL for your Identity Provider. Your IdP should have
|
269 |
+
a `/.well-known/openid-configuration` endpoint and the
|
270 |
+
discoveryBaseURL is simply that url minus the `/.well-known/openid-configuration` part.
|
271 |
+
* `flowType`: We support both implicit and PKCE flows. Consult with your team to decide which OIDC flow type is right
|
272 |
+
for your organization.
|
273 |
+
* `clientID`: When you create the application integration in your IdP, a Client ID will be provided to you. Paste that
|
274 |
+
value into this field.
|
275 |
+
* `resourceID`: This is optional. If your IdP gives you a Resource ID when creating your application integration, paste
|
276 |
+
the value here.
|
277 |
+
* `claimMapping`: We extract various pieces of authentication information from the provided JWT access token. However,
|
278 |
+
there is no common standard for
|
279 |
+
how these pieces of information should be formatted in the token. For us to extract this information from the token,
|
280 |
+
we need you to explicitly tell Arthur
|
281 |
+
where this information is stored in the token. For example, a username could be stored in a field called `username`
|
282 |
+
or `login` or `email` or `userID`.
|
283 |
+
In order to get this user information, a mapping needs to be provided for the following items
|
284 |
+
* `roles`: This is the field for where either a single authorization role or a list of authorization roles will be
|
285 |
+
specified.
|
286 |
+
Note that this is **not** where you paste a list of roles, this is **the name of a field** in the JWT where the
|
287 |
+
user's roles are specified.
|
288 |
+
For help with role definitions, see {doc}`custom_rbac`.(Required)
|
289 |
+
* `userID`: This is the field for a unique identifier for the user; this is frequently the same as `username`
|
290 |
+
and/or `email`. (Optional, omit if empty)
|
291 |
+
* `username`: This is the field for the user's unique username; this is frequently the same as `username`
|
292 |
+
and/or `email`. (Optional, omit if empty)
|
293 |
+
* `firstName`: This is the field for the user's first name. (Optional, omit if empty)
|
294 |
+
* `lastName`: This is the field for the user's last name. (Optional, omit if empty)
|
295 |
+
* `email`: This is the field for the user's email. (Optional, omit if empty)
|
296 |
+
* `audience`: This is part of the JWT standard. The `aud` field for any JWT you create must be a value in this list. For
|
297 |
+
example in the above configuration, any token that has an `aud` field that is not set to `api://defaults`, the token
|
298 |
+
will be automatically rejected by Arthur. If you are having trouble finding this value, it is frequently the same as
|
299 |
+
your `resourceID`. Remember to format this as a _list_, not a single value.
|
300 |
+
|
301 |
+
```{note}
|
302 |
+
If your IdP has CORS restrictions see
|
303 |
+
[Appendix B](#appendix-b-setup-for-idps-with-cors-restrictions) below for a workaround.
|
304 |
+
```
|
305 |
+
|
306 |
+
## 4. Apply the Arthur IdP YAML configuration
|
307 |
+
|
308 |
+
Once you have your YAML configuration file ready, you need to add it to your Arthur installation. With the Arthur admin
|
309 |
+
console open, navigate to the "Use a 3rd Party Global Identity Provider" section and select "OIDC". This will expose a
|
310 |
+
text box for you to paste the YAML config file assembled above. When pasting, make sure whitespace is preserved and the
|
311 |
+
YAML document has consistent spacing (do not mix tabs and spaces). Here is a screenshot of the config section:
|
312 |
+
|
313 |
+

|
314 |
+
|
315 |
+
Once you have added your config files, scroll to the bottom and click "Save" to save the config. Then go to the latest
|
316 |
+
version and click "Deploy" to roll out the change to the cluster.
|
317 |
+
|
318 |
+
## 5. Create organization user roles to match the IdP user groups
|
319 |
+
|
320 |
+
In order to complete this section, you will need access to the Arthur superadmin user credentials set during your
|
321 |
+
install, or you will need to be able to assume the role defined in the Arthur IdP config YAML created above in
|
322 |
+
the `globalRoleDefs` section.
|
323 |
+
|
324 |
+
In order to use the API example linked below, you will need a Bearer token (authentication token) to include with your
|
325 |
+
API request. There are a few options available to retrieve a token:
|
326 |
+
|
327 |
+
1. **Retrieve a global role token directly from your IdP** - Most IdPs will have a method to retrieve tokens for users.
|
328 |
+
Some companies make scripts or APIs that allow retrieving a token. If your IdP does not have an automated method to
|
329 |
+
retrieve a token, you can try setting up a tool like [https://oidcdebugger.com](https://oidcdebugger.com) (this may
|
330 |
+
involve adding `https://oidcdebugger.com` as an allowed URL in your IdP settings).
|
331 |
+
2. **Retrieve a global role token from your browser cookies** - If you sign in to Arthur as a user with a global role,
|
332 |
+
the UI will not be fully functional, but it will have a valid access token in the cookies. If you navigate to your
|
333 |
+
browser's developer console and then go to the Application Storage/Cookies section, you should see a cookie like
|
334 |
+
`ArthurAuth0`, which is your authentication token. Note: if your user has a large number of groups, there may be
|
335 |
+
multiple cookies of the form `ArthurAuthN`. In this case your token was too large to fit in the browser cookie, so
|
336 |
+
it had to be split. You can assemble the full token by concatenating the values of the `ArthurAuthN` cookies in
|
337 |
+
order.
|
338 |
+
3. Use the [/login](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/auth/paths/~1login/post) API endpoint
|
339 |
+
with the superadmin user's credentials set during the Arthur install (only available on-prem).
|
340 |
+
|
341 |
+
Using either of those credentials, we can use the Arthur API to define roles in Arthur that match the user group names
|
342 |
+
in your IdP. See the {ref}`creating_organization_roles` section for an example API request to create custom roles in
|
343 |
+
Arthur. Importantly, the role
|
344 |
+
names must uniquely match to a user group in your IdP in order for your users to be able to assume those permissions in
|
345 |
+
Arthur. Therefore, the roles in Arthur must be globally unique in the entire Arthur installation.
|
346 |
+
|
347 |
+
## 6. Test Access
|
348 |
+
|
349 |
+
At this point everything should be configured correctly to sign in to Arthur via SSO. Either navigate to your IdP
|
350 |
+
or the Arthur homepage to test logging in.
|
351 |
+
|
352 |
+
## 7. Cleaning Up
|
353 |
+
|
354 |
+
Once users are successfully able to log in to Arthur via the IdP, you should do the following to ensure proper security
|
355 |
+
best-practices remain enforced:
|
356 |
+
|
357 |
+
- Restrict any Arthur global roles to only allow access to essential admin functions
|
358 |
+
- Set the Arthur superadmin user password securely, and either store the password in a vault, or discard the password
|
359 |
+
entirely. superadmin shouldn't be used going forward.
|
360 |
+
- Set up a policy to routinely rotate the superadmin password to keep it secure
|
361 |
+
|
362 |
+
Together, these practices will help ensure the security of your Arthur installation, and will give your IdP sole control
|
363 |
+
over the platform and who is able to access it.
|
364 |
+
|
365 |
+
## Common Troubleshooting
|
366 |
+
|
367 |
+
If after following the steps above, users are not able to log in via the IdP try some of these common troubleshooting
|
368 |
+
tips:
|
369 |
+
|
370 |
+
### Does the user properly redirected to the IdP's log in screen?
|
371 |
+
|
372 |
+
If not, there is likely a configuration error in the Arthur YAML config with the IdP discovery URL. Double check
|
373 |
+
that the url entered resolved correctly when you append `/.well-known/openid-configuration` to the end of it. The full
|
374 |
+
URL should be viewable in your browser or via a REST client.
|
375 |
+
|
376 |
+
### Once the user authenticates with the IdP, are they redirected to the Arthur homepage?
|
377 |
+
|
378 |
+
If not, there is likely a configuration error with the IdP and the URLs that it uses to communicate with Arthur.
|
379 |
+
Double-check the redirect (whitelisted) URL is configured correctly for the Arthur installation
|
380 |
+
at `https://<HOSTNAME>/login/callback`.
|
381 |
+
|
382 |
+
### A user can see the Arthur home page, but can't see any of the model in their organization
|
383 |
+
|
384 |
+
If a user cannot see any of the models in their organization, it means they either don't have the necessary permissions
|
385 |
+
to access models (see {doc}`../../reference/permissions_by_endpoint`) or they were not able to correctly assume the role
|
386 |
+
in Arthur. Double-check the groups in
|
387 |
+
their JWT claims match the role names that have been configured in Arthur. A superadmin or global role user with
|
388 |
+
permissions to manage RBAC can see a list of roles in the installation by using the following API call. Be sure to
|
389 |
+
replace the HOST and AUTH TOKEN for your installation and user:
|
390 |
+
|
391 |
+
```shell
|
392 |
+
curl --location 'https://<HOST>/api/v3/authorization/custom_roles' \
|
393 |
+
--header 'Authorization: Bearer <INSERT AUTH TOKEN HERE>'
|
394 |
+
```
|
395 |
+
|
396 |
+
## Appendix A: More examples of JWT claims and how to parse them
|
397 |
+
|
398 |
+
This section outlines some additional ways to use the `accessTokenValidation` section of the Arthur IdP config YAML
|
399 |
+
format. The below examples include sample JWTs, then corresponding YAML for how to parse them.
|
400 |
+
|
401 |
+
### Basic Full Example
|
402 |
+
|
403 |
+
This example shows how to parse a user's information from JWT claims in a typical format.
|
404 |
+
Example parsed JWT claims JSON:
|
405 |
+
|
406 |
+
```json
|
407 |
+
{
|
408 |
+
"iss": "https://dev.okta.com/oauth2/default",
|
409 |
+
"aud": "api://default",
|
410 |
+
"scp": [
|
411 |
+
"openid"
|
412 |
+
],
|
413 |
+
"Groups": [
|
414 |
+
"idp-admin",
|
415 |
+
"org-1-model-owner",
|
416 |
+
"org-2-model-owner"
|
417 |
+
],
|
418 |
+
"FirstName": "John",
|
419 |
+
"LastName": "Doe",
|
420 |
+
"Login": "john.doe@arthur.ai",
|
421 |
+
"EmployeeID": "1234567890"
|
422 |
+
}
|
423 |
+
```
|
424 |
+
|
425 |
+
Corresponding settings for the Arthur IdP config YAML `accessTokenValidation` for the user information field:
|
426 |
+
|
427 |
+
```yaml
|
428 |
+
accessTokenValidation:
|
429 |
+
type: JWT
|
430 |
+
claimMapping:
|
431 |
+
roles: Groups
|
432 |
+
userID: EmployeeID
|
433 |
+
username: Login
|
434 |
+
firstName: FirstName
|
435 |
+
lastName: LastName
|
436 |
+
email: Login
|
437 |
+
```
|
438 |
+
|
439 |
+
### Minimal Example
|
440 |
+
|
441 |
+
This example shows how to parse a user's information from JWT claims when many fields are missing.
|
442 |
+
Example parsed JWT claims JSON:
|
443 |
+
|
444 |
+
```json
|
445 |
+
{
|
446 |
+
"iss": "https://dev.okta.com/oauth2/default",
|
447 |
+
"aud": "api://default",
|
448 |
+
"scp": [
|
449 |
+
"openid"
|
450 |
+
],
|
451 |
+
"Groups": [
|
452 |
+
"idp-admin",
|
453 |
+
"org-1-model-owner",
|
454 |
+
"org-2-model-owner"
|
455 |
+
],
|
456 |
+
"user": "john.doe@arthur.ai"
|
457 |
+
}
|
458 |
+
```
|
459 |
+
|
460 |
+
Corresponding settings for the Arthur IdP config YAML `accessTokenValidation` for the user information field:
|
461 |
+
|
462 |
+
```yaml
|
463 |
+
accessTokenValidation:
|
464 |
+
type: JWT
|
465 |
+
claimMapping:
|
466 |
+
roles: Groups
|
467 |
+
userID: user
|
468 |
+
username: user
|
469 |
+
firstName: ""
|
470 |
+
lastName: ""
|
471 |
+
email: user
|
472 |
+
```
|
473 |
+
|
474 |
+
## Appendix B: Setup for IdPs with CORS Restrictions
|
475 |
+
|
476 |
+
Completing this will require access to the Kubernetes cluster Arthur is running in, and the ability to create ingress
|
477 |
+
resources in that cluster.
|
478 |
+
|
479 |
+
If your OIDC Identity Provider does not support CORS (common with Microsoft Azure AD), you will need to proxy
|
480 |
+
requests via the Arthur backend. The following examples show how this can be done with a cluster using the
|
481 |
+
NGINX ingress controller.
|
482 |
+
|
483 |
+
This first example YAML configures a route on NGINX that will proxy OIDC connections to your IdP. You'll need to
|
484 |
+
replace the `<IDP HOST>` and `<ARTHUR HOST>` placeholders, then apply it to your cluster with
|
485 |
+
`kubectl apply -n <NAMESPACE> -f file.yaml`. There should be two places to fill in each variable below.
|
486 |
+
|
487 |
+
```yaml
|
488 |
+
apiVersion: v1
|
489 |
+
kind: Service
|
490 |
+
metadata:
|
491 |
+
name: external-idp
|
492 |
+
spec:
|
493 |
+
type: ExternalName
|
494 |
+
externalName: "<IDP HOST>"
|
495 |
+
---
|
496 |
+
apiVersion: networking.k8s.io/v1
|
497 |
+
kind: Ingress
|
498 |
+
metadata:
|
499 |
+
name: external-idp
|
500 |
+
annotations:
|
501 |
+
kubernetes.io/ingress.class: nginx
|
502 |
+
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
503 |
+
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" #important
|
504 |
+
nginx.ingress.kubernetes.io/upstream-vhost: "<IDP HOST>"
|
505 |
+
spec:
|
506 |
+
rules:
|
507 |
+
- host: "<ARTHUR HOST>"
|
508 |
+
http:
|
509 |
+
paths:
|
510 |
+
- backend:
|
511 |
+
service:
|
512 |
+
name: external-idp
|
513 |
+
port:
|
514 |
+
number: 443
|
515 |
+
path: /oidc(/|$)(.*)
|
516 |
+
pathType: Prefix
|
517 |
+
tls:
|
518 |
+
- hosts:
|
519 |
+
- "<ARTHUR HOST>"
|
520 |
+
secretName: kotsadm-tls
|
521 |
+
```
|
522 |
+
|
523 |
+
After you've applied the above configuration to your cluster, you should be able to visit your IdP's
|
524 |
+
`/.well-known/openid-configuration` endpoint at the following URL:
|
525 |
+
`https://<ARTHUR HOST>/oidc/<your IdP's .well-known endpoint path>`. Once that is accessible, we need to modify
|
526 |
+
the OIDC YAML configuration file. Fill in the following example
|
527 |
+
with the correct values in the `endpointOverrides` section. Note, the `issuer` and `authorization_endpoint` fields
|
528 |
+
should match what is in your IdP's `/.well-known` spec. The rest of the values should use the same path as shown in the
|
529 |
+
IdP's `/.well-known` spec, but with the value of `<ARTHUR HOST>/oidc/` substituted for the host of the IdP.
|
530 |
+
The following example shows a proper CORS config for an IdP at the `https://XXXX.okta.com` address.
|
531 |
+
|
532 |
+
```yaml
|
533 |
+
version: v2
|
534 |
+
kind: OIDC
|
535 |
+
config:
|
536 |
+
discoveryBaseURL: https://XXXX.okta.com/oauth2/default
|
537 |
+
# if your IdP has CORS restrictions with the metadata URL,
|
538 |
+
# specify this block to prevent using the metadata endpoint to look them up
|
539 |
+
endpointOverrides:
|
540 |
+
# these first two match the IdP's .well-known spec
|
541 |
+
issuer: "https://XXXX.okta.com/oauth2/default"
|
542 |
+
authorization_endpoint: "https://XXXX.okta.com/oauth2/default/authorize"
|
543 |
+
# notice the following are all modified to add the <ARTHUR HOST>/oidc prefix in the URL
|
544 |
+
token_endpoint: "https://<ARTHUR HOST/oidc/oauth2/default/tokens"
|
545 |
+
jwks_uri: "https://<ARTHUR HOST/oidc/oauth2/default/keys"
|
546 |
+
userinfo_endpoint: "https://<ARTHUR HOST/oidc/oauth2/default/user_info"
|
547 |
+
end_session_endpoint: "https://<ARTHUR HOST/oidc/oauth2/default/logout"
|
548 |
+
|
549 |
+
# the rest of this file is unchanged from the examples above...
|
550 |
+
```
|
551 |
+
|
552 |
+
Once you have modified this YAML file accordingly, follow the [steps](#apply-the-arthur-idp-yaml-configuration)
|
553 |
+
above to save it to your installation.
|
554 |
+
|
555 |
+
|
files/arthur-docs-markdown/platform-management/access-control-overview/sso-access-control/setting_up_saml_idp.md.txt
ADDED
@@ -0,0 +1,479 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Setting Up a SAML IdP
|
2 |
+
|
3 |
+
```{note}
|
4 |
+
SSO configurations are only supported in on-prem Arthur installations.
|
5 |
+
```
|
6 |
+
|
7 |
+
This page provides a walk-through for how to configure your Arthur installation to work with a SAML compatible IdP.
|
8 |
+
In order to complete this guide, you need
|
9 |
+
administrator access to your IdP and access to your Arthur installation's admin console configuration. Additionally, you
|
10 |
+
will either need access to the Arthur superadmin user or be able to assume a role in your IdP to give yourself RBAC
|
11 |
+
management permissions in Arthur.
|
12 |
+
|
13 |
+
This guide will walk through the following steps:
|
14 |
+
|
15 |
+
1. Configure the IdP user groups and SAML assertion
|
16 |
+
2. Configure the Arthur service provider URLs in the IdP
|
17 |
+
3. Configure Arthur to work with your IdP
|
18 |
+
4. Apply the Arthur IdP YAML configuration
|
19 |
+
5. Create organization user roles to match the IdP user groups
|
20 |
+
6. Test Access
|
21 |
+
7. Cleaning Up
|
22 |
+
|
23 |
+
## 1. Configure the IdP user groups and SAML assertion
|
24 |
+
|
25 |
+
In order to properly map users to permissions, Arthur requires an attribute in your SAML assertion that contains
|
26 |
+
information about the group memberships of the user. Each group in the IdP should correspond to a role in Arthur's
|
27 |
+
{doc}`custom_rbac` permission system.
|
28 |
+
|
29 |
+
This process can vary depending on your IdP, but most IdP's should have a user grouping mechanism, and a mechanism to
|
30 |
+
configure attributes in the SAML assertions. For example using Okta, under the SAML application settings, admins can
|
31 |
+
configure the SAML assertion attributes to include group information under SAML Settings -> Configure SAML -> Group
|
32 |
+
Attribute Statements, then specifying a name for the attribute and a filter for the groups to include:
|
33 |
+
|
34 |
+

|
35 |
+
|
36 |
+
Setting this configuration produces the following attribute in the SAML assertion (in Okta click "Preview the SAML
|
37 |
+
Assertion" button to see a sample):
|
38 |
+
|
39 |
+
```xml
|
40 |
+
|
41 |
+
<saml2:AttributeStatement>
|
42 |
+
<saml2:Attribute Name="groups">
|
43 |
+
<saml2:AttributeValue>Everyone</saml2:AttributeValue>
|
44 |
+
<saml2:AttributeValue>admins</saml2:AttributeValue>
|
45 |
+
<saml2:AttributeValue>org-1-model-owners</saml2:AttributeValue>
|
46 |
+
</saml2:Attribute>
|
47 |
+
</saml2:AttributeStatement>
|
48 |
+
|
49 |
+
```
|
50 |
+
|
51 |
+
## 2. Configure the Arthur service provider URLs in the IdP
|
52 |
+
|
53 |
+
In order for your IdP to speak to Arthur, it needs to know where to find it. Enter the following URLs in your IdP's
|
54 |
+
configuration to Arthur's SAML endpoints:
|
55 |
+
|
56 |
+
- ACS URL (SSO URL): `https://<HOSTNAME>/api/v3/saml/sso`
|
57 |
+
- Entity ID: `https://<HOSTNAME>/api/v3/saml/sso`
|
58 |
+
- Start URL: `https://<HOSTNAME>/`
|
59 |
+
|
60 |
+
```{note}
|
61 |
+
If your IdP will be sending signed assertions to Arthur, you will also need to generate and upload the public key
|
62 |
+
(certificate) Arthur will be using in your IdP. This will be the same certificate you set in the Arthur configuration
|
63 |
+
[below](#apply-the-arthur-idp-yaml-configuration). Please follow your own company policies to obtain a certificate
|
64 |
+
for Arthur. If you have no internal guidelines, then use a tool like
|
65 |
+
[ssh-keygen](https://www.ibm.com/docs/en/spectrum-control/5.3.7?topic=agents-creating-certificate-ssh-protocol) to
|
66 |
+
generate them
|
67 |
+
```
|
68 |
+
|
69 |
+
## 3. Configure Arthur to work with your IdP
|
70 |
+
|
71 |
+
Additionally, Arthur needs to know how to handshake with your IdP. To do that, Arthur requires the following
|
72 |
+
information:
|
73 |
+
|
74 |
+
1. Your IdP's metadata URL or the metadata XML payload (some IdPs require it be downloaded, either is fine)
|
75 |
+
2. One or more IdP administrator user groups that will be paired to global custom roles in Arthur
|
76 |
+
(see [here](#configure-the-arthur-global-roles) for a description of what these are for)
|
77 |
+
3. An understanding of your SAML assertion and how to parse user information out of it
|
78 |
+
|
79 |
+
With those three things available, it is possible to fill out Arthur's IdP configuration YAML. The next subsections
|
80 |
+
explain each section of the Arthur YAML configuration, and are followed by some complete examples further down.
|
81 |
+
|
82 |
+
### Configuring the IdPs metadata URL
|
83 |
+
|
84 |
+
Some IdP's host their metadata XML at a public URL, while others only have it available for download privately. To
|
85 |
+
support either option, Arthur has two configurations that can be used:
|
86 |
+
|
87 |
+
```yaml
|
88 |
+
# use this option if your IdP has a public URL for its metadata
|
89 |
+
metadataURL: "link to IdP metadata goes here"
|
90 |
+
# use this option if your IdP does not have a public URL and include the XML payload
|
91 |
+
# make sure to indent the XML payload two spaces and make sure the X509Certificate lines
|
92 |
+
# do not have more than two leading whitespaces!
|
93 |
+
metadataXML: |
|
94 |
+
<?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor ...>
|
95 |
+
<md:IDPSSODescriptor>
|
96 |
+
...
|
97 |
+
<ds:X509Certificate>CERTIFICATE LINE 1
|
98 |
+
CERT LINE 2
|
99 |
+
CERT LINE 3
|
100 |
+
CERT LINE 4
|
101 |
+
LAST CERT LINE</ds:X509Certificate>
|
102 |
+
</md:IDPSSODescriptor>
|
103 |
+
</md:EntityDescriptor>
|
104 |
+
```
|
105 |
+
|
106 |
+
```{warning}
|
107 |
+
If using the `metadataXML` configuration option, make sure to indent the entire XML payload two spaces. YAML expects
|
108 |
+
multi-line values to be indented under the key `metadataXML`.
|
109 |
+
```
|
110 |
+
|
111 |
+
```{warning}
|
112 |
+
Additionally, the assertion's `X509Certificate` XML attribute is a multi-line value within the XML.
|
113 |
+
Any new lines in the certificate value need to be indented only two spaces (all the way to the left of the YAML value).
|
114 |
+
Otherwise, the extra whitespaces introduces characters which will invalidate the certificate value.
|
115 |
+
```
|
116 |
+
|
117 |
+
### Configure the Arthur Global Roles
|
118 |
+
|
119 |
+
Arthur has the ability to create roles for the cluster administrators during the configuration of the IdP. These roles
|
120 |
+
are often needed by admins to configure RBAC and create organizations for other users in the system. See
|
121 |
+
{ref}`creating_global_roles_in_arthur_config` for a deep dive on how to use global roles.
|
122 |
+
|
123 |
+
This section of the YAML config is under the `globalRoleDefs` field. It accepts a list of role definitions that will be
|
124 |
+
created when the configuration is applied. The names of the roles in this section must match the user groups in your IdP
|
125 |
+
in order to be able to assume them in Arthur.
|
126 |
+
|
127 |
+
```yaml
|
128 |
+
globalRoleDefs:
|
129 |
+
# Here we can specify a list to define multiple global roles
|
130 |
+
- name: "idp-admin" # change this name to match the cluster administrator group name in your IdP
|
131 |
+
permissions:
|
132 |
+
custom_roles:
|
133 |
+
- read
|
134 |
+
- write
|
135 |
+
- delete
|
136 |
+
organization_global:
|
137 |
+
- read
|
138 |
+
- write
|
139 |
+
organization:
|
140 |
+
- read
|
141 |
+
- delete
|
142 |
+
model:
|
143 |
+
- read
|
144 |
+
- write
|
145 |
+
- delete
|
146 |
+
```
|
147 |
+
|
148 |
+
### Parsing the IdP SAML Assertion
|
149 |
+
|
150 |
+
In order for Arthur to communicate with your IdP, it needs to understand the format of the SAML assertion your IdP uses.
|
151 |
+
This section of the config falls under the `assertionAttributes` YAML field. This section is designed to be flexible to
|
152 |
+
support a variety of assertion formats, so it has a lot of options. At its core, the goal is to tell Arthur how to be
|
153 |
+
able to extract the following information from the assertion:
|
154 |
+
|
155 |
+
- user roles/groups
|
156 |
+
- first name
|
157 |
+
- last name
|
158 |
+
- email
|
159 |
+
- user ID
|
160 |
+
|
161 |
+
Each field has a corresponding YAML field the defines where to find the information in the SAML assertion XML. For
|
162 |
+
example:
|
163 |
+
|
164 |
+
```yaml
|
165 |
+
firstNameAttribute:
|
166 |
+
name: "employeeFirstName"
|
167 |
+
```
|
168 |
+
|
169 |
+
This configuration tells Arthur that it can find the user's first name under the "employeeFirstName" attribute in the
|
170 |
+
XML assertion. Such an assertion might look like this:
|
171 |
+
|
172 |
+
```xml
|
173 |
+
|
174 |
+
<saml2:AttributeStatement>
|
175 |
+
<saml2:Attribute Name="firstName">
|
176 |
+
<saml2:AttributeValue>Ian</saml2:AttributeValue>
|
177 |
+
</saml2:Attribute>
|
178 |
+
</saml2:AttributeStatement>
|
179 |
+
```
|
180 |
+
|
181 |
+
More examples of how to parse attributes out of the SAML assertion can be
|
182 |
+
found [below](#appendix-a-more-examples-of-saml-assertion-values-and-how-to-parse-them).
|
183 |
+
|
184 |
+
### Full Configuration Examples
|
185 |
+
|
186 |
+
Here is an example of a full configuration, combining each section described above.
|
187 |
+
|
188 |
+
```yaml
|
189 |
+
version: v1
|
190 |
+
kind: SAML
|
191 |
+
config:
|
192 |
+
# if your IdP hosts its metadata, provide the URL to it here
|
193 |
+
metadataURL: "link to IdP metadata goes here"
|
194 |
+
# if the IdP does not host the metadata, provide the XML payload here and comment out metadataURL
|
195 |
+
# metadataXML: |
|
196 |
+
# <?xml version="1.0" encoding="UTF-8"?><md:EntityDescriptor ...>
|
197 |
+
# <md:IDPSSODescriptor>
|
198 |
+
# ...
|
199 |
+
# </md:IDPSSODescriptor>
|
200 |
+
# </md:EntityDescriptor>
|
201 |
+
|
202 |
+
# this section describes how Arthur will parse the SAML assertion from your IdP
|
203 |
+
# for each required attribute, Arthur will use the "name" field to match to an XML attribute in the SAML assertion
|
204 |
+
assertionAttributes:
|
205 |
+
# this roleAttribute configuration will use a "groups" attribute in the XML assertion which expects the
|
206 |
+
# roles in separate XML AttributeValues within the assertion Attribute
|
207 |
+
roleAttribute:
|
208 |
+
name: "groups"
|
209 |
+
useAllAttributeValues: True
|
210 |
+
firstNameAttribute:
|
211 |
+
name: "employeeFirstName"
|
212 |
+
lastNameAttribute:
|
213 |
+
name: "employeeLastName"
|
214 |
+
emailAttribute:
|
215 |
+
name: "company_email"
|
216 |
+
userIdAttribute:
|
217 |
+
name: "companyUserID"
|
218 |
+
globalRoleDefs:
|
219 |
+
# Here we specify a global role for the IdP user group "idp-admin" to create and manage RBAC in Arthur
|
220 |
+
- name: "idp-admin"
|
221 |
+
permissions:
|
222 |
+
custom_roles:
|
223 |
+
- read
|
224 |
+
- write
|
225 |
+
- delete
|
226 |
+
organization_global:
|
227 |
+
- read
|
228 |
+
- write
|
229 |
+
organization:
|
230 |
+
- read
|
231 |
+
- delete
|
232 |
+
model:
|
233 |
+
- read
|
234 |
+
- write
|
235 |
+
- delete
|
236 |
+
|
237 |
+
```
|
238 |
+
|
239 |
+
## 4. Apply the Arthur IdP YAML configuration
|
240 |
+
|
241 |
+
Once you have your YAML configuration file ready, you need to add it to your Arthur installation. With the Arthur admin
|
242 |
+
console open, navigate to the "Use a 3rd Party Global Identity Provider" section and select "SAML". This will expose a
|
243 |
+
text box for you to paste the YAML config file assembled above. When pasting, make sure whitespace is preserved and the
|
244 |
+
YAML document has consistent spacing (do not mix tabs and spaces). Here is a screenshot of the config section:
|
245 |
+
|
246 |
+

|
247 |
+
|
248 |
+
```{note}
|
249 |
+
If your IdP enforces signed authorization requests, this config page also provides the ability to upload a
|
250 |
+
certificate and private key for Arthur to use when making the requests. Click the "Upload a file" button for the Public
|
251 |
+
Certificate and Private Key sections of the config to upload the appropriate files for your IdP.
|
252 |
+
```
|
253 |
+
|
254 |
+
Once you have added your config files, scroll to the bottom and click "Save" to save the config. Then go to the latest
|
255 |
+
version and click "Deploy" to roll out the change to the cluster.
|
256 |
+
|
257 |
+
## 5. Create organization user roles to match the IdP user groups
|
258 |
+
|
259 |
+
In order to complete this section, you will need access to the Arthur superadmin user credentials set during your
|
260 |
+
install, or you will need to be able to assume the role defined in the Arthur IdP config YAML created above in
|
261 |
+
the `globalRoleDefs` section.
|
262 |
+
|
263 |
+
In order to use the API example linked below, you will need a Bearer token (authentication token) to include with your
|
264 |
+
API request. There are a few options available to retrieve a token:
|
265 |
+
|
266 |
+
1. **Retrieve a SAML assertion from your IdP and exchange with Arthur** - Most IdPs will have a method to retrieve a
|
267 |
+
SAML assertion for users. Some companies make scripts or APIs to do so. If your IdP does not have an automated method
|
268 |
+
to retrieve an assertion, use one of the other options below. Once you have an assertion, you can exchange it for an
|
269 |
+
Arthur access token with the follow API call to Arthur:
|
270 |
+
```shell
|
271 |
+
curl --location --request POST 'https://<YOUR ARTHUR HOST>/api/v3/saml/sso' \
|
272 |
+
--header 'Content-Type: application/x-www-form-urlencoded' \
|
273 |
+
--data-urlencode 'SAMLResponse=<INSERT URL ENCODED BASE64 ASSERTION>'
|
274 |
+
```
|
275 |
+
2. **Retrieve a global role token from your browser cookies** - If you sign in to Arthur as a user with a global role,
|
276 |
+
the UI will not be fully functional, but it will have a valid access token in the cookies. If you navigate to your
|
277 |
+
browser's developer console and then go to the Application Storage/Cookies section, you should see a cookie like
|
278 |
+
`Authentication`. The authentication token is the value of that cookie.
|
279 |
+
3. Use the [/login](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/auth/paths/~1login/post) API endpoint
|
280 |
+
with the superadmin user's credentials set during the Arthur install (only available on-prem).
|
281 |
+
|
282 |
+
Using either of those credentials, we can use the Arthur API to define roles in Arthur that match the user group names
|
283 |
+
in your IdP. See the {ref}`creating_organization_roles` section for an example API request to create custom roles in
|
284 |
+
Arthur. Importantly, the role
|
285 |
+
names must uniquely match to a user group in your IdP in order for your users to be able to assume those permissions in
|
286 |
+
Arthur. Therefore, the roles in Arthur must be globally unique in the entire Arthur installation.
|
287 |
+
|
288 |
+
## 6. Test Access
|
289 |
+
|
290 |
+
At this point everything should be configured correctly to sign in to Arthur via SSO. Either navigate to your IdP
|
291 |
+
or the Arthur homepage to test logging in.
|
292 |
+
|
293 |
+
## 7. Cleaning Up
|
294 |
+
|
295 |
+
Once users are successfully able to log in to Arthur via the IdP, you should do the following to ensure proper security
|
296 |
+
best-practices remain enforced:
|
297 |
+
|
298 |
+
- Restrict any Arthur global roles to only allow access to essential admin functions
|
299 |
+
- Set the Arthur superadmin user password securely, and either store the password in a vault, or discard the password
|
300 |
+
entirely. superadmin shouldn't be used going forward.
|
301 |
+
- Set up a policy to routinely rotate the superadmin password to keep it secure
|
302 |
+
|
303 |
+
Together, these practices will help ensure the security of your Arthur installation, and will give your IdP sole control
|
304 |
+
over the platform and who is able to access it.
|
305 |
+
|
306 |
+
## Common Troubleshooting
|
307 |
+
|
308 |
+
If after following the steps above, users are not able to log in via the IdP try some of these common troubleshooting
|
309 |
+
tips:
|
310 |
+
|
311 |
+
### Does the user properly redirected to the IdP's log in screen?
|
312 |
+
|
313 |
+
If not, there is likely a configuration error in the Arthur YAML config with the IdP metadata or the URL to access it.
|
314 |
+
Another problem could be if your IdP expects Arthur to make signed requests to authenticate users. If that is the case,
|
315 |
+
be sure you have correctly configured Arthur's certificate and private key as
|
316 |
+
described [above](#apply-the-arthur-idp-yaml-configuration).
|
317 |
+
|
318 |
+
### Once the user authenticates with the IdP, are they redirected to the Arthur homepage?
|
319 |
+
|
320 |
+
If not, there is likely a configuration error with the IdP and the URLs that it uses to communicate with Arthur.
|
321 |
+
Double-check the ACS (SSO) URL is configured correctly for the Arthur installation
|
322 |
+
at `https://<HOSTNAME>/api/v3/saml/sso`.
|
323 |
+
|
324 |
+
### A user can see the Arthur home page, but can't see any of the model in their organization
|
325 |
+
|
326 |
+
If a user cannot see any of the models in their organization, it means they either don't have the necessary permissions
|
327 |
+
to access models (see {doc}`../../reference/permissions_by_endpoint`) or they were not able to correctly assume the role
|
328 |
+
in Arthur. Double-check the groups in
|
329 |
+
their SAML assertion match the role names that have been configured in Arthur. A superadmin or global role user with
|
330 |
+
permissions to manage RBAC can see a list of roles in the installation by using the following API call. Be sure to
|
331 |
+
replace the HOST and AUTH TOKEN for your installation and user:
|
332 |
+
|
333 |
+
```shell
|
334 |
+
curl --location 'https://<HOST>/api/v3/authorization/custom_roles' \
|
335 |
+
--header 'Authorization: Bearer <INSERT AUTH TOKEN HERE>'
|
336 |
+
```
|
337 |
+
|
338 |
+
## Appendix A: More examples of SAML assertion values and how to parse them
|
339 |
+
|
340 |
+
This section outlines some additional ways to use the `assertionAttributes` section of the Arthur IdP config YAML
|
341 |
+
format. The below examples include sample SAML assertions, then corresponding YAML for how to parse them.
|
342 |
+
|
343 |
+
### Basic Full Example
|
344 |
+
|
345 |
+
This example shows how to parse a user's information from a SAML assertion when each field is its own Attribute and the
|
346 |
+
user's groups are each in their own AttributeValue.
|
347 |
+
Example SAML assertion XML:
|
348 |
+
|
349 |
+
```xml
|
350 |
+
|
351 |
+
<saml2:AttributeStatement>
|
352 |
+
<saml:Attribute Name="employeeFirstName">
|
353 |
+
<saml:AttributeValue>John</saml:AttributeValue>
|
354 |
+
</saml:Attribute>
|
355 |
+
<saml:Attribute Name="employeeLastName">
|
356 |
+
<saml:AttributeValue>Doe</saml:AttributeValue>
|
357 |
+
</saml:Attribute>
|
358 |
+
<saml:Attribute Name="employeeEmail">
|
359 |
+
<saml:AttributeValue>john.doe@arthur.ai</saml:AttributeValue>
|
360 |
+
</saml:Attribute>
|
361 |
+
<saml:Attribute Name="employeeID">
|
362 |
+
<saml:AttributeValue>1234567890</saml:AttributeValue>
|
363 |
+
</saml:Attribute>
|
364 |
+
<saml:Attribute Name="userGroups">
|
365 |
+
<saml:AttributeValue>group1</saml:AttributeValue>
|
366 |
+
<saml:AttributeValue>group2</saml:AttributeValue>
|
367 |
+
<saml:AttributeValue>group3</saml:AttributeValue>
|
368 |
+
</saml:Attribute>
|
369 |
+
</saml2:AttributeStatement>
|
370 |
+
|
371 |
+
```
|
372 |
+
|
373 |
+
Corresponding settings for the Arthur IdP config YAML `assertionAttributes` for the user information field:
|
374 |
+
|
375 |
+
```yaml
|
376 |
+
assertionAttributes:
|
377 |
+
roleAttribute:
|
378 |
+
name: "userGroups"
|
379 |
+
useAllAttributeValues: True
|
380 |
+
firstNameAttribute:
|
381 |
+
name: "employeeFirstName"
|
382 |
+
lastNameAttribute:
|
383 |
+
name: "employeeLastName"
|
384 |
+
emailAttribute:
|
385 |
+
name: "employeeEmail"
|
386 |
+
userIdAttribute:
|
387 |
+
name: "employeeID"
|
388 |
+
```
|
389 |
+
|
390 |
+
### Parsing User Groups from Multiple Attribute Values
|
391 |
+
|
392 |
+
This example shows how to parse a user's groups from a SAML assertion when each group is its own AttributeValue.
|
393 |
+
Example SAML assertion XML:
|
394 |
+
|
395 |
+
```xml
|
396 |
+
|
397 |
+
<saml2:AttributeStatement>
|
398 |
+
<saml:Attribute Name="Idp_user_groups">
|
399 |
+
<saml:AttributeValue>role1</saml:AttributeValue>
|
400 |
+
<saml:AttributeValue>role2</saml:AttributeValue>
|
401 |
+
<saml:AttributeValue>role3</saml:AttributeValue>
|
402 |
+
</saml:Attribute>
|
403 |
+
...
|
404 |
+
</saml2:AttributeStatement>
|
405 |
+
```
|
406 |
+
|
407 |
+
Corresponding settings for the Arthur IdP config YAML `assertionAttributes` for the `roleAttribute` field:
|
408 |
+
|
409 |
+
```yaml
|
410 |
+
assertionAttributes:
|
411 |
+
roleAttribute:
|
412 |
+
name: "Idp_user_groups"
|
413 |
+
useAllAttributeValues: True
|
414 |
+
```
|
415 |
+
|
416 |
+
### Parsing User Groups from a String Attribute Value
|
417 |
+
|
418 |
+
This example shows how to parse a user's groups from a SAML assertion when the groups are in a single string
|
419 |
+
AttributeValue.
|
420 |
+
Example SAML assertion XML:
|
421 |
+
|
422 |
+
```xml
|
423 |
+
|
424 |
+
<saml2:AttributeStatement>
|
425 |
+
<saml:Attribute Name="Idp_user_groups">
|
426 |
+
<saml:AttributeValue>role1,role2,role3</saml:AttributeValue>
|
427 |
+
</saml:Attribute>
|
428 |
+
...
|
429 |
+
</saml2:AttributeStatement>
|
430 |
+
```
|
431 |
+
|
432 |
+
Corresponding settings for the Arthur IdP config YAML `assertionAttributes` for the `roleAttribute` field:
|
433 |
+
|
434 |
+
```yaml
|
435 |
+
assertionAttributes:
|
436 |
+
roleAttribute:
|
437 |
+
name: "Idp_user_groups"
|
438 |
+
deliminator: ","
|
439 |
+
```
|
440 |
+
|
441 |
+
### Parsing Specific Fields in a Single Attribute's AttributeValue List
|
442 |
+
|
443 |
+
This example shows how to parse a user's information from a SAML assertion when all fields are in a single assertion
|
444 |
+
Attribute's list of AttributeValues.
|
445 |
+
Example SAML assertion XML:
|
446 |
+
|
447 |
+
```xml
|
448 |
+
|
449 |
+
<saml2:AttributeStatement>
|
450 |
+
<saml:Attribute Name="employeeInfo">
|
451 |
+
<saml:AttributeValue>John</saml:AttributeValue>
|
452 |
+
<saml:AttributeValue>Doe</saml:AttributeValue>
|
453 |
+
<saml:AttributeValue>(123) 456-7890</saml:AttributeValue>
|
454 |
+
<saml:AttributeValue>42 Wallaby Way, Sydney</saml:AttributeValue>
|
455 |
+
<saml:AttributeValue>johndoe@arthur.ai</saml:AttributeValue>
|
456 |
+
<saml:AttributeValue>5678987654</saml:AttributeValue>
|
457 |
+
</saml:Attribute>
|
458 |
+
...
|
459 |
+
</saml2:AttributeStatement>
|
460 |
+
```
|
461 |
+
|
462 |
+
Corresponding settings for the Arthur IdP config YAML `assertionAttributes` for the user information field:
|
463 |
+
|
464 |
+
```yaml
|
465 |
+
assertionAttributes:
|
466 |
+
firstNameAttribute:
|
467 |
+
name: "employeeInfo"
|
468 |
+
index: 0
|
469 |
+
lastNameAttribute:
|
470 |
+
name: "employeeInfo"
|
471 |
+
index: 1
|
472 |
+
emailAttribute:
|
473 |
+
name: "employeeInfo"
|
474 |
+
index: 4
|
475 |
+
userIdAttribute:
|
476 |
+
name: "employeeInfo"
|
477 |
+
index: 5
|
478 |
+
```
|
479 |
+
|
files/arthur-docs-markdown/platform-management/access-control-overview/standard_access_control.md.txt
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Arthur Standard Access Control Overview
|
2 |
+
|
3 |
+
In both SaaS and On-prem installations, Arthur ships with a build-in access control system that can be used to manage
|
4 |
+
users, permissions, and access to organizations. This system has different capabilities than the SSO based paradigm. If
|
5 |
+
your installation is using SSO, please see the {doc}`sso-access-control/index`.
|
6 |
+
|
7 |
+
## Authentication
|
8 |
+
|
9 |
+
Users authenticate to Arthur using a username and password, which is set when their account is created and can be
|
10 |
+
changed later in the UI. Users can also use
|
11 |
+
the [login API endpoint](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/auth/paths/~1login/post) to
|
12 |
+
retrieve a token for use with Arthur APIs.
|
13 |
+
|
14 |
+
Applications and automated systems can authenticate with Arthur using API keys, which can be created in the Arthur UI
|
15 |
+
from the organization menu in the upper right corner then clicking on Manage API Keys.
|
16 |
+
|
17 |
+
```{note}
|
18 |
+
Note: it is not recommended to use API-keys for non-automated use cases as they are not tied to user
|
19 |
+
identities and can obscure who is performing actions. As a best practice, use API keys minimally only in the systems
|
20 |
+
that need automated access, and be sure to create a rotation practice to ensure safe keeping.
|
21 |
+
```
|
22 |
+
|
23 |
+

|
24 |
+
|
25 |
+
## Authorization (RBAC)
|
26 |
+
|
27 |
+
The Arthur standard access control system uses role-based access control (RBAC) with a set of pre-defined roles.
|
28 |
+
The available roles for users are `User`, `Model Owner`, `Administrator`, and `SuperAdmin`. If enrolled in multiple
|
29 |
+
organizations, the user can have a different role in each organization. For a full list of permissions for these 4
|
30 |
+
standard roles, please reference {doc}`here </platform-management/reference/permissions_by_standard_roles>`.
|
31 |
+
|
32 |
+
* `User`: Has read-only access to the models and data within the organization.
|
33 |
+
* `Model Owner`: Can onboard new models in the enrolled organization as well as send data including reference data,
|
34 |
+
inferences, and ground truth.
|
35 |
+
* `Administrator`: Organization level administrator that has access to manage users and models within the organization.
|
36 |
+
* `Super Admin`: Has full access to all data, models, and actions on the platform. Can create new organizations and
|
37 |
+
manage users. Only available on-prem.
|
38 |
+
|
39 |
+
```{note}
|
40 |
+
If your installation uses SSO, you can take advantage of creating custom roles to fine-tune user
|
41 |
+
access to Arthur resources. See {doc}`sso-access-control/custom_rbac` for more information.
|
42 |
+
```
|
43 |
+
|
44 |
+
## Adding Users to an Organization in the UI
|
45 |
+
|
46 |
+
To complete this section, you must have the "Administrator" role in your organization.
|
47 |
+
|
48 |
+
In the upper right corner, click on the organization menu, then click "Manage Members". From this screen, you can enter
|
49 |
+
the emails of additional users to add to the organization, manage the roles of existing users, and remove users from the
|
50 |
+
organization.
|
51 |
+
|
52 |
+
```{note}
|
53 |
+
In order for email-based user invites to work, your installation must have an email integration set up. If
|
54 |
+
not, you can use the
|
55 |
+
[Arthur API](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/users/paths/~1users/post)
|
56 |
+
to create user accounts directly in your organization.
|
57 |
+
```
|
58 |
+
|
59 |
+
## Adding Users to an Organization in the API
|
60 |
+
|
61 |
+
Arthur also supports managing users via automated workflows using the REST API. In order to create a user in
|
62 |
+
your organization, you will need to have Administrator privileges in that organization, or have access to the superadmin
|
63 |
+
user for your Arthur on-prem installation. The following APIs are helpful for managing users:
|
64 |
+
|
65 |
+
- [Create a New User](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/users/paths/~1users/post)
|
66 |
+
- [Update User/Change User Password](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/users/paths/~1users~1%7Buser_id%7D/patch)
|
67 |
+
- [Send an Email Invite to a New User](https://docs.arthur.ai/api-documentation/v3-api-docs.html#tag/users/paths/~1users~1invite_users/post)
|
68 |
+
|
69 |
+
|
70 |
+
## Switching Between Organizations
|
71 |
+
|
72 |
+
If a user is invited to multiple organizations, they will have the ability to switch between them in the UI.
|
73 |
+
User can click on the organization menu in the upper right corner, and choose one of the other available organizations
|
74 |
+
from that menu to switch to it. If no other organizations appear, that user does not have access to any other
|
75 |
+
organizations.
|
76 |
+
|
files/arthur-docs-markdown/platform-management/access-control/authenticating_with_multiple_organizations.md.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
# Access Control
|
2 |
+
|
3 |
+
The access control documentation has moved. Please see the new guides in {doc}`../access-control-overview/index`
|
files/arthur-docs-markdown/platform-management/access-control/authentication.md.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
# Access Control
|
2 |
+
|
3 |
+
The access control documentation has moved. Please see the new guides in {doc}`../access-control-overview/index`
|
files/arthur-docs-markdown/platform-management/access-control/authorization_custom.md.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
# Access Control
|
2 |
+
|
3 |
+
The access control documentation has moved. Please see the new guides in {doc}`../access-control-overview/index`
|
files/arthur-docs-markdown/platform-management/access-control/authorization_standard.md.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
# Access Control
|
2 |
+
|
3 |
+
The access control documentation has moved. Please see the new guides in {doc}`../access-control-overview/index`
|
files/arthur-docs-markdown/platform-management/access-control/index.md.txt
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
orphan: true
|
3 |
+
---
|
4 |
+
[//]: # (This folder was the old structure of the access control docs.
|
5 |
+
The file structure was kept to maintain any customer bookmarks and point them to the new documentation.)
|
6 |
+
|
7 |
+
# Access Control
|
8 |
+
|
9 |
+
The access control documentation has moved. Please see the new guides in {doc}`../access-control-overview/index`
|
10 |
+
|
11 |
+
```{toctree}
|
12 |
+
:maxdepth: 2
|
13 |
+
:hidden: true
|
14 |
+
|
15 |
+
Authentication <authentication>
|
16 |
+
Standard Authorization <authorization_standard>
|
17 |
+
Custom Authorization <authorization_custom>
|
18 |
+
Authenticating With Multiple Organizations <authenticating_with_multiple_organizations>
|
19 |
+
```
|
files/arthur-docs-markdown/platform-management/index.md.txt
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
(platform_management)=
|
2 |
+
|
3 |
+
# Platform Management
|
4 |
+
|
5 |
+
This section covers administration of the Arthur platform. Here you will find information on Arthur's access control,
|
6 |
+
user management, installation, and maintenance. Arthur is offered as a hosted SaaS platform and on-prem solution,
|
7 |
+
deployable to existing Kubernetes clusters, virtual machines, and bare metal servers.
|
8 |
+
|
9 |
+
## {doc}`access-control-overview/index`
|
10 |
+
|
11 |
+
This section shows how to configure the access and permissions for your various Arthur users within your organization.
|
12 |
+
|
13 |
+
## {doc}`installation/index`
|
14 |
+
|
15 |
+
This section shows how to install the necessary components for integrating Arthur into your platform.
|
16 |
+
|
17 |
+
## {doc}`ongoing-maintenance/index`
|
18 |
+
|
19 |
+
This section covers information for platform administrators responsible for ongoing maintenance of the Arthur platform.
|
20 |
+
|
21 |
+
## {doc}`reference/index`
|
22 |
+
|
23 |
+
This section contains references to configuration templates and permission sets for managing your Arthur usage.
|
24 |
+
|
25 |
+
```{toctree}
|
26 |
+
:maxdepth: 2
|
27 |
+
:hidden:
|
28 |
+
|
29 |
+
Access Control <access-control-overview/index>
|
30 |
+
Installation <installation/index>
|
31 |
+
Ongoing Maintenance <ongoing-maintenance/index>
|
32 |
+
Reference <reference/index>
|
33 |
+
```
|
files/arthur-docs-markdown/platform-management/installation/.DS_Store
ADDED
Binary file (6.15 kB). View file
|
|
files/arthur-docs-markdown/platform-management/installation/externalize_postgres.md.txt
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Externalizing the Relational Database
|
2 |
+
|
3 |
+
If desired, you can bring your own Postgres instance to use as your Arthur's relational database. Follow the steps
|
4 |
+
on this page to prepare your Postgres instance.
|
5 |
+
|
6 |
+
First, deploy your Postgres instance in your desired environment with appropriate ingress firewall configuration.
|
7 |
+
|
8 |
+
Create databases for the Arthur platform.
|
9 |
+
```
|
10 |
+
CREATE DATABASE arthurai
|
11 |
+
CREATE DATABASE alert_service;
|
12 |
+
CREATE DATABASE dataset_service;
|
13 |
+
CREATE DATABASE metric_service;
|
14 |
+
|
15 |
+
-- for stand alone instance
|
16 |
+
CREATE USER arthurai WITH PASSWORD 'SuperSecret';
|
17 |
+
-- for RDS instance
|
18 |
+
CREATE ROLE arthurai WITH PASSWORD 'SuperSecret' LOGIN;
|
19 |
+
|
20 |
+
REVOKE ALL PRIVILEGES ON DATABASE postgres FROM arthurai;
|
21 |
+
GRANT ALL PRIVILEGES ON DATABASE arthurai TO arthurai;
|
22 |
+
GRANT ALL PRIVILEGES ON DATABASE alert_service TO arthurai;
|
23 |
+
GRANT ALL PRIVILEGES ON DATABASE dataset_service TO arthurai;
|
24 |
+
GRANT ALL PRIVILEGES ON DATABASE metric_service TO arthurai;
|
25 |
+
```
|
26 |
+
|
27 |
+
If you have been using the embedded database and you wish to switch to using an external Postgres, backup the embedded
|
28 |
+
database and restore it to the new external Postgres with `pg_dump` and `pg_restore`.
|
29 |
+
|
30 |
+
### Connecting to the database using SSL/TLS
|
31 |
+
|
32 |
+
If your postgres instance supports SSL/TLS connections, and you want to connect to your external database
|
33 |
+
with an encrypted connection, you simply need to set `Database SSL Mode` in the initial configuration. By default, this
|
34 |
+
is set to `disable`. However, you can enable an encrypted connection using the value `require`.
|
35 |
+
|
36 |
+
```{note}
|
37 |
+
An externally managed Postgres instance is strongly recommended for production-grade installs.
|
38 |
+
```
|
files/arthur-docs-markdown/platform-management/installation/high_availability.md.txt
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Setting up for High Availability
|
2 |
+
|
3 |
+
## Introduction
|
4 |
+
|
5 |
+
The Arthur Platform is built to run in a High Availability configuration, ensuring that the application can function
|
6 |
+
in the event of a Data Center outage, hardware outages, or other similar infrastructure issues.
|
7 |
+
|
8 |
+
In order to take advantage of this, there are a few requirements in how your infrastructure is setup:
|
9 |
+
|
10 |
+
1. Installing across 3 Availability Zones
|
11 |
+
2. Specifying the correct Instance Types
|
12 |
+
3. Configuring the cluster for Auto-scaling
|
13 |
+
|
14 |
+
## Notes about this document
|
15 |
+
|
16 |
+
```{note}
|
17 |
+
Note that this document is written using AWS terminology, as this is one of the environments/infrastructure that Arthur uses
|
18 |
+
internally for our environments. However, these setup steps should work across various cloud providers using similar features.
|
19 |
+
```
|
20 |
+
|
21 |
+
```{note}
|
22 |
+
Note that this document is written with the pre-requisite that you are installing Arthur in a High Availability configuration.
|
23 |
+
At the minimum, this means that there should be 3 instances across which Arthur is deployed.
|
24 |
+
```
|
25 |
+
|
26 |
+
## Installing across 3 Availability Zones
|
27 |
+
|
28 |
+
In order to ensure continuous operation during an Availability Zone (AZ) outage, Arthur must be installed on a cluster
|
29 |
+
that has 3 Availability Zones. This ensures that in the event of one AZ outage that the rest of the components can still
|
30 |
+
operate.
|
31 |
+
|
32 |
+
To do this in AWS, create 3 separate Auto-Scaling Groups (ASGs) - one for each AZ. You can configure which AZ an ASG provisions
|
33 |
+
instances into when you create the ASG.
|
34 |
+
|
35 |
+
When Arthur deploys, the stateful services (eg: databases, messaging queues, etc.) will be balanced across the 3 AZs automatically using
|
36 |
+
kubernetes pod anti-affinity rules (pods will not schedule onto nodes where there already exists another pod that is of the same component).
|
37 |
+
|
38 |
+
## Specifying the correct Instance Types
|
39 |
+
|
40 |
+
Generally speaking, the best way to ensure you have deployed the correct Instance Types is to monitor resource utilization across the cluster
|
41 |
+
to determine when your services are hitting resource limits.
|
42 |
+
|
43 |
+
When initially configuring a cluster for Arthur, we recommend 3 nodes, where each node has at least 16 vCPUs and 64G of RAM (eg: an `m5a.4xlarge` instance type).
|
44 |
+
This is a good starting point for a general-purpose cluster that will grow with your production usage.
|
45 |
+
|
46 |
+
## Configuring the cluster for Auto-scaling
|
47 |
+
|
48 |
+
Arthur's stateless components horizontally auto-scale, but in order to take the maximum advantage of this, you will need to configure and install
|
49 |
+
an additional component that performs node autoscaling (eg: adding more instances).
|
50 |
+
|
51 |
+
AWS specifies how to setup cluster autoscaling in their [documentation](https://docs.aws.amazon.com/eks/latest/userguide/autoscaling.html).
|
52 |
+
|
53 |
+
Generally speaking, it involves setting up an IAM role and granting permissions to autoscale the cluster, and then installing a third-party component
|
54 |
+
to perform the autoscaling (eg: [cluster-autoscaler](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md)
|
files/arthur-docs-markdown/platform-management/installation/index.md.txt
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Installation
|
2 |
+
|
3 |
+
Arthur can be installed to existing Kubernetes clusters (K8s) or virtual machines (VM). For both Kubernetes and virtual machine deployments, Arthur supports two types of installation methods, online and airgapped. The online method allows fast and continuous differential upgrades. The airgapped install supports environments where the cluster has no outbound internet connectivity.
|
4 |
+
|
5 |
+
## {doc}`Installation Requirements <requirements>`
|
6 |
+
This page covers the requirements needed in your system to deploying Arthur within your system.
|
7 |
+
|
8 |
+
## {doc}`Platform Readiness FAQ <platform_readiness_faq>`
|
9 |
+
This page covers some of the most frequently-asked questions about setting up Arthur for on-premises installation.
|
10 |
+
|
11 |
+
## {doc}`Configuring for High Availability <high_availability>`
|
12 |
+
This page covers how to configure your infrastructure to support running Arthur as a High Availability Application.
|
13 |
+
|
14 |
+
## {doc}`kubernetes-installation/index`
|
15 |
+
This section shows how to install Arthur into a Kubernetes cluster.
|
16 |
+
|
17 |
+
## {doc}`vm-installation/index`
|
18 |
+
This section shows how to install Arthur into a virtual machine.
|
19 |
+
|
20 |
+
## {doc}`Externalize Postgres <externalize_postgres>`
|
21 |
+
This page shows how to set up a Postgres instance to use as your Arthur's relational database.
|
22 |
+
|
23 |
+
|
24 |
+
```{toctree}
|
25 |
+
:maxdepth: 2
|
26 |
+
:hidden:
|
27 |
+
|
28 |
+
Installation Requirements <requirements>
|
29 |
+
Platform Readiness <platform_readiness_faq>
|
30 |
+
Kubernetes Installation <kubernetes-installation/index>
|
31 |
+
Virtual Machine Installation <vm-installation/index>
|
32 |
+
Configuring for High Availability <high_availability>
|
33 |
+
Externalize Postgres <externalize_postgres>
|
34 |
+
```
|
files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/index.md.txt
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Kubernetes Installation
|
2 |
+
|
3 |
+
This section covers the steps required for installing Arthur on a Kubernetes cluster. There are separate steps required for online and airgapped installations. An additional set of instructions are also available for installing Arthur that’s scoped within a K8s namespace.
|
4 |
+
|
5 |
+
## {doc}`kubernetes-preparation/index`
|
6 |
+
This section shows how to configure a Kubernetes cluster to install Arthur.
|
7 |
+
|
8 |
+
## {doc}`k8s_install_online`
|
9 |
+
This page shows how to install Arthur into an online Kubernetes installation.
|
10 |
+
|
11 |
+
## {doc}`k8s_install_airgapped`
|
12 |
+
This page shows how to install Arthur into an airgapped Kubernetes installation.
|
13 |
+
|
14 |
+
## {doc}`k8s_install_airgapped_cli`
|
15 |
+
This page shows how to install Arthur into an online Kubernetes installation via a command-line interface.
|
16 |
+
|
17 |
+
## {doc}`k8s_install_namespace_scoped`
|
18 |
+
This page shows how to install Arthur into a Kubernetes cluster with namespace scoped privileges.
|
19 |
+
|
20 |
+
|
21 |
+
```{toctree}
|
22 |
+
:maxdepth: 2
|
23 |
+
:hidden:
|
24 |
+
|
25 |
+
Configuring Kubernetes <kubernetes-preparation/index>
|
26 |
+
Online <k8s_install_online>
|
27 |
+
Airgapped <k8s_install_airgapped>
|
28 |
+
Airgapped CLI <k8s_install_airgapped_cli>
|
29 |
+
Namespace Scoped <k8s_install_namespace_scoped>
|
30 |
+
|
31 |
+
```
|
files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/k8s_install_airgapped.md.txt
ADDED
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Airgap Kubernetes Cluster (K8s) Install
|
2 |
+
|
3 |
+
Make sure your K8s cluster is ready for Arthur platform installation by following
|
4 |
+
{doc}`the K8s preparation guide <kubernetes-preparation/index>`.
|
5 |
+
|
6 |
+
### **Preparing Container Registries**
|
7 |
+
|
8 |
+
Prepare your private container image registry for Arthur artifacts by creating the following list of repositories:
|
9 |
+
|
10 |
+
Admin Console:
|
11 |
+
```
|
12 |
+
arthurai/dex
|
13 |
+
arthurai/kotsadm
|
14 |
+
arthurai/kotsadm-migrations
|
15 |
+
arthurai/local-volume-fileserver
|
16 |
+
arthurai/local-volume-provider
|
17 |
+
arthurai/minio
|
18 |
+
arthurai/postgres
|
19 |
+
```
|
20 |
+
|
21 |
+
Application:
|
22 |
+
```
|
23 |
+
arthurai/alert-service
|
24 |
+
arthurai/alpine
|
25 |
+
arthurai/api-service
|
26 |
+
arthurai/argocli
|
27 |
+
arthurai/argoexec
|
28 |
+
arthurai/aws-cli
|
29 |
+
arthurai/beta-client
|
30 |
+
arthurai/busybox
|
31 |
+
arthurai/clickhouse-operator
|
32 |
+
arthurai/clickhouse-server
|
33 |
+
arthurai/client
|
34 |
+
arthurai/cp-kafka
|
35 |
+
arthurai/cp-kafka-connect
|
36 |
+
arthurai/cp-schema-registry
|
37 |
+
arthurai/cp-zookeeper
|
38 |
+
arthurai/custom-hpa
|
39 |
+
arthurai/dataset-service
|
40 |
+
arthurai/ingestion-service
|
41 |
+
arthurai/kafka-connect-monitor
|
42 |
+
arthurai/kafka-exporter
|
43 |
+
arthurai/kafka-prometheus-jmx-exporter
|
44 |
+
arthurai/kubectl
|
45 |
+
arthurai/mc
|
46 |
+
arthurai/metric-service
|
47 |
+
arthurai/metrics-exporter
|
48 |
+
arthurai/minio
|
49 |
+
arthurai/model-server
|
50 |
+
arthurai/model-server-controller
|
51 |
+
arthurai/postgresql
|
52 |
+
arthurai/python-jobs
|
53 |
+
arthurai/python-spark-jobs
|
54 |
+
arthurai/pytorch-jobs
|
55 |
+
arthurai/query-service
|
56 |
+
arthurai/redis
|
57 |
+
arthurai/scala-spark-jobs
|
58 |
+
arthurai/schema-service
|
59 |
+
arthurai/workflow-controller
|
60 |
+
arthurai/zookeeper-exporter
|
61 |
+
```
|
62 |
+
|
63 |
+
As an example, here's how you can create a new `arthurai/alert-service` repository on AWS ECR.
|
64 |
+
```shell
|
65 |
+
export AWS_REGION=<your_region>
|
66 |
+
aws ecr create-repository --repository-name=arthurai/alert-service
|
67 |
+
```
|
68 |
+
|
69 |
+
### **Download Installation Files**
|
70 |
+
|
71 |
+
Go to the download portal using the URL and the password provided by Arthur.
|
72 |
+
|
73 |
+
Select the "Bring my own cluster" option.
|
74 |
+

|
75 |
+
|
76 |
+
Click the “Download license” button to download your license in YAML file.
|
77 |
+
|
78 |
+
Download the "KOTS Airgap Bundle" and the "arthur Airgap Bundle".
|
79 |
+
|
80 |
+
### **Setup for Installation**
|
81 |
+
|
82 |
+
Make sure you're in the correct kubectl environment context before running the installer.
|
83 |
+
```shell
|
84 |
+
kubectl config current-context
|
85 |
+
```
|
86 |
+
|
87 |
+
Install the KOTS kubectl extension on your local machine:
|
88 |
+
```shell
|
89 |
+
curl https://kots.io/install | bash
|
90 |
+
```
|
91 |
+
|
92 |
+
If the Linux workstation you're running `kubectl` from is also in the airgap environment, download the "KOTS CLI" from the download portal and install it like below:
|
93 |
+
```shell
|
94 |
+
tar zxf kots_linux_amd64.tar.gz
|
95 |
+
# move it to a location that's on your path
|
96 |
+
sudo mv kots /usr/local/bin/kubectl-kots
|
97 |
+
```
|
98 |
+
|
99 |
+
```{note}
|
100 |
+
The "KOTS CLI" and "KOTS Airgap Bundle" must be installed at the same time and therefore will be on the same version.
|
101 |
+
```
|
102 |
+
```shell
|
103 |
+
kubectl kots version
|
104 |
+
```
|
105 |
+
|
106 |
+
If your workstation is a Mac, you can download the latest version of Kots CLI Darwin binary from [https://kots.io/](https://kots.io/).
|
107 |
+
|
108 |
+
### **Start Installation**
|
109 |
+
|
110 |
+
Push the Admin Console images to your private registry:
|
111 |
+
```shell
|
112 |
+
kubectl kots admin-console push-images ./kotsadm.tar.gz [Your private registry host]/arthurai \
|
113 |
+
--registry-username [Read-Write Username] \
|
114 |
+
--registry-password [Read-Write Password]
|
115 |
+
```
|
116 |
+
|
117 |
+
As an option, you can also pre-upload the application images to your private registry before running the installer:
|
118 |
+
```shell
|
119 |
+
kubectl kots admin-console push-images ./arthur-x.x.x.airgap [Your private registry host]/arthurai \
|
120 |
+
--registry-username [Read-Write Username] \
|
121 |
+
--registry-password [Read-Write Password]
|
122 |
+
```
|
123 |
+
|
124 |
+
Install the Admin Console (see here for {doc}`Namespace-Scoped Installs <k8s_install_namespace_scoped>`):
|
125 |
+
```shell
|
126 |
+
kubectl kots install arthur \
|
127 |
+
--no-port-forward \
|
128 |
+
--namespace arthur \
|
129 |
+
--shared-password [Provide an Admin Console password] \
|
130 |
+
--kotsadm-namespace arthurai \
|
131 |
+
--kotsadm-registry [Your private container image repository] \
|
132 |
+
--registry-username [Read-Write Username] \
|
133 |
+
--registry-password [Read-Write Password]
|
134 |
+
```
|
135 |
+
|
136 |
+
Create a port forwarding tunnel to Admin Console. Go to `http://localhost:8800` to access the Admin Console:
|
137 |
+
```shell
|
138 |
+
kubectl kots admin-console --namespace arthur
|
139 |
+
```
|
140 |
+
|
141 |
+
Follow the instructions on the Admin Console to complete your installation by providing the private registry details and `arthur-x.x.x.airgap` bundle.
|
142 |
+

|
143 |
+
|
144 |
+
```{note}
|
145 |
+
The upload process can take couple of hours so ensure your laptop does not go to sleep. You may follow the instructions {doc}`here <k8s_install_airgapped_cli>` to install the Admin Console and Arthur app programmatically using the CLI only.
|
146 |
+
```
|
147 |
+
|
148 |
+
Configure Arthur.
|
149 |
+

|
150 |
+
|
151 |
+
### **Verify Installation**
|
152 |
+
|
153 |
+
Monitor the Admin Console dashboard for the application status to become **Ready**.
|
154 |
+
|
155 |
+

|
156 |
+
|
157 |
+
To see the progress of the deployment, monitor the deployment status with `kubectl` CLI:
|
158 |
+
```shell
|
159 |
+
kubectl get deployment,statefulset,pod -n arthur
|
160 |
+
```
|
161 |
+
|
162 |
+
If anything is showing Pending, it is likely you need to add more/bigger nodes to your cluster.
|
163 |
+
|
164 |
+
### **Customize Installation**
|
165 |
+
|
166 |
+
Configure graphs on Admin Console by clicking on the `Configure Prometheus Address` button and providing your Prometheus endpoint (e.g. `http://kube-prometheus-stack-prometheus.monitoring.svc.cluster.local:9090`).
|
files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/k8s_install_airgapped_cli.md.txt
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Airgap Kubernetes Cluster (K8s) Install with CLI
|
2 |
+
|
3 |
+
If you prefer to install programmatically using CLI only, follow the steps below.
|
4 |
+
|
5 |
+
Prepare a `config.yaml` file using {doc}`the configuration template </platform-management/reference/config_template>`.
|
6 |
+
|
7 |
+
Deploy the application by running the below `kubectl` command:
|
8 |
+
```shell
|
9 |
+
kubectl kots install arthur \
|
10 |
+
--no-port-forward \
|
11 |
+
--namespace arthur \
|
12 |
+
--shared-password [Provide an Admin Console password] \
|
13 |
+
--license-file ./license.yaml \
|
14 |
+
--config-values ./config.yaml \
|
15 |
+
--airgap-bundle ./arthur-x.x.x.airgap \
|
16 |
+
--kotsadm-registry [Your private container image repository] \
|
17 |
+
--kotsadm-namespace arthurai \
|
18 |
+
--registry-username [Read-Write Username] \
|
19 |
+
--registry-password [Read-Write Password]
|
20 |
+
```
|
21 |
+
|
22 |
+
`shared-password` is the Admin Console password.
|
23 |
+
|
24 |
+
|
25 |
+
## Installing a specific version of Arthur
|
26 |
+
|
27 |
+
To install a specific version of Arthur, you would run the same command as above (following the same steps to prepare the configuration), with the inclusion of the
|
28 |
+
`--app-version-label` flag. This flag allows you to specify which specific version of Arthur you want to install (eg: to setup a sandbox environment on the same version
|
29 |
+
as production).
|
30 |
+
|
31 |
+
To determine which versions of Arthur are available, you can run:
|
32 |
+
|
33 |
+
```
|
34 |
+
kubectl kots get versions arthur -n <arthur namespace>
|
35 |
+
```
|
files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/k8s_install_namespace_scoped.md.txt
ADDED
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Kubernetes Cluster (K8s) Install with Namespace Scope Privileges
|
2 |
+
|
3 |
+
If you would like to install the Arthur platform with namespace scoped privileges, there are certain components that will fail since they will need cluster level access.
|
4 |
+
These cluster-level components are CRDs ([Custom Resource Definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/)) which are _**required**_ for proper functioning and operation of the Arthur platform. However, these CRDs only need to be installed once with cluster admin privileges, and elevated access is not required for normal usage of the platform.
|
5 |
+
|
6 |
+
```{note} Both the Admin Console and Arthur application can be installed at the cluster-level or namespace-scope independent of each other.
|
7 |
+
```
|
8 |
+
|
9 |
+
### CRDs leverage by Arthur Platform
|
10 |
+
|
11 |
+
The Arthur platform makes use of the following two CRDs:
|
12 |
+
1. **Argo Workflows** : Kubernetes-native Open-source workflow manager
|
13 |
+
1. **ClickHouse Operator** : Column-oriented OLAP datastore
|
14 |
+
|
15 |
+
## Installing Admin Console within a Namespace
|
16 |
+
|
17 |
+
By default, the Admin Console is installed at the Cluster level, available in all namespaces. If you would like to install the Admin Console only within a specific namespace, you can use the following flag to the `kots` command:
|
18 |
+
```shell
|
19 |
+
kubectl kots install arthur \
|
20 |
+
--use-minimal-rbac
|
21 |
+
--skip-rbac-check
|
22 |
+
```
|
23 |
+
|
24 |
+
Since the Admin Console will not have access to the Cluster, certain Preflight checks will fail. It is the responsibility of the Cluster Admin to ensure sufficient resources are provisioned with the correct version of K8s.
|
25 |
+
|
26 |
+
## Installing Cluster-level CRDs for Arthur, from Nexus
|
27 |
+
|
28 |
+
Since the Arthur platform requires CRDs for normal operation, these will need to be installed by the Cluster Admin prior to installing Arthur itself, in no particular order. The instructions below show how you can download the CRD charts from our publicly hosted repository.
|
29 |
+
|
30 |
+
* Argo Workflows:
|
31 |
+
```shell
|
32 |
+
helm repo add arthurai-released https://repository.arthur.ai/repository/charts --username <nexus-username> --password <nexus-password>
|
33 |
+
helm install argo-workflows-crd arthurai-released/argo-workflows-crd --version 0.19.1-arthur-1
|
34 |
+
```
|
35 |
+
|
36 |
+
* ClickHouse Operator:
|
37 |
+
```shell
|
38 |
+
helm repo add arthurai-released https://repository.arthur.ai/repository/charts --username <nexus-username> --password <nexus-password>
|
39 |
+
helm install clickhouse-operator-crd arthurai-released/clickhouse-operator-crd --version 0.19.2-arthur-1
|
40 |
+
```
|
41 |
+
|
42 |
+
```{note} Please reach out to our Sales Team if you do not have credentials to our Nexus repository.
|
43 |
+
```
|
44 |
+
|
45 |
+
## Installing Cluster-level CRDs for Arthur, from Airgap Bundle
|
46 |
+
|
47 |
+
If you are in an airgapped environment with no access to the public internet, the CRD charts are also available in the Airgap bundle provided to you. The instructions below show how you can extract the charts from the Airgap bundle.
|
48 |
+
|
49 |
+
```shell
|
50 |
+
tar -xvf arthur-<version>.airgap
|
51 |
+
cd arthur-<version>
|
52 |
+
tar -xvf app.tar.gz
|
53 |
+
cd app
|
54 |
+
```
|
55 |
+
|
56 |
+
* Argo Workflows:
|
57 |
+
```shell
|
58 |
+
helm install argo-workflows-crd argo-workflows-crd-0.14.0-arthur-2.tgz
|
59 |
+
```
|
60 |
+
|
61 |
+
* ClickHouse Operator:
|
62 |
+
```shell
|
63 |
+
helm install clickhouse-operator-crd arthurai-released/clickhouse-operator-crd-0.18.4-arthur-2.tgz
|
64 |
+
```
|
65 |
+
|
66 |
+
You can verify the CRDs have been installed successfully, by executing the following command:
|
67 |
+
```shell
|
68 |
+
kubectl get crd | grep -iE 'argo|clickhouse'
|
69 |
+
```
|
70 |
+
|
71 |
+
Now that we have the pre-reqs installed with elevated access, we can now switch over to namespace-scoped access to complete the installation either {doc}`using the Admin Console <k8s_install_airgapped>` or {doc}`using the CLI <k8s_install_airgapped_cli>`.
|
files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/k8s_install_online.md.txt
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Online Kubernetes Cluster (K8s) Install
|
2 |
+
|
3 |
+
Make sure your K8s cluster is ready for Arthur platform installation by following {doc}`the K8s preparation guide <kubernetes-preparation/index>`.
|
4 |
+
|
5 |
+
### **Download Installation Files**
|
6 |
+
|
7 |
+
Go to the download portal using the URL and the password provided by Arthur.
|
8 |
+
|
9 |
+
Click the "Download license" button to download your license in YAML file.
|
10 |
+
|
11 |
+
### **Setup for Installation**
|
12 |
+
|
13 |
+
Make sure you're in the correct kubectl environment context before running the installer.
|
14 |
+
|
15 |
+
Install the KOTS kubectl extension on your local machine:
|
16 |
+
```shell
|
17 |
+
curl https://kots.io/install | bash
|
18 |
+
```
|
19 |
+
|
20 |
+
### **Start Installation**
|
21 |
+
|
22 |
+
Run the Admin Console installer and login on your browser at `localhost:8800` via the provided port forwarding tunnel:
|
23 |
+
```shell
|
24 |
+
kubectl kots install arthur
|
25 |
+
```
|
26 |
+
For Namespace-Scoped Installs, follow this {doc}`guide <k8s_install_namespace_scoped>`.
|
27 |
+
|
28 |
+
When you need to re-create the tunnel to Admin Console, run:
|
29 |
+
```shell
|
30 |
+
kubectl kots admin-console --namespace <your_name_space>
|
31 |
+
```
|
32 |
+
|
33 |
+
Upload your license file.
|
34 |
+

|
35 |
+
|
36 |
+
On the following screen, click on the link to install Arthur from the Internet.
|
37 |
+

|
38 |
+
|
39 |
+
Configure Arthur.
|
40 |
+

|
41 |
+
|
42 |
+
Review the preflight checks to make sure that your machine meets the minimum requirements before you proceed with the installation.
|
43 |
+
|
44 |
+
### **Verify Installation**
|
45 |
+
|
46 |
+
Monitor the admin console dashboard for the application status to become **Ready**.
|
47 |
+
|
48 |
+

|
49 |
+
|
50 |
+
To see the progress of the deployment, monitor the deployment status with `kubectl` CLI:
|
51 |
+
```shell
|
52 |
+
kubectl get deployment,statefulset,pod -n <yournamespace>
|
53 |
+
```
|
54 |
+
|
55 |
+
If anything is showing Pending, it is likely you need to add more/bigger nodes to your cluster.
|
56 |
+
|
57 |
+
### **Customize Installation**
|
58 |
+
|
59 |
+
Configure graphs on Admin Console by clicking on the `Configure graphs` button and providing your Prometheus endpoint (e.g. `http://kube-prometheus-stack-prometheus.monitoring.svc.cluster.local:9090`).
|
files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/kubernetes-preparation/index.md.txt
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Kubernetes Installation Preparation
|
2 |
+
|
3 |
+
This section covers the steps required to prepare an existing Kubernetes cluster for installing the Arthur platform.
|
4 |
+
|
5 |
+
## {doc}`k8s_install_prep`
|
6 |
+
This page shows the basic process of configuring an existing K8s cluster for installing the Arthur platform.
|
7 |
+
|
8 |
+
## {doc}`k8s_install_prep_aws`
|
9 |
+
This page shows the additional steps involved in configuring an Amazon AWS EKS cluster for installing the Arthur platform.
|
10 |
+
|
11 |
+
|
12 |
+
```{toctree}
|
13 |
+
:maxdepth: 1
|
14 |
+
:hidden:
|
15 |
+
|
16 |
+
Configuring Kubernetes <k8s_install_prep>
|
17 |
+
Additional Configurations for Amazon AWS <k8s_install_prep_aws>
|
18 |
+
|
19 |
+
```
|
files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/kubernetes-preparation/k8s_install_prep.md.txt
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Kubernetes Cluster (K8s) Install Preparation
|
2 |
+
|
3 |
+
This is a guide to help you prepare your existing Kubernetes cluster for installing the Arthur platform.
|
4 |
+
The examples use Helm 3.
|
5 |
+
|
6 |
+
Make sure you're in the correct `kubectl` environment context before running the installer.
|
7 |
+
|
8 |
+
## **Install Prometheus**
|
9 |
+
|
10 |
+
Example:
|
11 |
+
```shell
|
12 |
+
helm repo add \
|
13 |
+
prometheus-community \
|
14 |
+
https://prometheus-community.github.io/helm-charts
|
15 |
+
helm repo update
|
16 |
+
helm upgrade --install -n monitoring \
|
17 |
+
--create-namespace \
|
18 |
+
kube-prometheus-stack \
|
19 |
+
prometheus-community/kube-prometheus-stack \
|
20 |
+
--set prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false
|
21 |
+
helm upgrade --install -n monitoring \
|
22 |
+
--create-namespace \
|
23 |
+
prometheus-adapter \
|
24 |
+
prometheus-community/prometheus-adapter
|
25 |
+
```
|
26 |
+
|
27 |
+
Verify that Prometheus CRDs are installed:
|
28 |
+
```shell
|
29 |
+
kubectl api-resources | grep monitoring
|
30 |
+
```
|
31 |
+
|
32 |
+
Verify that Prometheus is up and running:
|
33 |
+
```shell
|
34 |
+
kubectl --namespace monitoring get pods -l "release=kube-prometheus-stack"
|
35 |
+
```
|
36 |
+
|
37 |
+
If everything is installed correctly, the following command should not return _"ServiceUnavailable"_:
|
38 |
+
```shell
|
39 |
+
kubectl get --raw /apis/custom.metrics.k8s.io/v1beta1
|
40 |
+
```
|
41 |
+
|
42 |
+
(k8s_install_prep_install_ingress)=
|
43 |
+
## **Install Ingress**
|
44 |
+
|
45 |
+
Example with Nginx:
|
46 |
+
```shell
|
47 |
+
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
|
48 |
+
helm repo update
|
49 |
+
helm upgrade --install -n ingress-system \
|
50 |
+
--create-namespace \
|
51 |
+
ingress-nginx \
|
52 |
+
ingress-nginx/ingress-nginx
|
53 |
+
```
|
54 |
+
|
55 |
+
[Optional] To add an AWS managed SSL certificate, create a `values.yaml` file with following contents -
|
56 |
+
```shell
|
57 |
+
controller:
|
58 |
+
service:
|
59 |
+
annotations:
|
60 |
+
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
|
61 |
+
service.beta.kubernetes.io/aws-load-balancer-connection-idle-timeout: "60"
|
62 |
+
service.beta.kubernetes.io/aws-load-balancer-cross-zone-load-balancing-enabled: "true"
|
63 |
+
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: <AWS managed SSL certificate ARN>
|
64 |
+
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https
|
65 |
+
service.beta.kubernetes.io/aws-load-balancer-type: elb
|
66 |
+
service.beta.kubernetes.io/aws-load-balancer-ssl-negotiation-policy: ELBSecurityPolicy-TLS-1-2-2017-01
|
67 |
+
service.beta.kubernetes.io/aws-load-balancer-internal: true # optional annotation that creates a non-internet-facing loadbalancer
|
68 |
+
targetPorts:
|
69 |
+
http: "tohttps"
|
70 |
+
|
71 |
+
allowSnippetAnnotations: "true"
|
72 |
+
config:
|
73 |
+
http-snippet: |
|
74 |
+
server {
|
75 |
+
listen 2443;
|
76 |
+
return 308 https://$host$request_uri;
|
77 |
+
}
|
78 |
+
use-forwarded-headers: "true"
|
79 |
+
|
80 |
+
containerPort:
|
81 |
+
http: 8080
|
82 |
+
tohttps: 2443
|
83 |
+
https: 80
|
84 |
+
```
|
85 |
+
Upgrade or install the helm chart with the `values.yaml` you created.
|
86 |
+
```shell
|
87 |
+
helm upgrade --install -n ingress-system \
|
88 |
+
--create-namespace \
|
89 |
+
ingress-nginx \
|
90 |
+
ingress-nginx/ingress-nginx \
|
91 |
+
-f values.yaml
|
92 |
+
```
|
93 |
+
|
94 |
+
If you need to install Nginx in the same namespace as Arthur (not recommended) and want to use our network-policy to restrict ingress to the Arthur application, use the below command to add labels to the pods and services. The network-policy allows traffic between pods and services that have these labels.
|
95 |
+
```shell
|
96 |
+
helm upgrade --install -n arthur --set controller.podLabels.network-app=arthurai,controller.service.labels.network-app=arthurai,defaultBackend.podLabels.network-app=arthurai,.service.labels.network-app=arthurai \
|
97 |
+
ingress-nginx \
|
98 |
+
ingress-nginx/ingress-nginx
|
99 |
+
```
|
100 |
+
|
101 |
+
Look up the hostname for the Ingress and configure it in your DNS (e.g. `arthur.mydomain.com`).
|
102 |
+
```shell
|
103 |
+
kubectl get svc -n ingress-system ingress-nginx-controller -ojsonpath='{.status.loadBalancer.ingress[*].hostname}'
|
104 |
+
```
|
105 |
+
|
106 |
+
## **Install Metrics Server**
|
107 |
+
|
108 |
+
Example:
|
109 |
+
```shell
|
110 |
+
helm repo add bitnami https://charts.bitnami.com/bitnami
|
111 |
+
helm repo update
|
112 |
+
helm upgrade --install -n monitoring \
|
113 |
+
--create-namespace \
|
114 |
+
metrics-server \
|
115 |
+
bitnami/metrics-server \
|
116 |
+
--set apiService.create=true \
|
117 |
+
--set --extraArgs.kubelet-preferred-address-types=InternalIP
|
118 |
+
```
|
119 |
+
|
120 |
+
Verify that you can retrieve metric snapshots.
|
121 |
+
```shell
|
122 |
+
kubectl top node
|
123 |
+
```
|
124 |
+
|
125 |
+
## **Configure the cluster-autoscaler**
|
126 |
+
|
127 |
+
In a production environment, it is vital to ensure that there are enough resources (memory and cpu) available for pods to get scheduled on the Kubernetes cluster. Please follow the instructions for your cloud provider to install the [cluster-autoscaler](https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler) on your cluster.
|
128 |
+
|
129 |
+
Verify that the `cluster-autoscaler` is successfully installed.
|
130 |
+
```shell
|
131 |
+
kubectl get deployments -n kube-system | grep -i cluster-autoscaler
|
132 |
+
```
|
133 |
+
|
134 |
+
## **Cloud Provider-specific Configuration**
|
135 |
+
If installing on an existing Amazon AWS EKS, follow the additional steps {doc}`here <k8s_install_prep_aws>`.
|
files/arthur-docs-markdown/platform-management/installation/kubernetes-installation/kubernetes-preparation/k8s_install_prep_aws.md.txt
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Deploying on Amazon AWS EKS
|
2 |
+
|
3 |
+
This is a guide with additional steps to help you prepare your existing Amazon Elastic Kubernetes Service (Amazon EKS) cluster for installing the Arthur platform.
|
4 |
+
Ensure the initial steps detailed {doc}`here <k8s_install_prep>` have already been applied to the cluster.
|
5 |
+
|
6 |
+
## **Configure EKS EBS CSI driver**
|
7 |
+
|
8 |
+
As of EKS 1.23, the Amazon Elastic Block Store (Amazon EBS) Container Storage Interface (CSI) driver needs to be installed explicitly. This driver allows EKS clusters to manage the lifecycle of EBS volumes for Persistent Volumes. For more information, see [Amazon Docs](https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html).
|
9 |
+
|
10 |
+
If you are deploying Arthur on EKS 1.23+, you will need to follow the instructions on [this page](https://docs.aws.amazon.com/eks/latest/userguide/managing-ebs-csi.html).
|
11 |
+
|
12 |
+
Verify that the Add-On is successfully installed, by navigating to **AWS Console → EKS → Cluster → Add-Ons** or by running `helm list -A`, depending on your installation method.
|
13 |
+
|
14 |
+
## **Optimizing the AWS EKS StorageClass**
|
15 |
+
Once the EKS EBS CSI driver is installed, you can take advantage of the `gp3` StorageClass type. This StorageClass is more [cost-effective and performant](https://aws.amazon.com/blogs/storage/migrate-your-amazon-ebs-volumes-from-gp2-to-gp3-and-save-up-to-20-on-costs/) than the previous `gp2` StorageClass. Apply the below YAML definition to your cluster:
|
16 |
+
```yaml
|
17 |
+
apiVersion: storage.k8s.io/v1
|
18 |
+
kind: StorageClass
|
19 |
+
metadata:
|
20 |
+
annotations:
|
21 |
+
storageclass.kubernetes.io/is-default-class: "true"
|
22 |
+
name: gp3
|
23 |
+
parameters:
|
24 |
+
type: gp3
|
25 |
+
provisioner: ebs.csi.aws.com
|
26 |
+
reclaimPolicy: Delete
|
27 |
+
volumeBindingMode: WaitForFirstConsumer
|
28 |
+
allowVolumeExpansion: true
|
29 |
+
```
|
30 |
+
```{note}
|
31 |
+
Ensure there is **_only one_** default StorageClass on the cluster. This is controlled by the `storageclass.kubernetes.io/is-default-class` annotation.
|
32 |
+
```
|
33 |
+
|
34 |
+
## **Supported AWS Service Authentication Mechanisms**
|
35 |
+
If using AWS services with Arthur such as S3 or SES, you will need to configure Arthur to authenticate with AWS. Arthur currently supports 3 authentication mechanisms:
|
36 |
+
|
37 |
+

|
38 |
+
|
39 |
+
### AWS Access Keys
|
40 |
+
Access Keys only work with S3. If you want to use Access Keys you will need to provision an IAM user and a set of keys. Via [AWS IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_change-permissions.html), you will need to grant this user read/write access to the S3 storage bucket that you plan on using with Arthur. Selecting the Access Keys option will expand the Blob Storage section of the config page where you will be able to enter your Access key, Secret Access key ID, and the S3 bucket.
|
41 |
+
|
42 |
+

|
43 |
+
|
44 |
+
## IRSA
|
45 |
+
|
46 |
+
We recommend using [IRSA](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) to authenticate Arthur with AWS as it is the most secure, and is the only mechanism that supports SES. Using this methodology will require a bit of AWS platform work in preparation for Arthur. You can follow these [AWS docs](https://docs.aws.amazon.com/eks/latest/userguide/associate-service-account-role.html) which will show you how to do this setup via eksctl or the AWS CLI, or you can automate this via your internal Infrastructure as Code.
|
47 |
+
|
48 |
+
The role that you create will need to have S3 read/write privileges on the bucket you want to use with Arthur, and permissions to send email via your SES entity. Example snippets are as below:
|
49 |
+
|
50 |
+
### Sample IAM policy for S3 access:
|
51 |
+
```
|
52 |
+
{
|
53 |
+
"Statement": [
|
54 |
+
{
|
55 |
+
"Action": [
|
56 |
+
"s3:PutObject",
|
57 |
+
"s3:GetObject",
|
58 |
+
...
|
59 |
+
],
|
60 |
+
"Effect": "Allow",
|
61 |
+
"Resource": [
|
62 |
+
"arn:aws:s3:::<insert-s3-bucket-name>/*",
|
63 |
+
"arn:aws:s3:::<insert-s3-bucket-name>"
|
64 |
+
],
|
65 |
+
....
|
66 |
+
},
|
67 |
+
```
|
68 |
+
|
69 |
+
### Sample IAM policy for SES access:
|
70 |
+
```
|
71 |
+
"Action": [
|
72 |
+
"ses:SendTemplatedEmail",
|
73 |
+
"ses:SendEmail",
|
74 |
+
"ses:SendCustomVerificationEmail",
|
75 |
+
"ses:SendBulkTemplatedEmail",
|
76 |
+
"ses:SendBulkEmail",
|
77 |
+
"ses:SendBounce"
|
78 |
+
],
|
79 |
+
"Effect": "Allow",
|
80 |
+
"Resource": "*",
|
81 |
+
"Sid": "sesSendEmails"
|
82 |
+
},
|
83 |
+
```
|
84 |
+
|
85 |
+
This role will also need to have a trust relationship to the OIDC provider of your EKS cluster, specifying the Arthur service accounts. See the linked docs above for a further explanation. An example snippet of this is:
|
86 |
+
```
|
87 |
+
{
|
88 |
+
"Version": "2012-10-17",
|
89 |
+
"Statement": [
|
90 |
+
{
|
91 |
+
"Sid": "",
|
92 |
+
"Effect": "Allow",
|
93 |
+
"Principal": {
|
94 |
+
"Federated": "arn:aws:iam::123456789012:oidc-provider/oidc.eks.us-east-2.amazonaws.com/id/ABDCEF......"
|
95 |
+
},
|
96 |
+
"Action": "sts:AssumeRoleWithWebIdentity",
|
97 |
+
"Condition": {
|
98 |
+
"StringEquals": {
|
99 |
+
"oidc.eks.us-east-2.amazonaws.com/id/ABDCEF:sub": [
|
100 |
+
"system:serviceaccount:<namespace>:arthurai-<namespace>",
|
101 |
+
"system:serviceaccount:<namespace>:arthurai-<namespace>-helm-hook"
|
102 |
+
]
|
103 |
+
}
|
104 |
+
}
|
105 |
+
}
|
106 |
+
]
|
107 |
+
}
|
108 |
+
```
|
109 |
+
|
110 |
+
Once this is all set up you can pass this role into Arthur via the config page. This sets the role in the Arthur Service Accounts specified above, which enables Arthur's pods to authenticate with AWS via the role, and the permissions you created. Be sure to use the exact formatting shown below:
|
111 |
+
|
112 |
+

|
113 |
+
|
114 |
+
Proceed to the Blob Storage section of the Arthur config page to specify the S3 bucket
|
115 |
+
|
116 |
+
### SES
|
117 |
+
|
118 |
+
To utilize AWS SES for Arthur generated emails, you will need to configure IRSA as outlined in the above section. Once this is done navigate to the email configuration section of Arthur's config page. Select AWS SES, and then enter the region in which your SES entity is configured. As outlined above, the role associated with the cluster must have permissions on this SES entity. If the SES entity is in the same account as your cluster, and you do not need to utilize a different role such as for cross account permissions, do not enter a role in the second box.
|
119 |
+
|
120 |
+

|
121 |
+
|
122 |
+
If your SES entity is in another Arthur account you will need to set up cross account privileges between roles. In the account of your SES entity (Account A) you will need to create an IAM role (Role A) that has send email permissions to SES as depicted above. Role A will also need to have a trust relationship with either the account that your cluster is in (Account B), the OIDC provider on your cluster as depicted above, or the IRSA role associated with your cluster. Additionally, the IRSA role that you created above in Account B, will also need to be granted STS assume role privileges on the role you are creating in Account A.
|
123 |
+
|
124 |
+
Once all of this is set up, enter the role in the account that contains the SES entity (Account A), that the IRSA role should assume to send emails:
|
125 |
+
|
126 |
+

|
files/arthur-docs-markdown/platform-management/installation/platform_readiness_faq.md.txt
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Platform Readiness for Existing Cluster Installs
|
2 |
+
|
3 |
+
The Arthur platform can be installed on an on-prem or cloud-based pre-provisioned Kubernetes cluster, so all the data and controls adhere to existing corporate practices.
|
4 |
+
|
5 |
+
## Arthur Cluster Installs FAQs
|
6 |
+
|
7 |
+
### SysAdmin
|
8 |
+
|
9 |
+
1. **What kind of privileges/hardware does the SysAdmin installing the Arthur platform need?**
|
10 |
+
The SysAdmin will need a workstation with the following requirements:
|
11 |
+
- running Linux or MacOS. The KOTS CLI installer does not support Windows.
|
12 |
+
- sudo/root access. To install the KOTS CLI plugin for `kubectl`.
|
13 |
+
- connection to the Kubernetes cluster, using `kubectl`, and privileges to deploy K8s Objects at either Cluster or Namespace scope (at least).
|
14 |
+
- (recommended) access to the Internet. For downloading the installer, plugins and fetching updates.
|
15 |
+
|
16 |
+
1. **How can I download the artifacts required for installing the Arthur platform?**
|
17 |
+
All artifacts required for installing the Arthur platform are available on a customer-specific password-protected portal, which your sales team can give you access to. It is recommended that the portal is accessible from within your corporate network, since the artifacts are around mutiple GBs in size.
|
18 |
+
|
19 |
+
1. **Does my kubernetes cluster need access to the internet?**
|
20 |
+
The Arthur platform can be installed without Internet access, once all the required files are downloaded and available locally. However, we recommend access to the Internet from the Kubernetes cluster for an efficient install and upgrade experience. Please inform your sales team about any network restrictions and optionally, if its possible to {ref}`whitelist specific URLs <requirements_for_online_installation>`.
|
21 |
+
|
22 |
+
### Cloud Providers
|
23 |
+
|
24 |
+
1. **Which Kubernetes distributions that Arthur supports out-of-the-box?**
|
25 |
+
Arthur is architected to run on any distribution of Kubernetes, however certain commercial distributions are untested. The Arthur application is validated/tested on:
|
26 |
+
- Amazon [AWS EKS](https://aws.amazon.com/eks/)
|
27 |
+
- Microsoft [Azure AKS](https://azure.microsoft.com/en-us/services/kubernetes-service/)
|
28 |
+
|
29 |
+
1. **Which cloud providers has Arthur been tested on?**
|
30 |
+
The Arthur platform has been tested on the following cloud providers:
|
31 |
+
- Amazon [AWS](https://aws.amazon.com/)
|
32 |
+
- Microsoft [Azure](https://azure.microsoft.com/en-us/)
|
33 |
+
|
34 |
+
1. **What container runtimes does Arthur support?**
|
35 |
+
Containers in the Arthur Platform run on the following container runtimes:
|
36 |
+
- docker (slated to be [deprecated in Kubernetes 1.24](https://kubernetes.io/blog/2022/01/07/kubernetes-is-moving-on-from-dockershim/))
|
37 |
+
- containerd
|
38 |
+
|
39 |
+
### Kubernetes Server
|
40 |
+
|
41 |
+
1. **What version(s) of Kubernetes Server does Arthur support?**
|
42 |
+
Arthur supports Kubernetes Server 1.19 through 1.22.
|
43 |
+
|
44 |
+
1. **Can the Arthur platform be scoped to a dedicated namespace?**
|
45 |
+
The Arthur platform can be deployed and scoped to a specific namespace, though there are some cluster-level CustomResourceDefinitions that need to be pre-installed. See details [here](./kubernetes-installation/k8s_install_namespace_scoped).
|
46 |
+
|
47 |
+
1. **What are the minimum resource requirements for operating the Arthur Platform?**
|
48 |
+
Optimal performance of the Arthur platform is ensured on a 6 node cluster (though test clusters can be provisioned with 3 nodes) with each node having 16 CPUs, 32GB Memory (RAM) and 1000 GB Storage with atleast 3000 IOPS. However, please reach out to your sales team for a tailored configuration custom to your projected workloads.
|
49 |
+
|
50 |
+
1. **Is there a default StorageClass defined on the Kubernetes cluster?**
|
51 |
+
The Kubernetes cluster must have a default StorageClass defined before starting the Arthur platform installation. If a default StorageClass does not exist, adding the `storageclass.kubernetes.io/is-default-class: "true"` annotation to a StorageClass should remedy this requirement.
|
52 |
+
|
53 |
+
1. **What Ingress Controller are you planning to use to access the Arthur platform? Is it already installed?**
|
54 |
+
The Arthur platform needs to expose a couple of services so the application is accessible outside the cluster. All [compatible Kubernetes Ingress controllers](https://kubernetes.io/docs/concepts/services-networking/ingress-controllers/) should work, though {ref}`Nginx Ingress Controller <k8s_install_prep_install_ingress>` installed in a separate namespace is recommended.
|
55 |
+
|
56 |
+
1. **Are there any SecurityContext requirements on the Kubernetes cluster?**
|
57 |
+
The Arthur platform is architected to leverage as few permissions as deemed necessary for optimal functioning. No container is run as root. All processes are owned by non-system users. Please reach out to your sales team if you have specific SecurityContext requirements.
|
58 |
+
|
59 |
+
1. **Does Arthur support running on SELinux environments?**
|
60 |
+
The Arthur platform requires SELinux to be running in permissive mode, if enabled.
|
61 |
+
|
62 |
+
1. **Are there any Network Policies configured on the Kubernetes cluster?**
|
63 |
+
Pods of the Arthur platform will need to communicate with each other. By default, pods [can communicate](https://kubernetes.io/docs/concepts/services-networking/network-policies/#default-policies) with each other. Please reach out to your sales team if you have custom Network Policies configured on the Kubernetes cluster.
|
64 |
+
|
65 |
+
1. **How many IP addresses should be available for the Arthur Platform?**
|
66 |
+
The Arthur platform is architected to be scalable, using resources on-demand. Given the dynamic nature of the infrastructure involved, we recommend at least 128 IP address CIDR blocks attached to the relevant subnets. However, this number can increase as more models are onboarded to the platform.
|
67 |
+
|
68 |
+
1. **Are there any namespace-level constraints enforced on the Kubernetes cluster?**
|
69 |
+
Please let your sales team know if there are any constraints configured at the namespace-level on the Kubernetes cluster, as this will help prepare for a smooth installation experience.
|
70 |
+
|
71 |
+
1. **Are there any cluster-level constraints enforced on the Kubernetes cluster?**
|
72 |
+
Please let your sales team know if there are any specific cluster-level contraints configured on the Kubernetes cluster, as this will help prepare for a smooth installation experience.
|
73 |
+
|
74 |
+
1. **Does the Kubernetes cluster have access to a private/public container registry?**
|
75 |
+
The Kubernetes cluster on which the Arthur platform will be installed must have connectivity to a container registry. The SysAdmin performing the installation must also have Read/Write access to the same container registry.
|
76 |
+
|
77 |
+
1. **Does the Kubernetes cluster have access to a private/public Pypi/Conda registry?**
|
78 |
+
The Kubernetes cluster on which the Arthur platform will be installed must have connectivity to a Pypi/Conda registry, which ensures optimum utilization of the features of the platform.
|
79 |
+
|
80 |
+
### Other Considerations
|
81 |
+
|
82 |
+
1. **Does your enterprise have a software procurement process?**
|
83 |
+
Please keep your sales team informed of any software procurement process that maybe in place before installing new software, and potential turnaround times for such processes.
|
84 |
+
|
85 |
+
1. **Do you want to deploy Arthur on infrastructure that isn't mentioned above (eg: Cloud Providers, Kubernetes Distributions, etc.)?**
|
86 |
+
If so, please inform your sales team as soon as possible so we can setup an architecture review between your platform team and Arthur's platform team.
|
87 |
+
|
88 |
+
1. **Can any of the Arthur platform components be externalized, so its not managed by Arthur?**
|
89 |
+
The platform supports the use of AWS S3 as well as most S3 compatible systems as the Object/Blob store. The embedded metadata database can be replaced by a recent version of Postgres.
|
90 |
+
A managed service for S3 and/or Postgres is recommended for production-grade installs.
|
91 |
+
|
92 |
+
1. **Can the Arthur platform be deployed on a Kubernetes cluster that is shared with other applications?**
|
93 |
+
The Arthur platform has been architected to be highly scalable and reliable. Based on usage (number of models) and load (data ingestion), pods are scaled in short periods of time to ensure efficient operation. As such, if other applications will be installed on the same Kubernetes platform, talk to your sales team about provisioning dedicated nodegroups for the cluster.
|
94 |
+
|
95 |
+
3. **Does the Arthur platform support different organizations/business units using the same application?**
|
96 |
+
Yes. See our guide on [User and Org Management](../ongoing-maintenance/organizations_and_users).
|
files/arthur-docs-markdown/platform-management/installation/requirements.md.txt
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# On-prem Deployment Requirements
|
2 |
+
|
3 |
+
## General
|
4 |
+
* A DNS hostname
|
5 |
+
* TLS private key & certificate
|
6 |
+
* SMTP server (StartTLS supported)
|
7 |
+
|
8 |
+
The minimum compute resource requirements in this documentation is for running a few small models in a non-production environment. Your production deployment will likely use more compute resources to achieve higher availability, performance and scalability.
|
9 |
+
|
10 |
+
Arthur’s horizontally elastic architecture allows high throughput processing in both streaming and batch. The platform's auto-scaler mechanism self-manages resource utilization in optimized and cost-effective fashion. It automatically scales up and down based on compute resource requests by the platform activities as well as the lag observed in the data pipeline queue within the limits of the allocated hardware. This works best in a cloud infrastructure with a managed Kubernetes service that enables Arthur to also auto-scale the provisioned hardware (e.g. AWS EKS, Azure ASK).
|
11 |
+
|
12 |
+
Storage volumes used for Arthur deployment should be encrypted with a data key using industry-standard data encryption (e.g. AES-256). This applies to the mounted disk volumes as well as the externalized storage, such as the S3 object storage and the relational database if any.
|
13 |
+
|
14 |
+
## Kubernetes Install
|
15 |
+
* Kubectl-ing workstation: Linux or MacOS
|
16 |
+
* Kubernetes: 1.22 to 1.24
|
17 |
+
* Runtime: containerd or Docker
|
18 |
+
* Namespace
|
19 |
+
* [Storage class](https://kubernetes.io/docs/concepts/storage/storage-classes/)
|
20 |
+
|
21 |
+
### Minimum Node Group Resource
|
22 |
+
* 16 CPUs
|
23 |
+
* 32 GB RAM
|
24 |
+
* Storage with at least 3000 IOPS (>100GB recommended)
|
25 |
+
|
26 |
+
### Permissions
|
27 |
+
When Arthur platform is installed, Kubernetes RBAC resources are created to allow the Admin Console to manage the application.
|
28 |
+
The kubectl-ing user who installs Arthur must have the wildcard privileges in the cluster.
|
29 |
+
|
30 |
+
Refer to [this documentation](https://kots.io/vendor/packaging/rbac/#reference-objects) for the ClusterRole and ClusterRoleBinding that
|
31 |
+
will be created for the Admin Console.
|
32 |
+
|
33 |
+
### Components
|
34 |
+
* Prometheus
|
35 |
+
* Ingress Controller (Nginx or Ambassador)
|
36 |
+
* Kubernetes Metrics Server
|
37 |
+
* Velero with Restic (Optional for managed backup and restore feature)
|
38 |
+
|
39 |
+
For Airgapped installation only:
|
40 |
+
* An existing private container registry
|
41 |
+
* Existing private Python registries (PyPI, Anaconda) - only required for the model explanation feature
|
42 |
+
|
43 |
+
## VM Install
|
44 |
+
|
45 |
+
### Minimum Server Resource
|
46 |
+
* 16 CPUs
|
47 |
+
* 32 GB RAM
|
48 |
+
* Storage with at least 3000 IOPS (>100GB recommended)
|
49 |
+
|
50 |
+
### Supported Operating Systems
|
51 |
+
The latest versions of the following Linux operating systems are supported.
|
52 |
+
|
53 |
+
* Ubuntu
|
54 |
+
* RHEL
|
55 |
+
|
56 |
+
Please do the following before running the installer on your VM for a smoother deployment experience:
|
57 |
+
* If SELinux is enabled, set it to the permissive mode
|
58 |
+
* Make sure the VM doesn't have any container runtime pre-installed, such as Docker or containerd
|
59 |
+
|
60 |
+
### Ports for High Availability Configuration
|
61 |
+
* TCP ports 2379, 2380, 6443, 6783, 10250, 10251 and 10252 open between cluster nodes
|
62 |
+
* UDP ports 6783 and 6784 open between cluster nodes
|
63 |
+
|
64 |
+
## Firewall Configurations
|
65 |
+
### Ingress
|
66 |
+
The TCP port 443 is the only entry point that Arthur exposes.
|
67 |
+
|
68 |
+
### Egress
|
69 |
+
The platform requires access to any integrations (e.g. SMTP, IdP) as well as externalized components (e.g. Postgres, S3).
|
70 |
+
|
71 |
+
#### For Airgap Installation
|
72 |
+
Your private container and Python registries must be accessible.
|
73 |
+
|
74 |
+
(requirements_for_online_installation)=
|
75 |
+
#### For Online Installation
|
76 |
+
Access to container images and deployment manifest files from the below public registries are required.
|
77 |
+
|
78 |
+
| Host | Existing Cluster | Embedded Cluster |
|
79 |
+
| ---------------------- | ----------------- | -----------------|
|
80 |
+
| Docker Hub | Required | Required |
|
81 |
+
| proxy.replicated.com | Required | Required |
|
82 |
+
| replicated.app | Required | Required |
|
83 |
+
| k8s.kurl.sh | Not Required | Required |
|
84 |
+
| amazonaws.com | Not Required | Required |
|
files/arthur-docs-markdown/platform-management/installation/vm-installation/index.md.txt
ADDED
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Virtual Machine Installation
|
2 |
+
|
3 |
+
This section covers the steps required for installing Arthur on a virtual machine. We have included seperate steps required for online and airgapped installations.
|
4 |
+
|
5 |
+
## {doc}`vm_install_online`
|
6 |
+
This page shows the basic process of installing Arthur on a virtual machine.
|
7 |
+
|
8 |
+
## {doc}`vm_install_airgapped`
|
9 |
+
This page shows the basic process of installing Arthur on an airgapped virtual machine.
|
10 |
+
|
11 |
+
## {doc}`vm_install_airgapped_cli`
|
12 |
+
This page shows the basic process of installing Arthur on an airgapped virtual machine via a command-line interface.
|
13 |
+
|
14 |
+
```{toctree}
|
15 |
+
:maxdepth: 1
|
16 |
+
:hidden:
|
17 |
+
|
18 |
+
Online <vm_install_online>
|
19 |
+
Airgapped <vm_install_airgapped>
|
20 |
+
Airgapped CLI <vm_install_airgapped_cli>
|
21 |
+
```
|
files/arthur-docs-markdown/platform-management/installation/vm-installation/vm_install_airgapped.md.txt
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Airgap Virtual Machine (VM) Install
|
2 |
+
|
3 |
+
Go to the download portal using the URL and the password provided by Arthur.
|
4 |
+
|
5 |
+
Select the "Embedded cluster" option.
|
6 |
+

|
7 |
+
|
8 |
+
Click the “Download license” button to download your license in YAML file.
|
9 |
+
|
10 |
+
Download the "Latest kURL embedded install" and the "Latest Arthur Airgap bundle".
|
11 |
+
|
12 |
+
## Preparing the embedded cluster
|
13 |
+
Arthur leverages Kubernetes as the base. This step installs the base Kubernetes cluster and Arthur's Admin Console
|
14 |
+
on your VM with a single CLI command.
|
15 |
+
|
16 |
+
First, upload the kURL embedded install bundle on your VM instance.
|
17 |
+
Example:
|
18 |
+
```shell
|
19 |
+
scp -i mykey.pem ~/Downloads/arthur.tar.gz ubuntu@hostname:arthur.tar.gz
|
20 |
+
```
|
21 |
+
|
22 |
+
Unpack the bundle and install the embedded Kubernetes cluster on your VM instance.
|
23 |
+
```shell
|
24 |
+
tar xvf arthur.tar.gz
|
25 |
+
cat install.sh | sudo bash -s airgap
|
26 |
+
```
|
27 |
+
|
28 |
+
Save the output from the install which includes the Kotsadm Admin Console URL and the password.
|
29 |
+
You now have a K8s cluster, kubectl CLI, and the Admin Console installed on your VM.
|
30 |
+
|
31 |
+
## Deploying the application to the embedded cluster
|
32 |
+
Load the Admin Console UI on port 8800 from your browser using the Kotsadm URL and the password you recorded earlier.
|
33 |
+
Follow the instructions on the Admin Console to complete your installation by providing the `arthur-x.x.x.airgap` bundle and necessary configurations.
|
34 |
+
|
35 |
+
Monitor the Admin Console dashboard for the application status to become **Ready**.
|
36 |
+
|
37 |
+

|
38 |
+
|
39 |
+
To see the progress of the deployment, monitor the deployment status with `kubectl` CLI on the VM:
|
40 |
+
```shell
|
41 |
+
# Reload your shell if you haven't
|
42 |
+
bash -l
|
43 |
+
|
44 |
+
kubectl get deployment,statefulset,pod
|
45 |
+
```
|
46 |
+
|
47 |
+
If anything is showing Pending, it is likely you need to add more/bigger nodes to your cluster.
|
48 |
+
|
49 |
+
**Note:** You may also follow the instructions {doc}`here <vm_install_airgapped_cli>` to install the Admin Console and Arthur app programmatically using the CLI only.
|
files/arthur-docs-markdown/platform-management/installation/vm-installation/vm_install_airgapped_cli.md.txt
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Airgap Virtual Machine (VM) Install with CLI
|
2 |
+
|
3 |
+
If you prefer to install programmatically using CLI only, follow the steps below.
|
4 |
+
|
5 |
+
Upload the license file and the `arthur-x.x.x.airgap` bundle on your VM instance.
|
6 |
+
|
7 |
+
Example:
|
8 |
+
```shell
|
9 |
+
scp -i mykey.pem ~/Downloads/Test\ Customer.yaml ubuntu@hostname:license.yaml
|
10 |
+
scp -i mykey.pem ~/Downloads/arthur-x.x.x.airgap ubuntu@hostname:arthur-x.x.x.airgap
|
11 |
+
```
|
12 |
+
|
13 |
+
Create a `config.yaml` file on the VM instance using {doc}`the configuration template </platform-management/reference/config_template>`.
|
14 |
+
|
15 |
+
Run this install command from your VM's SSH session:
|
16 |
+
|
17 |
+
```shell
|
18 |
+
kubectl kots install arthur \
|
19 |
+
--airgap-bundle ./arthur-x.x.x.airgap \
|
20 |
+
--license-file ./license.yaml \
|
21 |
+
--config-values ./config.yaml \
|
22 |
+
--namespace arthur \
|
23 |
+
--shared-password [The Kotsadm password you saved earlier]
|
24 |
+
```
|
files/arthur-docs-markdown/platform-management/installation/vm-installation/vm_install_online.md.txt
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Online Virtual Machine (VM) Install
|
2 |
+
|
3 |
+
Go to the download portal using the URL and the password provided by Arthur.
|
4 |
+
|
5 |
+
Click the "Download license" button to download your license in YAML file.
|
6 |
+
|
7 |
+
SSH into your virtual machine (VM) and run the command below to install the Admin Console:
|
8 |
+
```shell
|
9 |
+
curl -sSL https://k8s.kurl.sh/arthur | sudo bash
|
10 |
+
```
|
11 |
+
|
12 |
+
Login to the Admin Console at `<yourhost>:8800` using the provided password in the install output.
|
13 |
+
|
14 |
+
Follow the instruction to set up your secure connection with TLS certificate.
|
15 |
+
|
16 |
+
Upload your license file.
|
17 |
+

|
18 |
+
|
19 |
+
Provide your configurations.
|
20 |
+

|
21 |
+
|
22 |
+
Review the preflight checks to make sure that your machine meets the minimum requirements before you proceed with the installation.
|
23 |
+
|
24 |
+
Monitor the dashboard for the application status to become **Ready**.
|
25 |
+
|
26 |
+

|
27 |
+
|
28 |
+
To see the progress of the deployment, monitor the deployment status with `kubectl` CLI:
|
29 |
+
```shell
|
30 |
+
# Reload your shell if you haven't
|
31 |
+
bash -l
|
32 |
+
|
33 |
+
kubectl get deployment,statefulset,pod -n <yournamespace>
|
34 |
+
```
|
35 |
+
|
36 |
+
If anything is showing Pending, it is likely you need to add more/bigger nodes to your cluster.
|
37 |
+
|
38 |
+
When using `kubectl`, you might run into a permission issue loading the `kubernetes/admin.conf` file. Please remediate it by running the command below.
|
39 |
+
```shell
|
40 |
+
sudo chmod +r /etc/kubernetes/admin.conf
|
41 |
+
```
|
files/arthur-docs-markdown/platform-management/ongoing-maintenance/audit_log.md.txt
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Audit Log
|
2 |
+
|
3 |
+
The Arthur platform has the ability to produce an audit log of all calls to sensitive endpoints that include
|
4 |
+
models, organizations, RBAC, and uploading / modifying data.
|
5 |
+
|
6 |
+
## Event Format
|
7 |
+
|
8 |
+
Each event in the audit log has the following fields:
|
9 |
+
|
10 |
+
| Field | Type | Notes |
|
11 |
+
|------------------|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
12 |
+
| event_category | string | A description of the overarching category for this event. See the table below for a breakdown of the various categories. |
|
13 |
+
| event_type | string | An explanation of what kind of event occurred within the event_category. See the table below for a breakdown of the various types. |
|
14 |
+
| event_id | string | A unique ID for this event, currently in UUID format but this may change in the future. |
|
15 |
+
| timestamp | [string, int] | A timestamp in either Unix Epoch millisecond integer format or [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) string format, depending on the point of integration. |
|
16 |
+
| organization_id | [string, null] | A string UUID of the organization if there is one associated with the event. |
|
17 |
+
| model_id | [string, null] | A string UUID of the model if there is one associated with the event. |
|
18 |
+
| user_id | [string, null] | A string ID of the user if there is one associated with the event. |
|
19 |
+
| user_type | [string, null] | A string description of the kind of user if there is one associated with the event. This can be one of: `service-account`, `arthur-managed`, or `idp-managed`. |
|
20 |
+
| http_path | [string, null] | A string HTTP path of the request that triggered the event if one exists. |
|
21 |
+
| http_method | [string, null] | A string HTTP method of the request that triggered the event if one exists. |
|
22 |
+
| http_status_code | [int, null] | An integer HTTP status code of the request that triggered the event if one exists. |
|
23 |
+
|
24 |
+
## Logged Endpoints
|
25 |
+
|
26 |
+
When enabled, Audit Logging will track all requests made to the following endpoints and set the Event Category and Event Type respectively in the audit log events.
|
27 |
+
|
28 |
+
| Endpoint | Method | Event Category | Event Type |
|
29 |
+
|---------------------------------------|--------|-------------------------------|---------------------------------|
|
30 |
+
| /organizations | POST | events.arthur.ai/organization | created |
|
31 |
+
| /organizations/{organization_id} | DELETE | events.arthur.ai/organization | deleted |
|
32 |
+
| /models | POST | events.arthur.ai/model | created |
|
33 |
+
| /models/{model_id} | PUT | events.arthur.ai/model | updated |
|
34 |
+
| /models/{model_id} | DELETE | events.arthur.ai/model | deleted |
|
35 |
+
| /alerts/{alert_id}/notifications | POST | events.arthur.ai/alert | created |
|
36 |
+
| /models/{model_id}/inferences | POST | events.arthur.ai/ingestion | inference_data_received |
|
37 |
+
| /models/{model_id}/inferences | PATCH | events.arthur.ai/ingestion | ground_truth_data_received |
|
38 |
+
| /models/{model_id}/inferences/file | POST | events.arthur.ai/ingestion | inference_data_received |
|
39 |
+
| /models/{model_id}/reference_data | POST | events.arthur.ai/ingestion | reference_data_received |
|
40 |
+
| /models/{model_id}/batches/{batch_id} | PATCH | events.arthur.ai/ingestion | inference_data_batch_completed |
|
41 |
+
| /models/{model_id}/reference_data | PATCH | events.arthur.ai/ingestion | reference_data_upload_completed |
|
42 |
+
| /authorization/custom_roles | POST | events.arthur.ai/rbac | updated |
|
43 |
+
| /authorization/custom_roles | DELETE | events.arthur.ai/rbac | updated |
|
44 |
+
|
45 |
+
A more thorough description of these endpoints is available at our [API documentation](https://docs.arthur.ai/api-documentation/v3-api-docs.html).
|
46 |
+
|
47 |
+
## Integration with EventBridge
|
48 |
+
|
49 |
+
The on-prem installation provides support for shipping the Audit Log to AWS EventBridge. In order to configure this, you will need the following:
|
50 |
+
|
51 |
+
- **Bus Name**: Required. The name of the EventBridge bus. This should not be the full ARN of the bus.
|
52 |
+
- **Region**: Required. This is the AWS region where your EventBridge bus is located.
|
53 |
+
- **Source**: Optional. This value will be added to the EventBridge events "source" for all events. This defaults to "arthur-audit-log".
|
54 |
+
- **Detail Type**: Optional. This value will be added to the EventBridge events "detail-type" for all events. This defaults to "events.arthur.ai".
|
55 |
+
|
56 |
+
An example of the events that are written to EventBridge look like the following
|
57 |
+
(this was captured via an EventBridge to CloudWatch Log Group rule and target):
|
58 |
+
```json
|
59 |
+
{
|
60 |
+
"version": "0",
|
61 |
+
"id": "b87f2a3a-6be1-e1d9-bc94-720d60e0a9d8",
|
62 |
+
"detail-type": "events.arthur.ai",
|
63 |
+
"source": "arthur-audit-log",
|
64 |
+
"account": "1234567890",
|
65 |
+
"time": "2022-07-21T22:07:00Z",
|
66 |
+
"region": "us-east-2",
|
67 |
+
"resources": [],
|
68 |
+
"detail": {
|
69 |
+
"event_type": "created",
|
70 |
+
"event_category": "events.arthur.ai/model",
|
71 |
+
"event_id": "da2ec82d-f581-4e72-bb66-fc82504f2a7e",
|
72 |
+
"timestamp": "2022-07-21T22:06:59.683+0000",
|
73 |
+
"organization_id": "d579359a-7259-4397-a08b-3e36c212350f",
|
74 |
+
"model_id": "a950c9ad-6a1e-4042-8e47-461d13072da5",
|
75 |
+
"user_id": "df3fe374-26d7-4bd8-bf62-e04a6e078e2b",
|
76 |
+
"user_type": "arthur-managed",
|
77 |
+
"http_path": "/api/v3/models",
|
78 |
+
"http_method": "POST",
|
79 |
+
"http_status_code": 200
|
80 |
+
}
|
81 |
+
}
|
82 |
+
```
|
83 |
+
|
84 |
+
### Configuration
|
85 |
+
|
86 |
+
The EventBridge integration can be enabled on the Admin Console Config Page by:
|
87 |
+
1. Checking "Show Other Advanced Options" under the Other Advanced Options section
|
88 |
+
2. After that is checked, a new section will appear called "Audit Logging"
|
89 |
+
3. Check "Enable Audit Log"
|
90 |
+
4. Next a choice of persistence methods appears. Choose "AWS EventBridge"
|
91 |
+
5. Fill out the "Bus Name", "Region", "Event Source", and "Detail Type" fields that appear.
|
92 |
+
6. Click "Save config" and deploy the updated version
|
93 |
+
|
94 |
+
### Required IAM Permissions
|
95 |
+
|
96 |
+
In order to send events to AWS EventBridge, the Arthur IAM credentials or role will require the `events:PutEvents`
|
97 |
+
permission. Here is an example policy that grants that permission on a EventBridge bus called `arthur-events` in the
|
98 |
+
`us-east-2` region, in the `0123456789` AWS account.
|
99 |
+
|
100 |
+
```json
|
101 |
+
{
|
102 |
+
"Statement": [
|
103 |
+
{
|
104 |
+
"Action": "events:PutEvents",
|
105 |
+
"Effect": "Allow",
|
106 |
+
"Resource": "arn:aws:events:us-east-2:0123456789:event-bus/arthur-events",
|
107 |
+
"Sid": ""
|
108 |
+
}
|
109 |
+
],
|
110 |
+
"Version": "2012-10-17"
|
111 |
+
}
|
112 |
+
```
|
files/arthur-docs-markdown/platform-management/ongoing-maintenance/backup.md.txt
ADDED
@@ -0,0 +1,845 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Arthur Platform Backup and Restore
|
2 |
+
|
3 |
+
## Contents
|
4 |
+
|
5 |
+
* Warnings
|
6 |
+
* Overview
|
7 |
+
* Overview - clickhouse-backup
|
8 |
+
* Overview - Velero
|
9 |
+
* Overview - Arthur (Argo)Workflows
|
10 |
+
* Overview - S3
|
11 |
+
* Pre-requisites
|
12 |
+
* Installing - Velero
|
13 |
+
* Setup ServiceAccount with IAM roles for Backup S3 Bucket
|
14 |
+
* Setup CRDs + Cluster-level permissions + Backup Infrastructure
|
15 |
+
* Confirm Velero is installed and configured correctly
|
16 |
+
* Configure the Backup Storage Destination to Point to S3
|
17 |
+
* Configuring - clickhouse-backup remote storage
|
18 |
+
* Backing up
|
19 |
+
* Restoring
|
20 |
+
* Appendix
|
21 |
+
* Running the Velero CLI
|
22 |
+
* Working with Velero - Backup
|
23 |
+
* Working with Velero - Restore
|
24 |
+
* Backup Architecture
|
25 |
+
|
26 |
+
## WARNINGS
|
27 |
+
|
28 |
+
### PLEASE READ - FOLLOW THESE INSTRUCTIONS EXACTLY
|
29 |
+
|
30 |
+
These instructions have been tested as written. If you find they do not work for your use-case, please reach out to Arthur Support before modifying them. We cannot guarantee reliable operation if these instructions are not followed exactly as written.
|
31 |
+
|
32 |
+
### PLEASE READ - TAKE CARE WHEN RESTORING INTO A NEW CLUSTER
|
33 |
+
|
34 |
+
When restoring into a new cluster, you must ensure that the new cluster is unable to communicate with any services or data store in the old cluster.
|
35 |
+
|
36 |
+
If you took a backup on cluster "Apple", and performed a restore into cluster "Banana", cluster "Banana" must point to its own RDS Instance, ClickHouse Database, and Kafka Store (note: it is ok if clusters share an S3 bucket, but not ideal).
|
37 |
+
|
38 |
+
To ensure this, you must re-configure via the Admin Interface when restoring into a new cluster. Failure to do this **WILL CAUSE DATA CORRUPTION** on both clusters that is unrecoverable.
|
39 |
+
|
40 |
+
### PLEASE READ - ENSURE CONSISTENCY WITH BACKUPS
|
41 |
+
|
42 |
+
If you are either manually taking a backup, or scheduling a backup, you **MUST** take a backup of of the full platform. You **CANNOT** use a ClickHouse snapshot taken at midnight with a RDS snapshot taken at 0400 AM (or any other time). All backup operations must be performed at the same time, and when restoring, the data you are using must all belong to the same backup operation. This is to ensure data consistency across the different data stores. **IGNORING THIS WILL CAUSE DATA CORRUPTION**.
|
43 |
+
|
44 |
+
## Overview
|
45 |
+
|
46 |
+
The overall backup and restore process for the Arthur Platform is as follows:
|
47 |
+
|
48 |
+
* Backup a cluster
|
49 |
+
* Take a backup of ClickHouse Data
|
50 |
+
* Take a backup of Kubernetes Deployment State and Persistent Volumes
|
51 |
+
* Enrichments infrastructure
|
52 |
+
* Model Servers
|
53 |
+
* Data Pipeline Services
|
54 |
+
* Enrichment / Delete Enrichment Workflows
|
55 |
+
* Kafka Deployment State and EBS Volumes (using EBS Snapshots)
|
56 |
+
* Take a backup of RDS Postgres
|
57 |
+
* Restore the cluster
|
58 |
+
* Restore RDS Postgres
|
59 |
+
* Update configuration and install the platform
|
60 |
+
* Restore ClickHouse Data
|
61 |
+
* Restore the Kafka Deployment State and Persistent Volumes
|
62 |
+
* Restore Enrichments infrastructure
|
63 |
+
* Restore Workflows
|
64 |
+
* Smoke Tests and Validation
|
65 |
+
|
66 |
+
### Overview - clickhouse-backup
|
67 |
+
|
68 |
+
The Arthur Platform stores inference data, data built from the enrichments pipeline, reference and ground truth data in ClickHouse. ClickHouse is an open-source OLAP Database which enables SQL-like query execution, replication, sharding and many additional features.
|
69 |
+
|
70 |
+
To backup ClickHouse, the Arthur Platform uses a tool called [clickhouse-backup](https://github.com/AlexAkulov/clickhouse-backup). clickhouse-backup is a sidecar-container included on the ClickHouse pods and is responsible for taking backups, performing restores, and coordinating with remote storage (in this case S3) to store and retrieve backups. clickhouse-backup uses built-in functionality of ClickHouse to take backups and perform restores.
|
71 |
+
|
72 |
+
|
73 |
+
### Overview - Velero
|
74 |
+
|
75 |
+
The Arthur Platform uses [Velero](https://velero.io/) as its Backup and Restore tool. Velero is an industry-standard, battle-tested tool for backing up Kubernetes Resources as well as Persistent Volumes.
|
76 |
+
|
77 |
+
Arthur uses velero to backup most namespaced kubernetes resources, as well as the EBS Volume Snapshot backups for each PersistentVolumes claimed by the StatefulSets (eg: via PVCs).
|
78 |
+
|
79 |
+
Backup data (not including EBS Volume Snapshots) is stored in an S3 bucket which is accessible via a ServiceAccount that is provisioned for the Backup and Restore agent. Backup and Restores are managed by Velero using Kubernetes Custom Resource Definitions (CRDs), which are consumed by the Velero Backup Controller and Restic Agents.
|
80 |
+
|
81 |
+
Velero has a feature which also allows backups to be scheduled, using a cron-like configuration. It also provides `ServiceMonitors` which expose metrics via Prometheus, so that operators can monitor backup and restore status and set up alerts for when backups or restores fail.
|
82 |
+
|
83 |
+
### Overview - Arthur (Argo)Workflows
|
84 |
+
|
85 |
+
The Arthur Platform uses [Argo Workflows](https://argoproj.github.io/argo-workflows/) as a workflow orchestration engine for running certain jobs. Argo installs a handful of Custom Resource Definitions (CRDs) which enable the Argo Workflow services to schedule, execute and update these jobs.
|
86 |
+
|
87 |
+
Workflows are dynamically managed, meaning that their definitions are not stored in the Arthur installer script. The Backup and Restore operation accounts for this by treating restoration of Workflows on a case-by-case basis, as follows:
|
88 |
+
|
89 |
+
* Enrichments and Delete Enrichments workflows
|
90 |
+
* These workflows are created to create and tear-down infrastructure necessary for processing enrichments data (eg: kafka topics, pods which manage the data pipeline for enrichments, etc.)
|
91 |
+
* These workflows are idempotent and safe to recover
|
92 |
+
* Therefore, these workflows are backed up and restored just like any other Kubernetes Resource during the backup stage
|
93 |
+
* Batch workflows
|
94 |
+
* These workflows are created to manage batch jobs, which are used by clients when uploading large data files to models (inferences and/or ground truths).
|
95 |
+
* These workflows are sometimes safe to recover
|
96 |
+
* Therefore, these workflows are restored selectively based on what state they were in when the backup was taken
|
97 |
+
* Workflows for which Arthur received all of the data from the client are resumed by manually re-submitting them (this is done via an Administrative HTTP endpoint that needs to manually be called)
|
98 |
+
* Workflows for which Arthur did not receive all the data from the client will need to be re-submitted. Operators restoring the cluster will need to reach out to affected clients to communicate that their batch workflows should be re-submitted.
|
99 |
+
* Reference and Cron Workflows
|
100 |
+
* Reference Workflows are created for monitoring the upload of reference datasets to S3
|
101 |
+
* Reference datasets that were in-flight during a backup will need to be re-uploaded with the SDK.
|
102 |
+
* Cron Workflows are scheduled workflows which perform some regular processing (eg: triggering alerts for non-batch inferences)
|
103 |
+
* Cron Workflows are meant to be run on a regular schedule. It is safe to wait for the next workflow to be triggered, and therefore, these workflows are not backed up nor restored.
|
104 |
+
|
105 |
+
### Overview - S3
|
106 |
+
|
107 |
+
The Arthur Platform uses AWS S3 as object storage for storing inference data, reference data, as well as data and trained models for the enrichments pipeline.
|
108 |
+
|
109 |
+
Arthur recommends ensuring that the AWS S3 bucket used for this storage is configured with Live Cross-Region Replication so that objects are available in the event of an AWS region outage.
|
110 |
+
|
111 |
+
The Arthur Backup solution does not manage consistency with the S3 bucket and other backup data.
|
112 |
+
The data in S3 is only used in conjuction with data that is stored in Postgres (eg: model definitions), so it's ok if there's data in S3 that isn't represented in Postgres.
|
113 |
+
Therefore, the S3 bucket for a cluster will always reflect the most up-to-date state, regardless of when a backup was taken.
|
114 |
+
|
115 |
+
To read more about S3 Bucket Replication, check out the AWS Documentation:
|
116 |
+
* https://docs.aws.amazon.com/AmazonS3/latest/userguide/replication.html
|
117 |
+
|
118 |
+
## Pre-requisites
|
119 |
+
|
120 |
+
|
121 |
+
The following items must be configured specifically in this capacity in order to use Arthur's Backup and Restore capabilities:
|
122 |
+
|
123 |
+
1. Arthur must be configured using external object storage, specifically, S3
|
124 |
+
2. The access to external storage must be configured using IRSA Annotations
|
125 |
+
3. In order to use IRSA Annotations, the cluster must be deployed using Amazon EKS
|
126 |
+
|
127 |
+
If the following are not true/possible for your deployment, please reach out to Arthur Support so we can discuss.
|
128 |
+
|
129 |
+
|
130 |
+
|
131 |
+
## Installing - Velero
|
132 |
+
|
133 |
+
The only component that needs to be installed separately from Arthur to perform backup and restores is Velero. Below, instructions are provided for setting up Velero to store backups in S3 using Secret and Access keys.
|
134 |
+
|
135 |
+
The general overview of the installation is as follows:
|
136 |
+
|
137 |
+
1. Create the Velero configuration
|
138 |
+
1. Create the policy for accessing the S3 Bucket and taking EBS Snapshots and attach to an IAM User
|
139 |
+
2. Generate the Secret and Access keys for the IAM User
|
140 |
+
3. Create a Velero-specific credentials file
|
141 |
+
4. Install Velero
|
142 |
+
5. Confirm Velero is installed and configured correctly
|
143 |
+
6. Configure the Backup Storage Destination to Point to S3
|
144 |
+
|
145 |
+
### Create the Velero Configuration
|
146 |
+
|
147 |
+
The instructions here are taken from the Velero AWS Plugin Documentation, which can be found in Option 1 here:
|
148 |
+
https://github.com/vmware-tanzu/velero-plugin-for-aws#setup
|
149 |
+
|
150 |
+
1. Create the IAM user:
|
151 |
+
|
152 |
+
```bash
|
153 |
+
aws iam create-user --user-name velero
|
154 |
+
```
|
155 |
+
|
156 |
+
If you'll be using Velero to backup multiple clusters with multiple S3 buckets, it may be desirable to create a unique username per cluster rather than the default `velero`.
|
157 |
+
|
158 |
+
2. Attach policies to give `velero` the necessary permissions:
|
159 |
+
|
160 |
+
```
|
161 |
+
cat > velero-policy.json <<EOF
|
162 |
+
{
|
163 |
+
"Version": "2012-10-17",
|
164 |
+
"Statement": [
|
165 |
+
{
|
166 |
+
"Effect": "Allow",
|
167 |
+
"Action": [
|
168 |
+
"ec2:DescribeVolumes",
|
169 |
+
"ec2:DescribeSnapshots",
|
170 |
+
"ec2:CreateTags",
|
171 |
+
"ec2:CreateVolume",
|
172 |
+
"ec2:CreateSnapshot",
|
173 |
+
"ec2:DeleteSnapshot"
|
174 |
+
],
|
175 |
+
"Resource": "*"
|
176 |
+
},
|
177 |
+
{
|
178 |
+
"Effect": "Allow",
|
179 |
+
"Action": [
|
180 |
+
"s3:GetObject",
|
181 |
+
"s3:DeleteObject",
|
182 |
+
"s3:PutObject",
|
183 |
+
"s3:AbortMultipartUpload",
|
184 |
+
"s3:ListMultipartUploadParts"
|
185 |
+
],
|
186 |
+
"Resource": [
|
187 |
+
"arn:aws:s3:::${BUCKET}/*"
|
188 |
+
]
|
189 |
+
},
|
190 |
+
{
|
191 |
+
"Effect": "Allow",
|
192 |
+
"Action": [
|
193 |
+
"s3:ListBucket"
|
194 |
+
],
|
195 |
+
"Resource": [
|
196 |
+
"arn:aws:s3:::${BUCKET}"
|
197 |
+
]
|
198 |
+
}
|
199 |
+
]
|
200 |
+
}
|
201 |
+
EOF
|
202 |
+
```
|
203 |
+
```bash
|
204 |
+
aws iam put-user-policy \
|
205 |
+
--user-name velero \
|
206 |
+
--policy-name velero \
|
207 |
+
--policy-document file://velero-policy.json
|
208 |
+
```
|
209 |
+
|
210 |
+
3. Create an access key for the user:
|
211 |
+
|
212 |
+
```bash
|
213 |
+
aws iam create-access-key --user-name velero
|
214 |
+
```
|
215 |
+
|
216 |
+
The result should look like:
|
217 |
+
|
218 |
+
```
|
219 |
+
{
|
220 |
+
"AccessKey": {
|
221 |
+
"UserName": "velero",
|
222 |
+
"Status": "Active",
|
223 |
+
"CreateDate": "2017-07-31T22:24:41.576Z",
|
224 |
+
"SecretAccessKey": <AWS_SECRET_ACCESS_KEY>,
|
225 |
+
"AccessKeyId": <AWS_ACCESS_KEY_ID>
|
226 |
+
}
|
227 |
+
}
|
228 |
+
```
|
229 |
+
|
230 |
+
4. Create a Velero-specific credentials file (`credentials-velero`) in your local directory:
|
231 |
+
|
232 |
+
```bash
|
233 |
+
[default]
|
234 |
+
aws_access_key_id=<AWS_ACCESS_KEY_ID>
|
235 |
+
aws_secret_access_key=<AWS_SECRET_ACCESS_KEY>
|
236 |
+
```
|
237 |
+
|
238 |
+
where the access key id and secret are the values returned from the `create-access-key` request.
|
239 |
+
|
240 |
+
### Install Velero
|
241 |
+
|
242 |
+
To install Velero, first install the Velero CLI. Instructions for how to do this can be found on the Velero Documentation site: https://velero.io/docs/v1.10/basic-install/#install-the-cli
|
243 |
+
|
244 |
+
Once the Velero CLI is installed, you can use this to install Velero on the cluster. Please ensure that your kubeconfig is pointing to the cluster, as this is what it used by the Velero CLI to communicate with the cluster.
|
245 |
+
|
246 |
+
To install Velero, use the following command, ensuring that the path to the credentials file you generated in the last step is provided correctly:
|
247 |
+
|
248 |
+
```
|
249 |
+
velero install \
|
250 |
+
--provider aws \
|
251 |
+
--plugins velero/velero-plugin-for-aws:v1.6.0 \
|
252 |
+
--bucket $BUCKET \
|
253 |
+
--backup-location-config region=$REGION \
|
254 |
+
--snapshot-location-config region=$REGION \
|
255 |
+
--secret-file ./credentials-velero
|
256 |
+
```
|
257 |
+
|
258 |
+
### Confirm Velero is installed and configured correctly
|
259 |
+
|
260 |
+
To confirm that Velero is installed and configured correctly:
|
261 |
+
|
262 |
+
1. Open the Kots Admin Interface and navigate to the "Snapshots" tab
|
263 |
+
2. Click the "Check for Velero" button (see the screenshot below)
|
264 |
+
|
265 |
+

|
266 |
+
|
267 |
+
### Configure the Backup Storage Destination to Point to S3
|
268 |
+
|
269 |
+
The final step in configuring Velero is to configure the Backup Storage Destination to point to the S3 Bucket where the backups will be stored.
|
270 |
+
|
271 |
+
To do this, add a new "Backup Storage Destination" in the Admin Interface and fill in the details for the S3 Bucket and for the Secret and Access keys.
|
272 |
+
|
273 |
+
## Configuring - clickhouse-backup remote storage
|
274 |
+
|
275 |
+
Before continuing, please ensure that your cluster is setup and configured as described in the "Pre-requisites" section above.
|
276 |
+
|
277 |
+
Configuring clickhouse-backup to store backups in remote storage (eg: S3) can be done in the Kots Admin Interface.
|
278 |
+
|
279 |
+
If you've performed the configuration steps as mentioned in the "Pre-requisites" section, you should see the "Enable Olap Database Backup Capabilites" option in the "Olap Database" section (see screenshot)
|
280 |
+
|
281 |
+

|
282 |
+
|
283 |
+
Ensure that:
|
284 |
+
|
285 |
+
1. The configuration that points to the bucket is correct
|
286 |
+
* The Bucket Name
|
287 |
+
* The Bucket Region
|
288 |
+
2. The ServiceAccount is the same ServiceAccount that you've configured with the IRSA Annotation (if you are not sure, enter the default value)
|
289 |
+
3. The IAM Role that you are using for the IRSA Annotation has the appropriate permissions to read/write/list from the S3 bucket
|
290 |
+
* Note - you can use the same permissions that are described in the Velero Section, just be sure to update the bucket ARN that the permissions apply to
|
291 |
+
4. The S3 Path is where you want to be storing backups
|
292 |
+
|
293 |
+
Once you've configured clickhouse-backup, you can validate that the configuration is correct by trying to take a backup. Refer to the "Take a backup of ClickHouse Data" section below on how to do this.
|
294 |
+
|
295 |
+
## Backing up
|
296 |
+
|
297 |
+
Note that you can use the following script to run all of these steps together. Read the `Appendix: Running the Velero CLI` for instructions on how to run velero.
|
298 |
+
|
299 |
+
```bash
|
300 |
+
#!/bin/bash
|
301 |
+
|
302 |
+
set -euo pipefail
|
303 |
+
IFS=$'\n\t'
|
304 |
+
|
305 |
+
# You need to configure this by getting the name of the storage location
|
306 |
+
# using the velero CLI
|
307 |
+
# eg: `velero backup-location get`
|
308 |
+
storage_location="Put your storage location here"
|
309 |
+
|
310 |
+
backup_date=$(DATE +%Y-%m-%d-%H-%M-%S);
|
311 |
+
name=arthur-backup-$backup_date
|
312 |
+
echo "Creating a new backup with name $name"
|
313 |
+
|
314 |
+
echo "Taking a backup of CH data"
|
315 |
+
kubectl create job $name-clickhouse-backup \
|
316 |
+
--from=cronjob/clickhouse-backup-cronjob
|
317 |
+
ch_backup_jobname=$(kubectl get jobs -o name | grep "$name-clickhouse-backup")
|
318 |
+
kubectl wait $ch_backup_jobname \
|
319 |
+
--for=condition=complete \
|
320 |
+
--timeout=30m
|
321 |
+
|
322 |
+
echo "Taking a backup of the enrichments infrastructure"
|
323 |
+
velero backup create $name-enrichments \
|
324 |
+
--namespace=arthurai \
|
325 |
+
--include-namespaces=arthurai \
|
326 |
+
--selector='component in (kafka-mover-init-connector, model_server)' \
|
327 |
+
--include-resources=deployments,services \
|
328 |
+
--exclude-resources=clusterrolebindings.rbac.authorization.k8s.io,clusterroles.rbac.authorization.k8s.io,controllerrevisions.apps,endpointslices.discovery.k8s.io,customresourcedefinitions.apiextensions.k8s.io,secrets,configmaps \
|
329 |
+
--storage-location=$storage_location \
|
330 |
+
--wait
|
331 |
+
|
332 |
+
echo "Taking a backup of workflows"
|
333 |
+
velero backup create $name-workflows \
|
334 |
+
--namespace=arthurai \
|
335 |
+
--include-namespaces=arthurai \
|
336 |
+
--include-resources=workflows \
|
337 |
+
--exclude-resources=clusterrolebindings.rbac.authorization.k8s.io,clusterroles.rbac.authorization.k8s.io,controllerrevisions.apps,endpointslices.discovery.k8s.io,customresourcedefinitions.apiextensions.k8s.io,secrets,configmaps \
|
338 |
+
--storage-location=$storage_location \
|
339 |
+
--wait
|
340 |
+
|
341 |
+
echo "Taking a backup of Kafka/Kafka-ZK StatefulSets, their EBS Volumes, and related components"
|
342 |
+
velero backup create $name-stateful-sets \
|
343 |
+
--namespace=arthurai \
|
344 |
+
--include-namespaces=arthurai \
|
345 |
+
--selector='app in (cp-zookeeper,cp-kafka)' \
|
346 |
+
--exclude-resources=clusterrolebindings.rbac.authorization.k8s.io,clusterroles.rbac.authorization.k8s.io,controllerrevisions.apps,endpointslices.discovery.k8s.io,customresourcedefinitions.apiextensions.k8s.io \
|
347 |
+
--storage-location=$storage_location \
|
348 |
+
--wait
|
349 |
+
|
350 |
+
echo "Taking a backup of the RDS database"
|
351 |
+
aws rds create-db-cluster-snapshot \
|
352 |
+
--db-cluster-snapshot-identifier $name-snapshot \
|
353 |
+
--db-cluster-identifier RDS_DB_NAME \
|
354 |
+
--profile AWS_PROFILE_NAME \
|
355 |
+
--region AWS_REGION
|
356 |
+
```
|
357 |
+
|
358 |
+
### Take a backup of ClickHouse Data
|
359 |
+
|
360 |
+
By default, the Arthur Platform ships with a Kubernetes CronJob which takes a ClickHouse Backup each day at midnight.
|
361 |
+
|
362 |
+
Please see the warning `PLEASE READ - ENSURE DATA CONSISTENCY` at the top if attempting to take a manual backup.
|
363 |
+
|
364 |
+
To take a manual backup of ClickHouse Data, you can run the following commands:
|
365 |
+
|
366 |
+
```bash
|
367 |
+
$ kubectl get cronjobs -n arthurai
|
368 |
+
NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE
|
369 |
+
arthurai-cron-workflow-cron-job 1 0 * * * False 0 14h 2d18h
|
370 |
+
arthurai-model-health-cron-job 5 * * * * False 0 20m 2d18h
|
371 |
+
clickhouse-backup-cronjob 0 0 * * * False 0 14h 2d18h
|
372 |
+
$ kubectl create job clickhouse-backup --from=cronjob/clickhouse-backup-cronjob -n arthurai
|
373 |
+
job.batch/clickhouse-backup created
|
374 |
+
$ kubectl get jobs -n arthurai
|
375 |
+
NAME COMPLETIONS DURATION AGE
|
376 |
+
clickhouse-backup-cronjob-27735840 1/1 8m35s 14m
|
377 |
+
```
|
378 |
+
|
379 |
+
### Take a backup of Enrichments infrastructure and Enrichment / Delete Enrichment Workflows
|
380 |
+
|
381 |
+
The Arthur Platform uses Velero to take a backup of the Enrichments Infrastructure, as well as the Enrichments workflows. The backup is orchestrated manually and requires running a command.
|
382 |
+
|
383 |
+
The Enrichments infrastructure and Enrichment Workflows are orchestrated as separate backups and will require running 2 separate commands.
|
384 |
+
|
385 |
+
To take a manual backup of the Enrichments infrastructure, run the following commands:
|
386 |
+
|
387 |
+
```bash
|
388 |
+
$ backup_date=$(DATE +%Y-%m-%d-%H-%M-%S);
|
389 |
+
$ name=arthur-backup-$backup_date
|
390 |
+
$ velero backup create $name-enrichments \
|
391 |
+
--namespace=arthurai \
|
392 |
+
--include-namespaces=arthurai \
|
393 |
+
--selector='component in (kafka-mover-init-connector, model_server)' \
|
394 |
+
--include-resources=deployments,services \
|
395 |
+
--exclude-resources=clusterrolebindings.rbac.authorization.k8s.io,clusterroles.rbac.authorization.k8s.io,controllerrevisions.apps,endpointslices.discovery.k8s.io,customresourcedefinitions.apiextensions.k8s.io,secrets,configmaps \
|
396 |
+
--storage-location=$storage_location \
|
397 |
+
--wait
|
398 |
+
```
|
399 |
+
|
400 |
+
To take a manual backup of the Enrichments Workflows, run the following commands:
|
401 |
+
|
402 |
+
```bash
|
403 |
+
$ backup_date=$(DATE +%Y-%m-%d-%H-%M-%S);
|
404 |
+
$ name=arthur-backup-$backup_date
|
405 |
+
velero backup create $name-workflows \
|
406 |
+
--namespace=arthurai \
|
407 |
+
--include-namespaces=arthurai \
|
408 |
+
--include-resources=workflows \
|
409 |
+
--exclude-resources=clusterrolebindings.rbac.authorization.k8s.io,clusterroles.rbac.authorization.k8s.io,controllerrevisions.apps,endpointslices.discovery.k8s.io,customresourcedefinitions.apiextensions.k8s.io,secrets,configmaps \
|
410 |
+
--storage-location=$storage_location \
|
411 |
+
--wait
|
412 |
+
```
|
413 |
+
|
414 |
+
### Take a backup of Kafka Deployment State and EBS Volumes (using EBS Snapshots)
|
415 |
+
|
416 |
+
The Arthur Platform uses Velero to take a backup of the Kafka Deployment State and EBS Volumes. The backup is orchestrated manually and requires running a command.
|
417 |
+
|
418 |
+
To take a manual backup of Kafka, run the following commands:
|
419 |
+
|
420 |
+
```bash
|
421 |
+
$ backup_date=$(DATE +%Y-%m-%d-%H-%M-%S);
|
422 |
+
$ name=arthur-backup-$backup_date
|
423 |
+
$ velero backup create $name-zookeeper \
|
424 |
+
--namespace=arthurai \
|
425 |
+
--include-namespaces=arthurai \
|
426 |
+
--selector='app in (cp-zookeeper,cp-kafka)' \
|
427 |
+
--exclude-resources=clusterrolebindings.rbac.authorization.k8s.io,clusterroles.rbac.authorization.k8s.io,controllerrevisions.apps,endpointslices.discovery.k8s.io,customresourcedefinitions.apiextensions.k8s.io \
|
428 |
+
--storage-location=$storage_location \
|
429 |
+
--wait
|
430 |
+
```
|
431 |
+
|
432 |
+
If you are unable to run the Velero CLI locally, you can execute it from the Velero container. See the section **Executing on the Velero Backup Controller Pod** for more details.
|
433 |
+
|
434 |
+
|
435 |
+
### Take a backup of RDS Postgres
|
436 |
+
|
437 |
+
The script above provides the command line instructions for taking a backup of a RDS Database (also copied here). Please ensure that the values for the `db-cluster-identifier`, `profile` and `region` are filled in correctly.
|
438 |
+
|
439 |
+
Note that the command is only compatible for a multi-region RDS Database. If you are using a single-region RDS Database, the command to use is `aws rds create-db-snapshot`.
|
440 |
+
|
441 |
+
```bash
|
442 |
+
aws rds create-db-cluster-snapshot \
|
443 |
+
--db-cluster-snapshot-identifier $name-snapshot \
|
444 |
+
--db-cluster-identifier RDS_DB_NAME \
|
445 |
+
--profile AWS_PROFILE_NAME \
|
446 |
+
--region AWS_REGION
|
447 |
+
```
|
448 |
+
|
449 |
+
For more information, please refer to the AWS Documentation:
|
450 |
+
* Multi-region RDS instance:
|
451 |
+
* https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateMultiAZDBClusterSnapshot.html
|
452 |
+
* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-db-cluster-snapshot.html
|
453 |
+
* Single-region RDS instance:
|
454 |
+
* https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateSnapshot.html
|
455 |
+
* https://awscli.amazonaws.com/v2/documentation/api/latest/reference/rds/create-db-snapshot.html
|
456 |
+
|
457 |
+
## Restoring
|
458 |
+
|
459 |
+
### Restore the RDS Postgres
|
460 |
+
|
461 |
+
To restore RDS Postgres, use the following resource:
|
462 |
+
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_RestoreFromMultiAZDBClusterSnapshot.Restoring.html
|
463 |
+
|
464 |
+
Please ensure that you correctly match the following configuration from the DB from which the snapshot was taken
|
465 |
+
* The connection port
|
466 |
+
* The VPC and Security Group IDs
|
467 |
+
* DB Subnet Group
|
468 |
+
* DB Instance Type
|
469 |
+
* Any other configuration which might be overridden
|
470 |
+
|
471 |
+
This operation might take a while and the DB must show as Available before installing the platform.
|
472 |
+
|
473 |
+
### Update configuration and install the platform
|
474 |
+
|
475 |
+
**NOTE - Before completing this action, please check the following:**
|
476 |
+
|
477 |
+
1. The Restored RDS DB Instance is showing as "Available"
|
478 |
+
2. All pods which were restored are showing as "Running"
|
479 |
+
|
480 |
+
**NOTE - IMPORTANT -- Update configuration to point to the new DB Instance**
|
481 |
+
|
482 |
+
It is **CRITICALLY IMPORTANT** to update your configuration to point to the newly restored DB Instance. Failure to complete this step **WILL CAUSE DATA CORRUPTION**.
|
483 |
+
|
484 |
+
Please update the configuration in the "Meta Database" section of the Admin Interface to point to the newly restored DB instance.
|
485 |
+
|
486 |
+
If your new cluster is routed via a different ingress URL, please also update this in the "Network" section of the configuration.
|
487 |
+
|
488 |
+
Wait for the platform to come back online before proceeding to the next steps. All Deployments and StatefulSets should be completely stood up (eg: all Pods should be ready and "Running") and all Jobs should be "Completed".
|
489 |
+
|
490 |
+
|
491 |
+
### Restore ClickHouse Data
|
492 |
+
|
493 |
+
The Arthur Platform ships with a Kubernetes CronJob that executes a ClickHouse restore that is scheduled to never run (eg: it's scheduled to run on February 31st, which is an invalid date).
|
494 |
+
|
495 |
+
To run a ClickHouse data restore, execute the following commands:
|
496 |
+
|
497 |
+
First, we need to get the name of the clickhouse-backup that coincides with the kafka/enrichments/workflow backups that you are restoring:
|
498 |
+
|
499 |
+
```bash
|
500 |
+
$ kubectl get pods | grep olap
|
501 |
+
chi-olap-installation-arthur-0-0-0 2/2 Running 0 6d23h
|
502 |
+
chi-olap-installation-arthur-0-1-0 2/2 Running 0 6d23h
|
503 |
+
chi-olap-installation-arthur-0-2-0 2/2 Running 0 6d23h
|
504 |
+
olap-installation-zookeeper-0 3/3 Running 0 6d23h
|
505 |
+
olap-installation-zookeeper-1 3/3 Running 0 6d22h
|
506 |
+
olap-installation-zookeeper-2 3/3 Running 0 6d23h
|
507 |
+
olap-operator-8c867ddff-kc22x 2/2 Running 0 6d23h
|
508 |
+
$ kubectl exec chi-olap-installation-arthur-0-0-0 -c backup -- clickhouse-backup list
|
509 |
+
2022/10/04 16:03:20.255378 info SELECT value FROM `system`.`build_options` where name='VERSION_INTEGER'
|
510 |
+
2022/10/04 16:03:20.257582 info SELECT * FROM system.disks;
|
511 |
+
2022/10/04 16:03:20.267149 info SELECT count() AS is_macros_exists FROM system.tables WHERE database='system' AND name='macros'
|
512 |
+
2022/10/04 16:03:20.271359 info SELECT * FROM system.macros
|
513 |
+
chi-olap-installation-arthur-0-0-arthur-clickhouse-backup-2022-09-26-19-50-43 3.64MiB 02/10/2022 00:00:16 remote tar, regular
|
514 |
+
chi-olap-installation-arthur-0-1-arthur-clickhouse-backup-2022-09-26-19-50-43 3.64MiB 02/10/2022 00:00:16 remote tar, regular
|
515 |
+
chi-olap-installation-arthur-0-2-arthur-clickhouse-backup-2022-09-26-19-50-43 3.64MiB 02/10/2022 00:00:16 remote tar, regular
|
516 |
+
```
|
517 |
+
|
518 |
+
Note that from the above backup, the backup names are in the following format:
|
519 |
+
`$CLICKHOUSE_NODE_NAME-$ARTHUR_BACKUP_NAME`
|
520 |
+
|
521 |
+
So for example, `chi-olap-installation-arthur-0-0-arthur-clickhouse-backup-2022-09-26-19-50-43` can be parsed into:
|
522 |
+
* clickhouse node name: `chi-olap-installation-arthur-0-0`
|
523 |
+
* arthur backup name: `arthur-clickhouse-backup-2022-09-26-19-50-43`
|
524 |
+
|
525 |
+
Now we need to create the restoration job, and configure it to use the Arthur Backup Name from above:
|
526 |
+
|
527 |
+
```bash
|
528 |
+
$ kubectl create job --from=cronjob/clickhouse-restore-cronjob -o yaml clickhouse-restore --dry-run=client --save-config > clickhouse-restore.yaml
|
529 |
+
|
530 |
+
# update the value of the `BACKUP_NAME` environment variable in the `clickhouse-restore.yaml` file
|
531 |
+
# eg:
|
532 |
+
# - name: BACKUP_NAME
|
533 |
+
# value: "arthur-clickhouse-backup-2022-09-26-19-50-43"
|
534 |
+
|
535 |
+
$ kubectl apply -f clickhouse-restore.yaml
|
536 |
+
job.batch/clickhouse-restore created
|
537 |
+
```
|
538 |
+
|
539 |
+
### Restore the Kafka Deployment State and Persistent Volumes
|
540 |
+
|
541 |
+
The Arthur Platform restores Kafka Deployment State and PVs using Velero.
|
542 |
+
|
543 |
+
To execute a restore, run the following commands:
|
544 |
+
|
545 |
+
```bash
|
546 |
+
$ velero backup get -n arthurai | grep kafka
|
547 |
+
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
|
548 |
+
arthur-backup-2022-09-23t11.23.25-04.00-kafka Completed 0 0 2022-09-23 11:24:37 -0400 EDT 27d default app in (cp-kafka,cp-zookeeper)
|
549 |
+
$ velero restore create \
|
550 |
+
--from-backup "arthur-backup-2022-09-23t11.23.25-04.00-kafka" \
|
551 |
+
--namespace arthurai \
|
552 |
+
--restore-volumes=true \
|
553 |
+
--existing-resource-policy=update
|
554 |
+
```
|
555 |
+
|
556 |
+
Velero will update the Pod Specs and point to the PVs using the EBS Volume Snapshots and restore the kubernetes resources associated with Kafka.
|
557 |
+
|
558 |
+
### Restore Enrichments infrastructure
|
559 |
+
|
560 |
+
The Arthur Platform uses Velero to restore the Enrichments infrastructure.
|
561 |
+
|
562 |
+
To restore, run the following commands:
|
563 |
+
|
564 |
+
```bash
|
565 |
+
$ velero backup get -n arthurai | grep enrichments
|
566 |
+
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
|
567 |
+
arthur-backup-2022-09-23t11.23.25-04.00-enrichments Completed 0 0 2022-09-23 11:24:33 -0400 EDT 27d default component in (kafka-mover-init-connector,model_server)
|
568 |
+
$ velero restore create \
|
569 |
+
--from-backup "arthur-backup-2022-09-23t11.23.25-04.00-enrichments" \
|
570 |
+
--namespace arthurai
|
571 |
+
```
|
572 |
+
|
573 |
+
### Restore Workflows
|
574 |
+
|
575 |
+
Restoring workflows is a 2-step process:
|
576 |
+
|
577 |
+
1. Restore the workflows from the Velero backup
|
578 |
+
2. Restore Batch Workflows which are recoverable using an Arthur Admin Endpoint
|
579 |
+
|
580 |
+
To restore workflows using the Velero backup, run the following commands:
|
581 |
+
|
582 |
+
```bash
|
583 |
+
$ velero backup get -n arthurai | grep workflows
|
584 |
+
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
|
585 |
+
arthur-backup-2022-09-23t11.23.25-04.00-workflows Completed 0 0 2022-09-23 11:24:35 -0400 EDT 27d default <none>
|
586 |
+
$ velero restore create \
|
587 |
+
--from-backup "arthur-backup-2022-09-23t11.23.25-04.00-workflows" \
|
588 |
+
--namespace arthurai
|
589 |
+
```
|
590 |
+
|
591 |
+
To restore Batch Workflows, run the following comamnds.
|
592 |
+
|
593 |
+
In one terminal window, port-forward to the dataset-service:
|
594 |
+
|
595 |
+
```bash
|
596 |
+
$ kubectl get pods | grep dataset-service
|
597 |
+
arthurai-dataset-service-69dd979d8c-72t7j 1/1 Running 0 2d17h
|
598 |
+
$ kubectl port-forward -n arthurai arthurai-dataset-service-69dd979d8c-72t7j 7899
|
599 |
+
```
|
600 |
+
|
601 |
+
Then, in another terminal window, run the following commands:
|
602 |
+
|
603 |
+
```bash
|
604 |
+
$ curl -k -XPOST https://localhost:7899/api/v1/workflows/batch/recover
|
605 |
+
{"message":"success"}
|
606 |
+
```
|
607 |
+
|
608 |
+
### Smoke Tests and Validation
|
609 |
+
|
610 |
+
The restore should now be complete. All data should be restored and in a consistent state as it was from when the backup was taken. Any data sent during or after the backup will need to be re-sent. Perform any validation/smoke-tests to ensure that the platform is operating.
|
611 |
+
|
612 |
+
## Appendix
|
613 |
+
|
614 |
+
### Running the Velero CLI
|
615 |
+
|
616 |
+
Velero provides a Command-Line Interface (CLI) for taking backups and performing restores. The command line interface can be installed locally, or it can be invoked by `kubectl exec` on the Velero Backup Controller pod.
|
617 |
+
|
618 |
+
#### Local Installation
|
619 |
+
|
620 |
+
Read through the Velero Documentation for how to install velero on your platform:
|
621 |
+
https://velero.io/docs/v1.9/basic-install/#install-the-cli
|
622 |
+
|
623 |
+
Velero uses your KUBECONFIG file to connect to the cluster.
|
624 |
+
|
625 |
+
```
|
626 |
+
$ velero --help
|
627 |
+
Velero is a tool for managing disaster recovery, specifically for Kubernetes
|
628 |
+
cluster resources. It provides a simple, configurable, and operationally robust
|
629 |
+
way to back up your application state and associated data.
|
630 |
+
|
631 |
+
If you're familiar with kubectl, Velero supports a similar model, allowing you to
|
632 |
+
execute commands such as 'velero get backup' and 'velero create schedule'. The same
|
633 |
+
operations can also be performed as 'velero backup get' and 'velero schedule create'.
|
634 |
+
|
635 |
+
Usage:
|
636 |
+
velero [command]
|
637 |
+
|
638 |
+
Available Commands:
|
639 |
+
backup Work with backups
|
640 |
+
backup-location Work with backup storage locations
|
641 |
+
bug Report a Velero bug
|
642 |
+
client Velero client related commands
|
643 |
+
completion Generate completion script
|
644 |
+
create Create velero resources
|
645 |
+
debug Generate debug bundle
|
646 |
+
delete Delete velero resources
|
647 |
+
describe Describe velero resources
|
648 |
+
get Get velero resources
|
649 |
+
help Help about any command
|
650 |
+
install Install Velero
|
651 |
+
plugin Work with plugins
|
652 |
+
restic Work with restic
|
653 |
+
restore Work with restores
|
654 |
+
schedule Work with schedules
|
655 |
+
snapshot-location Work with snapshot locations
|
656 |
+
uninstall Uninstall Velero
|
657 |
+
version Print the velero version and associated image
|
658 |
+
|
659 |
+
Flags:
|
660 |
+
--add_dir_header If true, adds the file directory to the header
|
661 |
+
--alsologtostderr log to standard error as well as files
|
662 |
+
--colorized optionalBool Show colored output in TTY. Overrides 'colorized' value from $HOME/.config/velero/config.json if present. Enabled by default
|
663 |
+
--features stringArray Comma-separated list of features to enable for this Velero process. Combines with values from $HOME/.config/velero/config.json if present
|
664 |
+
-h, --help help for velero
|
665 |
+
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
|
666 |
+
--kubecontext string The context to use to talk to the Kubernetes apiserver. If unset defaults to whatever your current-context is (kubectl config current-context)
|
667 |
+
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
|
668 |
+
--log_dir string If non-empty, write log files in this directory
|
669 |
+
--log_file string If non-empty, use this log file
|
670 |
+
--log_file_max_size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
|
671 |
+
--logtostderr log to standard error instead of files (default true)
|
672 |
+
-n, --namespace string The namespace in which Velero should operate (default "velero")
|
673 |
+
--skip_headers If true, avoid header prefixes in the log messages
|
674 |
+
--skip_log_headers If true, avoid headers when opening log files
|
675 |
+
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
|
676 |
+
-v, --v Level number for the log level verbosity
|
677 |
+
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
|
678 |
+
|
679 |
+
Use "velero [command] --help" for more information about a command.
|
680 |
+
```
|
681 |
+
|
682 |
+
#### Executing on the Velero Backup Controller Pod
|
683 |
+
|
684 |
+
```
|
685 |
+
$ kubectl exec velero-699dc869d4-r24bh -c velero -- /velero
|
686 |
+
Velero is a tool for managing disaster recovery, specifically for Kubernetes
|
687 |
+
cluster resources. It provides a simple, configurable, and operationally robust
|
688 |
+
way to back up your application state and associated data.
|
689 |
+
|
690 |
+
If you're familiar with kubectl, Velero supports a similar model, allowing you to
|
691 |
+
execute commands such as 'velero get backup' and 'velero create schedule'. The same
|
692 |
+
operations can also be performed as 'velero backup get' and 'velero schedule create'.
|
693 |
+
|
694 |
+
Usage:
|
695 |
+
velero [command]
|
696 |
+
|
697 |
+
Available Commands:
|
698 |
+
backup Work with backups
|
699 |
+
backup-location Work with backup storage locations
|
700 |
+
bug Report a Velero bug
|
701 |
+
client Velero client related commands
|
702 |
+
completion Generate completion script
|
703 |
+
create Create velero resources
|
704 |
+
debug Generate debug bundle
|
705 |
+
delete Delete velero resources
|
706 |
+
describe Describe velero resources
|
707 |
+
get Get velero resources
|
708 |
+
help Help about any command
|
709 |
+
install Install Velero
|
710 |
+
plugin Work with plugins
|
711 |
+
restic Work with restic
|
712 |
+
restore Work with restores
|
713 |
+
schedule Work with schedules
|
714 |
+
snapshot-location Work with snapshot locations
|
715 |
+
uninstall Uninstall Velero
|
716 |
+
version Print the velero version and associated image
|
717 |
+
|
718 |
+
Flags:
|
719 |
+
--add_dir_header If true, adds the file directory to the header
|
720 |
+
--alsologtostderr log to standard error as well as files
|
721 |
+
--colorized optionalBool Show colored output in TTY. Overrides 'colorized' value from $HOME/.config/velero/config.json if present. Enabled by default
|
722 |
+
--features stringArray Comma-separated list of features to enable for this Velero process. Combines with values from $HOME/.config/velero/config.json if present
|
723 |
+
-h, --help help for velero
|
724 |
+
--kubeconfig string Path to the kubeconfig file to use to talk to the Kubernetes apiserver. If unset, try the environment variable KUBECONFIG, as well as in-cluster configuration
|
725 |
+
--kubecontext string The context to use to talk to the Kubernetes apiserver. If unset defaults to whatever your current-context is (kubectl config current-context)
|
726 |
+
--log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
|
727 |
+
--log_dir string If non-empty, write log files in this directory
|
728 |
+
--log_file string If non-empty, use this log file
|
729 |
+
--log_file_max_size uint Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited. (default 1800)
|
730 |
+
--logtostderr log to standard error instead of files (default true)
|
731 |
+
-n, --namespace string The namespace in which Velero should operate (default "arthurai")
|
732 |
+
--skip_headers If true, avoid header prefixes in the log messages
|
733 |
+
--skip_log_headers If true, avoid headers when opening log files
|
734 |
+
--stderrthreshold severity logs at or above this threshold go to stderr (default 2)
|
735 |
+
-v, --v Level number for the log level verbosity
|
736 |
+
--vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging
|
737 |
+
|
738 |
+
Use "velero [command] --help" for more information about a command.
|
739 |
+
```
|
740 |
+
|
741 |
+
### Working with Velero - Backup
|
742 |
+
|
743 |
+
To take a backup of Arthur, you would invoke the CLI as follows.
|
744 |
+
|
745 |
+
```bash
|
746 |
+
$ velero backup create arthur-backup-$(date -Iseconds | tr ":" "." | tr "T" "t") \
|
747 |
+
--namespace=arthurai \
|
748 |
+
--include-namespaces=arthurai
|
749 |
+
```
|
750 |
+
|
751 |
+
The command above will create a Velero Backup Resource named `arthur-backup-<timestamp>`, which you can check using the Velero CLI:
|
752 |
+
|
753 |
+
```bash
|
754 |
+
$ velero backup get -n arthurai
|
755 |
+
NAME STATUS ERRORS WARNINGS CREATED EXPIRES STORAGE LOCATION SELECTOR
|
756 |
+
arthur-backup-2022-08-25t09.59.35-04.00 Completed 0 0 2022-08-25 09:59:35 -0400 EDT 28d default <none>
|
757 |
+
arthur-backup-2022-08-26t10.37.52-04.00 InProgress 0 0 2022-08-26 10:37:52 -0400 EDT 29d default <none>
|
758 |
+
```
|
759 |
+
|
760 |
+
For debugging a backup, you can access the backup's logs using the Velero CLI:
|
761 |
+
|
762 |
+
```bash
|
763 |
+
$ velero backup logs arthur-backup-2022-08-25t09.59.35-04.00 -n arthurai | head
|
764 |
+
time="2022-08-25T13:59:35Z" level=info msg="Setting up backup temp file" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/controller/backup_controller.go:587"
|
765 |
+
time="2022-08-25T13:59:35Z" level=info msg="Setting up plugin manager" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/controller/backup_controller.go:594"
|
766 |
+
time="2022-08-25T13:59:35Z" level=info msg="Getting backup item actions" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/controller/backup_controller.go:598"
|
767 |
+
time="2022-08-25T13:59:35Z" level=info msg="Setting up backup store to check for backup existence" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/controller/backup_controller.go:608"
|
768 |
+
time="2022-08-25T13:59:36Z" level=info msg="Writing backup version file" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/backup/backup.go:192"
|
769 |
+
time="2022-08-25T13:59:36Z" level=info msg="Including namespaces: arthurai" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/backup/backup.go:198"
|
770 |
+
time="2022-08-25T13:59:36Z" level=info msg="Excluding namespaces: <none>" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/backup/backup.go:199"
|
771 |
+
time="2022-08-25T13:59:36Z" level=info msg="Including resources: *" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/backup/backup.go:202"
|
772 |
+
time="2022-08-25T13:59:36Z" level=info msg="Excluding resources: <none>" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/backup/backup.go:203"
|
773 |
+
time="2022-08-25T13:59:36Z" level=info msg="Backing up all pod volumes using Restic: false" backup=arthurai/arthur-backup-2022-08-25t09.59.35-04.00 logSource="pkg/backup/backup.go:204"
|
774 |
+
|
775 |
+
<truncated>
|
776 |
+
```
|
777 |
+
|
778 |
+
Finally, you can get an overview of the backup using the Velero CLI:
|
779 |
+
|
780 |
+
```bash
|
781 |
+
$ velero backup describe arthur-backup-2022-08-25t09.59.35-04.00 -n arthurai
|
782 |
+
Name: arthur-backup-2022-08-25t09.59.35-04.00
|
783 |
+
Namespace: arthurai
|
784 |
+
Labels: velero.io/storage-location=default
|
785 |
+
Annotations: velero.io/source-cluster-k8s-gitversion=v1.21.14-eks-18ef993
|
786 |
+
velero.io/source-cluster-k8s-major-version=1
|
787 |
+
velero.io/source-cluster-k8s-minor-version=21+
|
788 |
+
|
789 |
+
Phase: Completed
|
790 |
+
|
791 |
+
Errors: 0
|
792 |
+
Warnings: 0
|
793 |
+
|
794 |
+
Namespaces:
|
795 |
+
Included: arthurai
|
796 |
+
Excluded: <none>
|
797 |
+
|
798 |
+
Resources:
|
799 |
+
Included: *
|
800 |
+
Excluded: <none>
|
801 |
+
Cluster-scoped: auto
|
802 |
+
|
803 |
+
Label selector: <none>
|
804 |
+
|
805 |
+
Storage Location: default
|
806 |
+
|
807 |
+
Velero-Native Snapshot PVs: auto
|
808 |
+
|
809 |
+
TTL: 720h0m0s
|
810 |
+
|
811 |
+
Hooks: <none>
|
812 |
+
|
813 |
+
Backup Format Version: 1.1.0
|
814 |
+
szExpiration: 2022-09-24 09:59:35 -0400 EDT
|
815 |
+
|
816 |
+
Total items to be backed up: 654
|
817 |
+
Items backed up: 654
|
818 |
+
|
819 |
+
Velero-Native Snapshots: 3 of 3 snapshots completed successfully (specify --details for more information)
|
820 |
+
|
821 |
+
Restic Backups (specify --details for more information):
|
822 |
+
Completed: 23
|
823 |
+
```
|
824 |
+
|
825 |
+
|
826 |
+
### Working with Velero - Restore
|
827 |
+
|
828 |
+
Similar to backup, restore happens using the Velero Cli. A restore takes a Backup object and then executes the restore procedure.
|
829 |
+
|
830 |
+
You can execute a restore with the following Velero CLI command:
|
831 |
+
|
832 |
+
```bash
|
833 |
+
$ velero restore create \
|
834 |
+
--from-backup arthur-backup-2022-08-25t09.59.35-04.00 \
|
835 |
+
--namespace arthurai \
|
836 |
+
--restore-volumes=true
|
837 |
+
```
|
838 |
+
|
839 |
+
Just like with the Backup, Velero will create a Restore Velero Resource, which you can inspect with the Velero CLI:
|
840 |
+
|
841 |
+
```bash
|
842 |
+
$ velero restore get -n arthurai
|
843 |
+
NAME BACKUP STATUS STARTED COMPLETED ERRORS WARNINGS CREATED SELECTOR
|
844 |
+
arthur-backup-2022-08-26t10.37.52-04.00-20220826110520 arthur-backup-2022-08-26t10.37.52-04.00 Completed 2022-08-26 11:06:16 -0400 EDT 2022-08-26 11:08:00 -0400 EDT 0 35 2022-08-26 11:05:21 -0400 EDT <none>
|
845 |
+
```
|
files/arthur-docs-markdown/platform-management/ongoing-maintenance/index.md.txt
ADDED
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Ongoing Maintenance
|
2 |
+
|
3 |
+
This section covers information for platform administrators responsible for ongoing maintenance of the Arthur platform.
|
4 |
+
|
5 |
+
## {doc}`audit_log`
|
6 |
+
This page shows how to audit log of all calls to sensitive Arthur endpoints.
|
7 |
+
|
8 |
+
## {doc}`Administration <post_install>`
|
9 |
+
This page shows how handle administration settings for managing your Arthur account.
|
10 |
+
|
11 |
+
## {doc}`organizations_and_users`
|
12 |
+
This page shows how to manage and create Arthur organizations and
|
13 |
+
users.
|
14 |
+
|
15 |
+
## {doc}`backup`
|
16 |
+
This page shows how to use Arthur's managed backup and restore capability.
|
17 |
+
|
18 |
+
## {doc}`upgrade`
|
19 |
+
This page shows how to upgrade Arthur platform components.
|
20 |
+
***
|
21 |
+
|
22 |
+
```{toctree}
|
23 |
+
:maxdepth: 2
|
24 |
+
:hidden:
|
25 |
+
|
26 |
+
Audit Log <audit_log>
|
27 |
+
Administration <post_install>
|
28 |
+
Organizations and Users <organizations_and_users>
|
29 |
+
Backup and Restore <backup>
|
30 |
+
Upgrade <upgrade>
|
31 |
+
```
|
files/arthur-docs-markdown/platform-management/ongoing-maintenance/organizations_and_users.md.txt
ADDED
@@ -0,0 +1,182 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Organizations and Users
|
2 |
+
|
3 |
+
By default, a new organization, "My Organization" is created by the installer for convenience. You can also create new
|
4 |
+
organizations using the API with the `superadmin` user.
|
5 |
+
|
6 |
+
### Log in with superadmin credentials
|
7 |
+
|
8 |
+
The first thing you will need is a `superadmin` authorization token. To obtain this, you will need to make a `POST`
|
9 |
+
request to your organization's `/login` endpoint with the password set in the Admin Console Config page.
|
10 |
+
|
11 |
+
```
|
12 |
+
POST /login
|
13 |
+
```
|
14 |
+
```json
|
15 |
+
{
|
16 |
+
"login": "superadmin",
|
17 |
+
"password": "<superadmin-password>"
|
18 |
+
}
|
19 |
+
```
|
20 |
+
|
21 |
+
The response will look like this:
|
22 |
+
|
23 |
+
```json
|
24 |
+
{
|
25 |
+
"id": "ed1dcb56-352a-4130-8f52-1fd1225196b1",
|
26 |
+
"first_name": "Super",
|
27 |
+
"last_name": "Admin",
|
28 |
+
"email": "superadmin@arthur.ai",
|
29 |
+
"username": "superadmin",
|
30 |
+
"roles": null,
|
31 |
+
"active": true,
|
32 |
+
"show_intro_sequence": true,
|
33 |
+
"help_mode_enabled": false,
|
34 |
+
"created_at": "2021-08-09T19:57:44.92047Z"
|
35 |
+
}
|
36 |
+
```
|
37 |
+
|
38 |
+
The response will also include a `set-cookie` HTTP header with an authorization token.` Copy the authorization token value and use it in subsequent
|
39 |
+
requests as your auth token.
|
40 |
+
|
41 |
+
```
|
42 |
+
set-cookie: Authorization=<authorization-token>; Path=/; Expires=Mon, 30 Aug 2021 16:51:07 GMT; Secure;
|
43 |
+
```
|
44 |
+
|
45 |
+
#### cURL example
|
46 |
+
|
47 |
+
```bash
|
48 |
+
curl --location --request POST 'https://<your-domain>/api/v3/login' --header 'Content-Type: application/json' --data-raw '{ "login": "superadmin", "password": "<superadmin-password>" }' -v
|
49 |
+
```
|
50 |
+
|
51 |
+
### Create a New Organization
|
52 |
+
To create a new organization, you will need to make a `POST` request to `/organizations` with the body specifying
|
53 |
+
the name. Ensure you are using a super admin authentication token to make this request.
|
54 |
+
|
55 |
+
```
|
56 |
+
POST /organizations
|
57 |
+
```
|
58 |
+
```json
|
59 |
+
{
|
60 |
+
"name": "my-new-organization"
|
61 |
+
}
|
62 |
+
```
|
63 |
+
|
64 |
+
The response will look like this:
|
65 |
+
|
66 |
+
```json
|
67 |
+
{
|
68 |
+
"id": "38faff8b-4edf-44c5-b103-aeca4ea71110",
|
69 |
+
"name": "my-new-organization",
|
70 |
+
"plan": "enterprise",
|
71 |
+
"created_at": "2021-08-18T19:51:22.291504554Z"
|
72 |
+
}
|
73 |
+
```
|
74 |
+
|
75 |
+
Remember to save the `id`; you will need this to add users to your organization.
|
76 |
+
|
77 |
+
#### cURL Example
|
78 |
+
|
79 |
+
```bash
|
80 |
+
curl --location --request POST '<your-domain>/api/v3/organizations' --header 'Content-Type: application/json' --header 'Authorization: <your-superadmin-access-control-token>' --data-raw '{ "name": "my-new-organization" }' -v
|
81 |
+
```
|
82 |
+
|
83 |
+
### Create The First User in an Organization
|
84 |
+
|
85 |
+
To create a new user in the new organization, you will need to make a `POST` request to
|
86 |
+
`/users?organization_id=<your_organization_id>` using a super admin authentication token. You can set the role of the new user to `Administrator`,
|
87 |
+
`Model Owner`, or `User`. Refer to the [authorization page](../access-control-overview/standard_access_control) for the description of the roles.
|
88 |
+
|
89 |
+
```
|
90 |
+
POST /users?organization_id=<your_organization_id>
|
91 |
+
```
|
92 |
+
```json
|
93 |
+
{
|
94 |
+
"username": "newuser",
|
95 |
+
"email": "newuser@email.com",
|
96 |
+
"password": "G00dP@$$w0rd!",
|
97 |
+
"first_name": "New",
|
98 |
+
"last_name": "User",
|
99 |
+
"roles": [
|
100 |
+
"Administrator"
|
101 |
+
],
|
102 |
+
"alert_notifications_enabled": true
|
103 |
+
}
|
104 |
+
```
|
105 |
+
|
106 |
+
The response will look like this.
|
107 |
+
|
108 |
+
```json
|
109 |
+
{
|
110 |
+
"id": "b6554927-9ac4-4531-bf76-fe640b8223b7",
|
111 |
+
"first_name": "New",
|
112 |
+
"last_name": "User",
|
113 |
+
"email": "newuser@email.com",
|
114 |
+
"username": "newuser",
|
115 |
+
"roles": null,
|
116 |
+
"active": true,
|
117 |
+
"show_intro_sequence": true,
|
118 |
+
"help_mode_enabled": true,
|
119 |
+
"created_at": "2021-08-18T20:20:18.535137592Z"
|
120 |
+
}
|
121 |
+
```
|
122 |
+
|
123 |
+
You can now log in to the dashboard as this user.
|
124 |
+
|
125 |
+
#### cURL Example
|
126 |
+
This action can be performed as either super administrator or organization administrator.
|
127 |
+
If you'd like to use an organization administrator, repeat the `/login` API call performed earlier with the credentials for that user and save the returned authorization token.
|
128 |
+
|
129 |
+
```bash
|
130 |
+
curl --location --request POST 'https://<your-domain>/api/v3/users?organization_id=<your-organization-id>' --header 'Content-Type: application/json' --header 'Authorization: <your-superadmin-token>' --data-raw '{ "username": "<username>", "email": "<email-address>", "password": "<password>", "first_name": "<first-name>", "last_name": "<last-name>", "roles": [ "Administrator" ], "alert_notifications_enabled": true }'
|
131 |
+
```
|
132 |
+
|
133 |
+
### Adding Additional Users
|
134 |
+
|
135 |
+
Although you can continue to create users through the API, it is generally easier to create an `Administrator` user
|
136 |
+
and then invite additional users from the UI. To add additional users this way, log in to Arthur AI with an `Administrator`
|
137 |
+
user on a web browser and follow these steps:
|
138 |
+
|
139 |
+
1. In the top right corner, you will see a series of icons. Click on the Organization icon that looks like a tree with three nodes.
|
140 |
+
|
141 |
+

|
142 |
+
|
143 |
+
2. You will see a dropdown menu. Click on `Manage Members`
|
144 |
+
3. Under the heading, `Invite Members`, you can type in the email address of the person you wish to invite.
|
145 |
+
That person will receive instructions for how to create a user in the organization via email.
|
146 |
+
|
147 |
+

|
148 |
+
|
149 |
+
4. Once the new user follows the emailed instructions, they will be able to log in with their newly created
|
150 |
+
username and password. You will then be able to view that new user on this `Manage Members` page.
|
151 |
+
5. As an `Administrator`, you can continue to use this page to manage users and roles.
|
152 |
+
|
153 |
+
|
154 |
+
### Adding Existing Users To Existing Organizations via API:
|
155 |
+
To add an existing user to an existing organization create a `PATCH` request to `/organizations/<org_id>/users`.
|
156 |
+
Supplying in the body a json object defining the role (`Administrator`,
|
157 |
+
`Model Owner`, or `User`) you want to add the user with. Any attributes other than roles that are supplied in the body
|
158 |
+
will effect the user across all organizations that user is a part of.
|
159 |
+
|
160 |
+
```
|
161 |
+
PATCH /organizations/<org_id>/users
|
162 |
+
```
|
163 |
+
```json
|
164 |
+
[
|
165 |
+
{
|
166 |
+
"user_id": "b6554927-9ac4-4531-bf76-fe640b8223b7",
|
167 |
+
"role": "Model Owner"
|
168 |
+
} ,
|
169 |
+
{
|
170 |
+
"user_id": "b6554927-9ac4-4531-bf76-fe640b8223b7",
|
171 |
+
"role": "Model Owner"
|
172 |
+
}
|
173 |
+
]
|
174 |
+
```
|
175 |
+
|
176 |
+
The response will look like this.
|
177 |
+
|
178 |
+
```json
|
179 |
+
{
|
180 |
+
"updated_user_count": 10
|
181 |
+
}
|
182 |
+
```
|
files/arthur-docs-markdown/platform-management/ongoing-maintenance/post_install.md.txt
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Post Installation Steps
|
2 |
+
|
3 |
+
By default, a new organization, "My Organization" is created by the installer for convenience. You can also create new
|
4 |
+
organizations using the API with the `superadmin` user. Full instructions for creating new users and organizations can
|
5 |
+
be found {doc}`here <organizations_and_users>`.
|
6 |
+
|
7 |
+
To access the UI for the default organization dashboard, visit `https://your_arthur_domain` from your Web browser.
|
8 |
+
Login with `admin` username and `SuperSecret` password. Make sure to change the password as soon as possible.
|
9 |
+
|
10 |
+
To get started with onboarding your models, refer to the [Quickstart](../../user-guide/arthur_quickstart) guide.
|
11 |
+
|
12 |
+
## Admin Console
|
13 |
+
The Admin Console can be made available via the ingress controller on port 443 by creating a subdomain DNS record that starts with `admin.`
|
14 |
+
(e.g. admin.arthur.mydomain.com). For VM install, this eliminates the port 8800 egress requirement on the firewall.
|
15 |
+
|
16 |
+
We recommend that you rotate your Admin Console password often. You can reset the password using this command:
|
17 |
+
```shell
|
18 |
+
kubectl kots reset-password -n <namespace>
|
19 |
+
```
|
20 |
+
|
21 |
+
## Update Admin password for Embedded Postgres
|
22 |
+
|
23 |
+
The 'postgres' admin user is used to manage the embedded Postgres database. If you would like to update the password for this admin user, you can execute the following commands on the primary database pod:
|
24 |
+
```shell
|
25 |
+
kubectl exec -it database-master-0 -- psql -U postgres
|
26 |
+
Password for user postgres: <type_current_secret>
|
27 |
+
psql (11.13)
|
28 |
+
Type "help" for help.
|
29 |
+
|
30 |
+
postgres=# ALTER ROLE postgres WITH PASSWORD '<insert_new_secret>';
|
31 |
+
postgres=# \q
|
32 |
+
$
|
33 |
+
```
|
files/arthur-docs-markdown/platform-management/ongoing-maintenance/upgrade.md.txt
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Upgrading
|
2 |
+
|
3 |
+
Arthur's platform installer leverages an open source solution called [Kubernetes Off-The-Shelf (KOTS)](https://github.com/replicatedhq/kots).
|
4 |
+
Please refer to the below links for upgrading the platform components.
|
5 |
+
|
6 |
+
* [Upgrading the platform application](https://kots.io/kotsadm/updating/updating-kots-apps/)
|
7 |
+
* [Upgrading the Admin Console](https://kots.io/kotsadm/updating/updating-admin-console/)
|
8 |
+
* [Upgrading the embedded Kubernetes cluster for VM install](https://kots.io/kotsadm/updating/updating-embedded-cluster/)
|
files/arthur-docs-markdown/platform-management/reference/config_dump.md.txt
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Exporting Platform Configurations
|
2 |
+
|
3 |
+
After a successful installation of the Arthur platform, you can download the configuration that was used as a `.yaml` file by following the below steps:
|
4 |
+
|
5 |
+
1. Navigate to the Admin Console and login.
|
6 |
+

|
7 |
+
2. Click on the **"View Files"** tab.
|
8 |
+

|
9 |
+
3. Go to **upstream → userdata** and click on `config.yaml` file.
|
10 |
+

|
11 |
+
4. Copy the contents of that file and save it for future use (or check-in to source control).
|
files/arthur-docs-markdown/platform-management/reference/config_template.md.txt
ADDED
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Configuration File Template
|
2 |
+
|
3 |
+
The Configuration template for Arthur version `3.2.1` is below:
|
4 |
+
|
5 |
+
```yaml
|
6 |
+
apiVersion: kots.io/v1beta1
|
7 |
+
kind: ConfigValues
|
8 |
+
metadata:
|
9 |
+
creationTimestamp: null
|
10 |
+
name: arthur
|
11 |
+
spec:
|
12 |
+
values:
|
13 |
+
IAM_permission_type:
|
14 |
+
default: access_keys
|
15 |
+
advanced_cache_options:
|
16 |
+
default: "0"
|
17 |
+
advanced_messaging_connect_cpu_limits:
|
18 |
+
default: "2"
|
19 |
+
advanced_messaging_connect_cpu_limits_not_validate: {}
|
20 |
+
advanced_messaging_connect_cpu_requests:
|
21 |
+
default: "1"
|
22 |
+
advanced_messaging_connect_cpu_requests_not_validate: {}
|
23 |
+
advanced_messaging_connect_heap_options:
|
24 |
+
default: -Xms1g -Xmx3g
|
25 |
+
advanced_messaging_connect_memory_limits:
|
26 |
+
default: 4Gi
|
27 |
+
advanced_messaging_connect_memory_limits_not_validate: {}
|
28 |
+
advanced_messaging_connect_memory_requests:
|
29 |
+
default: 2Gi
|
30 |
+
advanced_messaging_connect_memory_requests_not_validate: {}
|
31 |
+
advanced_olap_options:
|
32 |
+
default: "0"
|
33 |
+
advanced_other:
|
34 |
+
default: "0"
|
35 |
+
value: "1"
|
36 |
+
alert_service_update_rule_metrics:
|
37 |
+
default: "0"
|
38 |
+
api_token_ttl:
|
39 |
+
default: "24"
|
40 |
+
arthur_user_id:
|
41 |
+
default: "1000"
|
42 |
+
audit_log_event_bridge_bus_name: {}
|
43 |
+
audit_log_event_bridge_bus_region: {}
|
44 |
+
audit_log_event_bridge_detail_type:
|
45 |
+
default: events.arthur.ai
|
46 |
+
audit_log_event_bridge_source:
|
47 |
+
default: arthur-audit-log
|
48 |
+
audit_log_sink_destination:
|
49 |
+
default: none
|
50 |
+
batch_workflow_parallelism:
|
51 |
+
default: "120"
|
52 |
+
beta_ui:
|
53 |
+
default: "0"
|
54 |
+
beta_ui_alternate_site:
|
55 |
+
default: "0"
|
56 |
+
beta_ui_hostname: {}
|
57 |
+
bootstrap_job_backoff_limit:
|
58 |
+
default: "100"
|
59 |
+
bootstrap_job_ttl:
|
60 |
+
default: "86400"
|
61 |
+
cache_cpu_limits: {}
|
62 |
+
cache_cpu_limits_not_validate: {}
|
63 |
+
cache_cpu_requests: {}
|
64 |
+
cache_cpu_requests_not_validate: {}
|
65 |
+
cache_memory_limits: {}
|
66 |
+
cache_memory_limits_not_validate: {}
|
67 |
+
cache_memory_requests: {}
|
68 |
+
cache_memory_requests_not_validate: {}
|
69 |
+
cache_password:
|
70 |
+
default: SuperSecret
|
71 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
72 |
+
cache_replicas:
|
73 |
+
default: "0"
|
74 |
+
cicd_credentials:
|
75 |
+
default: "0"
|
76 |
+
cluster_nodes:
|
77 |
+
# Only Relevant for "fixed" cluster sizes. Enter the number of nodes in the cluster. This number cannot be decreased from the current value unless it's greater than `6`.
|
78 |
+
default: "1"
|
79 |
+
value: "3"
|
80 |
+
config_job_and_workflow_retention:
|
81 |
+
default: "0"
|
82 |
+
database_admin_password:
|
83 |
+
default: SuperSecret
|
84 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
85 |
+
database_hostname:
|
86 |
+
# Leave the default configuration to use the embedded database. If you would like to use an external Postgres instance, provide the hostname here and follow this guide: https://docs.arthur.ai/platform-management/installation/externalize_postgres.html.
|
87 |
+
default: database-primary
|
88 |
+
database_password:
|
89 |
+
default: SuperSecret
|
90 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
91 |
+
database_port:
|
92 |
+
value: "5432"
|
93 |
+
database_ssl_mode:
|
94 |
+
# This option allows you to enable SSL communication between services and the postgres database. See https://www.postgresql.org/docs/10/libpq-ssl.html for full descriptions of each option. By default, the postgres database has ssl disabled.
|
95 |
+
default: disable
|
96 |
+
database_username:
|
97 |
+
default: arthurai
|
98 |
+
default_messaging_partition_count:
|
99 |
+
default: "3"
|
100 |
+
value: "1"
|
101 |
+
disable_ssl_redirect_on_ingress:
|
102 |
+
default: "0"
|
103 |
+
email_selection:
|
104 |
+
default: none
|
105 |
+
enable_audit_log:
|
106 |
+
default: "0"
|
107 |
+
enable_olap_backup:
|
108 |
+
default: '"0"'
|
109 |
+
enable_olap_backup_user:
|
110 |
+
default: "0"
|
111 |
+
enable_password_rotation_cache:
|
112 |
+
default: "0"
|
113 |
+
enable_password_rotation_olap:
|
114 |
+
default: "0"
|
115 |
+
existing_database_primary_pvc: {}
|
116 |
+
existing_or_vm:
|
117 |
+
default: existing_cluster
|
118 |
+
fixed_or_autoscale:
|
119 |
+
# The `fixed` mode is recommended for clusters with a fixed number of nodes. The `autoscale` mode is used for clusters that can autoscale and automatically expand their node count.
|
120 |
+
value: fixed
|
121 |
+
full_name_override:
|
122 |
+
default: arthurai
|
123 |
+
global_identity_provider:
|
124 |
+
default: none
|
125 |
+
global_model_limit_Count:
|
126 |
+
default: "500"
|
127 |
+
global_model_limits:
|
128 |
+
default: "0"
|
129 |
+
global_workflow_parallelism:
|
130 |
+
default: "150"
|
131 |
+
http_proxy: {} # Relevant if you are using Explainability and your organization is behind a proxy server. If PIP and/or Conda need to route through the proxy server to pull down public packages this will set the environment variable HTTP_PROXY to the supplied value. Ex. http://sysproxy.my-company.com:port
|
132 |
+
http_proxy_user: {}
|
133 |
+
https_proxy: {}
|
134 |
+
https_proxy_user: {}
|
135 |
+
ingestion_service_cpu_limits: {}
|
136 |
+
ingestion_service_cpu_limits_not_validate: {}
|
137 |
+
ingestion_service_cpu_requests: {}
|
138 |
+
ingestion_service_cpu_requests_not_validate: {}
|
139 |
+
ingestion_service_memory_limits: {}
|
140 |
+
ingestion_service_memory_limits_not_validate: {}
|
141 |
+
ingestion_service_memory_requests: {}
|
142 |
+
ingestion_service_memory_requests_not_validate: {}
|
143 |
+
ingress_ambassador_enabled:
|
144 |
+
default: "false"
|
145 |
+
ingress_class:
|
146 |
+
default: nginx
|
147 |
+
ingress_hostname:
|
148 |
+
value: arthur.mydomain.ai
|
149 |
+
ingress_namespace_label_key:
|
150 |
+
value: name
|
151 |
+
ingress_namespace_label_value:
|
152 |
+
value: ingress-system
|
153 |
+
ingress_nginx_additional_hostname:
|
154 |
+
value: ""
|
155 |
+
irsa_annotations: {}
|
156 |
+
irsa_annotations_user:
|
157 |
+
default: |
|
158 |
+
eks.amazonaws.com/role-arn: arn:aws:iam::111122223333:role/my-role
|
159 |
+
k8_storageclass:
|
160 |
+
# Provide Kubernetes StorageClass profile. Use 'gp2' for Amazon EKS, 'default' if you're using embedded Kubernetes provided by the installer
|
161 |
+
value: default
|
162 |
+
kafka_ecosystem_common_replication_calc:
|
163 |
+
default: "1"
|
164 |
+
max_arthur_replicas:
|
165 |
+
default: "1"
|
166 |
+
max_messaging_partition_count:
|
167 |
+
default: "3"
|
168 |
+
max_model_server_replicas:
|
169 |
+
default: "2"
|
170 |
+
messaging_cpu_limit:
|
171 |
+
default: "1"
|
172 |
+
messaging_heap:
|
173 |
+
default: -Xmx2G -Xms1G
|
174 |
+
messaging_memory_limit_and_request:
|
175 |
+
default: 2560Mi
|
176 |
+
messaging_rack_aware_enabled:
|
177 |
+
default: "0"
|
178 |
+
messaging_rack_label:
|
179 |
+
default: topology.kubernetes.io/zone
|
180 |
+
messaging_replicas:
|
181 |
+
default: "3"
|
182 |
+
messaging_sa_create:
|
183 |
+
default: "0"
|
184 |
+
messaging_sa_fullnameoverride: {}
|
185 |
+
messaging_zookeeper_timeout:
|
186 |
+
default: "20000"
|
187 |
+
meta_replicas:
|
188 |
+
default: "0"
|
189 |
+
metric_service_update_default_metrics:
|
190 |
+
default: "0"
|
191 |
+
min_arthur_replicas:
|
192 |
+
default: "1"
|
193 |
+
model_servers_always_on:
|
194 |
+
# For use with what-if and on-demand explainability. See https://docs.arthur.ai/user-guide/explainability.html If set to "true", then on-demand and what-if explanations are available, but uses additional cluster resources, 1 CPU and 1 GB memory per model with explainability enabled. If set to "false", on-demand and what-if explanations are unavailable, but less cluster usage when there is no data being sent. Regardless of the setting here, streaming explainability will be available if enabled. This only effects what-if and on-demand explanations.
|
195 |
+
default: "true"
|
196 |
+
network_policy_enabled:
|
197 |
+
default: "0"
|
198 |
+
no_proxy: {} # Relevant if you are using Explainability and your organization is behind a proxy server. If PIP and/or Conda need to route through the proxy server to pull down public packages this will set the environment variable NO_PROXY to the supplied value. Ex. localhost,127.0.0.1,.my-company.com
|
199 |
+
no_proxy_user: {}
|
200 |
+
number_of_olap_backups_to_keep:
|
201 |
+
default: "7"
|
202 |
+
oidc_identity_provider_config_yaml: {}
|
203 |
+
oidc_identity_provider_config_yaml_user: {}
|
204 |
+
olap_backup_s3_bucket:
|
205 |
+
default: arthurai
|
206 |
+
olap_backup_s3_bucket_region:
|
207 |
+
default: us-east-1
|
208 |
+
olap_backup_s3_endpoint:
|
209 |
+
default: s3.us-east-1.amazonaws.com
|
210 |
+
olap_backup_s3_path:
|
211 |
+
default: olap_backups
|
212 |
+
olap_backup_service_account:
|
213 |
+
default: arthurai-arthurai
|
214 |
+
olap_cpu_limits: {}
|
215 |
+
olap_cpu_limits_not_validate: {}
|
216 |
+
olap_cpu_requests:
|
217 |
+
default: 1000m
|
218 |
+
olap_cpu_requests_not_validate: {}
|
219 |
+
olap_database_operator_password:
|
220 |
+
# The OLAP database is installed along with a Kubernetes Operator to manage it. This operator needs credentials to access the database. We recommend overwriting the default password below.
|
221 |
+
default: 5ugYLDJ2uLhRdEgz5t
|
222 |
+
value: ch/0gntnboTNbQpxmzx4GuPCRnjqSNwTpOT6FwgQ9q4iY7CHiQLeFQ3snnZgxYnFt4gSyInce3KhYiMR7eebBtGbe5sIuY/aBPAySrSjExfO+1VYPBp176bP+zQ=
|
223 |
+
olap_database_user_password:
|
224 |
+
# Password used internally in our application to query the olap database, currently only supports alpha-numeric characters.
|
225 |
+
default: eQ3iBo8UGh5zqJKQWuEEySrR
|
226 |
+
value: ch/0gntnboTNbQppnGJgGvCjSmPlS/l8orO+UggQ/rstcryCj2r/GRXR8UNr+u3plPIj+uLMdXGGFiRtko6pTsClBoQkoeLXqDVr1jeqsThCZI/bTfovlA==
|
227 |
+
olap_memory_limits: {}
|
228 |
+
olap_memory_limits_not_validate: {}
|
229 |
+
olap_memory_requests:
|
230 |
+
default: 1Gi
|
231 |
+
olap_memory_requests_not_validate: {}
|
232 |
+
olap_node_label_key: {}
|
233 |
+
olap_node_label_value: {}
|
234 |
+
olap_replicas:
|
235 |
+
default: "1"
|
236 |
+
olap_zookeeper_cpu_limits: {}
|
237 |
+
olap_zookeeper_cpu_limits_not_validate: {}
|
238 |
+
olap_zookeeper_cpu_requests:
|
239 |
+
default: 500m
|
240 |
+
olap_zookeeper_cpu_requests_not_validate: {}
|
241 |
+
olap_zookeeper_heap_options:
|
242 |
+
default: -Xms4G -Xmx4G
|
243 |
+
olap_zookeeper_memory_limits: {}
|
244 |
+
olap_zookeeper_memory_limits_not_validate: {}
|
245 |
+
olap_zookeeper_memory_requests:
|
246 |
+
default: 1Gi
|
247 |
+
olap_zookeeper_memory_requests_not_validate: {}
|
248 |
+
password_rotation_cron_schedule:
|
249 |
+
default: 0 0 1 */6 *
|
250 |
+
pending_batch_workflows_limit:
|
251 |
+
default: "100"
|
252 |
+
prometheus_host:
|
253 |
+
# Leave the default configuration if you're using the embedded K8s. Provide your Prometheus hostname if you're running your own K8s.
|
254 |
+
default: http://kube-prometheus-stack-prometheus.monitoring.svc.cluster.local
|
255 |
+
prometheus_labels:
|
256 |
+
# If your prometheus installation requires labels to identify ServiceMonitors and PrometheusRules, add them here. They should be in yaml format just as you would specify inside the "metadata.labels" block. Do not indent.
|
257 |
+
default: |
|
258 |
+
prometheus: monitor
|
259 |
+
app: prometheus
|
260 |
+
prometheus_namespace:
|
261 |
+
default: monitoring
|
262 |
+
prometheus_port:
|
263 |
+
# Leave the default configuration if you're using the embedded K8s. Provide your Prometheus hostname if you're running your own K8s.
|
264 |
+
default: "9090"
|
265 |
+
pypi_registry_conda: {} # This is set as a channel in the '.condarc' file. Do not include 'https://' prefix (e.g. repository.arthur.ai/repository/conda-proxy/main).
|
266 |
+
pypi_registry_conda_user: {}
|
267 |
+
pypi_registry_index: {} # This maps to the 'index key' in the 'pip.conf' file. Do not include 'https://' prefix (e.g repository.arthur.ai/repository/pypi-virtual/pypi).
|
268 |
+
pypi_registry_index_url: {} # This maps to the 'index-url' key in the 'pip.conf' file. Do not include 'https://' prefix (e.g. repository.arthur.ai/repository/pypi-virtual/simple).
|
269 |
+
pypi_registry_index_url_user: {}
|
270 |
+
pypi_registry_index_user: {}
|
271 |
+
pypi_registry_password:
|
272 |
+
default: bO4Mxhdaevso/029YtUgz98Wk7qPcxEpa1P/uVqG4cy4UY1B3+YN5Q==
|
273 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
274 |
+
pypi_registry_password_user:
|
275 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
276 |
+
pypi_registry_username: {}
|
277 |
+
pypi_registry_username_user: {}
|
278 |
+
raw_anaconda_config: {}
|
279 |
+
raw_anaconda_config_user: {}
|
280 |
+
raw_pypi_config: {}
|
281 |
+
raw_pypi_config_user: {}
|
282 |
+
rbac_privileges:
|
283 |
+
# Change to "cluster_scope" to install CRDs too
|
284 |
+
default: namespace_scope
|
285 |
+
run_as_root:
|
286 |
+
default: "0"
|
287 |
+
value: "0"
|
288 |
+
s3_access_key_id:
|
289 |
+
default: access_key
|
290 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
291 |
+
s3_access_key_id_user:
|
292 |
+
default: access_key
|
293 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
294 |
+
s3_bucket:
|
295 |
+
default: arthurai
|
296 |
+
s3_bucket_user:
|
297 |
+
default: arthurai
|
298 |
+
s3_region:
|
299 |
+
default: us-east-1
|
300 |
+
s3_region_user:
|
301 |
+
default: us-east-1
|
302 |
+
s3_secret_access_key:
|
303 |
+
default: secret_key
|
304 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
305 |
+
s3_secret_access_key_user:
|
306 |
+
default: secret_key
|
307 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
308 |
+
s3_url:
|
309 |
+
default: http://minio:9000
|
310 |
+
s3_url_user:
|
311 |
+
default: http://minio:9000
|
312 |
+
saml_identity_provider_config_yaml: {}
|
313 |
+
saml_identity_provider_config_yaml_user: {}
|
314 |
+
secondary_token_validation_key:
|
315 |
+
value: Aj3ziCI/YcnTT3QR3WAtMNDNEzzqTa8W9iJCoHjNFMteiO6lrcnUKw==
|
316 |
+
ses_region: {}
|
317 |
+
ses_role: {}
|
318 |
+
show_advanced_arthur_microservice_options:
|
319 |
+
default: "0"
|
320 |
+
show_advanced_messaging:
|
321 |
+
default: "0"
|
322 |
+
value: "1"
|
323 |
+
show_hidden_variables:
|
324 |
+
default: "0"
|
325 |
+
value: "0"
|
326 |
+
show_token_signing_and_validation_options:
|
327 |
+
default: "0"
|
328 |
+
signing_cert: {}
|
329 |
+
signing_cert_user: {}
|
330 |
+
signing_private_key: {}
|
331 |
+
signing_private_key_user: {}
|
332 |
+
single_or_ha:
|
333 |
+
# The `single` configuration is a minimal deployment suitable for non-production environments. For production deployment, select `ha`.
|
334 |
+
value: single
|
335 |
+
smtp_from: {} # Provide the email address to send alerts from (e.g. alerts@arthur.ai)
|
336 |
+
smtp_host: {} # Provide the address of the SMTP server (e.g. smtp.arthur.ai)
|
337 |
+
smtp_password:
|
338 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
339 |
+
smtp_port: {}
|
340 |
+
smtp_user: {}
|
341 |
+
superadmin_email:
|
342 |
+
default: superadmin@myorg.com
|
343 |
+
superadmin_firstname:
|
344 |
+
default: Super
|
345 |
+
superadmin_lastname:
|
346 |
+
default: Admin
|
347 |
+
superadmin_password:
|
348 |
+
default: SuperSecret
|
349 |
+
value: VwC3tnE9cpzObSxIhTx9U/34Ky+mA6p8veb9bCk+iqcAEaOarGzGEFf7ozoGxO3m05QY5YTuIx3ezMI694TUX0gj7RHSyHoK
|
350 |
+
superadmin_username:
|
351 |
+
value: superadmin
|
352 |
+
token_signing_primary_key:
|
353 |
+
value: YSDFzjg5I83KMBJ+wHQmU/ejDQ7tTthIpaDcCRM+iqcDTofiul7DZzTblFkb0e2U0+UJ74TuIx28oGnxPM+pkmKlc1yx2uvj
|
354 |
+
use_external_blob_storage:
|
355 |
+
# Select "Yes" if and only if you are supplying your own S3 compatible storage, otherwise select "No" to use the embedded blob storage.
|
356 |
+
default: "no"
|
357 |
+
use_external_postgres:
|
358 |
+
default: "no"
|
359 |
+
use_raw_python_repository_configs:
|
360 |
+
# The PyPi registry section is only relevant when using the explainability enrichment (https://docs.arthur.ai/user-guide/enrichments.html#explainability).
|
361 |
+
# Provide your private PyPi registry if you have an airgapped enrivonment or your model requirements file includes packages only hosted in a private repository.
|
362 |
+
# Leaving this section blank will cause the public PyPi to be used. If the public PyPi is inaccessible from the cluster, the explainability feature will not work.
|
363 |
+
default: "no"
|
364 |
+
use_smtp:
|
365 |
+
default: "0"
|
366 |
+
workflow_ttl_seconds:
|
367 |
+
default: "3600"
|
368 |
+
workflow_ttl_seconds_after_success:
|
369 |
+
default: "60"
|
370 |
+
status: {}
|
371 |
+
```
|