-
Notifications
You must be signed in to change notification settings - Fork 259
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
docs(*): add SIP for spin deploy #304
Conversation
docs/content/sips/001-spin-deploy.md
Outdated
- Environment variable: HIPPO_URL | ||
- Flag: --hippo-url | ||
- Hippo authentication information | ||
- Environment variable: HIPPOTOKEN |
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.
HIPPO_TOKEN
?
docs/content/sips/001-spin-deploy.md
Outdated
|
||
A Spin application — (currently described as a spin.toml file) — is a collection of one or more components, each invoked as a result of an event generated by a trigger. The Spin CLI currently enables running a Spin application locally via the `spin up` command. The Spin CLI also offers a set of commands enabling users to package and push a Spin application to a [Bindle](https://github.com/deislabs/bindle) registry. | ||
|
||
[Hippo](https://github.com/deislabs/hippo) is a self-hosted, open source, Web Assembly PaaS that allows users to deploy and scale Web Assembly applications at scale. Hippo takes a reference to a bindle, deploys it to the cloud and makes it publicly available. Hippo currently only works with Wagi applications and can currently deploy Wagi applications on a Nomad cluster with Traefik for routing. Additionally, Hippo has a concept called “channels” enabling users to track different version categories of an application (ex. alpha, beta, stable, pre-releases, minor versions, etc.). |
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.
What channel will spin deploy
use? Does that need another option?
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.
By default, the channel will be named "spin-deploy" and yes we'll need another option for that. I'll add that to the doc!
docs/content/sips/001-spin-deploy.md
Outdated
- Hippo authentication information | ||
- Environment variable: HIPPOTOKEN | ||
- Flag: --hippo-token | ||
- _Note: currently the Hippo auth token expires in 30 minutes and there is no way to refresh the token. We may need to support basic auth in the first iteration as token support will require updates to Hippo._ |
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.
A refresh token API is expected to land the next Hippo release, so perhaps it'd be worth going through with implementing client token support. Implementing token refreshes would only be a few lines of code once 0.6.0 lands.
Have a look at hippo's UI for a good implementation of session management: https://github.com/deislabs/hippo/blob/main/src/Web/ClientApp/src/app/_services/session.service.ts
You could implement "forced login" from two directions:
- Implementing an HTTP interceptor, sniffing incoming responses from Hippo. If a 401 response is returned, ask the user to log back in.
- Check the token's expiry date before sending a request. If it has expired, force the user to log back in. Eventually, this could be replaced with the refresh token API.
If it helps, here's hippo-cli's client implementation: https://github.com/deislabs/hippo-cli/blob/main/src/hippo/client.rs
As of Hippo 0.6, the wagi runtime has been replaced with the Spin runtime. The Spin CLI plans to implement commands like `spin deploy` which will be used to package and distribute a Spin application to Hippo.[1] This change reduces the Hippo CLI to the bare minimum. The new role of the Hippo CLI is to implement all of the endpoints available through the hippo-openapi project. This is to help serve as a reference point for those looking to write their own Hippo clients against the hippo-openapi[2] project (like Spin), and it could also serve as a useful administrator tool looking to inspect and/or understand the Hippo API. [1]: fermyon/spin#304 [2]: https://github.com/fermyon/hippo-openapi Signed-off-by: Matthew Fisher <[email protected]>
As of Hippo 0.6, the wagi runtime has been replaced with the Spin runtime. The Spin CLI plans to implement commands like `spin deploy` which will be used to package and distribute a Spin application to Hippo.[1] This change reduces the Hippo CLI to the bare minimum. The new role of the Hippo CLI is to implement all of the endpoints available through the hippo-openapi project. This is to help serve as a reference point for those looking to write their own Hippo clients against the hippo-openapi[2] project (like Spin), and it could also serve as a useful administrator tool looking to inspect and/or understand the Hippo API. [1]: fermyon/spin#304 [2]: https://github.com/fermyon/hippo-openapi Signed-off-by: Matthew Fisher <[email protected]>
As of Hippo 0.6, the wagi runtime has been replaced with the Spin runtime. The Spin CLI plans to implement commands like `spin deploy` which will be used to package and distribute a Spin application to Hippo.[1] This change reduces the Hippo CLI to the bare minimum. The new role of the Hippo CLI is to implement all of the endpoints available through the hippo-openapi project. This is to help serve as a reference point for those looking to write their own Hippo clients against the hippo-openapi[2] project (like Spin), and it could also serve as a useful administrator tool looking to inspect and/or understand the Hippo API. [1]: fermyon/spin#304 [2]: https://github.com/fermyon/hippo-openapi Signed-off-by: Matthew Fisher <[email protected]>
Signed-off-by: Michelle Dhanani <[email protected]>
Signed-off-by: Michelle Dhanani <[email protected]>
|
||
A Spin application — (currently described as a spin.toml file) — is a collection of one or more components, each invoked as a result of an event generated by a trigger. The Spin CLI currently enables running a Spin application locally via the `spin up` command. The Spin CLI also offers a set of commands enabling users to package and push a Spin application to a [Bindle](https://github.com/deislabs/bindle) registry. | ||
|
||
[Hippo](https://github.com/deislabs/hippo) is a self-hosted, open source, Web Assembly PaaS that allows users to deploy and scale Web Assembly applications. Hippo takes a reference to a bindle, deploys it to the cloud and makes it publicly available. Hippo currently only works with Wagi applications and can currently deploy Wagi applications on a Nomad cluster with Traefik for routing. Additionally, Hippo has a concept called “channels” enabling users to track different version categories of an application (ex. alpha, beta, stable, pre-releases, minor versions, etc.). |
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.
Hippo currently only works with Wagi applications.
Hippo was recently updated — deislabs/hippo#580
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.
One small comment, but overall LGTM.
Thanks!
Is there anything else we need to address in this PR before merging? Thanks! |
As of Hippo 0.6, the wagi runtime has been replaced with the Spin runtime. The Spin CLI plans to implement commands like `spin deploy` which will be used to package and distribute a Spin application to Hippo.[1] This change reduces the Hippo CLI to the bare minimum. The new role of the Hippo CLI is to implement all of the endpoints available through the hippo-openapi project. This is to help serve as a reference point for those looking to write their own Hippo clients against the hippo-openapi[2] project (like Spin), and it could also serve as a useful administrator tool looking to inspect and/or understand the Hippo API. [1]: fermyon/spin#304 [2]: https://github.com/fermyon/hippo-openapi Signed-off-by: Matthew Fisher <[email protected]>
Signed-off-by: Michelle Dhanani [email protected]
TODO: update sip index once #202 is merged