canonical / canonical/multipass
Multipass snap: add a content interface to expose multipass binaries
- Dominant language
- C++
- Stars
- 9.2k
- Forks
- 828
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 44
Description
**What are you trying to do?**
[I'm trying to execute `multipass info`](https://forum.snapcraft.io/t/how-to-execute-an-external-binary-from-within-the-snap/48756) from within [another (strictly confined) snap](https://snapcraft.io/multipass-exporter).
**What's your proposed solution?**
[According to @ogra](https://forum.snapcraft.io/t/how-to-execute-an-external-binary-from-within-the-snap/48756/3?u=abuelodelanada):
> _"the only proper solution here would be if multipass exported all its binaries through a [content interface](https://snapcraft.io/docs/content-interface) that another snap could then consume"_
As far as I understand, multipass snap should add something like this:
```yaml
slots:
multipass_binary:
interface: content
content: multipass_binary
source:
read:
- $SNAP/bin/multipass
```
**Additional context**
I have initiated a small project named [`multipass-exporter`](https://github.com/Abuelodelanada/multipass-exporter) to expose Multipass' metrics in Prometheus format.
To create multipass metrics, the tool executes `multipass info`, but if the tool is packed in a strictly confined snap then it has no access to multipass binary.
Contributor guide
Research direction
Start with the Multipass snap's existing snap configuration and the Snapcraft content-interface documentation. Confirm which Multipass binaries must be exposed and how multipass-exporter would consume the slot; done means a strictly confined consumer can execute `multipass info` through the interface.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100