Skip to content

Commit

Permalink
Merge branch '126695-make-upload-and-registry-package-info-consistent…
Browse files Browse the repository at this point in the history
…' of github.com:kpollich/kibana into 126695-make-upload-and-registry-package-info-consistent
  • Loading branch information
kpollich committed Mar 9, 2022
2 parents bd2e6c2 + 9122a63 commit bfffa79
Show file tree
Hide file tree
Showing 70 changed files with 986 additions and 843 deletions.
11 changes: 1 addition & 10 deletions .buildkite/pipelines/performance/daily.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
steps:
- block: ':gear: Performance Tests Configuration'
prompt: 'Fill out the details for performance test'
fields:
- text: ':arrows_counterclockwise: Iterations'
key: 'performance-test-iteration-count'
hint: 'How many times you want to run tests? '
required: true
if: build.env('PERF_TEST_COUNT') == null

- label: ':male-mechanic::skin-tone-2: Pre-Build'
command: .buildkite/scripts/lifecycle/pre_build.sh
agents:
Expand All @@ -24,7 +15,7 @@ steps:
- label: ':muscle: Performance Tests with Playwright config'
command: .buildkite/scripts/steps/functional/performance_playwright.sh
agents:
queue: c2-16
queue: kb-static-ubuntu
depends_on: build

- wait: ~
Expand Down
65 changes: 48 additions & 17 deletions .buildkite/scripts/steps/functional/performance_playwright.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,55 @@
#!/bin/bash
#!/usr/bin/env bash

set -uo pipefail
set -euo pipefail

if [ -z "${PERF_TEST_COUNT+x}" ]; then
TEST_COUNT="$(buildkite-agent meta-data get performance-test-iteration-count)"
else
TEST_COUNT=$PERF_TEST_COUNT
fi
source .buildkite/scripts/common/util.sh

tput setab 2; tput setaf 0; echo "Performance test will be run at ${BUILDKITE_BRANCH} ${TEST_COUNT} times"
.buildkite/scripts/bootstrap.sh
.buildkite/scripts/download_build_artifacts.sh

cat << EOF | buildkite-agent pipeline upload
steps:
- command: .buildkite/scripts/steps/functional/performance_sub_playwright.sh
parallelism: "$TEST_COUNT"
concurrency: 20
concurrency_group: 'performance-test-group'
agents:
queue: c2-16
EOF
echo --- Run Performance Tests with Playwright config

node scripts/es snapshot&

esPid=$!

export TEST_ES_URL=http://elastic:changeme@localhost:9200
export TEST_ES_DISABLE_STARTUP=true

sleep 120

cd "$XPACK_DIR"

jobId=$(npx uuid)
export TEST_JOB_ID="$jobId"

journeys=("ecommerce_dashboard" "flight_dashboard" "web_logs_dashboard" "promotion_tracking_dashboard")

for i in "${journeys[@]}"; do
echo "JOURNEY[${i}] is running"

export TEST_PERFORMANCE_PHASE=WARMUP
export ELASTIC_APM_ACTIVE=false
export JOURNEY_NAME="${i}"

checks-reporter-with-killswitch "Run Performance Tests with Playwright Config (Journey:${i},Phase: WARMUP)" \
node scripts/functional_tests \
--config test/performance/config.playwright.ts \
--include "test/performance/tests/playwright/${i}.ts" \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--debug \
--bail

export TEST_PERFORMANCE_PHASE=TEST
export ELASTIC_APM_ACTIVE=true

checks-reporter-with-killswitch "Run Performance Tests with Playwright Config (Journey:${i},Phase: TEST)" \
node scripts/functional_tests \
--config test/performance/config.playwright.ts \
--include "test/performance/tests/playwright/${i}.ts" \
--kibana-install-dir "$KIBANA_BUILD_LOCATION" \
--debug \
--bail
done

kill "$esPid"
55 changes: 0 additions & 55 deletions .buildkite/scripts/steps/functional/performance_sub_playwright.sh

This file was deleted.

10 changes: 5 additions & 5 deletions .buildkite/scripts/steps/package_testing/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ mkdir -p target
cd target
if [[ "$TEST_PACKAGE" == "deb" ]]; then
buildkite-agent artifact download 'kibana-*.deb' . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
KIBANA_IP_ADDRESS="192.168.50.5"
KIBANA_IP_ADDRESS="192.168.56.5"
elif [[ "$TEST_PACKAGE" == "rpm" ]]; then
buildkite-agent artifact download 'kibana-*.rpm' . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
KIBANA_IP_ADDRESS="192.168.50.6"
KIBANA_IP_ADDRESS="192.168.56.6"
elif [[ "$TEST_PACKAGE" == "docker" ]]; then
buildkite-agent artifact download "kibana-$KIBANA_PKG_VERSION-SNAPSHOT-docker-image.tar.gz" . --build "${KIBANA_BUILD_ID:-$BUILDKITE_BUILD_ID}"
KIBANA_IP_ADDRESS="192.168.50.7"
KIBANA_IP_ADDRESS="192.168.56.7"
fi
cd ..

