cloud-init
cloud-init copied to clipboard
[enhancement]: Support passing assertions URL and/or store id
Enhancement
Currently the support for snap is very limited in 2.53 (link)
#cloud-config
snap:
assertions:
00: |
signed_assertion_blob_here
02: |
signed_assertion_blob_here
commands:
00: snap create-user --sudoer --known <snap-user>@mydomain.com
01: snap install canonical-livepatch
02: canonical-livepatch enable <AUTH_TOKEN>
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