-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added documentation on how to use a pci-e Coral Accelerator in Talos …
…Linux for Code Project AI
- Loading branch information
UntouchedWagons
committed
Jul 11, 2024
1 parent
59124da
commit c488ffe
Showing
4 changed files
with
133 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
talos/testing/secrets.yaml | ||
talos/testing/rendered | ||
talos/testing/rendered+nvidia | ||
talos/testing/rendered+coral | ||
production/*/*/.decrypted~values.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
## Cleaning house | ||
|
||
``` | ||
rm -Rf ~/.talos ~/.kube/talos-config talos/testing/rendered talos/testing/rendered+nvidia talos/testing/rendered+coral talos/testing/secrets.yaml | ||
``` | ||
|
||
## Getting started | ||
|
||
``` | ||
talosctl gen secrets --output-file talos/testing/secrets.yaml | ||
talosctl gen config coral-test https://192.168.20.105:6443 \ | ||
--with-secrets talos/testing/secrets.yaml \ | ||
--config-patch @talos/testing/patches/allow-controlplane-workloads.yaml \ | ||
--config-patch @talos/testing/patches/dhcp.yaml \ | ||
--config-patch @talos/testing/patches/install-disk+coral.yaml \ | ||
--config-patch @talos/testing/patches/interface-names.yaml \ | ||
--config-patch @talos/testing/patches/kubelet-certificates.yaml \ | ||
--config-patch-control-plane @talos/testing/patches/admissionControl.yaml \ | ||
--output talos/testing/rendered+coral/ | ||
``` | ||
|
||
## Install Talos | ||
|
||
``` | ||
talosctl apply -f talos/testing/rendered+coral/controlplane.yaml -n 192.168.20.105 --insecure | ||
``` | ||
|
||
## Copy talos config for talosctl | ||
|
||
``` | ||
mkdir -p ~/.talos | ||
cp talos/testing/rendered+coral/talosconfig ~/.talos/config | ||
``` | ||
|
||
## Configure the context's endpoints | ||
|
||
``` | ||
talosctl config contexts | ||
talosctl config endpoint 192.168.20.105 | ||
talosctl config node 192.168.20.105 | ||
``` | ||
|
||
## Bootstrap the cluster | ||
|
||
``` | ||
talosctl bootstrap -n 192.168.20.105 | ||
``` | ||
|
||
## Generate a kubeconfig for kubectl | ||
|
||
``` | ||
talosctl kubeconfig ~/.kube/talos-config | ||
``` | ||
|
||
Based off of https://mirceanton.com/posts/2023-11-28-the-best-os-for-kubernetes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
machine: | ||
install: | ||
disk: /dev/vda | ||
image: factory.talos.dev/installer/70fb923343260bfe3e419cfb7bfeb66719b973df0149da9f49ab7637971b1aef:v1.7.5 | ||
|
||
kernel: | ||
modules: | ||
- name: gasket | ||
- name: apex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/bjw-s/helm-charts/app-template-3.2.1/charts/other/app-template/values.schema.json | ||
|
||
controllers: | ||
main: | ||
strategy: Recreate | ||
|
||
containers: | ||
main: | ||
image: | ||
repository: codeproject/ai-server | ||
tag: cpu-2.6.5 | ||
securityContext: | ||
privileged: true | ||
allowPrivilegeEscalation: true | ||
|
||
probes: | ||
# -- Liveness probe configuration | ||
# @default -- See below | ||
liveness: | ||
# -- Enable the liveness probe | ||
enabled: true | ||
# -- Set this to `true` if you wish to specify your own livenessProbe | ||
custom: false | ||
# -- sets the probe type when not using a custom probe | ||
# @default -- "TCP" | ||
type: HTTP | ||
path: / | ||
# -- The spec field contains the values for the default livenessProbe. | ||
# If you selected `custom: true`, this field holds the definition of the livenessProbe. | ||
# @default -- See below | ||
spec: | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
timeoutSeconds: 1 | ||
failureThreshold: 3 | ||
|
||
service: | ||
main: | ||
controller: main | ||
type: LoadBalancer | ||
ports: | ||
http: | ||
port: 32168 | ||
|
||
persistence: | ||
config: | ||
type: persistentVolumeClaim | ||
accessMode: ReadWriteOnce | ||
storageClass: local-path | ||
size: 3Gi | ||
advancedMounts: | ||
main: | ||
main: | ||
- path: /etc/codeproject/ai | ||
subPath: data | ||
- path: /app/modules | ||
subPath: modules | ||
usb: | ||
type: hostPath | ||
hostPath: /dev | ||
hostPathType: Directory | ||
globalMounts: | ||
- path: /dev |