README.md 3.96 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!--
SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
SPDX-License-Identifier: Apache-2.0

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

18
# 🚀 Deploy Dynamo Cloud to Kubernetes
19

20
## 🏗️ Building Docker images for Dynamo Cloud components
21
22
23

You can build and push Docker images for the Dynamo cloud components (API server, API store, and operator) to any container registry of your choice. Here's how to build each component:

24
### 📋 Prerequisites
25
26
27
28
- [Earthly](https://earthly.dev/) installed
- Docker installed and running
- Access to a container registry of your choice

29
### ⚙️ Building and Pushing Images
30
31
32

First, set the required environment variables:
```bash
33
34
export DOCKER_SERVER=<CONTAINER_REGISTRY>
export IMAGE_TAG=<TAG>
35
36
37
```

As a description of the placeholders:
38
- `<CONTAINER_REGISTRY>`: Your container registry (e.g., `nvcr.io`, `docker.io/<your-username>`, etc.)
39
40
41
42
43
44
45
46
47
- `<TAG>`: The tag you want to use for the image (e.g., `latest`, `0.0.1`, etc.)

Note: Make sure you're logged in to your container registry before pushing images. For example:
```bash
docker login <CONTAINER_REGISTRY>
```

You can build each component individually or build all components at once:

48
#### 🛠️ Build and push platform components
49
```bash
50
earthly --push +all-docker --DOCKER_SERVER=$DOCKER_SERVER --IMAGE_TAG=$IMAGE_TAG
51
52
```

53
## 🚀 Deploy Dynamo Cloud Platform
54

55
### 📋 Prerequisites
56
57
Before deploying Dynamo Cloud, ensure your Kubernetes cluster meets the following requirements:

58
#### 1. 🛡️ Istio Installation
59
Dynamo Cloud requires Istio for service mesh capabilities. Verify Istio is installed and running:
60
61

```bash
62
63
64
65
66
# Check if Istio is installed
kubectl get pods -n istio-system

# Expected output should show running Istio pods
# istiod-* pods should be in Running state
67
68
```

69
#### 2. 💾 PVC Support with Default Storage Class
70
71
Dynamo Cloud requires Persistent Volume Claim (PVC) support with a default storage class. Verify your cluster configuration:

72
```bash
73
74
# Check if default storage class exists
kubectl get storageclass
75

76
77
78
79
80
# Expected output should show at least one storage class marked as (default)
# Example:
# NAME                 PROVISIONER             RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
# standard (default)   kubernetes.io/gce-pd    Delete          Immediate              true                   1d
```
81

82
83
84
85
> [!TIP]
> Don't have a Kubernetes cluster? Check out our [Minikube setup guide](../../../docs/guides/dynamo_deploy/minikube.md) to set up a local environment! 🏠

### 📥 Installation
86

87
1. Set the required environment variables:
88
```bash
89
export PROJECT_ROOT=($pwd)
90
91
92
93
94
export DOCKER_USERNAME=<your-docker-username>
export DOCKER_PASSWORD=<your-docker-password>
export DOCKER_SERVER=<your-docker-server>
export IMAGE_TAG=<TAG>  # Use the same tag you used when building the images
export NAMESPACE=dynamo-cloud    # change this to whatever you want!
95
export DYNAMO_INGRESS_SUFFIX=dynamo-cloud.com # change this to whatever you want!
96
97
```

98
2. [One-time Action] Create a new kubernetes namespace and set it as your default. Create image pull secrets if needed.
99
100

```bash
101
cd $PROJECT_ROOT/deploy/cloud/helm
102
103
kubectl create namespace $NAMESPACE
kubectl config set-context --current --namespace=$NAMESPACE
104

105
kubectl create secret docker-registry docker-imagepullsecret \
106
107
108
109
  --docker-server=$DOCKER_SERVER \
  --docker-username=$DOCKER_USERNAME \
  --docker-password=$DOCKER_PASSWORD \
  --namespace=$NAMESPACE
110
111
```

112
3. Deploy the helm chart using the deploy script:
113
114
115

```bash
./deploy.sh
116
```