Skip to content

Commit 44d8d3b

Browse files
vishalbolludeliahu
authored andcommitted
Docs nits (#1853)
(cherry picked from commit b39bb0a)
1 parent 7c22617 commit 44d8d3b

File tree

8 files changed

+52
-54
lines changed

8 files changed

+52
-54
lines changed

.gitbook.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
root: ./docs/
22

33
structure:
4-
readme: ./workloads/realtime/example.md
4+
readme: ./start.md
55
summary: summary.md

charts/templates/NOTES.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
###########################################################################
22

3-
Cortex {{ .Chart.AppVersion }} is initializing in in your cluster.
3+
Cortex (version {{ .Chart.AppVersion }}) is initializing in your cluster.
44

5-
Wait for the loadbalancers to be provisioned and connected to your cluster.
5+
It will take 5 to 10 minutes for the load balancers to be provisioned and connected to your cluster.
66

7-
1. Get the Cortex operator endpoint:
7+
1. Get the Cortex operator endpoint (it might take 1-2 minutes until the endpoint is allocated):
88

9-
{{ if eq .Values.global.provider "aws" }}
9+
{{- if eq .Values.global.provider "aws" }}
1010
$ kubectl get service --namespace {{ .Release.Namespace }} ingressgateway-operator -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
1111
{{- else if eq .Values.global.provider "gcp" }}
1212
$ kubectl get service --namespace {{ .Release.Namespace }} ingressgateway-operator -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
1313
{{- end }}
1414

15-
2. You can use the curl command below to verify loadbalancer set up. It can take between 5 to 10 minutes for the setup to complete. You can expect to encounter `Could not resolve host` or timeouts when running the verification request below during the loadbalancer initialization.
15+
2. You can use the curl command below to verify that your load balancer is ready. You can expect to encounter `Could not resolve host` or timeouts when running the verification request before the load balancer is initialized.
1616

17-
{{ if eq .Values.global.provider "aws" }}
17+
{{- if eq .Values.global.provider "aws" }}
1818
$ export CORTEX_OPERATOR_ENDPOINT=$(kubectl get service --namespace {{ .Release.Namespace }} ingressgateway-operator -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
1919
{{- else if eq .Values.global.provider "gcp" }}
2020
$ export CORTEX_OPERATOR_ENDPOINT=$(kubectl get service --namespace {{ .Release.Namespace }} ingressgateway-operator -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
2121
{{- end}}
22+
$ echo $CORTEX_OPERATOR_ENDPOINT
2223
$ curl http://$CORTEX_OPERATOR_ENDPOINT/verifycortex --max-time 5
2324

2425
A successful response looks like this:

charts/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cortex:
22
# Please provide the following required fields for a cortex installation on AWS
33
cluster_name: ""
4-
bucket: ""
4+
bucket: "" # e.g. "my-cortex-bucket" (without s3:// or gs://)
55

66
# AWS only
77
region: ""

docs/clusters/aws/networking/vpc-peering.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# VPC peering
22

3-
If you are using an internal operator load balancer (i.e. you set `operator_load_balancer_scheme: internal` in your cluster configuration file before creating your cluster), you can use VPC Peering to enable your Cortex CLI to connect to your cluster operator from another VPC so that you may run `cortex` commands. Note that because the operator validates that the CLI user is an active IAM user in the same AWS account as the Cortex cluster, it is usually unnecessary to configure the operator's load balancer to be internal.
3+
If you are using an internal operator load balancer (i.e. you set `operator_load_balancer_scheme: internal` in your cluster configuration file before creating your cluster), you can use VPC Peering to enable your Cortex CLI to connect to your cluster operator from another VPC so that you may run `cortex` commands.
44

55
If you are using an internal API load balancer (i.e. you set `api_load_balancer_scheme: internal` in your cluster configuration file before creating your cluster), you can use VPC Peering to make prediction requests from another VPC.
66

docs/clusters/aws/security.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ See [networking](networking/index.md) for a discussion of API visibility.
1010

1111
## Private operator
1212

13-
By default, the Cortex cluster operator's load balancer is internet-facing, and therefore publicly accessible (the operator is what the `cortex` CLI connects to). The operator validates that the CLI user is an active IAM user in the same AWS account as the Cortex cluster (see [below](#cli)). Therefore it is usually unnecessary to configure the operator's load balancer to be private, but this can be done by by setting `operator_load_balancer_scheme: internal` in your [cluster configuration](install.md) file. If you do this, you will need to configure [VPC Peering](networking/vpc-peering.md) to allow your CLI to connect to the Cortex operator (this will be necessary to run any `cortex` commands).
13+
By default, the Cortex cluster operator's load balancer is internet-facing, and therefore publicly accessible (the operator is what the `cortex` CLI connects to). The operator's load balancer can be configured to be private by setting `operator_load_balancer_scheme: internal` in your [cluster configuration](install.md) file. If you do this, you will need to configure [VPC Peering](networking/vpc-peering.md) to allow your CLI to connect to the Cortex operator (this will be necessary to run any `cortex` commands).
1414

1515
## IAM permissions
1616

@@ -36,7 +36,7 @@ You can specify credentials for spinning up the cluster in four ways (in order o
3636

3737
5. You can specify the AWS credentials `"aws access key id"` and `"aws secret access key"` at the CLI's prompt when requested.
3838

39-
It is recommended to use an IAM user with the `AdministratorAccess` policy to create your cluster, since the CLI requires many permissions for this step, and the list of permissions is evolving as Cortex adds new features. If it is not possible to use `AdministratorAccess` in your existing AWS account, you could create a separate AWS account for your Cortex cluster, or you could ask someone within your organization to create the Cortex cluster for you (since `AdministratorAccess` is not required to deploy APIs to your cluster; see [CLI](#cli) below).
39+
It is recommended to use an IAM user with the `AdministratorAccess` policy to create your cluster, since the CLI requires many permissions for this step, and the list of permissions is evolving as Cortex adds new features. If it is not possible to use `AdministratorAccess` in your existing AWS account, you could create a separate AWS account for your Cortex cluster, or you could ask someone within your organization to create the Cortex cluster for you.
4040

4141
### Operator
4242

@@ -72,10 +72,6 @@ The operator requires read permissions for any S3 bucket containing exported mod
7272

7373
It is possible to further restrict access by limiting access to particular resources (e.g. allowing access to only the bucket containing your models and the cortex bucket).
7474

75-
### CLI
76-
77-
In order to connect to the operator via the CLI, you must provide valid AWS credentials for any user with access to the account. No special permissions are required. The CLI can be configured using the `cortex env configure ENVIRONMENT_NAME` command (e.g. `cortex env configure aws`).
78-
7975
### Running `cortex cluster` commands from different IAM users
8076

8177
By default, the `cortex cluster *` commands can only be executed by the IAM user who created the Cortex cluster. To grant access to additional IAM users, follow these steps:

docs/clusters/kubernetes/install.md

Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# install
1+
# Install
22

33
Cortex currently relies on cloud provider specific functionality such as load balancers and storage. Kubernetes clusters in the following cloud providers are supported:
4+
45
* [AWS](#aws)
56
* [GCP](#gcp)
67

@@ -14,22 +15,23 @@ Cortex uses helm to install the Cortex operator and its dependencies on your Kub
1415
* aws cli
1516
* helm 3
1617
* EKS cluster
17-
* kubernetes version >= 1.17
18-
* at least 3 t3.medium (2 vCPU, 4 GB mem) instances
18+
* at least 3 t3.medium (2 vCPU, 4 GB mem) instances
1919

20-
Note that installing Cortex on your kubernetes cluster will not provide some of the cluster level features such as cluster autoscaling and spot instances with on-demand backup.
20+
You may install Cortex in any namespace in your cluster. In the guide that follows, the "default" namespace is assumed; if you're using a different namespace, replace all occurrences of "default" with the name of your namespace.
2121

22-
### Download cortex charts
22+
Note that installing Cortex on your Kubernetes cluster will not provide some of the cluster-level features such as cluster autoscaling and spot instances with on-demand backup.
2323

24-
<!-- CORTEX_VERSION -->
25-
```
24+
### Download Cortex charts
25+
26+
<!-- CORTEX_VERSION_BRANCH_STABLE x3 -->
27+
```bash
2628
wget https://s3-us-west-2.amazonaws.com/get-cortex/0.28.0/charts/cortex-0.28.0.tar.gz
2729
tar -xzf cortex-0.28.0.tar.gz
2830
```
2931

3032
### Create a bucket in S3
3133

32-
The Cortex operator will use this bucket to store API states and dependencies.
34+
The Cortex operator will use this bucket to store API state and dependencies.
3335

3436
```yaml
3537
aws s3api create-bucket --bucket <CORTEX_S3_BUCKET> --region <CORTEX_REGION>
@@ -49,7 +51,7 @@ kubectl --namespace default create secret generic 'aws-credentials' \
4951
-o yaml --dry-run=client | kubectl apply -f - >/dev/null
5052
```
5153

52-
### Install Cortex on to your kubernetes cluster
54+
### Install Cortex
5355

5456
Define a `values.yaml` with the following information provided:
5557

@@ -58,7 +60,7 @@ Define a `values.yaml` with the following information provided:
5860

5961
cortex:
6062
region: <CORTEX_REGION>
61-
bucket: <CORTEX_S3_BUCKET>
63+
bucket: <CORTEX_S3_BUCKET> # e.g. "my-cortex-bucket" (without s3://)
6264
cluster_name: <CORTEX_CLUSTER_NAME>
6365
global:
6466
provider: "aws"
@@ -78,7 +80,7 @@ Get the Cortex operator endpoint:
7880
kubectl get service --namespace default ingressgateway-operator -o jsonpath='{.status.loadBalancer.ingress[0].hostname}'
7981
```
8082

81-
You can use the curl command below to verify loadbalancer set up. It can take between 5 to 10 minutes for the setup to complete. You can expect to encounter `Could not resolve host` or timeouts when running the verification request below during the loadbalancer initialization.
83+
You can use the curl command below to verify that your load balancer is ready. It can take 5-10 minutes for the setup to complete. You can expect to encounter `Could not resolve host` or timeouts when running the verification request before the load balancer is initialized.
8284

8385
```bash
8486
export CORTEX_OPERATOR_ENDPOINT=$(kubectl get service --namespace default ingressgateway-operator -o jsonpath='{.status.loadBalancer.ingress[0].hostname}')
@@ -120,22 +122,23 @@ The following tolerations are added to Deployments and Jobs orchestrated by Cort
120122
* gsutil
121123
* helm 3
122124
* GKE cluster
123-
* kubernetes version >= 1.17
124-
* at least 2 n1-standard-2 (2 vCPU, 8 GB mem) (with monitoring and logging disabled)
125+
* at least 2 n1-standard-2 (2 vCPU, 8 GB mem) (with monitoring and logging disabled)
125126
126-
Note that installing Cortex on your kubernetes cluster will not provide some of the cluster level features such as cluster autoscaling and spot instances with on-demand backup.
127+
You may install Cortex in any namespace in your cluster. In the guide that follows, the "default" namespace is assumed; if you're using a different namespace, replace all occurrences of "default" with the name of your namespace.
127128
128-
### Download cortex charts
129+
Note that installing Cortex on your Kubernetes cluster will not provide some of the cluster-level features such as cluster autoscaling and preemptible instances.
129130
130-
<!-- CORTEX_VERSION -->
131-
```
131+
### Download Cortex charts
132+
133+
<!-- CORTEX_VERSION_BRANCH_STABLE x3 -->
134+
```bash
132135
wget https://s3-us-west-2.amazonaws.com/get-cortex/0.28.0/charts/cortex-0.28.0.tar.gz
133136
tar -xzf cortex-0.28.0.tar.gz
134137
```
135138

136139
### Create a bucket in GCS
137140

138-
The Cortex operator will use this bucket to store API states and dependencies.
141+
The Cortex operator will use this bucket to store API state and dependencies.
139142

140143
```yaml
141144
gsutil mb gs://CORTEX_GCS_BUCKET
@@ -146,46 +149,42 @@ gsutil mb gs://CORTEX_GCS_BUCKET
146149
The credentials need to have at least these [permissions](../gcp/credentials.md).
147150

148151
```yaml
149-
export CORTEX_GOOGLE_APPLICATION_CREDENTIALS=
152+
export CORTEX_GOOGLE_APPLICATION_CREDENTIALS=<PATH_TO_CREDENTIALS>
150153

151154
kubectl create secret generic 'gcp-credentials' --namespace default --from-file=key.json=$CORTEX_GOOGLE_APPLICATION_CREDENTIALS
152155
```
153156

154-
Note: make sure to add credentials to the namespace that cortex will be installed into.
155-
156-
### Install cortex
157+
### Install Cortex
157158

158159
Define a `values.yaml` with the following information provided:
159160

160161
```yaml
161162
# values.yaml
162163

163164
cortex:
164-
project: <CORTEX_REGION>
165+
project: <CORTEX_PROJECT>
165166
zone: <CORTEX_ZONE>
166-
bucket: <CORTEX_GCS_BUCKET>
167+
bucket: <CORTEX_GCS_BUCKET> # e.g. "my-cortex-bucket" (without gs://)
167168
cluster_name: <CORTEX_CLUSTER_NAME>
168169
global:
169170
provider: "gcp"
170171
```
171172
172-
### Install with your configuration
173-
174173
```bash
175-
helm install cortex manifests/ --namespace default -f values.yaml
174+
helm install cortex charts/ --namespace default -f values.yaml
176175
```
177176

178177
### Configure Cortex client
179178

180179
Wait for the loadbalancers to be provisioned and connected to your cluster.
181180

182-
Get the Cortex operator endpoint (double check your namespace):
181+
Get the Cortex operator endpoint:
183182

184183
```bash
185184
kubectl get service --namespace default ingressgateway-operator -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
186185
```
187186

188-
You can use the curl command below to verify loadbalancer set up. It can take between 5 to 10 minutes for the setup to complete. You can expect to encounter `Could not resolve host` or timeouts when running the verification request below during the loadbalancer initialization.
187+
You can use the curl command below to verify that your load balancer is ready. It can take 5-10 minutes for the setup to complete. You can expect to encounter `Could not resolve host` or timeouts when running the verification request before the load balancer is initialized.
189188

190189
```bash
191190
export CORTEX_OPERATOR_ENDPOINT=$(kubectl get service --namespace default ingressgateway-operator -o jsonpath='{.status.loadBalancer.ingress[0].ip}')

docs/clusters/kubernetes/uninstall.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
# uninstall
1+
# Uninstall
22

3-
Get the Cortex installation's release name
3+
Identify the Cortex installation's release name:
44

55
```bash
66
helm list
77
```
88

9+
Uninstall Cortex:
10+
911
```bash
1012
helm uninstall <RELEASE_NAME>
1113
```
1214

13-
Resources in your cloud such as the bucket and logging will not be deleted.
15+
Resources in your cloud such as the bucket and logs will not be deleted.

docs/start.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
$ pip install cortex
77
```
88

9-
See the detailed installation instructions [here](clients/install.md).
9+
See [here](clients/install.md) for alternative installation options.
1010

11-
## Connect to a cluster
11+
## Create a cluster
1212

13-
* [Launch a managed Cortex cluster on your AWS account](clusters/aws/install.md)
14-
* [Launch a managed Cortex cluster on your GCP account](clusters/gcp/install.md)
13+
* [Launch a Cortex cluster on your AWS account](clusters/aws/install.md)
14+
* [Launch a Cortex cluster on your GCP account](clusters/gcp/install.md)
1515
* [Install Cortex on your Kubernetes cluster](clusters/kubernetes/install.md)
1616

1717
## Run inference workloads
1818

19-
* [RealtimeAPI](workloads/realtime/example.md)
20-
* [BatchAPI](workloads/batch/example.md)
21-
* [TaskAPI](workloads/task/example.md)
19+
* [Realtime API](workloads/realtime/example.md)
20+
* [Batch API](workloads/batch/example.md)
21+
* [Task API](workloads/task/example.md)

0 commit comments

Comments
 (0)