# Hacky Implicit Provisioning version 2

This document describes a quick hack to test the implicit provisioning flow as it currently works in aktualizr before full support is available in meta-updater and on the server.

## Goals

* end-to-end installation of updates using OSTree

## Steps

1. Edit `recipes-sota/aktualizr/files/sota_autoprov.toml` in meta-updater:
* Remove the `provision_path` line.
* Add a line in the `[tls]` section with `server = "https://..."`. Use the URL from your account's credentials.zip file.
1. Edit `recipes-sota/aktualizr/aktualizr_git.bb` in meta-updater:
* Change aktualizr `SRC_URI` to `git://github.com/advancedtelematic/aktualizr;branch=bugfix/cert_prov_install`.
* Change `SRCREV` to `13828774baa5a7369e6f5ca552b879ad1ce773d5`.
* Increment `PR`.
1. Build a standard image using bitbake. Make sure to set `SOTA_PACKED_CREDENTIALS` like normal.
1. Boot the image.
1. Optionally, verify that aktualizr is not provisioning. Make sure the device is not visible in the Garage.
1. Run `cert_provider` from the aktualizr repo: `cert_provider -c credentials.zip -t <device>`
1. Verify that aktualizr provisions correctly with the server using the device_id generated by `cert_provider`.

# Hacky Implicit Provisioning version 2

This document describes a quick hack to test the implicit provisioning flow as it currently works in aktualizr before full support is available in meta-updater and on the server.

## Goals

* end-to-end installation of updates using OSTree

## Steps

1. Edit `recipes-sota/aktualizr/files/sota_autoprov.toml` in meta-updater:
* Remove the `provision_path` line.
* Add a line in the `[tls]` section with `server = "https://..."`. Use the URL from your account's credentials.zip file.
1. Edit `recipes-sota/aktualizr/aktualizr_git.bb` in meta-updater:
* Change `SRCREV` to `1c635c67d70cf38d2c841d449e750f08855e41a4`.
* Increment `PR`.
1. Build a standard image using bitbake. Make sure to set `SOTA_PACKED_CREDENTIALS` like normal.
1. Boot the image.
1. Optionally, verify that aktualizr is not provisioning. Make sure the device is not visible in the Garage.
1. Run `cert_provider` from the aktualizr repo: `cert_provider -c credentials.zip -t <device>`
1. Verify that aktualizr provisions correctly with the server using the device_id generated by `cert_provider`.

## Known Issues

At this time, although the device will be shown in the Garage, its installed package will not be.

Use latest version of aktualizr. Add known issue.
Use latest version of aktualizr. Add known issue.
