Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

chore: add K8s Helm charts + DO K8s cluster terraform files #71

Merged

Conversation

smoya
Copy link
Collaborator

@smoya smoya commented Oct 27, 2021

Description

This PR adds:

  • Terraform files for generating a K8s cluster on Digital Ocean. The name of the cluster is asyncapi-demo by default, since I think we could use it for any demo services we want to quickly deploy, not only event-gateway-demo.
  • Two Helm charts:
    • asyncapi-event-gateway, which can be used by any user in order to install the Event-Gateway on your own K8s Cluster.
    • event-gateway-demo, which just uses asyncapi-event-gateway chart in order to deploy it into Digital Ocean using our own asyncapi file and custom configuration (Aiven kafka servers, etc).

Related issue(s)
This is almost closing #23. We are pending from Digital Ocean to give us some budget.

@magicmatatjahu
Copy link
Collaborator

Helm Chart, we meet again...

image

@smoya
Copy link
Collaborator Author

smoya commented Oct 27, 2021

Helm Chart, we meet again...

image

Fear is the path to the Dark Side. Fear leads to anger, anger leads to hate, hate leads to suffering.

The good point of the Dark Side is that they have good cookies.

Please join me reviewing Helm charts. Accept your destiny.

livenessProbe:
httpGet:
path: /
port: http

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would there be benefit in having a liveness script that hits /ws to see if it's returning a 101 status code? That might be a better indication. I think wget might be in the Docker image already, and I'm sure that can be leveraged.

Copy link

@kevinswiber kevinswiber Nov 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think curl is in the image, as well. I just put together a basic example of how this might work.

The config would have to change to something like:

    livenessProbe:
      exec:
        command:
          - /go/websocket_handshake_probe.sh http://localhost:5000/ws

See: https://gist.github.com/kevinswiber/a0fd2d9e8b327d6b8f9a5a7bfa097085

Copy link
Collaborator Author

@smoya smoya Nov 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kevinswiber It is a really good suggestion. However, the right combo to add would be all Kafka TCP ports + the websocket port.
The HTTP port here is just a simple 200 OK handler in the app.
I think it would be cool if we modify your script to also check Kafka TCP ports (ideally, sending a Metadata Request through nc or kcat, in the worst case, just a simple nc connection test).

WDYT about me opening a follow up issue so we can work on it later on?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created such issue so we can work on it later #77

@smoya smoya merged commit 45a9cd8 into asyncapi-archived-repos:master Nov 22, 2021
@smoya smoya deleted the chore/event-gateway-deploy branch November 22, 2021 12:01
@asyncapi-bot
Copy link
Contributor

🎉 This PR is included in version 0.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants