Code Monkey home page Code Monkey logo

Comments (15)

 avatar commented on May 28, 2024

As per documentation, st2chatops can work in HA as a shared component. Trying to the best way to accomplish that, How valid is following a scenario?

  1. Deploy native st2chatops container found here to the cluster.
  2. Setup environment variable st2chatops to communicate with st2.

Any feedback on the feasibility of this approach and/or whether this can be considered as a viable chatops addition to Stackstorm HA. If we have a positive answer for the above, the next stop is how we can automate this flow using the existing chart to include chatops as well.

from stackstorm-k8s.

afoninsky avatar afoninsky commented on May 28, 2024

https://github.com/afoninsky/stackstorm-chatops-playground

I played with implementing chatops into existing stackstorm kubernetes instance with additional telegram adapter.
As I remember everything worked fine. But can't promise it works for now. Could be a good point to start.

from stackstorm-k8s.

arm4b avatar arm4b commented on May 28, 2024

@mosn st2chatops (which relies on hubot) is currently not HA-friendly.

See:

What we want to do is just having 1 normally installed instance of st2chatops to have minimal functionality present in K8s deployment.

from stackstorm-k8s.

arm4b avatar arm4b commented on May 28, 2024

As for implementation, ideally to start with defining a Dockerfile for st2chatops here: https://github.com/stackstorm/st2-dockerfiles so we can proceed with deploying it to Docker Hub (https://hub.docker.com/u/stackstorm).

st2chatops configuration could be controlled by passing ENV variables to override defaults from https://github.com/StackStorm/st2chatops/blob/master/st2chatops.env.

Once that's done next step would be creating a K8s resource for st2chatops as well as corresponding Helm values for stackstorm-ha (this repo).

We're definitely very open to contributions and happy if someone can work on that before we'll reach this task ourselves πŸ‘ We'll provide feedback & help along the way.

from stackstorm-k8s.

 avatar commented on May 28, 2024

My approach so far and possibly calls for comments:

  • using docker-in-docker, I pull st2chatops to build a new image based on the value provider in values.yaml. This should leave room for further expansion through st2chatops and prevents duplications.

  • I decided on taking the standalone approach, rather than combining it with the st2 container. This was one of the pain points I felt first hand after using chatops in production.

My next step:

  • I see st2chatops as a component similar to st2web. I assume my next step is to look at how st2web is linked to the components it communicates with and replicates that for st2chatops

Things I still haven't figured out:

  • Whether to expose st2chatops through using ingress or having a loadbalancer with the goal of total isolation.

from stackstorm-k8s.

arm4b avatar arm4b commented on May 28, 2024

@mosn
st2chatops is designed to work in standalone mode. That sounds about right if you install only that package without st2. I don't think service/load-balancer is needed for st2chatops as it just connects to ST2 via APIs.

I think docker-in-docker and building st2chatops Docker image every time on startup (if I understand you correctly) sounds like overcomplication and goes against the immutable approach where result can vary depending on build results.

Ideally is to build and deploy produced st2chatops image to some Docker repository and refer to it in K8s deployment. Passing Hubot adapter & settings via ENV variables like it happens https://github.com/StackStorm/st2chatops/blob/master/st2chatops.env should be good enough.

At this point if you want, you can contribute your st2chatops Dockerfile to: https://github.com/stackstorm/st2-dockerfiles so we can review, provide feedback, merge and potentially start building & shipping it to Docker Hub.

from stackstorm-k8s.

 avatar commented on May 28, 2024

@armab Thanks for the info. I will publish my changes as soon as I have it in good shape. I hope the community finds useful.
re. building the image every time, our st2chatop has lots of custom components that we need in our use case. Custom images are needed in our case but definitely not a common one. |

from stackstorm-k8s.

arm4b avatar arm4b commented on May 28, 2024

@mosn Got it.
So in future when we'll have official st2chatops image, you could use FROM stackstorm/st2chatops to build your modified Docker image on top of that + deploy it.
That also means it will be a good idea for us to allow pointing to custom chatops Docker image in Helm values, similar as st2packs:
https://github.com/StackStorm/stackstorm-ha/blob/f7498be460bfc3df50aab75318b1af8f7c05350c/values.yaml#L78-L87

from stackstorm-k8s.

 avatar commented on May 28, 2024

Is there a chatops branch where we can submit progression on this?
There's an example here which is what we tried in our testing. We choose the st2chatops docker for faster integration. You can see the change to the template hte here;

from stackstorm-k8s.

 avatar commented on May 28, 2024

I faced following questions while working on this

  • Should chatops component work as as separate container or Integrated inside the StackStorm as we know it? a good example of this can be seen in custom_pack implementation.
  • Packaged distributions or ready container: st2chaops package distribution offers an easy to integrate solutions and reduces deployment step but is more error prone to customization in this environment; On the other hand, building from dockers can take time and is not as straight forward but offers better customization.
  • values.yaml file: There are a lot of parameters that users need/do not need to watch out for which will impact user experience and ease of use- current values.yaml fine is one of the cleanest I've ever seen. I hope it remains like that post chatops integration :-)

from stackstorm-k8s.

arm4b avatar arm4b commented on May 28, 2024

@mosn Sure, as you already created a Github fork with custom changes, just fill a "Work in Progress" Pull Request against our stackstorm/stackstorm-ha repository and we'll provide feedback/help there.

from stackstorm-k8s.

 avatar commented on May 28, 2024

@armab I'd like to take a few moments to reflect on our current progress.
#55 received good feedback that I can use to proceed with the rest of the template files. I am also testing the implementation in my setup internally with no issues.

st2-dockerfiles # 19 I am blocked here and I would like to hand it over to someone with more experience than me to handle this part. There are lot's of questions but I am sure those are because of my lack of experience in this field and if someone with the right set of skills joins us, we'll have it ready in no time. never too late for Docker 101. Currently builds but not ready since I need to remove the .env file in light of #120

Is anyone interested? you are more than welcome to join. If you have questions about the current stage, I'd be happy to answer any questions.

from stackstorm-k8s.

arm4b avatar arm4b commented on May 28, 2024

@mosn Based on latest commits, that's a good progress towards official st2chatops implementation in K8s/Helm.

We can return anytime to it as you wish and there is no rush. Someone else could fork it and work further or just provide comments/ideas. Additionally, with time we, per our plans can finally hit this task and commit directly to your branch/fork. The bootstrap you did in that PR is already very helpful.

Overall I think it's all good work and valuable, thank you for doing this πŸ‘
We can collectively move that into a good state earlier or later.

from stackstorm-k8s.

 avatar commented on May 28, 2024

from stackstorm-k8s.

 avatar commented on May 28, 2024

@mosn Based on latest commits, that's good progress towards official st2chatops implementation in K8s/Helm.

We can return anytime to it as you wish and there is no rush. Someone else could fork it and work further or just provide comments/ideas. Additionally, with time we, per our plans can finally hit this task and commit directly to your branch/fork. The bootstrap you did in that PR is already very helpful.

Overall I think it's all good work and valuable, thank you for doing this πŸ‘
We can collectively move that into a good state earlier or later.

Absolutely! I'll try to open source as much as I can on our implementation but I am experimenting with Terraform to see if that can make it bit uncluttered for us.
I was working on #6 with auto-DNS and cert-manager but really I still find myself wondering if there's anything to add to help unclutter things. It all boils down on the scale and who StackStrom is good for. a well-automized cluster can really contribute to that image but that's a huge challenge that's not easy to overlook.

from stackstorm-k8s.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.