Skip to content
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

Spin Operator Dapr Tutorial #29

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Spin Operator Dapr Tutorial #29

wants to merge 8 commits into from

Conversation

tpmccallum
Copy link
Contributor

@tpmccallum tpmccallum commented Feb 28, 2024

This is a draft and it is highly likely that most of the original information in this file will need updating.
This tutorial will also need to be tested from start to finish once written up.

Fixes #30

Signed-off-by: tpmccallum tim.mccallum@fermyon.com

@bacongobbler
Copy link
Contributor

bacongobbler commented Feb 28, 2024

I fixed a few things while going through the tutorial.

One question I had occurred after running the tutorial. After the user has installed dapr-shared, how do they validate that the sample app has access to the dapr APIs? The tutorial uses the "simple" sample app, which IIRC just prints "Hello, World!" when an HTTP trigger is executed. Shouldn't the tutorial use an application that makes use of dapr APIs?

@jpflueger do you know of any Spin apps that demonstrate the usage of dapr APIs? If not, could you point me in the right direction?

@jpflueger
Copy link

@bacongobbler there is a usage in ZEISS/enterprise-wasm where they publish to a queue using an outgoing http request. @radu-matei also has a dapr-samples repo that may be of use.

@tpmccallum tpmccallum changed the title Draft: Spin Operator Dapr Tutorial Spin Operator Dapr Tutorial Mar 4, 2024
@bacongobbler
Copy link
Contributor

bacongobbler commented Mar 4, 2024

Okay. Both of the examples you shared require variable support. The tutorial should be updated to use a sample app using variables. e.g. https://github.com/spinkube/spin-operator/blob/main/config/samples/variables.yaml

tpmccallum and others added 4 commits March 5, 2024 14:43
Signed-off-by: tpmccallum tim.mccallum@fermyon.com
Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
@bacongobbler
Copy link
Contributor

Thanks to a community blog post, I was able to get a Spin app running with Dapr.

I modified the docs to refer to this sample application. I assume we want to point to something from within the SpinKube organization. @radu-matei is there an OCI image out there for your pubsub app, or is ThangChung's sample app acceptable enough to use in the docs? I'm having a tough time finding an official dapr app written in Spin.

@bacongobbler
Copy link
Contributor

The original commit also referred to Dapr Shared. @tpmccallum mentioned this was a concept we wanted to ideally show to the end user. This is not a technology I'm familiar with. I'm asking for help because I can't find any examples out there that show a Spin app with Dapr Shared. What do I need to change to make a "dapr-enabled" Spin app use Dapr Shared?

@tpmccallum
Copy link
Contributor Author

Hi @bacongobbler
I was thinking about re-creating what @radu-matei has created from scratch, but I feel that would make the tutorial too long (and some of it would be out of scope for Dapr Shared specifically, e.g., variables, etc.).
Instead, I do like your question above (to @radu-matei) that asks if there is an OCI image for the pubsub app.
If we were able to publish to a Fermyon org account, I think that would be ideal (rather than using personal accounts in the URLs).

Signed-off-by: tpmccallum tim.mccallum@fermyon.com

Signed-off-by: Timothy McCallum <tim.mccallum@fermyon.com>
Signed-off-by: tpmccallum tim.mccallum@fermyon.com

Signed-off-by: Timothy McCallum <tim.mccallum@fermyon.com>
@thangchung
Copy link

That was cool when I found the tutorial for running spinkube with dapr here. I'm working on upgrading the coffeeshop apps into spinkube now.

Signed-off-by: Matthew Fisher <matt.fisher@fermyon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create running Spin Operator with Dapr tutorial
4 participants