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

MDBF-815 - HashiCorp Vault server #670

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

RazvanLiviuVarzaru
Copy link
Collaborator

The scope of this PR is to create a separate Debian 12/i386 container image with HashiCorp Vault installed.
Vault tests are part of the MBDF-815 requirements, and the new fulltest-debug builder will use this image.

Changes to the BuildBot configuration will be done in a separate PR.

Testing
Built the image locally and tested on:

  • Server version: 10.11.11
  • Revision: c391fb1ff122adbfb9a7f98d3239aa08311918d6

Create Debug build

cmake . -DCMAKE_BUILD_TYPE=Debug -DWITH_EMBEDDED_SERVER=1 \ 
-DHAVE_EMBEDDED_PRIVILEGE_CONTROL=1 -DWITH_DBUG_TRACE=OFF && make -j 24

Start Vault server
vault server -dev > /dev/null 2>&1 &

Run MTR with --suite=vault
cd mysql-test && perl mysql-test-run.pl --suite=vault --parallel=1 --verbose-restart --force --big

==============================================================================

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 19000..19029
vault.hashicorp_mariabackup              [ pass ]   3013
vault.hashicorp_cache_after_recreate     [ pass ]   3232
vault.hashicorp_key_rotation_age         [ pass ]  15220
vault.hashicorp_check_kv_version         [ pass ]   4679
vault.hashicorp_encode                   [ pass ]    451
vault.hashicorp_key_migration            [ pass ]   5881
vault.hashicorp_url_prefix               [ pass ]   4735
vault.hashicorp_cache_timeout_update     [ pass ]    402
--------------------------------------------------------------------------
The servers were restarted 4 times
Spent 37.613 of 43 seconds executing testcases

Completed: All 8 tests were successful.

The scope of this PR is to create a separate Debian 12/i386 container image
with HashiCorp Vault installed.
Vault tests are part of the MBDF-815 requirements,
and the new fulltest-debug builder will use this image.

Changes to the BuildBot configuration will be done in a separate PR.
Built the image locally and tested on:
    Server version: 10.11.11
    Revision: c391fb1ff122adbfb9a7f98d3239aa08311918d6

# Create Debug build
cmake . -DCMAKE_BUILD_TYPE=Debug -DWITH_EMBEDDED_SERVER=1 \
-DHAVE_EMBEDDED_PRIVILEGE_CONTROL=1 -DWITH_DBUG_TRACE=OFF && make -j 24

# Start Vault server
vault server -dev > /dev/null 2>&1 &

# Run MTR with --suite=vault
cd mysql-test && perl mysql-test-run.pl --suite=vault \
--parallel=1 --verbose-restart --force --big

==============================================================================

TEST                                      RESULT   TIME (ms) or COMMENT
--------------------------------------------------------------------------

worker[01] Using MTR_BUILD_THREAD 300, with reserved ports 19000..19029
vault.hashicorp_mariabackup              [ pass ]   3013
vault.hashicorp_cache_after_recreate     [ pass ]   3232
vault.hashicorp_key_rotation_age         [ pass ]  15220
vault.hashicorp_check_kv_version         [ pass ]   4679
vault.hashicorp_encode                   [ pass ]    451
vault.hashicorp_key_migration            [ pass ]   5881
vault.hashicorp_url_prefix               [ pass ]   4735
vault.hashicorp_cache_timeout_update     [ pass ]    402
--------------------------------------------------------------------------
The servers were restarted 4 times
Spent 37.613 of 43 seconds executing testcases

Completed: All 8 tests were successful.

RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg \
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \
https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/hashicorp.list \
Copy link
Collaborator

Choose a reason for hiding this comment

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

lsb_release is fragile and needs the command to be installed, use /etc/os-release instead. See other example in the repo.

Indentation could be improved:

RUN ...
  && ...
  &&

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants