Skip to content

Commit

Permalink
code clean up: rosa classic scripts (#345)
Browse files Browse the repository at this point in the history
* added rosahcp script

* trimmed down extra char

* updated workload
HCP light-weight c-d-v2 iteration will be 7 iteration/node

* removed extra env vars

* increasing node ready timeout

* mgmt cluster env var

* scrapping metric for longer duration

* updated query logic to index MC stat
  • Loading branch information
mukrishn authored Aug 1, 2023
1 parent 426a748 commit 9ec4046
Show file tree
Hide file tree
Showing 20 changed files with 1,160 additions and 762 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"benchmarks": [
{
"name": "node-density",
"workload": "kube-burner-ocp-wrapper",
"trigger_rule": "all_done",
"command": "./run.sh",
"env": {
"WORKLOAD": "node-density",
"LOG_LEVEL": "debug"
}
},
{
"name": "node-desnity-cni",
"workload": "kube-burner-ocp-wrapper",
"trigger_rule": "all_done",
"command": "./run.sh",
"env": {
"WORKLOAD": "node-density-cni",
"LOG_LEVEL": "debug"
}
},
{
"name": "cluster-density-v2",
"workload": "kube-burner-ocp-wrapper",
"trigger_rule": "all_done",
"command": "./run.sh",
"env": {
"WORKLOAD": "cluster-density-v2",
"ITERATIONS": "500",
"LOG_LEVEL": "debug",
"CHURN": "true",
"EXTRA_FLAGS": "--churn-duration=1h --churn-percent=10 --churn-delay=30s"
}
}
]
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"benchmarks": [
{
"name": "cluster-density-ms-p75",
"name": "cluster-density-v2-p75",
"workload": "kube-burner-ocp-wrapper",
"trigger_rule": "all_done",
"command": "./run.sh",
"env": {
"WORKLOAD": "cluster-density-ms",
"ITERATIONS": "75",
"WORKLOAD": "cluster-density-v2",
"ITERATIONS": "63",
"LOG_LEVEL": "debug",
"EXTRA_FLAGS": "--churn-duration=1h --churn-percent=10 --churn-delay=30s"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
{
"benchmarks": [
{
"name": "cluster-density-ms-p90",
"workload": "kube-burner",
"name": "cluster-density-v2-p90",
"workload": "kube-burner-ocp-wrapper",
"trigger_rule": "all_done",
"command": "./run.sh",
"env": {
"WORKLOAD": "cluster-density-ms",
"JOB_ITERATIONS": "100",
"JOB_TIMEOUT": "18000",
"STEP_SIZE": "2m",
"HYPERSHIFT": "true",
"METRICS_PROFILE": "metrics-profiles/hypershift-metrics.yaml",
"QPS": "20",
"BURST": "20",
"LOG_LEVEL": "info",
"PLATFORM_ALERTS": "false",
"CLEANUP_WHEN_FINISH": "true",
"CLEANUP": "true"
"WORKLOAD": "cluster-density-v2",
"ITERATIONS": "84",
"LOG_LEVEL": "debug",
"EXTRA_FLAGS": "--churn-duration=1h --churn-percent=10 --churn-delay=30s"
}
}
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"rosa_hcp": "true",
"aws_profile": "",
"aws_access_key_id": "",
"aws_secret_access_key": "",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"rosa_hcp": "true",
"aws_profile": "",
"aws_access_key_id": "",
"aws_secret_access_key": "",
Expand All @@ -16,7 +15,7 @@
"openshift_worker_instance_type": "m5.2xlarge",
"machineset_metadata_label_prefix": "machine.openshift.io",
"staging_mgmt_provisioner_shards": "b4bb294b-a76c-11ed-91b2-0a580a831ba1",
"number_of_hostedcluster": 2,
"number_of_hostedcluster": 10,
"hcp_install_interval": 60,
"extra_machinepool": [{
"name": "infra",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"aws_profile": "",
"aws_access_key_id": "",
"aws_secret_access_key": "",
"aws_authentication_method": "sts",
"aws_region": "us-east-2",
"rosa_environment": "staging",
"rosa_cli_version": "container",
"ocm_cli_version": "container",
"ocm_environment": "stage",
"managed_channel_group": "nightly",
"managed_ocp_version": "latest",
"openshift_worker_count": 24,
"openshift_network_type": "OVNKubernetes",
"openshift_worker_instance_type": "m5.2xlarge",
"machineset_metadata_label_prefix": "machine.openshift.io",
"staging_mgmt_provisioner_shards": "b4bb294b-a76c-11ed-91b2-0a580a831ba1",
"number_of_hostedcluster": 1,
"hcp_install_interval": 10,
"extra_machinepool": [{
"name": "infra",
"replica": "1",
"instance_type": "r5.xlarge",
"labels": "node-role.kubernetes.io/infra=",
"taints": "node-role.kubernetes.io/infra=:NoSchedule"
}]
}
16 changes: 0 additions & 16 deletions dags/openshift_nightlies/config/install/rosa/ovn-osd.json

This file was deleted.

61 changes: 34 additions & 27 deletions dags/openshift_nightlies/dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from openshift_nightlies.tasks.install.openstack import jetpack
from openshift_nightlies.tasks.install.baremetal import jetski, webfuse
from openshift_nightlies.tasks.install.rosa import rosa
from openshift_nightlies.tasks.install.rosahcp import rosahcp
from openshift_nightlies.tasks.install.rogcp import rogcp
from openshift_nightlies.tasks.install.hypershift import hypershift
from openshift_nightlies.tasks.install.prebuilt import initialize_cluster
Expand Down Expand Up @@ -155,46 +156,50 @@ def _get_openshift_installer(self):
class RosaNightlyDAG(AbstractOpenshiftNightlyDAG):
def build(self):
installer = self._get_openshift_installer()
if installer.get_type() == "rosa_hcp":
install_cluster = installer.get_install_hcp_task()
hosted_installer = self._get_hypershift_openshift_installer()
wait_task = hosted_installer.wait_task()
wait_before_cleanup = hosted_installer.wait_task(id="wait_before_cleanup")
for c_id, install_hc, postinstall_hc, cleanup_hc in install_cluster:
benchmark = self._add_benchmarks(task_group=c_id)
install_hc >> postinstall_hc >> wait_task >> benchmark >> wait_before_cleanup >> cleanup_hc
install_cluster = installer.get_install_task()
final_status = final_dag_status.get_task(self.dag)
with TaskGroup("benchmarks", prefix_group_id=False, dag=self.dag) as benchmarks:
must_gather = self._get_scale_ci_diagnosis().get_must_gather("must-gather")
benchmark_tasks = self._get_e2e_benchmarks().get_benchmarks()
chain(*benchmark_tasks)
# Configure must_gather as downstream of all benchmark tasks
for benchmark in benchmark_tasks:
benchmark >> must_gather
rosa_post_installation = self._get_rosa_postinstall_setup()._get_rosa_postinstallation()
if self.config.cleanup_on_success:
cleanup_cluster = installer.get_cleanup_task()
install_cluster >> rosa_post_installation >> benchmarks >> cleanup_cluster >> final_status
else:
install_cluster = installer.get_install_task()
final_status = final_dag_status.get_task(self.dag)
with TaskGroup("benchmarks", prefix_group_id=False, dag=self.dag) as benchmarks:
must_gather = self._get_scale_ci_diagnosis().get_must_gather("must-gather")
benchmark_tasks = self._get_e2e_benchmarks().get_benchmarks()
chain(*benchmark_tasks)
# Configure must_gather as downstream of all benchmark tasks
for benchmark in benchmark_tasks:
benchmark >> must_gather
rosa_post_installation = self._get_rosa_postinstall_setup()._get_rosa_postinstallation()
if self.config.cleanup_on_success:
cleanup_cluster = installer.get_cleanup_task()
install_cluster >> rosa_post_installation >> benchmarks >> cleanup_cluster >> final_status
else:
install_cluster >> rosa_post_installation >> benchmarks >> final_status
install_cluster >> rosa_post_installation >> benchmarks >> final_status

def _get_openshift_installer(self):
return rosa.RosaInstaller(self.dag, self.config, self.release)

def _get_e2e_benchmarks(self, task_group="benchmarks"):
return e2e.E2EBenchmarks(self.dag, self.config, self.release, task_group)

class RosaHCPNightlyDAG(AbstractOpenshiftNightlyDAG):
def build(self):
installer = self._get_openshift_installer()
install_cluster = installer.get_install_hcp_task()
wait_task = installer.wait_task()
wait_before_cleanup = installer.wait_task(id="wait_before_cleanup")
for c_id, install_hc, postinstall_hc, cleanup_hc in install_cluster:
benchmark = self._add_benchmarks(task_group=c_id)
install_hc >> postinstall_hc >> wait_task >> benchmark >> wait_before_cleanup >> cleanup_hc

def _get_openshift_installer(self):
return rosahcp.RosaHCPInstaller(self.dag, self.config, self.release)

def _get_e2e_benchmarks(self, task_group="benchmarks"):
return e2e.E2EBenchmarks(self.dag, self.config, self.release, task_group)

def _add_benchmarks(self, task_group):
with TaskGroup(task_group, prefix_group_id=False, dag=self.dag) as benchmarks:
benchmark_tasks = self._get_e2e_benchmarks(task_group).get_benchmarks()
chain(*benchmark_tasks)
return benchmarks

def _get_hypershift_openshift_installer(self):
return hypershift.HypershiftInstaller(self.dag, self.config, self.release)


class RoGCPNightlyDAG(AbstractOpenshiftNightlyDAG):
def build(self):
Expand Down Expand Up @@ -242,7 +247,7 @@ def build(self):
install_mgmt_cluster >> rosa_post_installation >> install_hc >> wait_task >> benchmark

def _get_openshift_installer(self):
return rosa.RosaInstaller(self.dag, self.config, self.release)
return rosahcp.RosaHCPInstaller(self.dag, self.config, self.release)

def _get_hypershift_openshift_installer(self):
return hypershift.HypershiftInstaller(self.dag, self.config, self.release)
Expand Down Expand Up @@ -303,6 +308,8 @@ def build_releases():
nightly = OpenstackNightlyDAG(openshift_release, dag_config)
elif openshift_release.platform == "rosa":
nightly = RosaNightlyDAG(openshift_release, dag_config)
elif openshift_release.platform == "rosahcp":
nightly = RosaHCPNightlyDAG(openshift_release, dag_config)
elif openshift_release.platform == "rogcp":
nightly = RoGCPNightlyDAG(openshift_release, dag_config)
elif openshift_release.platform == "hypershift":
Expand Down
54 changes: 13 additions & 41 deletions dags/openshift_nightlies/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,6 @@ platforms:
config:
install: rosa/iam-ovn.json
benchmarks: control-plane.json
- name: osd-ovn-control-plane
schedule: "30 12 * * 1,3,5"
config:
install: rosa/ovn-osd.json
benchmarks: control-plane.json
- name: osd-ovn-data-plane
schedule: "30 1 * * 1,3,5" # an hour gap for OSD to avoid OsdCcsAdmin key limit
config:
install: rosa/ovn-osd.json
benchmarks: data-plane-mgs.json
- name: ocm-api-load
schedule: "None"
config:
Expand All @@ -123,16 +113,25 @@ platforms:
config:
install: rosa/upgrade.json
benchmarks: upgrade.json
- name: rosa-hcp-control-plane

rosahcp:
versions: ["4.12", "4.13"]
variants:
- name: p75-control-plane
schedule: "0 12 * * 3"
config:
install: rosa/rosa-hcp-ovn.json
install: rosa-hcp/p75-control-plane.json
benchmarks: hosted-control-plane-p75.json
- name: rosa-hcp-data-plane
- name: data-plane-v2
schedule: "1 12 * * 3"
config:
install: rosa/rosa-hcp-ovn-data-plane.json
install: rosa-hcp/data-plane.json
benchmarks: data-plane-v2.json
- name: small-control-plane
schedule: "2 12 * * 3"
config:
install: rosa-hcp/small-control-plane.json
benchmarks: hcp-small-control-plane.json

rogcp:
versions: ["4.12", "4.13"]
Expand All @@ -148,33 +147,6 @@ platforms:
install: rogcp/ovn.json
benchmarks: data-plane-mgs.json

hypershift:
versions: ["4.12", "4.13"]
variants:
- name: management-control-plane
schedule: "30 3 * * 1,3,5" # an hour gap for OSD to avoid OsdCcsAdmin key limit
config:
install: hypershift/none-type.json
benchmarks: management-control-plane.json
- name: ovn-control-plane-p75
schedule: "30 4 * * 1,3,5" # an hour gap for OSD to avoid OsdCcsAdmin key limit
config:
install: hypershift/ovn-p75.json
benchmarks: hosted-control-plane-p75.json
- name: ovn-control-plane-p90
schedule: "30 5 * * 1,3,5" # an hour gap for OSD to avoid OsdCcsAdmin key limit
config:
install: hypershift/ovn-p90.json
benchmarks: hosted-control-plane-p90.json
- name: chaos-ovn-control-plane-p75
config:
install: hypershift/ovn-p75.json
benchmarks: hosted-control-plane-chaos-p75.json
- name: chaos-ovn-control-plane-p90
config:
install: hypershift/ovn-p90.json
benchmarks: hosted-control-plane-chaos-p90.json

prebuilt:
versions: ["4.x"]
variants:
Expand Down
2 changes: 1 addition & 1 deletion dags/openshift_nightlies/models/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def _generate_cluster_name(self):
else:
cluster_name = f"{git_user}-{git_branch}-{release_name}"

if self.platform == 'rosa' or self.platform == 'rogcp' or self.platform == 'hypershift':
if self.platform == 'rosa' or self.platform == 'rogcp' or self.platform == 'hypershift' or self.platform == 'rosahcp':
#Only 15 chars are allowed
cluster_version = str(self.version).replace(".","")
return "perf-"+md5(cluster_name.encode("ascii")).hexdigest()[:3]
Expand Down
Loading

0 comments on commit 9ec4046

Please sign in to comment.