-
Notifications
You must be signed in to change notification settings - Fork 9
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
bee-hive in kubernetes #163
Conversation
Signed-off-by: Akihiko Kuroda <[email protected]>
Local |
@psschwei They are using same local port number. You may need to stop the docker container first. |
Kubernetes is failing for me with an "unable to create agents" error. Partial stack trace
|
I wonder if the problem is my Kubernetes not being able to talk to the bee-stack 🤔 ... (I'm using kind) |
@psschwei Does the deployment get the correct environment variables? |
Thank you so much for this @akihikokuroda and will spend some time on this but don't let me slow you down @psschwei is reviewing and if he reaches LGTM before I get to review then push forward and merge and I will catch up. This is v1 of a very important feature. どうもありがとうございます |
@psschwei I tried with kind and it is working. I changed the bee-hive.yaml at the last minutes. You might not pick up the change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome! I was able to run without issue.
I have one minor comment on the readme (which could be fixed now or in a followon PR), but otherwise LGTM
* Deploy bee-hive: `./bee-hive.sh deploy BEE_API=http://xxx.xxx.xxx.xxx:4000 BEE_API_KEY=sk-proj-testkey` | ||
* To deploy to kubernetes cluster, user `deploy-k` instead `deploy` as the first argument |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: let's make two sections for the deploy, one for docker and one for kubernetes. that would also allow for including some kubernetes-specific instructions:
- to load the image into the cluster
- to port-forward the bee-hive service, if necessary
since both of those will differ depending on the k8s used (rancher, kind, etc.), I don't think we need to include specific instructions, but we should mention that the steps are needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@psschwei Thanks! I'll create another PR for the readme update!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to merge when you're ready (or if you want to wait to see if anyone has comments that's cool too)
This PR makes Bee-hive deployable and accessible in kubernetes.
A small API is added bee-hive image. It accepts request with 2 yaml files and runs workflow.
This PR has kubernetes deployment and service (it's using a NodePort right now) yaml files. The can be deployed with the kubectl. The bee-hive with container runtime is also adjusted to use the API instead of mounting the local file system.
The bee-hive.sh has 4 commands (the first argument)
Run workflow in local environment with container runtime (e.g. podman) or kubernetes cluster
Prepare required environments
curl
is required forrun
commandkubectl
andsed
are requiredBuild bee-hive container image:
./bee-hive.sh build
in bee-hive/bee-hive directoryDeploy bee-hive:
./bee-hive.sh deploy BEE_API=http://xxx.xxx.xxx.xxx:4000 BEE_API_KEY=sk-proj-testkey
deploy-k
insteaddeploy
as the first argumentBEE_API=http://192.168.86.45:4000
).Prepare agent and workflow definition yaml files in the current directory (e.g. agent.yaml, workflow.yaml)
Run workflow:
./bee-hive.sh run agents.yaml workflow.yaml