Skip to content
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

Add xpack core and security to INTEG TEST #77632

Merged
merged 6 commits into from
Sep 21, 2021

Conversation

jkakavas
Copy link
Member

This change makes it so x-pack-core and x-pack-security are bundled
in the INTEG TEST distribution that we use for testClusters in our
tests. There are two reasons for this:

  • In Auto configure TLS for new nodes of new clusters #77231 where we
    are looking into enabling and auto-configuring security by default
    for all nodes, we need to call out to ConfigInitialNode to
    determine whether we should do the auto-configuration or not.
  • Since we are enabling security by default, we should be looking
    into enabling security for all for our tests moving forward, or
    at least make a concsious decision about which ones run without
    security. This change is a step towards that direction.

This change makes it so x-pack-core and x-pack-security are bundled
in the INTEG TEST distribution that we use for testClusters in our
tests. There are two reasons for this:

- In elastic#77231 where we
are looking into enabling and auto-configuring security by default
for all nodes, we need to call out to ConfigInitialNode to
determine whether we should do the auto-configuration or not.
- Since we are enabling security by default, we should be looking
into enabling security for all for our tests moving forward, or
at least make a concsious decision about which ones run without
security. This change is a step towards that direction.
@jkakavas jkakavas added >non-issue :Delivery/Build Build or test infrastructure v8.0.0 labels Sep 13, 2021
@elasticmachine elasticmachine added the Team:Delivery Meta label for Delivery team label Sep 13, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

@sethmlarson sethmlarson added the Team:Clients Meta label for clients team label Sep 13, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/clients-team (Team:Clients)

distribution/build.gradle Outdated Show resolved Hide resolved
distribution/build.gradle Outdated Show resolved Hide resolved
Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question

from(defaultBinFiles)
include 'x-pack-env', 'x-pack-security-env'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this explicit include necessary?

Copy link
Member Author

@jkakavas jkakavas Sep 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will need to call to ConfigInitialNode and to EnrollNodeToCluster from the startup script (either directly or by calling the bash script ) . Either way, we need x-pack-env and x-pack-security-env as we do in all of our security CLI tools. My original change had us copying all bin files but @mark-vieira commented that we don't need all , so I'm just copying the two that we need.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @rjernst did that answer your question? Any additional concerns/thoughts? Thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It answered my question, thanks!

@jkakavas jkakavas requested a review from rjernst September 17, 2021 19:00
@jkakavas
Copy link
Member Author

@mark-vieira @breskeby any thoughts on this ?

Copy link
Contributor

@mark-vieira mark-vieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jkakavas jkakavas merged commit ad5c782 into elastic:master Sep 21, 2021
@rjernst
Copy link
Member

rjernst commented Oct 15, 2021

@jkakavas Is this backportable to 7.x? The change to check for actually installed modules is important to being able to split up xpack rest tests.

@jkakavas
Copy link
Member Author

@rjernst Yes, I can't think of any problems. I'll open a backport PR Monday morning

jkakavas added a commit to jkakavas/elasticsearch that referenced this pull request Oct 17, 2021
This change makes it so x-pack-core and x-pack-security are bundled
in the INTEG TEST distribution that we use for testClusters in our
tests. There are two reasons for this:

- In elastic#77231 where we
are looking into enabling and auto-configuring security by default
for all nodes, we need to call out to ConfigInitialNode to
determine whether we should do the auto-configuration or not.
- Since we are enabling security by default, we should be looking
into enabling security for all for our tests moving forward, or
at least make a conscious decision about which ones run without
security. This change is a step towards that direction.

# Conflicts:
#	distribution/archives/build.gradle
#	distribution/packages/build.gradle
jakelandis added a commit that referenced this pull request Oct 26, 2022
This commit no longer explicitly sets the default configuration for FIPS tests.
This allows each project's tests to run in FIPS mode with out deviation (other
than the FIPS mode).

A side product of this change is that any REST test
can now enable security if they so choose without needing to use the default
distribution. This allows for additional usage of the integ_test distribution
which can help with testing modularization.

This only possible now that the security plugin is always included
with the integ_test distribution via #77632

fixes: #70005
related: #77632
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >non-issue Team:Clients Meta label for clients team Team:Delivery Meta label for Delivery team v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants