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
feat: playbook to deploy the snowdrop-bot to k8s #173
feat: playbook to deploy the snowdrop-bot to k8s #173
Conversation
builds the application locally and deploys it to k8s
WDYT @jacobdotcosta |
No PV is being used currently, due to problems when starting the bot with the H2 database. I'll check the service and the ingress, how they have been deployed. |
The URL to obtain the tag from as well as the build reference folders were wrong and the project didn't build correctly
I've created snowdrop-bot issue 130 to create a database and have some persistency. |
|
||
This project consists of 2 playbooks: | ||
* [build](#build): builds the project | ||
* [deploy](#deploy): deploys the application to [quay.io](https://quay.io/) and restarts the k8s pod |
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.
We dont deploy the application but we push the image to the quay registry. Can you then rename deploy
to push
and do the same within the role/tasks ?
|
||
# Introduction | ||
|
||
Ansible playbook to deploy the `snowdrop-bot` into k8s using [quay.io](https://quay.io/) registry. |
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.
We dont deploy the application but the role defined part of this PR is about compile or package/build/push the image to the quay registry. Can you then review this description section please ?
This playbook deploys the `snowdrop-bot` by performing the following tasks: | ||
1. Create local image | ||
1. Push image to [quay.io](https://quay.io/) with 2 tags, one for the version and another for the `latest` | ||
1. Scale down and up again the pod (the pod must be deployed against the `latest` version) |
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.
I propose to move the last step described here into another section "Rollout" as what you describe concerns the process to push an image to quay registry and that you use instead the following command to
kubectl rollout restart -h
Restart a resource.
Resource will be rollout restarted.
Examples:
# Restart a deployment
kubectl rollout restart deployment/nginx
- name: "Scale down pod" | ||
shell: "{{ kube_cli_tool }} scale --replicas=0 deployment snowdrop-bot -n bot {{ kube_cfg_append }}" | ||
|
||
- name: "Wait 10 seconds" | ||
pause: | ||
seconds: 10 | ||
|
||
- name: "Scale up pod" |
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.
To be moved into another file rollout.yml
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.
To be renamed as the title to buikld-push.yml
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.
Changed the rollout tasks to a new playbook.
What do you mean with To be renamed as the title to buikld-push.yml
?
PR is still missing what I commented 13days ago ;-) |
I have reviewed the descriptors and this information is provided from the application itself in Since we don't have a testing environment I'd prefer leaving this playbook as is for now as it works to update the bot as create a new issue to implement this as a future improvement. WDYT @cmoulliard ? |
Ok. LGTM then |
Go ahead and merge it then |
Optionally builds the application locally, and deploys it to k8s. It uses buildah in the process.