- Testing Done:
-
~ Run against a Windows 10 virtual machine and a containerized teamcity server and I ended up getting all the way until a succesfully registered (but unauthorized) agent
~ Ran
teamcitry_simple_agent.yml
playbook against a Windows 10 virtual machine and a containerized teamcity server and I ended up getting all the way until a succesfully registered (but unauthorized) agent
Support installing a Windows based teamcity agent
Review Request #1008 — Created Oct. 8, 2021 and submitted
This will only cover what's needed to get a working teamcity agent and install MSYS2, but what we will not cover in this commit is getting all the necessary dependencies for building Pidgin in Windows This commit will also update the README to mention that installing the ansible collections we depend on is now necessary (this is our first use of ansible collection in this repo and it makes our life easier since it provides some handy modules for interacting with Windows)
Ran
teamcity_simple_agent.yml
playbook against a Windows 10 virtual machine and a containerized teamcity server and I ended up getting all the way until a succesfully registered (but unauthorized) agent
Summary | ID |
---|---|
d69475aa6c1da1d53d90e4d96b3e5cf8e021cfbf |
Description | From | Last Updated |
---|---|---|
This is set in the windows task but isn't templated. |
grim | |
I didn't think to ask before.. but does this install under msys, mingw32, or mingw64? Also, I don't see anything … |
grim | |
can you add comments on what these values are because have zero idea what PT5M and PT0S mean :-D |
grim | |
what is this needed for exactly? |
grim | |
Can we split out the python install and pip upgrade to it's own role and have the mercurial role depend … |
grim | |
pypa is just the organization, but we're just downloading from pypi right? |
grim | |
we still need to pip install --upgrade hg-evolve |
grim | |
pypi |
grim | |
Once python is it's own role, lets just install meson from there as well. |
grim | |
looks like you're skipping the gplugin support for other languages? That's fine, I just wanted to make sure that that … |
grim | |
this is the python role |
grim | |
pypi? |
grim | |
pypi? |
grim |
-
-
Okay so this is my take on the issue about adding ansible code to get a Windows based TeamCity agent.
Some things that I want to note:
- I tried my best not to touch ansible code that does not directly involve the Windows side of things, but in one or two places I thought it best to do so since it may avoid inconsistencies in the long run (e.g. in agent.yml we were configuring thebuildAgent.properties
file with its contents directly in the task and now I moved the contents into a separate jinja2 file inside the templates directory so that it can be reused by a similar task but for Windows)
- I'm still thinking if I can improve some of the names for the variables, suggestions are certainly welcome
- I'm in the process of reinstalling Windows from scratch and launching this playbook against it (I forgot to take a snapshot after a clean installation...) to make sure I haven't inadvertently changed something that makes the ansible code work there but won't in a clean install.
- Testing Done:
-
~ Ran
teamcitry_simple_agent.yml
playbook against a Windows 10 virtual machine and a containerized teamcity server and I ended up getting all the way until a succesfully registered (but unauthorized) agent~ Ran
teamcity_simple_agent.yml
playbook against a Windows 10 virtual machine and a containerized teamcity server and I ended up getting all the way until a succesfully registered (but unauthorized) agent
-
-
Overall looks pretty good. But I still want to go through an do another pass in bit.
One thing though, is that once we get the gtk4 transition done, we'll probably want to stop using msys2 as it'll just complicate things.
Also meson in msys2 right now fails on the pidgin3 builds because of a path discrepency relating to a python script we run during the build. We haven't spent much time investigating that, but seems like we probably should as this is nearing completetion.
-
- Change Summary:
-
- improve ways that we install packages by leveraging the
product_id
- ensure user profile directory exists (needed for auto lock)
- force stop agent when reinstalling (to avoid checking for when the process exits in case it has unfinished jobs)
- add note about
win_scheduled_task
module not being idempotent - add more regkeys that disable annoying stuff
- install spice guest tools if hypervisor is qemu/kvm
- improve ways that we install packages by leveraging the
- Commits:
-
Summary ID 5d362f4c121c35bf6157a3a57af18abc8c88f594 f228a58e77142205f982f4efa632dd9d592f2346
-
-
Okay so in my opinion rev2 seems to be in much better shape, I left a good summary of the changes I made in the rev change summary field.
I think this should work fine, I've tested it a few times in a clean Windows 10 VM and everything worked without issues (besides the annoying bug in
win_scheduled_task
that prevents it to be idempotent when you use a trigger of type logon and due to that that task is always marked as changed :( )I'd be happy if someone can take a look at this the way it is now and give me some feedback.
- Change Summary:
-
- Clarify use of ISO8601 duration representation in
win_scheduled_task
module - Explain why we need to mark the Red Hat publisher certificate as trusted when installing spice guest tools
- Clarify use of ISO8601 duration representation in
- Commits:
-
Summary ID f228a58e77142205f982f4efa632dd9d592f2346 8093fab6aab56527e4b1b2a00048ec1adbb20e7f
- Change Summary:
-
- install mercurial through official msi installer
- install evolve through Windows python
- add logic to only copy redhat certificate when it's not present in the certificate store
- Commits:
-
Summary ID 8093fab6aab56527e4b1b2a00048ec1adbb20e7f 49931b0077ff0149e877ad0ea18f3029cad8c67f
- Change Summary:
-
- moved python installation to its own role
- install meson and ninja through windows python instead of msys
- added pidgin3 build dependencies on windows, which are installed through msys
- fix minor bug with thumbprint detection of red hat publisher certificate
- Commits:
-
Summary ID 49931b0077ff0149e877ad0ea18f3029cad8c67f a914101fbe811adaea23b74d3e23821eb7d98568
- Change Summary:
-
- s/pypa/pypi
- remove comment about
python_install_path
variable being defined in the python role from the python role tasks file - add comment about
python_install_path
variable being defined in the python role in the mercurial windows tasks file
- Commits:
-
Summary ID a914101fbe811adaea23b74d3e23821eb7d98568 49e365b4f99ff4680af742bf7334b95f546a5905