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

Update AMQ Perf #7

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
12 changes: 9 additions & 3 deletions amq-online/ansible/inventories/inventory.template
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
[all:vars]
temp_dir=/tmp

[master:vars]
[intly_master:vars]
ansible_user=root

[master]
master.evals.example.com
[maestro_master:vars]
ansible_user=root

[intly_master]
intly_master.evals.example.com

[maestro_master]
maestro_master.evals.example.com
11 changes: 7 additions & 4 deletions amq-online/ansible/playbooks/cleanup.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
---
- hosts: localhost
- hosts: intly_master
gather_facts: no
tasks:
- name: Remove {{test_ns}} project
shell: oc delete project {{test_ns}}

- name: Remove {{maestro_ns}} project
shell: oc delete project {{maestro_ns}}

- name: Remove none auth service
shell: oc delete authenticationservice none-authservice -n {{enmasse_infra_ns}}

- hosts: maestro_master
gather_facts: no
tasks:
- name: Remove {{maestro_ns}} project
shell: oc delete project {{maestro_ns}}
14 changes: 13 additions & 1 deletion amq-online/ansible/playbooks/execute_tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
---
- hosts: localhost
- hosts: intly_master
gather_facts: no
tasks:
- name: Fetch addressspace standard infra uidd
shell: oc get addressspace standard -o jsonpath='{.status.endpointStatuses[0].externalHost}' -n {{test_ns}}
register: standard_addressspace
changed_when: False
- name: Get standard address space uidd
add_host:
name: AMQ_CONFIG
standard_uidd: "{{standard_addressspace.stdout}}"

- hosts: maestro_master
gather_facts: no
tasks:
- include_role:
Expand Down
323 changes: 155 additions & 168 deletions amq-online/ansible/playbooks/roles/maestro-client/defaults/main.yml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,14 @@
- include: execute_baseline_tests.yml pkgName="{{item}}"
with_items: "{{ basline_test_configs }}"

- include: execute_baseline_tests.yml pkgName="{{item}}"
with_items: "{{ basline_test_configs }}"
- include: scale_workers.yml

- include: execute_baseline_tests.yml pkgName="{{item}}"
with_items: "{{ basline_test_configs }}"
# - include: execute_baseline_tests.yml pkgName="{{item}}"
# with_items: "{{ basline_test_configs }}"

- name: Scale maestro worker to {{worker_nodes_run_2}} nodes
shell: oc scale deployment --replicas={{worker_nodes_run_2}} maestro-worker -n {{ maestro_ns }}
# - include: scale_workers.yml

- name: Ensure maestro worker replicas are ready
shell: oc get deployment maestro-worker -o jsonpath='{.status.availableReplicas}' -n {{maestro_ns}}
register: availableReplicas
until: availableReplicas.stdout == "{{worker_nodes_run_2}}"
retries: 20
delay: 5
changed_when: False
# - include: execute_baseline_tests.yml pkgName="{{item}}"
# with_items: "{{ basline_test_configs }}"

- include: execute_baseline_tests.yml pkgName="{{item}}"
with_items: "{{ basline_test_configs }}"

- include: execute_baseline_tests.yml pkgName="{{item}}"
with_items: "{{ basline_test_configs }}"

- include: execute_baseline_tests.yml pkgName="{{item}}"
with_items: "{{ basline_test_configs }}"
# - include: scale_workers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- name: Process Incremental test case template
template:
src: increment-testcase.yaml.j2
dest: "{{temp_dir}}/increment-testcase-{{item.id}}.yaml"
with_items: "{{ increment_test_configs }}"

- name: Apply incremental test case config map
shell: oc apply -f {{temp_dir}}/increment-testcase-{{item.id}}.yaml -n {{ maestro_ns }}
with_items: "{{ increment_test_configs }}"

- include: execute_increment_tests.yml pkgName="{{item}}"
with_items: "{{ increment_test_configs }}"
46 changes: 1 addition & 45 deletions amq-online/ansible/playbooks/roles/maestro-client/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,3 @@
---
- name: Fetch addressspace standard infra uidd
shell: oc get addressspace standard -o yaml -n {{test_ns}} | grep infra-uuid | cut -d ' ' -f6
register: standard_addressspace
changed_when: False

- name: Get standard address space uidd
set_fact:
standard_uidd: "{{standard_addressspace.stdout}}"

- name: Fetch addressspace brokered infra uidd
shell: oc get addressspace brokered -o yaml -n {{test_ns}} | grep infra-uuid | cut -d ' ' -f6
register: brokered_addressspace
changed_when: False

- name: Get brokered address space uidd
set_fact:
brokered_uidd: "{{brokered_addressspace.stdout}}"

- include: baseline_run.yml

# - name: Process fair increment test case template
# template:
# src: fair-increment-testcase.yaml.j2
# dest: "{{temp_dir}}/fair-increment-testcase-{{item.id}}.yml"
# with_items: "{{ fair_increment_test_configs }}"

