Skip to content

Commit

Permalink
Update readme to use cluster token for gitops (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
sarvesh-cast authored Jan 8, 2025
1 parent 213ebb7 commit 1aec60f
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 14 deletions.
24 changes: 18 additions & 6 deletions examples/aks/aks_cluster_gitops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@ Helm Managed ==> All Castware components such as `castai-agent`, `castai-cluste
+-------------------------+
| 1. Update TF.VARS
2. Terraform Init & Apply|
+-------------------------+
|
|
| TERRAFORM OUTPUT
+-------------------------+
| 3. Execute terraform output command
| terraform output cluster_id
terraform output cluster_token
+-------------------------+
|
|GITOPS
+-------------------------+
| 3. Deploy Helm chart of castai-agent castai-cluster-controller`, `castai-evictor`, `castai-spot-handler`, `castai-kvisor`, `castai-workload-autoscaler`, `castai-pod-pinner`
| 4. Deploy Helm chart of castai-agent castai-cluster-controller`, `castai-evictor`, `castai-spot-handler`, `castai-kvisor`, `castai-workload-autoscaler`, `castai-pod-pinner`
+-------------------------+
|
|
Expand All @@ -34,17 +42,21 @@ Prerequisites:


### Step 1 & 2: Update TF vars & TF Init, plan & apply
After successful apply, CAST Console UI will be in `Connecting` state. \
Note generated 'CASTAI_CLUSTER_ID' from outputs
After successful apply, CAST Console UI will be in `Connecting` state.

### Step 3: Execute TF output command & save the below output values
terraform output cluster_id
terraform output cluster_token

Obtained values are needed for next step

### Step 3: Deploy Helm chart of CAST Components
### Step 4: Deploy Helm chart of CAST Components
Coponents: `castai-cluster-controller`,`castai-evictor`, `castai-spot-handler`, `castai-kvisor`, `castai-workload-autoscaler`, `castai-pod-pinner` \
After all CAST AI components are installed in the cluster its status in CAST AI console would change from `Connecting` to `Connected` which means that cluster onboarding process completed successfully.

```
CASTAI_API_KEY=""
CASTAI_CLUSTER_ID=""
CASTAI_API_KEY="<Replace cluster_token>"
CASTAI_CLUSTER_ID="<Replace cluster_id>"
CAST_CONFIG_SOURCE="castai-cluster-controller"
#### Mandatory Component: Castai-agent
Expand Down
22 changes: 17 additions & 5 deletions examples/eks/eks_cluster_gitops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ Helm Managed ==> All Castware components such as `castai-agent`, `castai-cluste
+-------------------------+
| 3. Update TF.VARS
4. Terraform Init & Apply|
+-------------------------+
|
| TERRAFORM OUTPUT
+-------------------------+
| 5. Execute terraform output command
| terraform output cluster_id
terraform output cluster_token
+-------------------------+
|
|GITOPS
+-------------------------+
| 5. Deploy Helm chart of castai-agent castai-cluster-controller`, `castai-evictor`, `castai-spot-handler`, `castai-kvisor`, `castai-workload-autoscaler`, `castai-pod-pinner`
| 6. Deploy Helm chart of castai-agent castai-cluster-controller`, `castai-evictor`, `castai-spot-handler`, `castai-kvisor`, `castai-workload-autoscaler`, `castai-pod-pinner`
+-------------------------+
|
|
Expand All @@ -55,7 +62,7 @@ Helm Managed ==> All Castware components such as `castai-agent`, `castai-cluste

Prerequisites:
- CAST AI account
- Obtained CAST AI [API Access key](https://docs.cast.ai/docs/authentication#obtaining-api-access-key) with Full Access
- Obtained CAST AI Key [API Access key](https://docs.cast.ai/docs/authentication#obtaining-api-access-key) with Full Access


### Step 0: Set Profile in AWS CLI
Expand Down Expand Up @@ -93,14 +100,19 @@ metadata:
After successful apply, CAST Console UI will be in `Connecting` state. \
Note generated 'CASTAI_CLUSTER_ID' from outputs

### Step 5: Execute TF output command & save the below output values
terraform output cluster_id
terraform output cluster_token

Obtained values are needed for next step

### Step 5: Deploy Helm chart of CAST Components
### Step 6: Deploy Helm chart of CAST Components
Coponents: `castai-cluster-controller`,`castai-evictor`, `castai-spot-handler`, `castai-kvisor`, `castai-workload-autoscaler`, `castai-pod-pinner` \
After all CAST AI components are installed in the cluster its status in CAST AI console would change from `Connecting` to `Connected` which means that cluster onboarding process completed successfully.

```
CASTAI_API_KEY=""
CASTAI_CLUSTER_ID=""
CASTAI_API_KEY="<Replace cluster_token>"
CASTAI_CLUSTER_ID="<Replace cluster_id>"
CAST_CONFIG_SOURCE="castai-cluster-controller"
#### Mandatory Component: Castai-agent
Expand Down
6 changes: 6 additions & 0 deletions examples/eks/eks_cluster_gitops/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ output "cluster_id" {
description = "CAST AI cluster ID"
}

output "cluster_token" {
value = castai_eks_cluster.my_castai_cluster.cluster_token
description = "CAST AI cluster token used by Castware to authenticate to Mothership"
sensitive = true
}

output "instance_profile_role_arn" {
description = "Arn of created cast instance role"
value = module.castai-eks-role-iam.instance_profile_role_arn
Expand Down
18 changes: 15 additions & 3 deletions examples/gke/gke_cluster_gitops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ Helm Managed ==> All Castware components such as `castai-agent`, `castai-cluste
+-------------------------+
| 1. Update TF.VARS
2. Terraform Init & Apply|
+-------------------------+
|
| TERRAFORM OUTPUT
+-------------------------+
| 3. Execute terraform output command
| terraform output cluster_id
terraform output cluster_token
+-------------------------+
|
|GITOPS
Expand All @@ -37,14 +44,19 @@ Prerequisites:
After successful apply, CAST Console UI will be in `Connecting` state. \
Note generated 'CASTAI_CLUSTER_ID' from outputs

### Step 3: Execute TF output command & save the below output values
terraform output cluster_id
terraform output cluster_token

Obtained values are needed for next step

### Step 3: Deploy Helm chart of CAST Components
### Step 4: Deploy Helm chart of CAST Components
Coponents: `castai-cluster-controller`,`castai-evictor`, `castai-spot-handler`, `castai-kvisor`, `castai-workload-autoscaler`, `castai-pod-pinner` \
After all CAST AI components are installed in the cluster its status in CAST AI console would change from `Connecting` to `Connected` which means that cluster onboarding process completed successfully.

```
CASTAI_API_KEY=""
CASTAI_CLUSTER_ID=""
CASTAI_API_KEY="<Replace cluster_token>"
CASTAI_CLUSTER_ID="<Replace cluster_id>"
CAST_CONFIG_SOURCE="castai-cluster-controller"
#### Mandatory Component: Castai-agent
Expand Down

0 comments on commit 1aec60f

Please sign in to comment.