-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
windows packaging tests #26741
Comments
Supersedes #18475 |
Here's roughly my roadmap for this since it's probably too much for one pull request
|
May I suggest |
We should not enable these by default, and the boxes should not be mentioned in the Vagrantfile. The boxes that we are going to use are "closed source". We do not refer to "closed source" in the open source code base. We should not require open source users to specify an environment variable to get around running these on boxes they can not see. All that we should do is enable these to run if you provide your own box, which we will do on our internal CI.
Can you clarify what this refers to? I think that you mean installing Elasticsearch on Windows as a service, not using the Windows MSI installer but what you write could be interpreted as the latter. |
Sounds good, that seems cleaner 👍
Agree, they won't run by default (when I see why we wouldn't want to mention the images explicitly in the Vagrantfile (although it looks like vagrant doesn't complain about not finding the image until you try to start it). They'll be hidden behind an environment variable in the Vagrantfile, something like Vagrant.configure(2) do |config|
if ENV['WINDOWS_PACKAGING']
config.vm.define 'windows-server-2012r2' do |config|
config.vm.box = ENV['WINDOWS_2012R2_VAGRANT_BOX']
end
config.vm.define 'windows-server-2016' do |config|
config.vm.box = ENV['WINDOWS_2016_VAGRANT_BOX']
end
end
# the other boxes
end and then gradle will decide whether to set these env variables. I guess it can get the box names either from command line properties or its own environment (I'll favor command line props)
Right, the elasticsearch-service script, not the MSI |
Thanks @andyb-elastic, this sounds good to me now.
I prefer properties too (we can do the
Thank you for clarifying, I wanted to make sure the MSI is out of scope here (and belongs elsewhere, in the MSI repository). |
Thanks @andyb-elastic, this plan looks good. Once the new packaging test project is available, we should make sure to involve many developers to convert the tests from bats to the new format. That will help to parallelize the work and spread the knowledge at the same time (we did this before when migrating settings to a new API or when adding integration test for aggregations). |
This creates projects for new packaging tests written in groovy that can run on linux and windows, and adds awareness of windows boxes to the gradle build and Vagrantfile. No tests have been ported here, the groovy tests just exit immediately. Also creates the project :qa:packaging-common for code that should be shared between tests, e.g. the kind of content that lives in the utils/ portion of the bats tests. This is a separate project so that extra plugins' projects may depend on it without conflicting with the tests' project. The default is to not test on any windows boxes unless explicitly specified (we can't provide windows boxes) to gradle via project properties or to vagrant via environment variables. Once the bats tests in :qa:vagrant have all been migrated, that project can be deleted and the vagrant test plugin applied to :qa:packaging directly, making it serve as both the groovy build for the tests, and the tasks that setup the VMs the tests run on. For elastic#26741
Vagrant boxes now include options for windows server 2012r2 and server 2016. Since licensing prevents us from providing windows images, they're only configured in vagrant if passed via environment variables. The windows boxes aren't used in gradle's packaging tests yet. For elastic#26741
Also removes alternate Vagrantfile For elastic#26741
We had a discussion about exactly what should be tested with plugins - currently (in bats) we just test that the plugins' jars are installed into the right place but some questioned the value of that. We may want to test basic functionality of the plugins if we can do that in a way that's not too involved. |
* Consolidates provision steps so it's more clear which steps are applied to all boxes * Removes duplicate configuration that was being stomped * Ensure rsync, a dependency for platform steps, is installed on linux * Ruby style changes For elastic#26741
* Consolidates provision steps so it's more clear which steps are applied to all boxes * Removes duplicate configuration that was being stomped * Ensure rsync, a dependency for platform steps, is installed on linux * Ruby style changes For #26741
* Consolidates provision steps so it's more clear which steps are applied to all boxes * Removes duplicate configuration that was being stomped * Ensure rsync, a dependency for platform steps, is installed on linux * Ruby style changes For #26741
Vagrant boxes now include options for windows server 2012r2 and server 2016. Since licensing prevents us from providing windows images, they're only configured in vagrant if passed via environment variables. The windows boxes aren't used in gradle's packaging tests yet. For elastic#26741
The vagrant test plugin adds tasks for the groovy packaging tests, which run after the bats packaging test tasks.Rename the 'bats' configuration to 'packaging' and remove the option to inherit archives from this configuration. For elastic#26741
Adds behavior to the vagrant test plugin that runs jars from the packagingTest configuration inside test VMs. Makes :qa:vagrant a project which builds such a packaging test uberjar. This test project doesn't run anything yet. For elastic#26741
Adds a project for building and running packaging tests written in java for portability. The vagrant tasks use jars on the packagingTest configuration, which are built in the same project. No tests are added yet. Corresponding changes are not made to :x-pack:qa:vagrant because the java packaging tests will all be consolidated into one project. For elastic#26741
[test] add java packaging test project Adds a project for building and running packaging tests written in java for portability. The vagrant tasks use jars on the packagingTest configuration, which are built in the same project. No tests are added yet. Corresponding changes are not made to :x-pack:qa:vagrant because the java packaging tests will all be consolidated into one project. For elastic#26741
[test] add java packaging test project Adds a project for building and running packaging tests written in java for portability. The vagrant tasks use jars on the packagingTest configuration, which are built in the same project. No tests are added yet. Corresponding changes are not made to :x-pack:qa:vagrant because the java packaging tests will all be consolidated into one project. For #26741
Adds windows server 2012r2 and 2016 vagrant boxes to packaging tests. They can only be used if IDs for their images are specified, which are passed to gradle and then to vagrant via env variables. Adds options to the project property `vagrant.boxes` to choose between linux and windows boxes Bats tests are run only on linux boxes, and portable packaging tests run on all boxes. Platform tests are only run on linux boxes since they are not being maintained. For elastic#26741
Adds windows server 2012r2 and 2016 vagrant boxes to packaging tests. They can only be used if IDs for their images are specified, which are passed to gradle and then to vagrant via env variables. Adds options to the project property `vagrant.boxes` to choose between linux and windows boxes. Bats tests are run only on linux boxes, and portable packaging tests run on all boxes. Platform tests are only run on linux boxes since they are not being maintained. For #26741
Adds windows server 2012r2 and 2016 vagrant boxes to packaging tests. They can only be used if IDs for their images are specified, which are passed to gradle and then to vagrant via env variables. Adds options to the project property `vagrant.boxes` to choose between linux and windows boxes. Bats tests are run only on linux boxes, and portable packaging tests run on all boxes. Platform tests are only run on linux boxes since they are not being maintained. For #26741
Ports the first couple tests for archive distributions from the old bats project to the new java project that includes windows platforms, consolidating them into one test method that tests that the distributions can be extracted and their contents verified. Includes the zip distributions which were not tested in the bats project. For elastic#26741
Adds windows server 2012r2 and 2016 vagrant boxes to packaging tests. They can only be used if IDs for their images are specified, which are passed to gradle and then to vagrant via env variables. Adds options to the project property `vagrant.boxes` to choose between linux and windows boxes. Bats tests are run only on linux boxes, and portable packaging tests run on all boxes. Platform tests are only run on linux boxes since they are not being maintained. For elastic#26741
Add packaging tests for the linux package distributions to the java test project and remove them from bats. Most of the tests that lived in 30_deb_package.bats and 40_rpm_package.bats are applicable to both package types and are combined into a single type of test case. Others are separated out into separate cases to make their intent more clear For elastic#26741
Add packaging tests for the linux package distributions to the java test project and remove them from bats. Most of the tests that lived in 30_deb_package.bats and 40_rpm_package.bats are applicable to both package types and are combined into a single type of test case. Others are separated out into separate cases to make their intent more clear For #26741
Add packaging tests for the linux package distributions to the java test project and remove them from bats. Most of the tests that lived in 30_deb_package.bats and 40_rpm_package.bats are applicable to both package types and are combined into a single type of test case. Others are separated out into separate cases to make their intent more clear For elastic#26741
Add packaging tests for the linux package distributions to the java test project and remove them from bats. Most of the tests that lived in 30_deb_package.bats and 40_rpm_package.bats are applicable to both package types and are combined into a single type of test case. Others are separated out into separate cases to make their intent more clear For #26741
Closing this as the new portable test project is created and running in CI, and basic tests have been ported over to it for all distributions we're currently testing. New work on porting and filling out packaging tests will be tracked in #32143 |
Add windows to the set of platforms we verify packaging correctness on.
The BATS tests will be rewritten in java/groovy so they'll be portable on all test platforms. We'd like to build these tests into a jar on the host and then execute the jar in the vm. Depending on how they're written it may make more sense to run them as a gradle task.
Because of licensing issues, we can't make a windows vagrant image publicly available. Users will be able to specify a windows image to use when running these tests, and the tests will include checks for correct java version, etc.
This was from a discussion with @tlrx @rjernst @nik9000 @jasontedor
The text was updated successfully, but these errors were encountered: