Skip to content

Commit b1a672b

Browse files
committed
Update to monorepo commit aa8eacc4bb64f41c3b14d307fab1263ec80e8048
1 parent 78127dc commit b1a672b

File tree

132 files changed

+2753
-2545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+2753
-2545
lines changed

BUILD_AND_TEST.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,12 +258,6 @@ workstation to your local host.
258258
The OSMO UI and APIs for the core service can now be accessed on your local machine at:
259259
http://ingress-nginx-controller.ingress-nginx.svc.cluster.local
260260

261-
Next, login into OSMO using the CLI:
262-
263-
```sh
264-
bazel run @osmo_workspace//src/cli -- login http://ingress-nginx-controller.ingress-nginx.svc.cluster.local --method=dev --username=testuser
265-
```
266-
267261
### Start OSMO Backend
268262

269263
```sh

DEV.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,16 @@ This command:
5050

5151
### Start OSMO Backend
5252

53-
To start the backend, you must be logged into OSMO using the CLI:
54-
55-
```sh
56-
bazel run @osmo_workspace//src/cli -- login http://$HOST_IP:8000 --method=dev --username=testuser
57-
```
58-
59-
Then start the backend:
53+
After OSMO services are started, start the backend:
6054

6155
```sh
6256
bazel run @osmo_workspace//run:start_backend -- --mode bazel
6357
```
6458

6559
This command:
6660

67-
- Checks for a kubernetes backend cluster that can be used for compute
68-
- If one is not accessible, a KIND cluster is created for compute
61+
- Checks for a KIND backend cluster that can be used for compute
62+
- If one is not accessible, a new KIND cluster is created for compute
6963
- Starts backend operators (listener, worker) using bazel
7064

7165
### Update Configuration
@@ -87,6 +81,11 @@ The OSMO UI and APIs can be accessed at: `http://$HOST_IP:8080`
8781

8882
## Next steps
8983

84+
Log into OSMO using the CLI:
85+
```sh
86+
bazel run @osmo_workspace//src/cli -- login http://$HOST_IP:8000 --method=dev --username=testuser
87+
```
88+
9089
Test your setup with:
9190

9291
```sh

QUICK_START.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,30 +40,8 @@ mkdir -p ~/osmo-quick-start && cd ~/osmo-quick-start
4040

4141
### Download and Install OSMO CLI
4242

43-
#### Linux AMD64
44-
45-
> Download from [osmo-client-linux](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/osmo/resources/osmo-client-linux)
46-
4743
```bash
48-
# cd to downloaded CLI tgz
49-
sudo tar -xzf osmo-client-linux_6.0.0.c18411774.tgz -C /usr/local
50-
rm osmo-client-linux_6.0.0.c18411774.tgz
51-
52-
# Create symlink
53-
sudo ln -s -f /usr/local/osmo /usr/local/bin/osmo
54-
```
55-
56-
#### MacOS ARM64
57-
58-
> Download from [osmo-client-macos](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/osmo/resources/osmo-client-macos)
59-
60-
```bash
61-
# cd to downloaded CLI pkg
62-
open -W osmo-client-macos_6.0.0.c18411774.pkg
63-
rm osmo-client-macos_6.0.0.c18411774.pkg
64-
65-
# Create symlink
66-
sudo ln -s -f /usr/local/osmo /usr/local/bin/osmo
44+
curl -fsSL https://raw.githubusercontent.com/NVIDIA/OSMO/refs/heads/main/install.sh | bash
6745
```
6846

6947
## 2. Configure variables
@@ -185,11 +163,18 @@ helm upgrade --install osmo nvstaging-osmo/osmo-quick-start \
185163
--version 1.0.0 \
186164
--namespace osmo \
187165
--create-namespace \
166+
--wait \
188167
--set global.containerRegistry.password="$CONTAINER_REGISTRY_PASSWORD" \
189168
--set global.nodeSelector."kubernetes\.io/arch"=$ARCH \
190169
--set ingress-nginx.controller.nodeSelector."kubernetes\.io/arch"=$ARCH
191170
```
192171

