Commit graph

1121 commits

Author SHA1 Message Date
Ryan Ernst
7ebb32db10
Guard bootstrap plugins loading from detecting plugins cache (#109116)
This commit guards iteration over plugin infos from mistakenly trying to
inspect the plugins cache file as a plugin.

closes #97702
2024-05-29 10:16:44 -07:00
Ryan Ernst
6f20cba5a1
Update bundled JDK to Java 22 (again) (#108654) (#108689)
* Update bundled JDK to Java 22 (again) (#108654)

This commit re-bumps the bundled JDK to Java 22 now that we have
a tested workaround for the G1GC bug
(https://bugs.openjdk.org/browse/JDK-8329528).

relates #108571
relates #106987

* copy main openjdk toolchain resolver

* use 2 lines for workaround

* fix test

* update adoptium test
2024-05-16 10:18:18 -04:00
Ryan Ernst
101bebe071
Workaround G1 bug for JDK 22 and 22.0.1 (#108571) (#108631)
See https://bugs.openjdk.org/browse/JDK-8329528. The applied workaround
was suggested on the linked issue, and was tested and confirmed to avoid
the G1 bug.
2024-05-14 12:48:48 -04:00
nervo
2154d32bce
Remove smart quote in distribution config (#107246) 2024-04-18 09:51:31 -07:00
Jake Landis
a3c4b0837f
Upgrade Bouncy Castle FIPS jars for plugin cli (#103801)
This commit upgrades bc-fips and bcpg-fips to the lastest available versions for 7.17.

related: #100923
2024-01-05 08:28:21 -06:00
Mark Vieira
08ffe30907
Update IronBank docker image base to ubi:9.3 (#102721) (#103077)
# Conflicts:
#	distribution/docker/src/docker/Dockerfile

Co-authored-by: Jon <jon@elastic.co>
2023-12-06 14:10:42 -05:00
Mark Vieira
6da33dc2de
Update IronBank BASE_IMAGE with ironbank prefix (#102720) (#102838)
This supports local testing.  It should not be included in
hardening_manifest.yml, which injects the scope at runtime.
# Conflicts:
#	distribution/docker/src/docker/Dockerfile

Co-authored-by: Jon <jon@elastic.co>
2023-11-30 17:21:41 -05:00
Mark Vieira
0aa8cda01f
Update IronBank docker image base to ubi:9.2 (#101393) (#101402)
# Conflicts:
#	distribution/docker/src/docker/Dockerfile
#	distribution/docker/src/docker/iron_bank/hardening_manifest.yaml
2023-10-26 15:48:59 -04:00
Rene Groeschke
a080bb2bbe
[7.17] Update gradle wrapper to 8.3 (#97838) (#100715)
* Update gradle wrapper to 8.3 (#97838)

Gradle now fully supports compiling, testing and running on Java 20.
Among other general performance improvements this release introduces --test-dry-run command line option that allows checking if tests are filtered or not by gradle.
Required updating nebula ospackage plugin as setuid was broken in gradle 8.3.

(cherry picked from commit b23e000c30)

# Conflicts:
#	build-tools-internal/src/integTest/groovy/org/elasticsearch/gradle/internal/test/rest/LegacyYamlRestCompatTestPluginFuncTest.groovy
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/ElasticsearchJavaModulePathPlugin.java
#	build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/test/rest/compat/compat/AbstractYamlRestCompatTestPlugin.java
#	build-tools-internal/src/main/resources/minimumGradleVersion
#	gradle/verification-metadata.xml
#	gradle/wrapper/gradle-wrapper.jar
#	gradlew
#	x-pack/plugin/watcher/qa/with-monitoring/src/javaRestTest/java/org/elasticsearch/smoketest/MonitoringWithWatcherRestIT.java

* [7.17] Use patched nebula os package gradle plugin

* Update testingconvention precommit integ test
2023-10-16 06:18:08 -04:00
Rene Groeschke
5afd06ae57
[7.17] Update Gradle Wrapper to 8.2 (#96686) (#97484)
* Update Gradle Wrapper to 8.2 (#96686)

- Convention usage has been deprecated and was fixed in our build files
- Fix test dependencies and deprecation
2023-09-27 08:46:44 +02:00
Brian Seeders
9ce5484924
Set explicit file permissions in NoticeTask (#99206) (#99255) 2023-09-06 12:48:56 -04:00
Brian Seeders
1b6be92751
Add java-matrix and java-fips-matrix Buildkite pipelines (#97253) (#98040) 2023-07-28 17:50:19 -04:00
Mark Vieira
3b5fcca89a
Improve efficiency of packer cache script (#94701) (#94705)
# Conflicts:
#	.ci/packer_cache.sh
#	distribution/bwc/build.gradle
#	distribution/docker/build.gradle
2023-03-23 17:10:08 -04:00
Mark Vieira
9e1ec97dcf
[7.17] Migrate core rest tests with security to new testing framework (#92575) (#92686)
* Migrate core rest tests with security to new testing framework (#92575)

# Conflicts:
#	x-pack/qa/core-rest-tests-with-security/build.gradle

* Fixes

* More fixes

* More fixes

* More more fixes
2023-01-04 19:17:57 -05:00
Mark Vieira
47c6fd34da
[7.17] Add JUnit rule based integration test cluster orchestration framework… (#92517)
This commit adds a new test framework for configuring and orchestrating
test clusters for both Java and YAML REST testing. This will eventually
replace the existing "test-clusters" Gradle plugin and the build-time
cluster orchestration.
2022-12-22 17:48:07 -08:00
Rene Groeschke
754588f4a1
[7.x] Add elasticsearch DRA Support (#91664)
Backporting DRA ci jobs and build logic to enable DRA support on 7.17.x

Includes besides plain CI jobs:

- https://github.com/elastic/elasticsearch/pull/91571
- https://github.com/elastic/elasticsearch/pull/91593
2022-11-21 18:23:57 +01:00
David Turner
1715c36610 Extend systemd startup timeout to 900s (#91338)
Extends the default `systemd` startup timeout from 75s to 900s.

Relates #86476
2022-11-17 14:18:49 +00:00
Rene Groeschke
de1ed44f37
Fix inter project handling of generateDependenciesReport (#91555) (#91560)
Also fixes a deprecation warning we see when generating dependency
reports
2022-11-14 12:38:52 -05:00
Mark Vieira
a6f5e18ad7 Remove ironbank arm docker export project 2022-09-27 14:42:27 -07:00
Mark Vieira
9c936cf219 Don't attempt to build ARM IronBank Docker images 2022-09-27 14:27:40 -07:00
Mark Vieira
dd0421eb82 Make sure we build docker context on supported platforms 2022-09-26 10:28:22 -07:00
Mark Vieira
2da13b44cb
[7.17] Allow for building multi-arch docker images via buildx (#89986) (#90047) 2022-09-13 17:49:19 -07:00
Rene Groeschke
62868b7abe
[7.17] Add verification metadata for dependencies (#88814) (#89105)
Backports the following commits to 7.17:
 - Add verification metadata for dependencies (#88814)
 - Add missing dependency verification checksums (#89139)
2022-08-08 12:30:59 +02:00
Mark Vieira
565443c582
Ignore beats artifacts when resolving all artifact dependencies (#88960) (#88963) 2022-07-30 06:35:06 +09:30
Rene Groeschke
62294616df
[7.17] Rework testing conventions gradle plugin (#87213) (#88422)
Backports the following commits to 7.17:
 - Rework testing conventions gradle plugin (#87213)
2022-07-12 10:58:40 +02:00
Rory Hunter
3f770e7caf
Change UBI docker user to elasticsearch (#88262)
Closes #88218.

Docker image scans have flagged up the `USER` that the UBI Docker image
runs with. Switch to `elasticsearch:root`, which is what the Iron Bank
image also uses, and is what we use for all images from
8.0 onwards.
2022-07-05 15:38:08 +01:00
Rene Groeschke
98d18185ae
[7.17] Setup elasticsearch dependency monitoring with Snyk for production code (#88036) (#88223)
Backports the following commits to 7.17:
 - Setup elasticsearch dependency monitoring with Snyk for production code (#88036)
2022-07-04 08:36:35 +02:00
Rory Hunter
cba6b2e82d Remove vim-tiny from Docker build (#87812)
Closes #85634.
2022-06-21 10:23:35 +01:00
Rene Groeschke
91537609b6
[7.17] Remove elasticsearch.rest-test gradle plugin (#85491) (#87025)
Backports the following commits to 7.17:
 - Remove elasticsearch.rest-test gradle plugin (#85491)
2022-05-23 13:58:00 +02:00
Ryan Ernst
33bbaed887
Rename PluginInfo to PluginDescriptor (#86950) (#86988)
The class PluginInfo represents the plugin-descriptor.properties file
that each plugin must have. This commit renames the class to more
closely match what it represents: the plugin descriptor.
2022-05-20 14:04:13 -04:00
Ryan Ernst
5ea1e130c5
Add license and notice files for commons daemon (#86773) (#86775)
Elasticsearch uses Apache procrun (part of the commons-daemon project)
to launching as a service on Windows. This commit adds attribution for
the project by including license and notice files. These were missed in
the past because the dependency is just two binary exes that are
embedded in the elasticseach codebase.
2022-05-12 21:02:53 -04:00
Mark Vieira
1d771af6ee
[7.17] Fix edge case where user-defined heap settings are ignored (#86438) (#86445)
* Fix edge case where user-defined heap settings are ignored (#86438)

It turns out if you specify an odd heap size (not a multiple of 4MB)
then the JVM will automatically round up to the nearest multiple and
this changes how the output of +PrintFinalFlags is reported. This
resulted in us incorrectly considering these settings to be JVM defaults
instead of user-defined and thus falling back to auto heap sizing
rather that using the user-defined value.

* Update refernces to List.of

* Use stdlib
2022-05-04 16:18:20 -04:00
Przemyslaw Gomulka
568dc6b10b
[7.17] Disable deprecation log indexing in docker test (#85150) (#85154)
Backports the following commits to 7.17:

Disable deprecation log indexing in docker test (Disable deprecation log indexing in docker test #85150)
2022-03-23 09:51:05 +01:00
Mark Vieira
690e1dbf7a
Remove usages of elasticsearch.build plugin in non-production projects (#84961) (#84964)
(cherry picked from commit dc3d3b5e12)
2022-03-15 09:55:44 -07:00
Mark Vieira
9258c55128
Use 'main' when referring to default branch (#84463) (#84532) 2022-03-01 14:04:10 -08:00
Rory Hunter
52a93d0545
Restart ES after keystore upgrade in postinst (#84224)
Closes #82433. If the environment variable `RESTART_ON_UPGRADE` is true,
then ensure that we delay restarting Elasticseach until after the
keystore is upgraded, or else we can run into permissions problems.
2022-02-24 09:23:51 +00:00
Rene Groeschke
4de3fb5eaf
Remove usage of deprecated Provider#forUseAtConfigurationTime (#83932) (#83947)
Remove gradle api usage that has been deprecated with Gradle 7.4
2022-02-15 16:45:24 +01:00
Chris Hegarty
2cd9cca5eb
[7.17] Allow to set the security manager (#82053) 2022-01-07 20:35:34 +00:00
Rene Groeschke
3768a92952
Update nebula ospackage plugin (#76639) (#76661)
This updates the nebula ospackage plugin to 8.6.1 that includes
a our provided PRs:

- https://github.com/nebula-plugins/gradle-ospackage-plugin/pull/402
- https://github.com/nebula-plugins/gradle-ospackage-plugin/pull/400
- https://github.com/nebula-plugins/gradle-ospackage-plugin/pull/397

and also an update to the redline library our fix for ssh256 headers

- https://github.com/craigwblake/redline/pull/157
2021-12-20 04:08:45 -05:00
Rory Hunter
f6c70fef87 Change default shell to bash in default Docker image (#81828)
As a result of changing the base Docker to Ubuntu in #80820, the default shell
i.e. `/bin/sh` changed to `dash`, rather than `bash`, which could impact anyone
invoking `/bin/sh` and expecting it to still propagate environment variables with
periods in their names.

Reconfigure the default shell back to `bash` so that this type of situation works
again.
2021-12-17 09:49:50 +00:00
Rory Hunter
19a27b1c1f Improve Docker image's cacert scripting (#81659)
Apply suggestions from Docker Inc about how to update the `cacerts` in
our Ubuntu-based Docker image. Instead of copying around files and
symlinking, instead install `ca-certificates` and `p11-kit`, and use the
latter to regenerate Java's `cacerts`, as well as ensuring it is
regenerated if the system ca certs are updated.
2021-12-13 21:43:49 +00:00
Rory Hunter
0126e1b904 Upgrade IronBank base image from 8.4 to 8.5 2021-12-13 19:53:29 +00:00
Mark Vieira
5b38441b16
Patch log4j JAR to remove JndiLookup class (#81631) 2021-12-10 15:53:32 -08:00
Chris Hegarty
cdc5ae4f28
Add logging property (#81624) 2021-12-10 17:47:49 +00:00
Rory Hunter
d8df234997
Remove Cloud images from 7.16 (#80742)
We don't actually need Cloud images before v8.0, so remove all
references and supporting code.
2021-12-09 21:20:31 +00:00
Przemyslaw Gomulka
850aa05787
Emit x-elastic-product-origin into logs backport(#81381) (#81518)
This commit emits the value of x-elastic-product-origin header into elasticsearch.elastic_product_origin field in ES deprecation logs and indexed deprecation logs.
x-elastic-product-origin header is intended to identify the elastic stack origin and allow to ignore deprecations emitted by the stack.

ES v7 logging differs from v8 as it creates the JSON layout on its own. The additional custom field have to be declared in log4j.properties and ECSLayout used for indexing deprecated logs also has to be updated
backports #81381
2021-12-09 11:16:08 +01:00
Rory Hunter
4eb9667cc0 Revert "Use Cloudflare's zlib in Docker images (#81245)"
This reverts commit 6582acfc00.
2021-12-03 19:24:56 +00:00
Rory Hunter
6582acfc00 Use Cloudflare's zlib in Docker images (#81245)
Closes #81208. Elasticsearch uses zlib for two purposes:    *
Compression of stored fields with `index.codec: best_compression`,
which we use for observability and security data.    * Request /
response compression. Historically, zlib was packaged within the JDK, so
that users wouldn't have to have zlib installed for basic usage of Java.
However, the original zlib optimizes for portability and misses a number
of important optimizations such as leveraging vectorization support for
x86 and ARM architectures. Several forks have been created in order to
address this. Since version 9, the JDK uses the system's zlib when
available and falls back to the zlib that is packaged within the JDK if
a system zlib cannot be found. This commit changes the Docker image to
install the Cloudflare fork of zlib, and run Java using the fork instead
of the original zlib, so that users of the Docker image can get better
performance. Other ES distribution types are out-of-scope, since
configuring the JVM to use an alternative zlib requires an environment
config as well as installed another zlib, and Docker is the only
distribution type where we can control both.
2021-12-03 11:34:08 +00:00
Rory Hunter
b0ed451742
Fix shadowed vars pt6 (#80899) (#80936)
Part of #19752. Fix more instances where local variable names were shadowing field names.
2021-11-23 06:06:51 -05:00
Rory Hunter
9aea490eae Install wget in Cloud Docker images (#80870)
Cloud needs wget to be available in 8.x, so add it to their Docker images.
2021-11-22 10:37:24 +00:00