canonical / canonical/cloud-init
[enhancement]: Support passing assertions URL and/or store id
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 18
Description
# Enhancement
Currently the support for snap is very limited in 2.53 ([link](https://cloudinit.readthedocs.io/en/stable/reference/yaml_examples/snap.html))
```
#cloud-config
snap:
assertions:
00: |
signed_assertion_blob_here
02: |
signed_assertion_blob_here
commands:
00: snap create-user --sudoer --known @mydomain.com
01: snap install canonical-livepatch
02: canonical-livepatch enable
```
Normally would be safer to just pass assertions url of snap-store-proxy for for airgapped environment
Currently I use this
```
#cloud-config
snap:
commands:
00: bash -c 'snap ack <(curl -s https://snap-store-proxy.local/v2/auth/store/assertions
)'
01: snap set core proxy.store=\$(curl -s https://snap-store-proxy.local/v2/auth/store/assertions
|grep "^store:"| cut -f2 -d" ")
````
and that works by the way, as in my case the certificate for snap-store-proxy is signed by global authority (SectiGo). In other case we would need set also CA certificate.
When that is implemented the MAAS could implement setting snap-store-proxy easily for newly deployed airgapped nodes
Contributor guide
Assessment
This issue has not been assessed yet.