You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cluster/development.md
+30-58Lines changed: 30 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,13 +22,12 @@ Create the AWS Elastic Container Registry:
22
22
make registry-create
23
23
```
24
24
25
-
Note the registry URL, this will be needed shortly.
25
+
Take note of the registry URL, this will be needed shortly.
26
26
27
27
Create the S3 buckets:
28
28
29
29
```bash
30
30
aws s3 mb s3://cortex-cluster-<your_name>
31
-
aws s3 mb s3://cortex-kops-<your_name># (if you'll be using KOPS)
32
31
aws s3 mb s3://cortex-cli-<your_name># (if you'll be uploading your compiled CLI)
33
32
```
34
33
@@ -40,37 +39,23 @@ Make the config folder:
40
39
mkdir dev/config
41
40
```
42
41
43
-
Create `dev/config/k8s.sh`. Paste the following config, replace `K8S_KOPS_BUCKET` with your bucket name (if using KOPS), and update any other variables as desired:
44
-
45
-
```bash
46
-
# EKS and KOPS
47
-
48
-
export K8S_NAME="cortex"
49
-
export K8S_REGION="us-west-2"
50
-
export K8S_NODE_INSTANCE_TYPE="t3.medium"
51
-
export K8S_NODES_MAX_COUNT="2"
52
-
export K8S_NODES_MIN_COUNT="2"
53
-
export K8S_GPU_NODES_MIN_COUNT="0"
54
-
export K8S_GPU_NODES_MAX_COUNT="0"
55
-
56
-
# KOPS only
57
-
58
-
export K8S_KOPS_BUCKET="cortex-kops-<your_name>"
59
-
export K8S_ZONE="us-west-2a"
60
-
export K8S_MASTER_INSTANCE_TYPE="t3.micro"
61
-
export K8S_MASTER_VOLUME_SIZE="32"
62
-
export K8S_NODE_VOLUME_SIZE="32"
63
-
```
64
-
65
42
Create `dev/config/cortex.sh`. Paste the following config, and update `CORTEX_BUCKET`, `CORTEX_REGION`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and all registry URLs accordingly:
Create `dev/config/build.sh`. Paste the following config, and update `CLI_BUCKET_NAME`, `CLI_BUCKET_REGION`, `REGISTRY_URL`, and `REGISTRY_REGION` accordingly:
kubectl get nodes "-o=custom-columns=NAME:.metadata.name,GPU:.status.allocatable.nvidia\.com/gpu"
104
+
make cli # The binary will be placed in path/to/cortex/bin/cortex
105
+
path/to/cortex/bin/cortex configure
125
106
```
126
107
127
-
### Building
108
+
### Cortex Cluster
128
109
129
-
Build and push all Cortex images (this will take a while):
110
+
Start Cortex:
130
111
131
112
```bash
132
-
make registry-all
113
+
make cortex-up
133
114
```
134
115
135
-
Build and configure the Cortex CLI:
116
+
Tear down the Cortex cluster:
136
117
137
118
```bash
138
-
make cli # The binary will be placed in path/to/cortex/bin/cortex
139
-
path/to/cortex/bin/cortex configure
119
+
make cortex-down
140
120
```
141
121
142
-
### Deployment
143
-
144
-
Deploy an example:
122
+
### Deployment an Example
145
123
146
124
```bash
147
125
cd examples/iris
148
126
path/to/cortex/bin/cortex deploy
149
127
```
150
128
151
-
Tear down the cluster:
152
-
153
-
```bash
154
-
make eks-down
155
-
# or
156
-
make kops-down
157
-
```
158
-
159
129
## Off-cluster Operator
160
130
161
131
If you're making changes in the operator and want faster iterations, you can run an off-cluster operator.
162
132
163
-
1.`make ostop` to stop the in-cluster operator
133
+
1.`make operator-stop` to stop the in-cluster operator
164
134
1.`make devstart` to run the off-cluster operator (which rebuilds the CLI and restarts the Operator when files change)
165
135
1.`path/to/cortex/bin/cortex configure` (on a separate terminal) to configure your cortex CLI to use the off-cluster operator. When prompted for operator URL, use `http://localhost:8888`
166
136
137
+
Note: `make cortex-up-dev` will start Cortex without installing the operator.
138
+
167
139
If you want to switch back to the in-cluster operator:
168
140
169
141
1.`<ctrl+C>` to stop your off-cluster operator
170
-
1.`oinstall` to install the operator in your cluster
171
-
1.`path/to/cortex/bin/cortex configure` to configure your cortex CLI to use the in-cluster operator. When prompted for operator URL, use the URL shown when running `oinstall`
142
+
1.`make operator-start` to install the operator in your cluster
143
+
1.`path/to/cortex/bin/cortex configure` to configure your cortex CLI to use the in-cluster operator. When prompted for operator URL, use the URL shown when running `make cortex-info`
0 commit comments