Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zero Touch Provisioning #155

Open
marcoherbst opened this issue Sep 12, 2023 · 4 comments
Open

Zero Touch Provisioning #155

marcoherbst opened this issue Sep 12, 2023 · 4 comments

Comments

@marcoherbst
Copy link
Member

marcoherbst commented Sep 12, 2023

A proposed workflow is something like:

  1. Burn SD card from standard image (using something like etcher.io or https://nerves-project.org/)
  2. Insert into device
  3. Device boots to SD
  4. Script calls preconfigured ExNVR Cloud Deployment Endpoint ( e.g. media.evercam.io/v2/ExNVR/Deploy ) and identifies itself with the device MAC (or other unique ID).
  5. API responds with a unique configuration (which can be pre-assigned or not).

I am proposing this as the most simple (from an Ops PoV) configuration workflow. i.e. burn SD, put SD in device.

Or look to something like this:
https://docs.aws.amazon.com/iot/latest/developerguide/jit-provisioning.html
https://aws.amazon.com/blogs/iot/setting-up-just-in-time-provisioning-with-aws-iot-core/
https://www.verytechnology.com/iot-insights/aws-iot-core-elixir-and-nerves-a-crash-course
https://fullsteamlabs.com/blog/workflows-for-elixir-nerves
https://github.com/nerves-hub/documentation/blob/main/nerves-key/provisioning-in-elixir.md

Possibly helpful:
https://github.com/nerves-project/boardid
https://github.com/mendersoftware

@marcoherbst marcoherbst changed the title Design an SD card image for zero touch deployment Design a zero touch deployment workflow (Burn SD Card, Boot Device, Relax). Sep 12, 2023
@marcoherbst marcoherbst changed the title Design a zero touch deployment workflow (Burn SD Card, Boot Device, Relax). Offer more installation options (ref: Livebook) Oct 7, 2023
@marcoherbst marcoherbst added this to the Backlog (Long Finger) milestone Nov 9, 2023
@marcoherbst marcoherbst changed the title Offer more installation options (ref: Livebook) A one touch provisioning system. Nov 9, 2023
@marcoherbst marcoherbst changed the title A one touch provisioning system. One Touch Provisioning Nov 9, 2023
@marcoherbst marcoherbst changed the title One Touch Provisioning Just in Time Provisioning May 29, 2024
@magixus
Copy link

magixus commented May 29, 2024

There is a simple way to do:

  1. Create a working version and save as *.img
  2. Use this image to burn all new MicroSDs. (dd if=*img of=/dev/new_sd)

The working version should have a service that check :

  1. Configure proxy and security policies.
  2. Auto mounting HDD
  3. Install a working ExNVR
  4. Communicate with Evercam API to inform existence
  5. Deploy grafana agent for monitoring
  6. Netbird checks (VPN checks in general)
  7. more ...

In case we update new things, we will update the *.img and sync changes will all EDGE devices via ansible.

There is another option. We can use Compute Provisioning system from Raspberry themselves

image

However this will take more time & efforts to achieve.

Cloning is the best (time & money) it reduce the burning phase, and setting up new system.

> I have done this in the UK and it worked from 7/8 RPIs. the one that didn't worked had different Architecture (aarch7)

@magixus
Copy link

magixus commented May 29, 2024

I have created an API before to call for new NXW provisioning. some work has been done here : I remember shifting this to github but don't remember where. I'll find out

@marcoherbst marcoherbst changed the title Just in Time Provisioning Zero Touch Provisioning Jul 10, 2024
@marcoherbst
Copy link
Member Author

Just to keep this fresh, Riadh gave a summary of what today the steps are to configure a new kit from a fresh router + pi (with PiOS):

  1. Add the router into RMS
  2. Upgrade the FW (& erasing the old settings)
  3. Pushing the configs into the router
  4. Creating the camera in Admin (based on the info from CRM)
  5. Accessing the Pi, & getting it an update and full upgrade
  6. Configuring the Pi (HDD formatting, mount point, IP setting...)
  7. Installing Exnvr from AWX (after adding the host details...)
  8. Getting the camera into the router network and configuring it
  9. Adding the camera into ExNVR
  10. Final checks (cam recording, Exnvr recording, admin info all added, relay or output checking ...)

@magixus
Copy link

magixus commented Jul 10, 2024

We are having this discussion here as well https://docs.google.com/spreadsheets/d/1PHp8Cs2poTjnuT28hTr8NDYFLAw9eD2yUXQojP6sxTY/edit?gid=1115603320#gid=1115603320

@marcoherbst marcoherbst removed this from the Backlog (Long Finger) milestone Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants