carbon-aware-sdk
carbon-aware-sdk copied to clipboard
Add example for 'podman play kube'
Pull Request
Summary
I'd like to propose to add example for CASDK demonstration.
This example provides both the SDK and Swagger UI with just one command. Thus demonstrator does not need to prepare each components for WebAPI. I used this in GSF Meetup Tokyo, then it works fine!
This example would use CASDK WebAPI container image tagged pre from GitHub Packages.
Changes
- samples/casdk-demo (new)
Checklist
- [ ] Local Tests Passing?
- [ ] CICD and Pipeline Tests Passing?
- [ ] Added any new Tests?
- [x] Documentation Updates Made?
- [ ] Are there any API Changes? If yes, please describe below.
- [x] This is not a breaking change. If it is, please describe it below.
Are there API Changes?
No
Is this a breaking change?
No
Please follow GitHub's suggested syntax to link Pull Requests to Issues via keywords
This PR Closes #<issue_number>
This a stale pull request. Please review, update or/and close as necessary.
I'd like to contribute this example because this manifest would be useful to demonstrate the SDK with just single command on Linux box.
@Willmish or @danuw would be great to get your review on this one
I think @Willmish already has podman but otherwise happy to install next week and review.
@Willmish assigned this to you for now as I know you have podman and can probably review this quickly... let me know otherwise
#417 @Willmish to look at for next week
@Willmish any news please?
@YaSuenag let me know if you have a few minutes to go over this at some point. Also, ideally make the update so we have a settings template that does not get tracked.
@danuw FYI @YaSuenag cannot see your comments, so is unable to review. @danuw please resubmit your comments to unblock review
Thanks @danuw for your comment! I updated this PR.
- This PR is no longer to have
casdk-config.yaml- it would be auto-generated from environment variables. See updated README: https://github.com/YaSuenag/carbon-aware-sdk/tree/podman-example/samples/casdk-demo#example - The error what you saw might be caused by SELinux. I added
demo.shto start/stop the demonstration - it would work whether SELinux is enabled or not. Can you test./demo.sh startto run?- You can stop via
./demo.sh stop. See README.md for details.
- You can stop via
This PR have to be aware of exposed port from Web API. So I want to tweak this PR after .NET 8 migration.
This PR is blocked by #489 - we need to fix port number of WebAPI container after #489.
I updated this PR to refer new (.NET 8 migrated) pre WebAPI container. Please review! @danuw @Willmish
It works on my environment:
Fedora 40
Ubuntu 24.04 (WSL2)
I also tried. It worked as expected in my environment.