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

Ibm z #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
####
# This Dockerfile is used in order to build a container that runs a
# Quarkus application in JVM mode on s390x architecture (IBM System Z)
#
# Before building the docker image run:
#
# mvn package
#
# Then, build the image with:
#
# podman build -f src/main/docker/Dockerfile.jvmZ -t quay.io/<username>/mannequin:0.0-z .
#
# Then run the container using:
#
# podman run -i --rm -p 8080:8080 quarkus/mannequin-jvm quay.io/<username>/mannequin:0.0-z .
#
# the instructions here are to put it in a public registry (e.g. quay.io)
# so that you can pull it into a pod deployment on OpenShift
#
###
FROM registry.access.redhat.com/ubi8/ubi:latest
RUN dnf -y update && dnf -y install java-1.8.0-openjdk-devel
ENV JAVA_OPTIONS=-Dquarkus.http.host=0.0.0.0
COPY target/lib/* /deployments/lib/
COPY target/*-runner.jar /deployments/app.jar
COPY ./java-runner.sh /deployments/java-runner.sh
ENTRYPOINT [ "/deployments/java-runner.sh" ]
49 changes: 25 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
# Istio/Maistra scalability tests

To get this benchmark running:
## Prerequisites

1. Install OCP and Ansible
2. Login to OCP: `oc login -u system:admin`
3. Install Istio: https://maistra.io/docs/getting_started/install/
### OCP
### Ansible
### Hyperfoil
### Hyperfoil Ansible task

```bash
git clone https://github.com/Hyperfoil/hyperfoil_setup.git
cd hyperfoil_setup
ansible-galaxy install hyperfoil.hyperfoil_setup
ansible-galaxy install hyperfoil.hyperfoil_shutdown
ansible-galaxy install hyperfoil.hyperfoil_test
```

### Firewall

## Setup

1. Install prerequisites
2. Run `prep_nodes.sh` to label the nodes.
3. Login to OCP: `oc login -u system:admin`
4. Install Istio: https://maistra.io/docs/getting_started/install/
- In `controlplane/basic-install` set `gateways.ior_enabled: true` and `mixer.telemetry.enabled: false`
- I suggest locating `istio-system` pods on the infra node (the same where the `default/router` resides):
`oc patch namespace istio-system -p '{"metadata":{"annotations":{"openshift.io/node-selector":"node-role.kubernetes.io/infra=true"}}}'`
- I had trouble with `clusterrole istio-sidecar-injector-istio-system` - this was not correctly created and I had to fix it manually, applying:
```
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: istio-sidecar-injector-istio-system
labels:
app: istio-sidecar-injector
release: istio
istio: sidecar-injector
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
- apiGroups: ["admissionregistration.k8s.io"]
resources: ["mutatingwebhookconfigurations"]
verbs: ["get", "list", "watch", "patch", "create" ]
```
4. You might need to add the policies:

5. You might need to add the policies:
```
oc adm policy add-scc-to-user anyuid -z istio-ingress-service-account -n istio-system
oc adm policy add-scc-to-user anyuid -z default -n istio-system
Expand Down Expand Up @@ -61,4 +62,4 @@ rules:
* There seems to be a bug in IOR (MAISTRA-356) that is not resolved in the image I use. Therefore you have to manually fix the generated route: `oc get route -n istio-system -l maistra.io/generated-by=ior` `oc patch route -n istio-system app-gateway-xxxxx -p '{ "spec": { "port" : { "targetPort": 443 }}}'`

TODO
oc get deployment istio-ingressgateway -o json | jq '.spec.template.spec.containers[].resources.requests={},.spec.template.spec.containers[].args += ["--proxy-concurrency", "4"]'
oc get deployment istio-ingressgateway -o json | jq '.spec.template.spec.containers[].resources.requests={},.spec.template.spec.containers[].args += ["--proxy-concurrency", "4"]'
15 changes: 15 additions & 0 deletions clusterrole-fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: istio-sidecar-injector-istio-system
labels:
app: istio-sidecar-injector
release: istio
istio: sidecar-injector
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
- apiGroups: ["admissionregistration.k8s.io"]
resources: ["mutatingwebhookconfigurations"]
verbs: ["get", "list", "watch", "patch", "create" ]
5 changes: 4 additions & 1 deletion dc.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ items:
operator: Exists
effect: NoExecute
containers:
{% if backend_type == "java-Z" %}
- image: quay.io/cfilleke/mannequin:0.0-z
{% endif %}
{% if backend_type == "java" %}
- image: quay.io/rvansa/mannequin:jvm-latest
- image: quay.io/cfilleke/mannequin:0.0-z
{% endif %}
{% if backend_type == "native" %}
- image: quay.io/rvansa/mannequin:native
Expand Down
72 changes: 72 additions & 0 deletions hosts.mysetup
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
[hyperfoil:children]
hyperfoil_controller
hyperfoil_agent

[hyperfoil_controller]

[hyperfoil_agent]
localhost

[hyperfoil:vars]
hyperfoil_jfr=false

[openshift]
localhost

[openshift:vars]
proxy_cpu=200m
backend_cpu=300m
backend_type=java

[compute]

[all:vars]
oc_username=kubeadmin
#oc_token=sha256~THE-TOKEN
oc_password=THE-CLUSTER-PASSWORD
hyperfoil_deployer=k8s
hyperfoil_controller_protocol=https
hyperfoil_controller_host=hyperfoil.apps.test.perf-lab-myocp4.com
hyperfoil_controller_port=443
hyperfoil_validate_certs=false
test_rampup_duration=120
test_steady_duration=300
test_name=closedmodel
#test_name=shardedwrk
fork=all
http2="true"

# For open-model
test_users_per_sec=4500
test_inc_users_per_sec=1500
# For closed-model
#test_concurrent_users=12000
#test_shared_connections=5376
#test_shared_connections=60000
test_concurrent_users=6000
test_shared_connections=6000

pods_per_dc=1
num_dc=40
use_istio=true
#use_istio=false
record_envoy_stats=false
#namespace=plain-scale
#wildcard_domain=plain.apps.test.perf-lab-myocp4.com

namespace=mesh-scale
control_plane=mesh-control-plane
wildcard_domain=mesh.apps.test.perf-lab-myocp4.com

#namespace=istio-scale
#control_plane=istio-system
#wildcard_domain=istio.apps.test.perf-lab-myocp4.com

policy_version=new

target=gateways
#target=routers
#target=services

expected_routers=0
expected_gateways="1"
3 changes: 3 additions & 0 deletions java-runner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/bash

java -cp '/deployments/lib/*' -jar /deployments/app.jar
14 changes: 14 additions & 0 deletions prep-nodes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/bash

# need to label the nodes

for i in `oc get no | grep worker | awk '{print $1}'`
do
oc label node $i test.role=workload
oc label node $i workload=${i}
done

for i in `oc get no | grep worker | awk '{print $1}' | tail -1`
do
oc label node $i test.role=router --overwrite
done
2 changes: 1 addition & 1 deletion setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
num_apps: "{{ (num_dc | int) / 5 }}"
- name: Login
when: oc_username is defined and oc_password is defined
command: "oc login --username={{ oc_username }} --password={{ oc_password }}"
command: "oc login --username={{ oc_username }} --password={{ oc_password }} --server=api.maistra-qez-49.maistra.upshift.redhat.com:6443"
- name: Check namespace presence
command: "oc get project {{ namespace }}"
register: ns_exists
Expand Down
15 changes: 15 additions & 0 deletions sidecar-injector.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: istio-sidecar-injector-istio-system
labels:
app: istio-sidecar-injector
release: istio
istio: sidecar-injector
rules:
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
- apiGroups: ["admissionregistration.k8s.io"]
resources: ["mutatingwebhookconfigurations"]
verbs: ["get", "list", "watch", "patch", "create" ]
2 changes: 1 addition & 1 deletion smcp_v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
cpu: "256"
memory: 256Gi
requests:
cpu: "16"
cpu: "7"
memory: 2Gi
deployment:
autoScaling:
Expand Down