dynamo_cloud.md 7.57 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
# Dynamo Cloud Kubernetes Platform (Dynamo Deploy)
19

20
The Dynamo Cloud platform is a comprehensive solution for deploying and managing Dynamo inference graphs (also referred to as pipelines) in Kubernetes environments. It provides a streamlined experience for deploying, scaling, and monitoring your inference services. You can interface with Dynamo Cloud using the `deploy` subcommand available in the Dynamo CLI (for example, `dynamo deploy`)
21

22
## Overview
23
24
25

The Dynamo cloud platform consists of several key components:

26
- **Dynamo Operator**: A Kubernetes operator that manages the lifecycle of Dynamo inference graphs from build ➡️ deploy. For more information on the operator, see [Dynamo Kubernetes Operator Documentation](../dynamo_deploy/dynamo_operator.md)
27
28
29
30
31
- **API Store**: Stores and manages service configurations and metadata related to Dynamo deployments. Needs to be exposed externally.
- **Custom Resources**: Kubernetes custom resources for defining and managing Dynamo services

These components work together to provide a seamless deployment experience, handling everything from containerization to scaling and monitoring.

32
![Dynamo Deploy system deployment diagram.](../../images/dynamo-deploy.png)
33

34
## Prerequisites
35
36
37
38
39
40
41
42
43
44

Before getting started with the Dynamo cloud platform, ensure you have:

- A Kubernetes cluster (version 1.24 or later)
- [Earthly](https://earthly.dev/) installed for building components
- Docker installed and running
- Access to a container registry (e.g., Docker Hub, NVIDIA NGC, etc.)
- `kubectl` configured to access your cluster
- Helm installed (version 3.0 or later)

45
46
47
```{tip}
Don't have a Kubernetes cluster? Check out our [Minikube setup guide](./minikube.md) to set up a local environment!
```
48

49
## Building Docker Images for Dynamo Cloud Components
50
51
52

The Dynamo cloud platform components need to be built and pushed to a container registry before deployment. You can build these components individually or all at once.

53
### Setting Up Environment Variables
54
55
56
57

First, set the required environment variables for building and pushing images:

```bash
58
59
# Set your container registry
export DOCKER_SERVER=<CONTAINER_REGISTRY>
60
# Set the image tag (e.g., latest, 0.0.1, etc.)
61
export IMAGE_TAG=<TAG>
62
63
64
```

Where:
65
66
- `<CONTAINER_REGISTRY>`: Your container registry (e.g., `nvcr.io`, `docker.io/<your-username>`, etc.)
- `<TAG>`: The version tag for your images (e.g., `latest`, `0.0.1`, `v1.0.0`)
67

68
69
**Important** Make sure you're logged in to your container registry before pushing images. For example:

70
71
72
```bash
docker login <CONTAINER_REGISTRY>
```
73

74
### Building Components
75

76
You can build and push all platform components at once:
77
78

```bash
79
earthly --push +all-docker --DOCKER_SERVER=$DOCKER_SERVER --IMAGE_TAG=$IMAGE_TAG
80
81
```

82
## Deploying the Dynamo Cloud Platform
83
84
85

Once you've built and pushed the components, you can deploy the platform to your Kubernetes cluster.

86
### Prerequisites
87

88
89
Before deploying Dynamo Cloud, ensure your Kubernetes cluster meets the following requirements:

90
#### PVC Support with Default Storage Class
91
Dynamo Cloud requires Persistent Volume Claim (PVC) support with a default storage class. Verify your cluster configuration:
92
93

```bash
94
95
# Check if default storage class exists
kubectl get storageclass
96

97
98
99
100
101
# 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
```
102

103
104
105
106
107
108
### Cloud Provider-Specific deployment

#### Google Kubernetes Engine (GKE) deployment

You can find detailed instructions for deployment in GKE [here](../dynamo_deploy/gke_setup.md)

109
### Installation
110
111
112
113
114
115
116
117

1. Set the required environment variables:
```bash
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!
118
119
```

120
121
122
123
``` {note}
DOCKER_USERNAME and DOCKER_PASSWORD are optional and only needed if you want to pull docker images from a private registry.
A docker image pull secret is created automatically if these variables are set. Its name is `docker-imagepullsecret` unless overridden by the `DOCKER_SECRET_NAME` environment variable.
```
124
125

The Dynamo Cloud Platform auto-generates docker images for pipelines and pushes them to a container registry.
126
By default, the platform uses the same container registry as the platform components (specified by `DOCKER_SERVER`).
127
128
129
130
131
132
133
134
However, you can specify a different container registry for pipelines by additionally setting the following environment variables:

```bash
export PIPELINES_DOCKER_SERVER=<your-docker-server>
export PIPELINES_DOCKER_USERNAME=<your-docker-username>
export PIPELINES_DOCKER_PASSWORD=<your-docker-password>
```

135
136
137
138
139
140
141
142
143
144
145
146
If you wish to expose your Dynamo Cloud Platform externally, you can setup the following environment variables:

```bash
# if using ingress
export INGRESS_ENABLED="true"
export INGRESS_CLASS="nginx" # or whatever ingress class you have configured

# if using istio
export ISTIO_ENABLED="true"
export ISTIO_GATEWAY="istio-system/istio-ingressgateway" # or whatever istio gateway you have configured
```

147
Running the installation script with `--interactive` guides you through the process of exposing your Dynamo Cloud Platform externally if you don't want to set these environment variables manually.
148

149
2. [One-time Action] Create a new kubernetes namespace and set it as your default.
150
151

```bash
152
cd deploy/cloud/helm
153
154
kubectl create namespace $NAMESPACE
kubectl config set-context --current --namespace=$NAMESPACE
155
156
```

157
3. Deploy the Helm charts (install CRDs first, then platform) using the deployment script:
158

159
```bash
160
./deploy.sh --crds
161
162
```

163
if you want guidance during the process, run the deployment script with the `--interactive` flag:
164
165

```bash
166
./deploy.sh --crds --interactive
167
168
```

169
170
omitting `--crds` will skip the CRDs installation/upgrade. This is useful when installing on a shared cluster as CRDs are cluster-scoped resources.

171
4. **Expose Dynamo Cloud Externally**
172

173
``` {note}
174
The script automatically displays information about the endpoint that you can use to access Dynamo Cloud. We refer to this externally available endpoint as `DYNAMO_CLOUD`.
175
```
176
177
178
179
180
181
182

The simplest way to expose the `dynamo-store` service within the namespace externally is to use a port-forward:

```bash
kubectl port-forward svc/dynamo-store <local-port>:80 -n $NAMESPACE
export DYNAMO_CLOUD=http://localhost:<local-port>
```
183

184
## Next Steps
185
186
187
188

After deploying the Dynamo cloud platform, you can:

1. Deploy your first inference graph using the [Dynamo CLI](operator_deployment.md)
189
2. Deploy Dynamo LLM pipelines to Kubernetes using the [Dynamo CLI](../../examples/llm_deployment.md)
190
191
3. Manage your deployments using the Dynamo CLI

192
For more detailed information about deploying inference graphs, see the [Dynamo Deploy Guide](README.md).