172+
Installing the chart will take about 5 minutes. If you're curious what's happening, you can monitor with:
173+
174+
```bash
175+
kubectl get pods --namespace osmo
176+
```
177+
193178
See [Configuration Options](./deployments/charts/osmo-quick-start/README.md#configuration) in the
194179
`osmo-quick-start` chart for more ways to install the chart.
195180

@@ -198,16 +183,15 @@ See [Configuration Options](./deployments/charts/osmo-quick-start/README.md#conf
198183
Add the following line to your `/etc/hosts` file:
199184

200185
```bash
201-
echo "127.0.0.1 osmo-ingress-nginx-controller.osmo.svc.cluster.local" | sudo tee -a /etc/hosts
186+
echo "127.0.0.1 quick-start.osmo" | sudo tee -a /etc/hosts
202187
```
203188

204189
## 5. Using OSMO
205190

206191
### Login to OSMO
207192

208193
```bash
209-
osmo login http://osmo-ingress-nginx-controller.osmo.svc.cluster.local \
210-
--method=dev --username=testuser
194+
osmo login http://quick-start.osmo --method=dev --username=testuser
211195
```
212196

213197
### Run a workflow

deployments/charts/backend-operator/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ This Helm chart deploys the OSMO Backend-Operator for managing compute backend r
110110
| `services.backendListener.imageName` | Listener image name | `backend-listener` |
111111
| `services.backendListener.imagePullPolicy` | Image pull policy | `Always` |
112112
| `services.backendListener.serviceName` | Service name | `osmo-backend-listener` |
113+
| `services.backendListener.initContainers` | Init containers for backend listener | `[]` |
113114
| `services.backendListener.serviceAccount` | Service account name | `backend-listener` |
114115
| `services.backendListener.max_unacked_messages` | Maximum unacked messages | `100` |
115116
| `services.backendListener.podCacheTtl` | Pod cache TTL in seconds | `15` |
@@ -134,6 +135,7 @@ This Helm chart deploys the OSMO Backend-Operator for managing compute backend r
134135
| `services.backendWorker.imageName` | Worker image name | `backend-worker` |
135136
| `services.backendWorker.imagePullPolicy` | Image pull policy | `Always` |
136137
| `services.backendWorker.serviceName` | Service name | `osmo-backend-worker` |
138+
| `services.backendWorker.initContainers` | Init containers for backend worker | `[]` |
137139
| `services.backendWorker.serviceAccount` | Service account name | `backend-worker` |
138140
| `services.backendWorker.extraArgs` | Additional arguments | `[]` |
139141
| `services.backendWorker.extraEnvs` | Additional environment variables | `[]` |

deployments/charts/backend-operator/templates/_otel-collector.tpl

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@
1919
- name: otc-container
2020
image: "{{ .Values.sidecars.OTEL.image }}"
2121
securityContext:
22+
allowPrivilegeEscalation: false
2223
capabilities:
23-
drop: ["NET_RAW"]
24+
drop: ["ALL"]
25+
runAsNonRoot: true
26+
runAsUser: 10001
27+
2428
imagePullPolicy: IfNotPresent
2529
args:
2630
- --config=/conf/collector.yaml
@@ -29,6 +33,15 @@
2933
volumeMounts:
3034
- mountPath: /conf
3135
name: config
36+
livenessProbe:
37+
httpGet:
38+
path: /metrics
39+
port: 4000
40+
scheme: HTTP
41+
periodSeconds: 30
42+
timeoutSeconds: 1
43+
failureThreshold: 3
44+
successThreshold: 1
3245
resources:
3346
{{- toYaml .Values.sidecars.OTEL.resources | nindent 4 }}
3447
{{- end }}

deployments/charts/backend-operator/templates/backend-listener.yaml

Lines changed: 45 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ spec:
5757
- name: {{ .Values.global.imagePullSecret }}
5858
{{- end }}
5959
serviceAccountName: {{ include "backend-operator.listener.serviceAccountName" . }}
60+
{{- with .Values.services.backendListener.initContainers }}
61+
initContainers:
62+
{{- toYaml . | nindent 6 }}
63+
{{- end }}
6064
hostAliases:
6165
{{- with .Values.services.backendListener.hostAliases }}
6266
{{- toYaml . | nindent 8}}
@@ -66,6 +70,12 @@ spec:
6670
- name: backend-listener
6771
image: {{ .Values.global.osmoImageLocation }}/{{ .Values.services.backendListener.imageName }}:{{ .Values.global.osmoImageTag }}
6872
imagePullPolicy: {{ .Values.services.backendListener.imagePullPolicy }}
73+
securityContext:
74+
allowPrivilegeEscalation: false
75+
capabilities:
76+
drop: ["ALL"]
77+
runAsNonRoot: true
78+
runAsUser: 1001
6979
command:
7080
- backend_listener
7181
args:
@@ -74,6 +84,11 @@ spec:
7484
{{- if eq .Values.global.loginMethod "password" }}
7585
- --username
7686
- {{ .Values.global.accountUsername }}
87+
- --password_file
88+
- /opt/osmo/secrets/password.txt
89+
{{- else if eq .Values.global.loginMethod "token" }}
90+
- --token_file
91+
- /opt/osmo/secrets/token.txt
7792
{{- end }}
7893
- --login_method
7994
- {{ .Values.global.loginMethod }}
@@ -103,28 +118,28 @@ spec:
103118
- {{$arg}}
104119
{{- end }}
105120
env:
106-
{{- if eq .Values.global.loginMethod "password" }}
107-
- name: OSMO_LOGIN_PASSWORD
108-
valueFrom:
109-
secretKeyRef:
110-
name: {{ .Values.global.accountPasswordSecret }}
111-
key: {{ .Values.global.accountPasswordSecretKey }}
112-
{{- else if eq .Values.global.loginMethod "token" }}
113-
- name: OSMO_LOGIN_TOKEN
114-
valueFrom:
115-
secretKeyRef:
116-
name: {{ .Values.global.accountTokenSecret }}
117-
key: {{ .Values.global.accountTokenSecretKey }}
118-
{{- end }}
119121
{{- with .Values.services.backendListener.extraEnvs }}
120122
{{- toYaml . | nindent 8 }}
121123
{{- end }}
122124
resources:
123125
{{- toYaml .Values.services.backendListener.resources | nindent 10 }}
124-
{{- if .Values.services.backendListener.volumeMounts }}
126+
{{- if or .Values.services.backendListener.volumeMounts (eq .Values.global.loginMethod "password") (eq .Values.global.loginMethod "token") }}
125127
volumeMounts:
128+
{{- if eq .Values.global.loginMethod "password" }}
129+
- name: osmo-secret
130+
mountPath: /opt/osmo/secrets/password.txt
131+
subPath: password.txt
132+
readOnly: true
133+
{{- else if eq .Values.global.loginMethod "token" }}
134+
- name: osmo-secret
135+
mountPath: /opt/osmo/secrets/token.txt
136+
subPath: token.txt
137+
readOnly: true
138+
{{- end }}
139+
{{- if .Values.services.backendListener.volumeMounts }}
126140
{{- toYaml .Values.services.backendListener.volumeMounts | nindent 8 }}
127141
{{- end }}
142+
{{- end }}
128143

129144
livenessProbe:
130145
exec:
@@ -137,7 +152,6 @@ spec:
137152
failureThreshold: 1
138153
periodSeconds: 30
139154
timeoutSeconds: 15
140-
141155
# Give the container 60 seconds to startup
142156
startupProbe:
143157
exec:
@@ -158,11 +172,26 @@ spec:
158172
{{- with .Values.services.backendListener.extraSidecarContainers }}
159173
{{- toYaml . | nindent 6 }}
160174
{{- end }}
161-
{{- if or .Values.services.backendListener.volumes .Values.sidecars.OTEL.enabled }}
175+
{{- if or .Values.services.backendListener.volumes .Values.sidecars.OTEL.enabled (eq .Values.global.loginMethod "password") (eq .Values.global.loginMethod "token") }}
162176
volumes:
163177
{{- if .Values.services.backendListener.volumes }}
164178
{{- toYaml .Values.services.backendListener.volumes | nindent 6 }}
165179
{{- end }}
180+
{{- if eq .Values.global.loginMethod "password" }}
181+
- name: osmo-secret
182+
secret:
183+
secretName: {{ .Values.global.accountPasswordSecret }}
184+
items:
185+
- key: {{ .Values.global.accountPasswordSecretKey }}
186+
path: password.txt
187+
{{- else if eq .Values.global.loginMethod "token" }}
188+
- name: osmo-secret
189+
secret:
190+
secretName: {{ .Values.global.accountTokenSecret }}
191+
items:
192+
- key: {{ .Values.global.accountTokenSecretKey }}
193+
path: token.txt
194+
{{- end }}
166195
{{- if .Values.sidecars.OTEL.enabled }}
167196
{{- include "backend-operator.OTELVolumes" (dict "Values" .Values "Prefix" $name) | nindent 6 }}
168197
{{- end }}

deployments/charts/backend-operator/templates/backend-worker.yaml

Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ spec:
5757
- name: {{ .Values.global.imagePullSecret }}
5858
{{- end }}
5959
serviceAccountName: {{ include "backend-operator.worker.serviceAccountName" . }}
60+
{{- with .Values.services.backendWorker.initContainers }}
61+
initContainers:
62+
{{- toYaml . | nindent 6 }}
63+
{{- end }}
6064
hostAliases:
6165
{{- with .Values.services.backendWorker.hostAliases }}
6266
{{- toYaml . | nindent 8}}
@@ -66,6 +70,12 @@ spec:
6670
- name: backend-worker
6771
image: {{ .Values.global.osmoImageLocation }}/{{ .Values.services.backendWorker.imageName }}:{{ .Values.global.osmoImageTag }}
6872
imagePullPolicy: {{ .Values.services.backendWorker.imagePullPolicy }}
73+
securityContext:
74+
allowPrivilegeEscalation: false
75+
capabilities:
76+
drop: ["ALL"]
77+
runAsNonRoot: true
78+
runAsUser: 1001
6979
command:
7080
- backend_worker
7181
args:
@@ -74,6 +84,11 @@ spec:
7484
{{- if eq .Values.global.loginMethod "password" }}
7585
- --username
7686
- {{ .Values.global.accountUsername }}
87+
- --password_file
88+
- /opt/osmo/secrets/password.txt
89+
{{- else if eq .Values.global.loginMethod "token" }}
90+
- --token_file
91+
- /opt/osmo/secrets/token.txt
7792
{{- end }}
7893
- --login_method
7994
- {{ .Values.global.loginMethod }}
@@ -103,26 +118,24 @@ spec:
103118
- {{$arg}}
104119
{{- end }}
105120
env:
106-
{{- if eq .Values.global.loginMethod "password" }}
107-
- name: OSMO_LOGIN_PASSWORD
108-
valueFrom:
109-
secretKeyRef:
110-
name: {{ .Values.global.accountPasswordSecret }}
111-
key: {{ .Values.global.accountPasswordSecretKey }}
112-
{{- else if eq .Values.global.loginMethod "token" }}
113-
- name: OSMO_LOGIN_TOKEN
114-
valueFrom:
115-
secretKeyRef:
116-
name: {{ .Values.global.accountTokenSecret }}
117-
key: {{ .Values.global.accountTokenSecretKey }}
118-
{{- end }}
119121
{{- with .Values.services.backendWorker.extraEnvs }}
120122
{{- toYaml . | nindent 8 }}
121123
{{- end }}
122124
resources:
123125
{{- toYaml .Values.services.backendWorker.resources | nindent 10 }}
124-
{{- if or .Values.backendTestRunner.enabled .Values.services.backendWorker.volumeMounts }}
126+
{{- if or .Values.backendTestRunner.enabled .Values.services.backendWorker.volumeMounts (eq .Values.global.loginMethod "password") (eq .Values.global.loginMethod "token") }}
125127
volumeMounts:
128+
{{- if eq .Values.global.loginMethod "password" }}
129+
- name: osmo-secret
130+
mountPath: /opt/osmo/secrets/password.txt
131+
subPath: password.txt
132+
readOnly: true
133+
{{- else if eq .Values.global.loginMethod "token" }}
134+
- name: osmo-secret
135+
mountPath: /opt/osmo/secrets/token.txt
136+
subPath: token.txt
137+
readOnly: true
138+
{{- end }}
126139
{{- if .Values.backendTestRunner.enabled }}
127140
- name: backend-test-runner-template
128141
mountPath: /tmp/backend-test-runner
@@ -145,7 +158,7 @@ spec:
145158
failureThreshold: 1
146159
periodSeconds: 30
147160
timeoutSeconds: 15
148-
# # Give the container 60 seconds to startup
161+
# Give the container 60 seconds to startup
149162
startupProbe:
150163
exec:
151164
command:
@@ -166,11 +179,26 @@ spec:
166179
{{- toYaml . | nindent 6 }}
167180
{{- end }}
168181

169-
{{- if or .Values.backendTestRunner.enabled .Values.services.backendWorker.volumes .Values.sidecars.OTEL.enabled }}
182+
{{- if or .Values.backendTestRunner.enabled .Values.services.backendWorker.volumes .Values.sidecars.OTEL.enabled (eq .Values.global.loginMethod "password") (eq .Values.global.loginMethod "token") }}
170183
volumes:
171184
{{- if .Values.services.backendWorker.volumes }}
172185
{{- toYaml .Values.services.backendWorker.volumes | nindent 6 }}
173186
{{- end }}
187+
{{- if eq .Values.global.loginMethod "password" }}
188+
- name: osmo-secret
189+
secret:
190+
secretName: {{ .Values.global.accountPasswordSecret }}
191+
items:
192+
- key: {{ .Values.global.accountPasswordSecretKey }}
193+
path: password.txt
194+
{{- else if eq .Values.global.loginMethod "token" }}
195+
- name: osmo-secret
196+
secret:
197+
secretName: {{ .Values.global.accountTokenSecret }}
198+
items:
199+
- key: {{ .Values.global.accountTokenSecretKey }}
200+
path: token.txt
201+
{{- end }}
174202
{{- if .Values.backendTestRunner.enabled }}
175203
- name: backend-test-runner-template
176204
configMap:

0 commit comments

Comments
 (0)