---kind:TemplateapiVersion:template.openshift.io/v1metadata:name:pod-autoscaling-examplecreationTimestamp:annotations:description:Pod Autoscaling exmaple with Chaos ProfessoriconClass:icon-tomcattags:tomcat,tomcat7,java,jboss,xpaas,autoscaling,chaos-professorversion:0.0.1objects:-kind:ImageStreamapiVersion:v1metadata:name:redhat-openjdk18-openshiftspec:dockerImageRepository:registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshifttags:-name:'1.0'annotations:description:OpenJDK S2I images.iconClass:icon-jbosstags:builder,java,xpaassupports:java:8,xpaas:1.0sampleRepo:https://github.com/jboss-openshift/openshift-quickstartssampleContextDir:undertow-servletversion:'1.0'-kind:ServiceapiVersion:v1spec:ports:-port:8080targetPort:8080selector:deploymentConfig:"${APPLICATION_NAME}"metadata:name:"${APPLICATION_NAME}"labels:application:"${APPLICATION_NAME}"annotations:description:The web server's http port.-kind:RouteapiVersion:v1id:"${APPLICATION_NAME}-http"metadata:name:"${APPLICATION_NAME}"labels:application:"${APPLICATION_NAME}"annotations:description:Route for application's http service.spec:host:"${HOSTNAME_HTTP}"to:name:"${APPLICATION_NAME}"-kind:ImageStreamapiVersion:v1metadata:name:"${APPLICATION_NAME}"labels:application:"${APPLICATION_NAME}"-kind:BuildConfigapiVersion:v1metadata:name:"${APPLICATION_NAME}"labels:application:"${APPLICATION_NAME}"spec:source:type:Gitgit:uri:"${SOURCE_REPOSITORY_URL}"ref:"${SOURCE_REPOSITORY_REF}"contextDir:"${CONTEXT_DIR}"strategy:type:SourcesourceStrategy:forcePull:truefrom:kind:ImageStreamTagname:redhat-openjdk18-openshift:latestoutput:to:kind:ImageStreamTagname:"${APPLICATION_NAME}:latest"triggers:-type:GitHubgithub:secret:"${GITHUB_WEBHOOK_SECRET}"-type:Genericgeneric:secret:"${GENERIC_WEBHOOK_SECRET}"-type:ImageChangeimageChange:{}-type:ConfigChange-kind:DeploymentConfigapiVersion:v1metadata:name:"${APPLICATION_NAME}"labels:application:"${APPLICATION_NAME}"spec:strategy:type:Recreatetriggers:-type:ImageChangeimageChangeParams:automatic:truecontainerNames:-"${APPLICATION_NAME}"from:kind:ImageStreamname:"${APPLICATION_NAME}"-type:ConfigChangereplicas:1selector:deploymentConfig:"${APPLICATION_NAME}"template:metadata:name:"${APPLICATION_NAME}"labels:deploymentConfig:"${APPLICATION_NAME}"application:"${APPLICATION_NAME}"spec:terminationGracePeriodSeconds:60containers:-name:"${APPLICATION_NAME}"image:"${APPLICATION_NAME}"resources:limits:cpu:500mmemory:512Mirequests:cpu:500mmemory:512MiimagePullPolicy:AlwaysreadinessProbe:failureThreshold:3httpGet:path:"/"port:8080scheme:HTTPinitialDelaySeconds:25periodSeconds:10successThreshold:1timeoutSeconds:1ports:-name:jolokiacontainerPort:8778protocol:TCP-name:httpcontainerPort:8080protocol:TCPenv:-name:JWS_ADMIN_USERNAMEvalue:"${JWS_ADMIN_USERNAME}"-name:JWS_ADMIN_PASSWORDvalue:"${JWS_ADMIN_PASSWORD}"-kind:HorizontalPodAutoscalerapiVersion:autoscaling/v1metadata:name:"${APPLICATION_NAME}"labels:application:"${APPLICATION_NAME}"spec:scaleTargetRef:kind:DeploymentConfigname:"${APPLICATION_NAME}"apiVersion:v1subresource:scaleminReplicas:${{HorizontalPodAutoscaler_MIN_REPLICAS}}maxReplicas:${{HorizontalPodAutoscaler_MAX_REPLICAS}}cpuUtilization:targetCPUUtilizationPercentage:"${HorizontalPodAutoscaler_CPU_TARGET_PERCENTAGE}"parameters:-name:APPLICATION_NAMEdescription:The name for the application.value:choas-professorrequired:true-name:HorizontalPodAutoscaler_MIN_REPLICASdescription:'HorizontalPodAutoscaler:minreplicas'value:"1"required:true-name:HorizontalPodAutoscaler_MAX_REPLICASdescription:'HorizontalPodAutoscaler:maxreplicas'value:"4"required:true-name:HorizontalPodAutoscaler_CPU_TARGET_PERCENTAGEdescription:'HorizontalPodAutoscaler:targetPercentageofcpuUtilization'value:'60'required:true-name:HOSTNAME_HTTPdescription:'Customhostnameforhttpserviceroute.Leaveblankfordefaulthostname,e.g.:<application-name>-<project>.<default-domain-suffix>'-name:SOURCE_REPOSITORY_URLdescription:Git source URI for applicationvalue:https://github.com/ConSol/chaos-professor.gitrequired:true-name:SOURCE_REPOSITORY_REFdescription:Git branch/tag referencevalue:master-name:CONTEXT_DIRdescription:Path within Git project to build; empty for root project directory.value:''-name:GITHUB_WEBHOOK_SECRETdescription:GitHub trigger secretgenerate:expressionfrom:"[a-zA-Z0-9]{8}"required:true-name:GENERIC_WEBHOOK_SECRETdescription:Generic build trigger secretgenerate:expressionfrom:"[a-zA-Z0-9]{8}"required:truelabels:template:jws30-tomcat7-basic-s2ixpaas:1.2.0
# Only 4fun
ab 'http://choas-professor-omd.paas.osp.consol.de/chaos/heapheap?size=500&time=10000'
ab 'http://choas-professor-omd.paas.osp.consol.de/chaos/cpu?threads=100&keepAlive=20000'
ab -c 10 -n 100 'http://choas-professor-omd.paas.osp.consol.de/chaos/cpu?threads=100&keepAlive=200'