New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(deploy): add spin deploy command #353
Conversation
d2abd3a
to
31a7504
Compare
This is an MVP for the spin deploy command. Given a bindle server url, hippo server url, and hippo username/password, this command will create (1) and push a bindle containing the app to the bindle server (2) a Hippo App with the name provided in the Spin.toml (3) a Hippo channel in the Hippo App called "spin-deploy" and create a post request to register a revision in Hippo. If an app with the same name already exists, this command will return an error. If a channel with the name spin-deploy exists, this will return an error. These errors will be handled more gracefully with prompts/helpful error messages in subsequent PRs. This commit it meant to lay the groundwork for the deploy command so folks can start playing with it and collect opinions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I deployed the Nomad infra, started Hippo, and got an application up and running!
The only thing not working was routing using the default local domain, but I suspect that's an issue with my setup.
Creating the application, channel, and starting it using Nomad worked for me (with the mention that if running IPv6, both Bindle and the Nomad job definition from Hippo need []
around the IP address — ref fermyon/nomad-local-demo#5).
(I have a few non-blocking comments related to error messages and default addresses).
I think this is in a great spot to be iterated on, LGTM.
* fix error message Signed-off-by: Michelle Dhanani <michelle@fermyon.com>
! |
This is an MVP for the spin deploy command. Given
a bindle server url, hippo server url, and hippo
username/password, this command will create
(1) and push a bindle containing the app to the bindle server
(2) a Hippo App with the name provided in the Spin.toml
(3) a Hippo channel in the Hippo App called "spin-deploy"
and create a post request to register a revision in Hippo.
If an app with the same name already exists, this command will
return an error. If a channel with the name spin-deploy exists,
this will return an error. These errors will be handled more
gracefully with prompts/helpful error messages in subsequent PRs.
This commit it meant to lay the groundwork for the deploy command
so folks can start playing with it and collect opinions.
To play with this command:
Infrastructure/Jobs/NomadJob.cs
, change the driver setting from "exec" to "raw_exec". Remove the artifact stanza so that Nomad uses your local Spin binary. Be sure to set the bindle url env variable given in the./run_servers.sh
outputspin deploy --bindle-server <bindle-url> --hippo-username <username> --hippo-password <password>