openfaas / faas-cli

Official CLI for OpenFaaS
https://www.openfaas.com/
Other
794 stars 226 forks source link

Snap Package Support (Feature Request) #569

Open mikeroyal opened 5 years ago

mikeroyal commented 5 years ago

I was thinking in the install and setup could be improved for Ubuntu and other Linux distros by having a snap package version. If it's not a priority would you mind if I made the snap?

Crafting your first snap

Build and test snap

Getting Started snap template

burtonr commented 5 years ago

Hey @mikeroyal Although I personally use Ubuntu (and snaps) primarily, this isn't a priority for the project.

The challenge is in maintaining the versions with releases.

We currently only officially support brew installer on MacOS as that is the primary platform for our users. Even that can be a challenge to keep up with the changes.

If you could propose a way that the maintenance of the snap would be automated, and reliable, it may be something that could be considered. However, as of right now, I don't think this will come to fruition.

I don't mean to knock your idea. I do like the idea, it's just difficult to keep up with multiple installers in the long term...

alexellis commented 5 years ago

Thanks for sharing your thoughts Burton.

@mikeroyal

Thanks for sharing your suggestion and for taking an interest in OpenFaaS. I'd like to see what the snap looks like and to understand what the maintenance effort would be like for the project. It sounds like you have bandwidth to put together a snap and I'd be interested to find out more.

On a related note, have you worked much with microk8s and do you know if that supports "add-ons"?

Alex

alexellis commented 5 years ago

Derek add label: proposal

mikeroyal commented 5 years ago

@alexellis, Yes, here are the docs if you want to read more in-depth. https://microk8s.io/docs/

List of available addons

dns: Deploy kube dns. This addon may be required by others thus we recommend you always enable it.

dashboard: Deploy kubernetes dashboard as well as grafana and influxdb. To access grafana point your browser to the url reported by microk8s.kubectl cluster-info.

storage: Create a default storage class. This storage class makes use of the hostpath-provisioner pointing to a directory on the host. Persistent volumes are created under ${SNAP_COMMON}/default-storage. Upon disabling this addon you will be asked if you want to delete the persistent volumes created.

ingress: Create an ingress controller.

gpu: Expose GPU(s) to MicroK8s by enabling the nvidia-docker runtime and nvidia-device-plugin-daemonset. Requires NVIDIA drivers to already be installed on the host system.

istio: Deploy the core Istio services. You can use the microk8s.istioctl command to manage your deployments.

registry: Deploy a docker private registry and expose it on localhost:32000. The storage addon will be enabled as part of this addon. To use the registry you can use the microk8s.docker command.

metrics-server: Deploy the Metrics Server.

alexellis commented 5 years ago

Thanks so much for the info. Do you want to join Slack to talk more? https://docs.openfaas.com/community/

How do we go about writing a test snap for this?

Alex

alexellis commented 5 years ago

@mikeroyal

mikeroyal commented 5 years ago

Hi @alexellis, Sorry it took me a while to see your notification been busy. Anyways here's small repo I made for the snap. https://github.com/mikeroyal/faas-cli-snap

All that's left for me to do is finish up the snapcraft.yaml config file to make sure all plugins and dependencies are setup properly to build the application.

Roadmaster commented 4 years ago

@mikeroyal hello there,

You currently own the faas-cli snap name, but we (the Snap Store team) received a request from the openfaas project to get ownership of the name. I wonder if you could confirm whether you agree with this in general (@alexellis is the requester).

I will also need to email you privately to confirm (as I can't verify your Snap Store email address matches your github identity) but it'll speed things up if you and @alexellis decide here whether it's OK to do the transfer.

mikeroyal commented 4 years ago

Yeah, that's fine @Roadmaster

alexellis commented 4 years ago

Thank you both 👍

alexellis commented 4 years ago

Hi @mikeroyal I can see some releases and snapshots, we'd assumed there was no package and started work on this to resolve, but it looks like you had something up.

In the dashboard I see this error though

Screenshot 2020-01-15 at 22 30 41
Roadmaster commented 4 years ago

The above is because Mike's snap uses the docker interface which needs to be explicitly approved (you can request it in the forum: https://forum.snapcraft.io/c/store-requests.

Alternatively, if you make it so that the snap doesn't require use of docker, it would likely pass the automatic review process.