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

Provide Scaffolding/sdk for Go experiments #1466

Closed
rahulchheda opened this issue Apr 17, 2020 · 3 comments
Closed

Provide Scaffolding/sdk for Go experiments #1466

rahulchheda opened this issue Apr 17, 2020 · 3 comments
Assignees
Milestone

Comments

@rahulchheda
Copy link
Member

This issue is for tracking the creation of scaffolding for Go related experiments.

@rahulchheda
Copy link
Member Author

Some thoughts:
- Add a go get pkg
- Add fns in these for easy accessibility
- Functions should be such that, initExperiment, bussinessLogic, exitCriteria
- The output of these functions would be uploaded as the chaosResult verdict, reason or any other custom CR field, this would help us abstract our logic.

@ksatchit
Copy link
Member

ksatchit commented Apr 18, 2020

Just posting some discussion notes. Similar to @rahulchheda 's comment above:

What is litmus-go SDK?



User action: "go get github.com/litmuchaos/litmus-go"
User action : "litmus-go create-experiment --name=myapp-kill --attributes=attributes.yaml "
What it does:
          (a) Create folder called myapp/myapp-pod-kill

          (b) Create myapp-pod-kill.go, myapp-pre-health.go, myapp-post-health.go

          (c) litmus-go check (lint) (scorecard) myapp/myapp-pod-kill

          (d) litmus-go build myapp/myapp-pod-kill

          (e) Dockerfile with COPY of binary and any other essentials

          (f) Kubernetes Job template with above container

          (g) ChaosExperiment CR

@ksatchit
Copy link
Member

Introduced here: https://github.com/litmuschaos/litmus-go

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

No branches or pull requests

3 participants