-
Notifications
You must be signed in to change notification settings - Fork 185
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
Refactor Ant deployment #9049
Refactor Ant deployment #9049
Conversation
👋 Hello! Thanks for contributing to our project. If you are unsure the failing tests are related to your code, you can check the "reference jobs". These are jobs that run on a scheduled time with code from master. If they fail for the same reason as your build, it means the tests or the infrastructure are broken. If they do not fail, but yours do, it means it is related to your code. Reference tests: KNOWN ISSUES Sometimes the build can fail when pulling new jar files from download.opensuse.org . This is a known limitation. Given this happens rarely, when it does, all you need to do is rerun the test. Sorry for the inconvenience. For more tips on troubleshooting, see the troubleshooting guide. Happy hacking! |
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.
Thanks a lot for taking the time to improve this, this is a great upgrade and both me and Richa will use this daily. I've tested all the configurations that I would like to use this in and it works great.
For context for others reviewers, this change set unlocks deploying to all sorts of remote hosts easily, including when you're running your containers in a VM. This simplifies our day-to-day workflow tremendously, so I hope we can get this merged as soon as the branch is unlocked.
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.
LGTM. I have tested a few, and it looks great to me :)
thanks for this change
3ed3d5b
to
67568af
Compare
I have testing this in a remote container (w/podman) setup. I like it way better. Specially for not having to deal with podman remote. Thanks! |
yeah! podman remote looks cool on paper, but the SSH part of it is very fragile |
67568af
to
9b27af5
Compare
@cbbayburt Seems like the enhanced changelog validation ignores the no changelog needed flag. |
|
Yes, I'll merge a few fixes tomorrow. Thanks for the heads up. |
What does this PR change?
This PR refactors the ant script for improving the deployment process. Instead of having separate multiple tasks for deploying inside or outside the container, this change introduces a new property
deploy.mode
which specify how the process is performed and can have the following values:local
, the deployment is done by copying the files in the same machine where the repository livesremote
, the deployment is done on the remote machine defined bydeploy.host
. The copying is done by opening an SSH tunnel to the machine and transferring the datacontainer
, the deployment is performed to a containerized server usingmgrctl
. The container can be locally installed or remote depending by the backend used bymgrctl
which can be explicitly set by using the propertycontainer.backend
remote-container
, the deployment is done on the remote machine defined bydeploy.host
. After establishing an SSH connection,mgrctl
is used to deploy on a containerized server. This mode allows to deploy to containerized server, without needingmgrctl
installedAfter setting the
deploy.mode
and thedeploy.host
if needed, just call thedeploy
task. The following tasks have been updated to reflect the logic change:deploy
deploy-static-resources
deploy-salt-files
restart-tomcat
restart-taskomatic
Please note that, currently, this change is not backward compatible, as I removed the tasks
*-container
tasks and thedeploy-local
task. Backwards compatibility could be achieved though, by restoring the deleted tasks, setting the property accordingly then calling the new task . I could even add these task along side the others, to keep them both for a "grace" period to test it more throughlly.Examples
mgrctl
(which needs to be installed):mgrctl
(no need to have mgrctl install on the development machine):GUI diff
No difference.
Documentation
No documentation needed, since it's a development only change but once merged, the wiki needs to be updated
DONE
Test coverage
No tests: no code change
DONE
Changelogs
Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository
If you don't need a changelog check, please mark this checkbox:
If you uncheck the checkbox after the PR is created, you will need to re-run
changelog_test
(see below)Re-run a test
If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:
Before you merge
Check How to branch and merge properly!