# - name: Apply fair increment test case config map
# shell: oc apply -f {{temp_dir}}/fair-increment-testcase-{{item.id}}.yml -n {{ maestro_ns }}
# with_items: "{{fair_increment_test_configs}}"

# - include: execute_fair_increment_tests.yml pkgName="{{item}}"
# with_items: "{{ fair_increment_test_configs }}"

# - name: Process increment test case template
# template:
# src: increment-testcase.yaml.j2
# dest: "{{temp_dir}}/increment-testcase-{{item.id}}.yml"
# with_items: "{{ increment_test_configs }}"

# - name: Apply increment test case config map
# shell: oc apply -f {{temp_dir}}/increment-testcase-{{item.id}}.yml -n {{ maestro_ns }}
# with_items: "{{increment_test_configs }}"

# - include: execute_increment_tests.yml pkgName="{{item}}"
# with_items: "{{ increment_test_configs }}"

# - include: increment_run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
- name: Scale workers back to flush memory
shell: oc scale deployment maestro-worker -n maestro --replicas=0

- name: Ensure workers have scaled back
shell: oc get deployment maestro-worker -n maestro -o jsonpath='{.spec.replicas}'
register: replica_count
until: replica_count.stdout == "0"
retries: 20
delay: 10
changed_when: False

- name: Restore workers replica count
shell: oc scale deployment maestro-worker -n maestro --replicas=2

- name: Ensure workers have scaled up
shell: oc get deployment maestro-worker -n maestro -o jsonpath='{..status.availableReplicas}'
register: replica_count
until: replica_count.stdout == "2"
retries: 20
delay: 10
changed_when: False
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,22 @@ spec:
env:
- name: MAESTRO_BROKER
value: mqtt://broker
- name: SUT_NAME
valueFrom:
configMapKeyRef:
name: {{item.name}}
key: name
- name: SUT_VERSION
value: v1.4.1
- name: SUT_TAGS
valueFrom:
configMapKeyRef:
name: {{item.name}}
key: parallelCon
- name: TEST_TAGS
value: integreatly-test
- name: LAB_NAME
value: POC
- name: SEND_RECEIVE_URL
valueFrom:
configMapKeyRef:
Expand Down Expand Up @@ -76,7 +92,7 @@ spec:
valueFrom:
configMapKeyRef:
name: {{ item.name }}
key: parallelCount
key: parallelCon
optional: true
- name: DISTRIBUTION_STRATEGY
valueFrom:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ kind: ConfigMap
metadata:
name: {{item.name}}
data:
name: {{item.name}}
sendReceiveUrl: {{item.sendReceiveUrl}}
messageSize: "{{item.messageSize}}"
testDuration: "{{item.testDuration}}"
rate: "{{item.rate}}"
testCase: {{item.testCase}}
warmUp: "false"
parallelCon: "{{item.parallelCon}}"
maestro-cli.properties: |
warm-up.message.count=10000
warm-up.rate.percent=10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ spec:
env:
- name: MAESTRO_BROKER
value: mqtt://broker
- name: SUT_NAME
valueFrom:
configMapKeyRef:
name: {{item.name}}
key: name
- name: SUT_VERSION
value: v1.4.1
- name: SUT_TAGS
value: integreatly
- name: TEST_TAGS
value: integreatly-test
- name: LAB_NAME
value: POC
- name: SEND_RECEIVE_URL
valueFrom:
configMapKeyRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{item.name}}
data:
data:
name: {{item.name}}
sendReceiveUrl: {{item.sendReceiveUrl}}
messageSize: "{{item.messageSize}}"
testDuration: "{{item.testDuration}}"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
mysql_user: "maestro"
mysql_password: "maestroReports"
mysql_password: "maestro-dev"
mysql_db: "maestro"
maria_image: "centos/mariadb-101-centos7"
maria_name: "mariadb-101-centos7"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: maestro-results
spec:
replicas: 1
selector:
matchLabels:
component: results
app: maestro
template:
metadata:
labels:
component: results
app: maestro
spec:
strategy:
type: Recreate
affinity:
nodeAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 1
preference:
matchExpressions:
- key: maestro-node-role
operator: In
values:
- infra
containers:
- name: maestro-reports
image: maestroperf/maestro-results-server:edge
imagePullPolicy: Always
livenessProbe:
httpGet:
path: /api/live
port: 6500
initialDelaySeconds: 5
timeoutSeconds: 5
periodSeconds: 20
failureThreshold: 3
env:
- name: MAESTRO_BROKER
value: mqtt://broker
- name: MAESTRO_REPORTS_DRIVER
value: org.mariadb.jdbc.Driver
- name: MAESTRO_REPORTS_DATASOURCE_URL
value: jdbc:mariadb://mariadb-101-centos7:3306/maestro
- name: MAESTRO_REPORTS_DATASOURCE_USERNAME
value: maestro
- name: MAESTRO_REPORTS_DATASOURCE_PASSWORD
value: maestro-dev
ports:
- name: http
containerPort: 6500
volumeMounts:
- mountPath: /maestro
name: results-data
volumes:
- name: results-data
persistentVolumeClaim:
claimName: results-data
Loading