|
1 | | -# SMARTER v2 |
| 1 | +# SMARTER Demo Deployment Instructions |
2 | 2 |
|
3 | 3 | [](https://artifacthub.io/packages/search?repo=smarter) |
| 4 | +## This demo makes the following assumptions about your environment |
4 | 5 |
|
5 | | -We are currently refactoring and updating SMARTER and placing into this repository. Some of the goals for this new version: |
| 6 | +In the case you wish to deploy the demo we assume you have done the following: |
| 7 | +- You should have a cloud-based k3s master dedicated for edge deployment (we will refer to this as k3s-edge-master) before proceeding any further |
| 8 | + - if you don't have a k3s-edge-master, you can follow [these instructions](./k3s-edge-master.md) |
| 9 | +- You should also have an installed InfluxDB and Grafana instance in a separate kubernetes cluster |
| 10 | + - these may be installed on a second cloud node, with its own k3s master, we will refer to this as the cloud-data-node |
| 11 | + - if you don't have a cloud-data-node, you can follow [these instructions](./cloud-data-node.md) |
| 12 | +- You will also need an installed k3s edge node which has already been setup to talk to k3s-edge-master |
| 13 | + - instructions for installing a SMARTER image on Xavier AGX 16GB or Rpi4 are available [here](http://gitlab.com/arm-research/smarter/smarter-yocto) |
| 14 | + - instructions for registering an arbitrary arm64 node running a **64 bit kernel and user space with docker installed** are available [here](./k3s-edge-master.md) under the section `Joining a non-yocto k3s node` |
| 15 | +- You will need a KUBECONFIG that is authenticated against the k3s-edge-master on the Dev machine (where you intend to run these commands) |
| 16 | +- Using our provided node images, your nodes should automatically register with the edge k3s master. You can verify this by running `kubectl get nodes -o wide` |
6 | 17 |
|
7 | | -- Simplify deployment |
8 | | - - move to helm based workflow for customization and deployment |
9 | | - - simplify cloud based deployment to minimal set of services |
10 | | - - leverage 3rd party platform deployment options versus custom yocto builds |
11 | | -- Update versions of baseline software |
12 | | -- Incorporate updates to triton and other software that forms the examples |
| 18 | +**Hardware:** |
| 19 | +- Xavier AGX or Raspberry Pi 4 using our [Smarter Yocto Images](http://gitlab.com/arm-research/smarter/smarter-yocto) (release > v0.6.4.1) |
| 20 | +- Rpi4 4GB running Ubuntu 19.10 (can be provisioned using smarter edge setup convenience script found in the scripts directory) or Xavier AGX 16GB running L4T 32.4.3 provided by the jetpack 4.4 release. Others have demonstrated this stack working on Nvidia Nano and Nvidia Xavier NX, but our team does not test on these platforms. Any Arm based device running a **64 bit kernel and user space with docker installed** should work. For instructions on how to register a **non-yocto** node, you can follow [these instructions](./k3s-edge-master.md) under the section `Joining a non-yocto k3s node`. Note that **Ubuntu 20.04** on the RPI 4 will **not** work, please use **19.10** |
| 21 | +- PS3 Eye Camera (or Linux compatible web cam with audio) serving both audio and video data (other USB cameras with microphones may work). Microphone **MUST** support 16KHz sampling rate. |
| 22 | +- A development machine (your work machine) setup to issue kubectl commands to your edge k3s cluster |
| 23 | +- (optional) PMS7003 Air Quality Sensor connected over Serial USB to USB port |
| 24 | +- (optional) Weather:bit connected over Serial USB to USB port |
13 | 25 |
|
| 26 | +**Software:** |
| 27 | +- Dev machine running kubectl client 1.25 |
| 28 | +- git, curl must also be installed |
| 29 | +- K3s server version 1.25 |
| 30 | +- Node running docker > 18.09 |
| 31 | + |
| 32 | +**Connectivity:** |
| 33 | +- You must be able to reach your node via IP on ports `22`(ssh) and `2520`(Webserver) from your dev machine for parts of this demo to work |
| 34 | +- The node must be able to reach your k3s-edge-master and cloud-data-node via IP |
| 35 | + |
| 36 | +## Smarter k3s server configuration |
| 37 | + |
| 38 | +- Use the helm chart on https://gitlab.com/smarter-project/documentation/chart to install CNI, DNS and device-manager |
| 39 | + ```bash |
| 40 | + helm install --namespace smarter --create-namespace smarter-edge chart |
| 41 | + ``` |
| 42 | +- Use the helm chart on each of hte modules. Remember to use the namespace and the correct labels. The individual charts do not install on devices automatically, they require labels. |
| 43 | + |
| 44 | +## To setup your registered edge node from your development machine |
| 45 | +Plugin USB camera. You should be able to see the camera at `/dev/video0`. |
| 46 | + |
| 47 | +The demo assumes that your microphone is assigned to card 2 device 0. On Jetson platforms the first usb microphone is automatically assigned to card 2 device 0, however on the **non-yocto** rpi4 devices this is not the default for instance. To fix this you must create the file `/etc/modprobe.d/alsa-base.conf` with the contents: |
| 48 | +``` |
| 49 | +options snd_usb_audio index=2,3 |
| 50 | +options snd_usb_audio id="Mic1","Mic2" |
| 51 | +``` |
| 52 | + |
| 53 | +On the rpi4 with **Ubuntu**, you must also append the text `cgroup_memory=1 cgroup_enable=memory` to the file: |
| 54 | +``` |
| 55 | +- `/boot/firmware/nobtcmd.txt` if Ubuntu 19.10 |
| 56 | +- `/boot/firmware/cmdline.txt` if Ubuntu 20.04 |
| 57 | +``` |
| 58 | + |
| 59 | +Do not install docker using snap with **Ubuntu** instead install by running: |
| 60 | +```bash |
| 61 | +sudo apt update && sudo apt install docker.io |
| 62 | +``` |
| 63 | + |
| 64 | +Then reboot the system. |
| 65 | + |
| 66 | +If you are running on a **Xavier**(on the **non-yocto** build), **Xavier NX**, or a **Nano**, open the file `/etc/docker/daemon.json` on the device and ensure that the default runtime is set to nvidia. The file should look as follows: |
| 67 | +```bash |
| 68 | +{ |
| 69 | + "default-runtime": "nvidia", |
| 70 | + "runtimes": { |
| 71 | + "nvidia": { |
| 72 | + "path": "nvidia-container-runtime", |
| 73 | + "runtimeArgs": [] |
| 74 | + } |
| 75 | + } |
| 76 | +} |
| 77 | +``` |
| 78 | + |
| 79 | +For Single Tenant deployment instructions read [Here](./SingleTenantREADME.md) |
| 80 | + |
| 81 | +For Virtual Tenant deployment instructions read [Here](./VirtualTenantREADME.md) |
0 commit comments