Skip to content

Commit

Permalink
Merge pull request #1366 from atlassian/release/8.2.0
Browse files Browse the repository at this point in the history
Release 8.2.0
  • Loading branch information
ometelytsia committed Apr 23, 2024
2 parents 9e3409d + 43e7ae9 commit 5635c0e
Show file tree
Hide file tree
Showing 23 changed files with 121 additions and 91 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This repository contains Taurus scripts for performance testing of Atlassian Dat
* Crowd [release notes](https://confluence.atlassian.com/crowd/crowd-release-notes-199094.html): `5.2.3`

* Supported Bamboo versions:
* Bamboo [Long Term Support release](https://confluence.atlassian.com/bamboo/bamboo-release-notes-671089224.html): `9.2.11`
* Bamboo [Long Term Support release](https://confluence.atlassian.com/bamboo/bamboo-release-notes-671089224.html): `9.6.1`

## Support
In case of technical questions, issues or problems with DC Apps Performance Toolkit, contact us for support in the [community Slack](http://bit.ly/dcapt_slack) **#data-center-app-performance-toolkit** channel.
Expand Down
2 changes: 1 addition & 1 deletion app/bamboo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "122.0.6261.128" # Supports Chrome version 122. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "124.0.6367.60" # Supports Chrome version 124. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
2 changes: 1 addition & 1 deletion app/bitbucket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "122.0.6261.128" # Supports Chrome version 122. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "124.0.6367.60" # Supports Chrome version 124. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
2 changes: 1 addition & 1 deletion app/confluence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "122.0.6261.128" # Supports Chrome version 122. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "124.0.6367.60" # Supports Chrome version 124. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
Expand Down
2 changes: 1 addition & 1 deletion app/jira.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "122.0.6261.128" # Supports Chrome version 122. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "124.0.6367.60" # Supports Chrome version 124. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
2 changes: 1 addition & 1 deletion app/jsm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ modules:
httpsampler.ignore_failed_embedded_resources: "true"
selenium:
chromedriver:
version: "122.0.6261.128" # Supports Chrome version 122. You can refer to https://googlechromelabs.github.io/chrome-for-testing
version: "124.0.6367.60" # Supports Chrome version 124. You can refer to https://googlechromelabs.github.io/chrome-for-testing
reporting:
- data-source: sample-labels
module: junit-xml
2 changes: 1 addition & 1 deletion app/selenium_ui/bamboo/pages/selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AllBuildsLocators:


class PlanConfigurationLocators:
edit_config_button = (By.XPATH, "//span[contains(text(),'Configure plan')]")
edit_config_button = (By.XPATH, "//span[@title='Configure plan']")
config_plan_page = (By.ID, "config-sidebar")
config_plan_page_content = (By.ID, "content")

Expand Down
18 changes: 11 additions & 7 deletions app/util/api/bamboo_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,18 @@ def get_server_info(self):
return r.json()

def get_available_processors(self):
processors = None
page = self.get(f'{self.host}/admin/systemInfo.action', 'Could not get Page content')
tree = html.fromstring(page.content)
try:
processors = tree.xpath('//*[@id="systemInfo_availableProcessors"]/text()')[0]
except Exception as error:
print(f"Warning: Could not parse number of Bamboo available processors: {error}")
return processors
processors = None
page = self.get(f'{self.host}/admin/systemInfo.action', 'Could not get Page content')
tree = html.fromstring(page.content)
try:
processors = tree.xpath('//*[@id="systemInfo_availableProcessors"]/text()')[0]
except Exception as e:
print(f"Warning: Could not parse number of Bamboo available processors: {e}")
return processors
except Exception as e:
print(f"Warning: Could not get Available Processors information. Error: {e}")
return 'N/A'

def get_nodes_count(self):
r = self.get(f'{self.host}/rest/api/latest/server/nodes', error_msg="Could not get Bamboo nodes count")
Expand Down
18 changes: 11 additions & 7 deletions app/util/api/bitbucket_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,18 @@ def get_bitbucket_repo_count(self):
return repos_count

def get_available_processors(self):
processors = None
page = self.get_bitbucket_system_page()
tree = html.fromstring(page.content)
try:
processors = tree.xpath('//*[@id="content-stp.properties.os-0"]/div[4]/span/text()')[0]
except Exception as error:
print(f"Warning: Could not parse number of Bitbucket available processors: {error}")
return processors
processors = None
page = self.get_bitbucket_system_page()
tree = html.fromstring(page.content)
try:
processors = tree.xpath('//*[@id="content-stp.properties.os-0"]/div[4]/span/text()')[0]
except Exception as error:
print(f"Warning: Could not parse number of Bitbucket available processors: {error}")
return processors
except Exception as e:
print(f"Warning: Could not get Available Processors information. Error: {e}")
return 'N/A'

def get_locale(self):
language = None
Expand Down
2 changes: 1 addition & 1 deletion app/util/api/jsm_clients.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def get_requests(self, start_at: int = 0, max_results: int = 100, auth: tuple =
init_url = self.host + "/rest/servicedeskapi/request"
while loop_count > 0:

api_url = init_url + f"?start={start_at}&limit={max_results}"
api_url = init_url + f"?start={start_at}&limit={max_results}&requestOwnership=PARTICIPATED_REQUESTS"
if status:
api_url += f"&requestStatus={status}"

Expand Down
10 changes: 5 additions & 5 deletions app/util/bamboo/bamboo_dataset_generator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>bamboo-specs-parent</artifactId>
<version>9.2.11</version>
<version>9.6.1</version>
<relativePath/>
</parent>

Expand Down Expand Up @@ -62,17 +62,17 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.0.0-jre</version>
<version>33.1.0-jre</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.16.1</version>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.16.1</version>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
Expand All @@ -82,7 +82,7 @@
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>2.5.0</version>
<version>2.5.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
4 changes: 2 additions & 2 deletions app/util/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

from util.project_paths import JIRA_YML, CONFLUENCE_YML, BITBUCKET_YML, JSM_YML, CROWD_YML, BAMBOO_YML

TOOLKIT_VERSION = '8.1.0'
UNSUPPORTED_VERSION = '7.4.1'
TOOLKIT_VERSION = '8.2.0'
UNSUPPORTED_VERSION = '7.5.0'


def read_yml_file(file):
Expand Down
20 changes: 10 additions & 10 deletions app/util/k8s/README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ docker run --pull=always --env-file aws_envs \
-v "/$PWD/dcapt-small.tfvars:/data-center-terraform/conf.tfvars" \
-v "/$PWD/dcapt-snapshots.json:/data-center-terraform/dcapt-snapshots.json" \
-v "/$PWD/logs:/data-center-terraform/logs" \
-it atlassianlabs/terraform:2.7.4 ./install.sh -c conf.tfvars
-it atlassianlabs/terraform:2.7.7 ./install.sh -c conf.tfvars
```
### Terminate development environment
Note: install and uninstall commands have to use the same `atlassianlabs/terraform:TAG` image tag.
Expand All @@ -42,7 +42,7 @@ docker run --pull=always --env-file aws_envs \
-v "/$PWD/dcapt-small.tfvars:/data-center-terraform/conf.tfvars" \
-v "/$PWD/dcapt-snapshots.json:/data-center-terraform/dcapt-snapshots.json" \
-v "/$PWD/logs:/data-center-terraform/logs" \
-it atlassianlabs/terraform:2.7.4 ./uninstall.sh -c conf.tfvars
-it atlassianlabs/terraform:2.7.7 ./uninstall.sh -c conf.tfvars
```

# Enterprise-scale environment
Expand All @@ -59,7 +59,7 @@ docker run --pull=always --env-file aws_envs \
-v "/$PWD/dcapt.tfvars:/data-center-terraform/conf.tfvars" \
-v "/$PWD/dcapt-snapshots.json:/data-center-terraform/dcapt-snapshots.json" \
-v "/$PWD/logs:/data-center-terraform/logs" \
-it atlassianlabs/terraform:2.7.4 ./install.sh -c conf.tfvars
-it atlassianlabs/terraform:2.7.7 ./install.sh -c conf.tfvars
```
### Terminate enterprise-scale environment
Note: install and uninstall commands have to use the same `atlassianlabs/terraform:TAG` image tag.
Expand All @@ -71,7 +71,7 @@ docker run --pull=always --env-file aws_envs \
-v "/$PWD/dcapt.tfvars:/data-center-terraform/conf.tfvars" \
-v "/$PWD/dcapt-snapshots.json:/data-center-terraform/dcapt-snapshots.json" \
-v "/$PWD/logs:/data-center-terraform/logs" \
-it atlassianlabs/terraform:2.7.4 ./uninstall.sh -c conf.tfvars
-it atlassianlabs/terraform:2.7.7 ./uninstall.sh -c conf.tfvars
```

# Collect detailed k8s logs
Expand All @@ -91,7 +91,7 @@ export REGION=us-east-2
docker run --pull=always --env-file aws_envs \
-v "/$PWD/k8s_logs:/data-center-terraform/k8s_logs" \
-v "/$PWD/logs:/data-center-terraform/logs" \
-it atlassianlabs/terraform:2.7.4 ./scripts/collect_k8s_logs.sh atlas-$ENVIRONMENT_NAME-cluster $REGION k8s_logs
-it atlassianlabs/terraform:2.7.7 ./scripts/collect_k8s_logs.sh atlas-$ENVIRONMENT_NAME-cluster $REGION k8s_logs
```

# Force terminate cluster
Expand Down Expand Up @@ -124,7 +124,7 @@ atlassian/dcapt terminate_cluster.py --cluster_name atlas-$ENVIRONMENT_NAME-clus
docker run --pull=always --env-file aws_envs \
-e ENVIRONMENT_NAME=$ENVIRONMENT_NAME \
-e REGION=$REGION \
-it atlassianlabs/terraform:2.7.4 bash
-it atlassianlabs/terraform:2.7.7 bash
```

5. Connect to the product pod. Example below for jira pod with number 0. For other product or pod number change `PRODUCT_POD` accordingly.
Expand All @@ -148,7 +148,7 @@ atlassian/dcapt terminate_cluster.py --cluster_name atlas-$ENVIRONMENT_NAME-clus
-e ENVIRONMENT_NAME=$ENVIRONMENT_NAME \
-e REGION=$REGION \
-v "/$PWD:/data-center-terraform/dc-app-performance-toolkit" \
-it atlassianlabs/terraform:2.7.4 bash
-it atlassianlabs/terraform:2.7.7 bash
```
5. Copy code base and connect to the execution environment pod:
``` bash
Expand Down Expand Up @@ -176,7 +176,7 @@ atlassian/dcapt terminate_cluster.py --cluster_name atlas-$ENVIRONMENT_NAME-clus
-e REGION=$REGION \
-e PRODUCT=$PRODUCT \
-v "/$PWD/script-runner.yml:/data-center-terraform/script-runner.yml" \
-it atlassianlabs/terraform:2.7.4 bash
-it atlassianlabs/terraform:2.7.7 bash
```
5. Run following commands one by one inside docker container:
``` bash
Expand Down Expand Up @@ -204,7 +204,7 @@ To enable detailed CPU/Memory monitoring and Grafana dashboards for visualisatio
docker run --pull=always --env-file aws_envs \
-e ENVIRONMENT_NAME=$ENVIRONMENT_NAME \
-e REGION=$REGION \
-it atlassianlabs/terraform:2.7.4 bash
-it atlassianlabs/terraform:2.7.7 bash
```
``` bash
aws eks update-kubeconfig --name atlas-$ENVIRONMENT_NAME-cluster --region $REGION
Expand Down Expand Up @@ -240,5 +240,5 @@ Note: this option is **not** suitable for full-scale performance runs as local n
-e ENVIRONMENT_NAME=$ENVIRONMENT_NAME \
-v "/$PWD:/data-center-terraform/dc-app-performance-toolkit" \
-v "/$PWD/app/util/k8s/bzt_on_pod.sh:/data-center-terraform/bzt_on_pod.sh" \
-it atlassianlabs/terraform:2.7.4 bash bzt_on_pod.sh jira.yml
-it atlassianlabs/terraform:2.7.7 bash bzt_on_pod.sh jira.yml
```
2 changes: 1 addition & 1 deletion app/util/k8s/dcapt-snapshots.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"size": "small",
"snapshots": [
{
"us-east-2": "snap-0067577f23ce694f1",
"us-east-2": "snap-0b103b4d0d75384f5",
"us-east-1": "snap-0ff264d124d02af3a"
}
]
Expand Down
4 changes: 2 additions & 2 deletions app/util/k8s/dcapt.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -389,8 +389,8 @@ crowd_db_master_password = "Password1!"
# By default, latest supported by DCAPT version is set.
# https://hub.docker.com/r/atlassian/bamboo/tags
# https://hub.docker.com/r/atlassian/bamboo-agent-base/tags
bamboo_version_tag = "9.2.11"
bamboo_agent_version_tag = "9.2.11"
bamboo_version_tag = "9.6.1"
bamboo_agent_version_tag = "9.6.1"

# Helm chart version of Bamboo and Bamboo agent instances
# bamboo_helm_chart_version = "<helm_chart_version>"
Expand Down
2 changes: 1 addition & 1 deletion app/util/k8s/terminate_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def delete_nodegroup(aws_region, cluster_name):
nodegroupName=node_group)['nodegroup']['resources']['autoScalingGroups'][0]['name']
autoscaling_client.delete_auto_scaling_group(AutoScalingGroupName=autoscaling_group_name,
ForceDelete=True)
except Boto3Error as e:
except (Boto3Error, KeyError) as e:
logging.error(f"Deleting autoscaling group {autoscaling_group_name} failed with error: {e}")

try:
Expand Down
32 changes: 27 additions & 5 deletions app/util/pre_run/environment_compliance_check.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import subprocess
import sys
from selenium import webdriver

from packaging import version
from selenium import webdriver

from util.common_util import get_latest_version, get_current_version, get_unsupported_version
from util.analytics.application_info import ApplicationSelector
from util.analytics.analytics import MIN_DEFAULTS
from util.analytics.application_info import ApplicationSelector
from util.common_util import get_latest_version, get_current_version, get_unsupported_version
from util.conf import JIRA_SETTINGS, CONFLUENCE_SETTINGS, BITBUCKET_SETTINGS, JSM_SETTINGS, BAMBOO_SETTINGS, \
CROWD_SETTINGS


APPS_SETTINGS = {
"JIRA": JIRA_SETTINGS,
"CONFLUENCE": CONFLUENCE_SETTINGS,
Expand All @@ -18,6 +19,8 @@
"CROWD": CROWD_SETTINGS,
}

SUPPORTED_JAVA_VERSIONS = [11, 17]


def check_dcapt_version():
latest_version = get_latest_version()
Expand Down Expand Up @@ -94,10 +97,27 @@ def validate_chromedriver_version(app_name, app_settings):
f'Please change `chromedriver` version in your {app_name}.yml.')


def validate_java_version():
try:
response = subprocess.check_output(['java', '-version'], stderr=subprocess.STDOUT)
java_version = str(response.splitlines()[0]).split('"')[1]
print(f'INFO: Java version: {java_version}')
except Exception as e:
print(f"WARNING: Skipping Java version check. Failed to get java version: {e}")
return
java_version_major = int(java_version.split(".")[0])

if java_version_major not in SUPPORTED_JAVA_VERSIONS:
raise SystemExit(
f"ERROR: Current java version {java_version} is not supported. "
f"Supported java versions: {SUPPORTED_JAVA_VERSIONS}")


def analyze_application_configuration(app_name):
app_name_upper = app_name.upper()
app = ApplicationSelector(app_name).application
processors = app.processors
print(f"INFO: {app_name} processors count: {processors}")
app_settings = APPS_SETTINGS[app_name_upper]

try:
Expand All @@ -109,13 +129,15 @@ def analyze_application_configuration(app_name):
app_settings,
min_defaults)
except ValueError:
print("WARNING: Skipping processor count validation because.")
print("WARNING: Skipping processor count validation. Get processor count failed.")

if app_name.upper() == "CROWD":
print("INFO: Skipping Chromedriver check for Crowd.")
else:
validate_chromedriver_version(app_name, app_settings)

validate_java_version()


def main():
check_dcapt_version()
Expand Down

0 comments on commit 5635c0e

Please sign in to comment.