export VAGRANT_CWD=test/package
vagrant up "$TEST_PACKAGE" --no-provision

node scripts/es snapshot \
-E network.bind_host=127.0.0.1,192.168.50.1 \
-E network.bind_host=127.0.0.1,192.168.56.1 \
-E discovery.type=single-node \
--license=trial &
while ! timeout 1 bash -c "echo > /dev/tcp/localhost/9200"; do sleep 30; done
Expand All @@ -33,7 +33,7 @@ vagrant provision "$TEST_PACKAGE"

export TEST_BROWSER_HEADLESS=1
export TEST_KIBANA_URL="http://elastic:changeme@$KIBANA_IP_ADDRESS:5601"
export TEST_ES_URL=http://elastic:[email protected].50.1:9200
export TEST_ES_URL=http://elastic:[email protected].56.1:9200

cd x-pack
node scripts/functional_test_runner.js --include-tag=smoke
29 changes: 0 additions & 29 deletions .ci/package-testing/Jenkinsfile

This file was deleted.

10 changes: 5 additions & 5 deletions docs/developer/contributing/development-package-tests.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ pip3 install --user ansible
[cols=",,",options="header",]
|===
|Hostname |IP |Description
|deb |192.168.50.5 |Installation of Kibana’s deb package
|rpm |192.168.50.6 |Installation of Kibana’s rpm package
|docker |192.168.50.7 |Installation of Kibana’s docker image
|deb |192.168.56.5 |Installation of Kibana’s deb package
|rpm |192.168.56.6 |Installation of Kibana’s rpm package
|docker |192.168.56.7 |Installation of Kibana’s docker image
|===

=== Running
Expand All @@ -49,11 +49,11 @@ vagrant provision <hostname>

# Running functional tests
node scripts/es snapshot \
-E network.bind_host=127.0.0.1,192.168.50.1 \
-E network.bind_host=127.0.0.1,192.168.56.1 \
-E discovery.type=single-node \
--license=trial
TEST_KIBANA_URL=http://elastic:changeme@<ip>:5601 \
TEST_ES_URL=http://elastic:[email protected].50.1:9200 \
TEST_ES_URL=http://elastic:[email protected].56.1:9200 \
node scripts/functional_test_runner.js --include-tag=smoke
```

Expand Down
Binary file removed logs.tar.gz
Binary file not shown.
6 changes: 3 additions & 3 deletions test/package/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Vagrant.configure("2") do |config|
deb.vm.provision "ansible" do |ansible|
ansible.playbook = "deb.yml"
end
deb.vm.network "private_network", ip: "192.168.50.5"
deb.vm.network "private_network", ip: "192.168.56.5"
end

config.vm.define "rpm" do |rpm|
Expand All @@ -20,7 +20,7 @@ Vagrant.configure("2") do |config|
rpm.vm.provision "ansible" do |ansible|
ansible.playbook = "rpm.yml"
end
rpm.vm.network "private_network", ip: "192.168.50.6"
rpm.vm.network "private_network", ip: "192.168.56.6"
end

config.vm.define "docker" do |docker|
Expand All @@ -31,6 +31,6 @@ Vagrant.configure("2") do |config|
docker.vm.provision "ansible" do |ansible|
ansible.playbook = "docker.yml"
end
docker.vm.network "private_network", ip: "192.168.50.7"
docker.vm.network "private_network", ip: "192.168.56.7"
end
end
2 changes: 1 addition & 1 deletion test/package/roles/install_kibana_docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
network_mode: host
env:
SERVER_HOST: 0.0.0.0
ELASTICSEARCH_HOSTS: http://192.168.50.1:9200
ELASTICSEARCH_HOSTS: http://192.168.56.1:9200
ELASTICSEARCH_USERNAME: '{{ elasticsearch_username }}'
ELASTICSEARCH_PASSWORD: '{{ elasticsearch_password }}'
2 changes: 1 addition & 1 deletion test/package/templates/kibana.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
server.host: 0.0.0.0

elasticsearch.hosts: http://192.168.50.1:9200
elasticsearch.hosts: http://192.168.56.1:9200
elasticsearch.username: "{{ elasticsearch_username }}"
elasticsearch.password: "{{ elasticsearch_password }}"

Expand Down
12 changes: 0 additions & 12 deletions test/scripts/jenkins_xpack_package_build.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test/scripts/jenkins_xpack_package_deb.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test/scripts/jenkins_xpack_package_docker.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test/scripts/jenkins_xpack_package_rpm.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export function Popover({
isOpen={isOpen}
ref={popoverRef}
style={popoverStyle}
initialFocus={false}
>
<EuiFlexGroup
direction="column"
Expand Down
Loading

0 comments on commit bfffa79

Please sign in to comment.