CONTRIBUTING.md 3.33 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Contributing to Dynamo Deploy

Welcome to the Dynamo Deploy project! This guide will help you get started with contributing to the deployment infrastructure and tooling for the Dynamo distributed inference platform.

## Getting Started

### Prerequisites


### Quick Setup

### Project Structure

The deploy directory contains several key components:

```
17
18
19
20
21
22
23
24
25
26
├── discovery # How to use Dynamo kubernetes discovery backend
├── helm
│   └── charts
│       ├── crds # Dynamo CRD helm chart
│       ├── platform # Dynamo platform helm chart
├── inference-gateway # Dynamo intregration with inference gateway
├── observability # Observability tools for Dynamo k8s
├── operator # Source code for the Dynamo operator
├── pre-deployment # Pre-deployment scripts to check your k8s cluster meets the requirements for deploying Dynamo
└── utils # Utilities and manifests for Dynamo benchmarking and profiling workflows
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
```

## Development Environment

### Setting Up Your Environment


### IDE Configuration

**VS Code:**

- Install Go extension
- Install Python extension
- Configure settings for Go formatting and linting
- Add workspace settings for consistent formatting

### Contribution Workflow Caveats

- We do signed commits

```bash
commit -S
```

51
52
53
- Every time you modify `deploy/helm/charts/crds/templates/*.yaml`, please bump up the version of the CRD helm chart in
    1. deploy/helm/charts/platform/components/operator/Chart.yaml
    2. deploy/helm/charts/platform/Chart.yaml
54
55
56
then

```bash
57
deploy/helm/charts/platform
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
helm dependency update
```

#### Commit Message Guidelines

Follow conventional commit format:

- `feat:` new features
- `fix:` bug fixes
- `docs:` documentation changes
- `test:` adding or updating tests
- `refactor:` code refactoring
- `perf:` performance improvements
- `ci:` CI/CD changes

Examples:

```
feat(operator): add support for custom resource limits
fix(sdk): resolve service discovery timeout issue
docs(helm): update deployment guide with new examples
test(e2e): add integration tests for disaggregated serving
```

## Style Guide

### Go Code Style (Operator)

Follow standard Go conventions.


### Python Code Style (SDK)

Follow PEP 8 and use modern Python practices:


### YAML/Helm Templates

```yaml
# Use consistent indentation (2 spaces)
apiVersion: apps/v1
kind: Deployment
metadata:
  name: {{ include "dynamo.fullname" . }}
  labels:
    {{- include "dynamo.labels" . | nindent 4 }}
spec:
  replicas: {{ .Values.replicaCount }}
  selector:
    matchLabels:
      {{- include "dynamo.selectorLabels" . | nindent 6 }}
```

## Testing

Once you have an MR up and standard checks pass trigger the integration tests by adding the comment “/ok to test <COMMIT-ID>


### Unit Tests

**Go Tests (Operator):**

```bash
121
cd deploy/operator
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
go test ./... -v
go test -race ./...
```

### Integration Tests

**End-to-End Deployment Tests:**

```bash
# Run full deployment test suite
pytest tests/serve/test_dynamo_serve.py -v

# Test specific deployment scenarios
pytest tests/serve/test_dynamo_serve.py::test_serve_deployment[agg] -v
```

**Operator Integration Tests:**

```bash
141
cd deploy/operator
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
make test-e2e
```

### Writing Tests

**Example Unit Test:**

**Example Integration Test:**


### Examples Testing

Ensure documentation examples work.


Thank you for contributing to Dynamo Deploy! 🚀