-
-
Notifications
You must be signed in to change notification settings - Fork 101
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
New Machine requirement: Windows dockerBuild containers #3286
Comments
Please, assign this task to me. Thank you. |
Of the three options listed on the Microsoft website:
|
OK First phase done ...
This allows the machine to be accessible via ansible running on a remote machine :-) (Also, for my own notes, to debug powershell scripts use |
Playbook execution notes:
|
ansible can be run on the host to point at the container if you install cygwin which has infrastructure/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/logs/tasks/main.yml Line 14 in 4aa7788
Noting that WSL could probably be used too, but that requires a system with virtualization extension instructions to be available which is not the case on all systems. |
Latest attempt is with:
After ansible run is complete, run the commands shown in this article
After which it can be started again and used |
EDIT: This seems to be the temporary location where it is storing the entire image before it is committed and the machine ran out of space. Noting that outside that directory most of the docker data is stored in EDIT 2: The It did, however, hit an error |
This is unfortunate. The builds aren't working because it looks like the automatic shortname generation ( EDIT: Noting that https://github.com/adoptium/infrastructure/blob/master/ansible/playbooks/AdoptOpenJDK_Windows_Playbook/roles/shortNames/tasks/main.yml already has some explicit short name creation. |
Manually created a few of the shortnames that the configure step was objecting to and I have a JDK21u build complete in a container, so this seems feasible 👍🏻 |
Noting that we should look at doing this with the MS build tools installer which is suitable for use by Open Source projects. The jdk21u builds currently use:
Other references (this numbering is more confiusing that I realised - I thought we only had the '2022' vs '19.xx' versioning differences to worry about before today...)
|
Noting that we should look at doing this with the MS build tools installer which is suitable for use by Open Source projects. The jdk21u builds currently use:
Other references (this numbering is more confiusing that I realised - I thought we only had the '2022' vs '19.xx' versioning differences to worry about before today...)
|
Struggling with the GPG role at the moment which is called during the ANT role (I'm getting Other than that a two-phase dockerfile is looking quite promising. The first sets up WinRM (will only be invoked locally) and installs cygwin with git and ansible, then triggers a reboot to ensure the cygwin path takes effect. The second runs the playbooks as normal, although for now I've currently it running in multiple layers for performance of testing to allow the caching of each layer to take effect independently:
This is currently using the playbook branch at https://github.com/sxa/infrastructure/tree/sxa_allhosts which makes a few changes to support this execution. |
The above approach seemed to work yesterday now that the machine is rebooted after adding cygwin to the PATH and I had a system which was able to successfully build jdk21u using two dockerfiles (First to configure WinRM, the second to run the playbooks using the individual layers from the previous comment. Next steps as follows:
Noting that the image without VS2013 or 2017 is 99GB in size. |
Now fixed the path setting so that it only requires one dockerfile so we have something consistent with what we have on Linux now 👍🏻 It still currently requires a username/password for the authentication, but the password can be passed into the dockerfile with I haven't got it picking up the git_sha properly yet so that is currently hard-coded. Everything else is good enough to be able to run a jdk21u build on, but it's missing the compilers for some earlier versions (Will need those on the host and mapped in via Otherwise, here is the dockerfile Dockerfile.win2022v2.txt which uses the playbook changes from https://github.com/sxa/infrastructure/tree/windows_docker_fixes |
VS2013 install appears to complete OK (Based on the logs in Sizes:
NOTE: The playbooks set up with the dockerfile excluding all the visual studio installations produces a docker image which is 15.4G in size NOTE 2: If the machine runs out of disk space on |
Steps to set up:
From there you can run this to start the container:
Then go through the normal build process:
|
Based on adoptium/temurin-build#2922 (comment) we may be able to switch to using Visual Studio 2022 for everything which would significantly reduce the windows installation requirements. The dockerfile is currently set up to only install VS2022 and not the other versions. |
Next bullet on the list is to: Integrate this into the build pipelines Initial attempts using a jenkins workspace directory with a drive on
Now moved to using Noting that I have had errors like this and while I have not identified the exact cause, clearing out the
The build (both jdk8u and jdk21u) then failed later on with another path length issue. I have therefore shortened the name of the job to
Successful builds in jenkins with
|
Job https://ci.adoptium.net/job/win2022_docker_image_updater/label=dockerhost-azure-win2022-x64-1/ is being prototyped to create the docker image. It is a stripped down copy of the rhel7/s390x one and will save to |
SummaryWith the initial feasibility done, I'm going to leave this closed and create follow-on items for the subsequent tasks and the outstanding items on the list:
Jenkins job refs: |
Note: The HOME environment variable set when the jenkins agent is started is significant, as it affects where git picks up the |
Above PR should fix the issue with long file names - I'm doing some extra tests to verify with my current job and have also initiated https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk21u/job/jdk21u-windows-x64-temurin/138/console to test with the full job name. It should be good with the PR in place as it's using the same logic for overriding the default workspace location as we use in the non-docker situation on Windows. Note that as part of this I have switched from using the |
First build using the main pipelines on the dockerhost machine: https://ci.adoptium.net/job/build-scripts/job/jobs/job/jdk21u/job/jdk21u-windows-x64-temurin/151/
DEFAULTS_JSON:
|
It's been quite a lot of work but the sign_Verification job now has a working run after a refactor of the code that does the signing and assembly within the pipelines. Ref: #3709 (comment) |
|
Noting that when attempting to run a build using a fixed SCM_REF for a reproducibility comparison some problems occur The create_installer_windows job needs to have the
This is likely nothing to do with the docker changes, but is likely something we should look to address as a build issue in the general case when building something that isn't the latest version, such as a previous GA level. (FYI @andrew-m-leonard) |
Reproducibility tests based on 21.0.5+11:
|
Reproducibility is confirmed good after a number of tests. A couple of additional notes on this:
|
I need to request a new machine:
Please explain what this machine is needed for:
Running builds in an isolated way where we can achieve SLSA build level 3 compliance on Windows along with the other primary platforms. Ideally we'll be able to create windows-on-windows container images which we share and then download and run the builds in.
As background info:
So the tasks required would be:
-v
on linux) which are read+write in the container-v
and use that to build Temurin in the container on the mapped volume so that the output is visible on the host system.Once this level of analysis and expertise is gained it will likely make windows installer testing, or any other such activities simpler and give us more options moving forward.
Related for historic reference:
The text was updated successfully, but these errors were encountered: