Skip to content
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
10 changes: 9 additions & 1 deletion camel-amq-fakeapp/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,15 @@ Failure injection may be added with a future version.
The container image can easily be build with the fabric8 build target, which uses the S2I strategy provided you are connected to OpenShift. Once you have cloned the git repository execute the following commands:

$ cd auto-perf-test/camel-amq-fakeapp
Change amqp.host in the following file
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Can you move the instruction before the code part so that we only have the command there?

camel-amq-fakeapp/src/main/openshift/camel-amq-fakeapp-props-cm.yaml
camel-amq-fakeapp/src/main/resources/application.properties

Create certificate as described below in section as prerequisite.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need that here? The certificate is not required until deployment, is it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,otherwise test case will not run successfully.one has to run it with -DskipTest option.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok good point. We can have the change in application.properties made and the jks created here. It also makes sense to have it in the build phase as it is close to the code. ConfigMap and secrets can then be created during deployment. In a real project (and we may do that later) I would use an embedded broker for the component test not to have any external dependency. git clone, mvn package should just work

make sure amqp.options.transport.trustStoreLocation is correct camel-amq-fakeapp/src/main/resources/application.properties

$ oc login
$ mvn fabric8:build
$ mvn package fabric8:build
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fabric8 does an S2I build. IIRC it takes the code from the git repo

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it does the binary build.if you check the camel-amq-fakeapp-bc.yaml there is no mention of the git repo and it specifies type as binary.


== Deployment

Expand Down Expand Up @@ -77,6 +84,7 @@ The secret can then be mounted in the container by updating the deployment confi
You may have noted that the openshift directory in the git repository also contains a configMap. This configMap is used for externalising environment dependent properties that are injected into the Spring Boot application through application.properties. Defaults can be defined in the property file provided with the application archive (jar). Only properties whose values should be overwritten can be specified in the ConfigMap. This works as Spring Boot will privilege values defined externally to the ones defined in application.properties embedded in the jar. Here are the steps that have been used. Alternatively you can use the "oc create -f" command provided earlier.

$ oc create configmap camel-amq-fakeapp-props --from-env-file=src/main/resources/application.properties
oc create -f src/main/openshift/camel-amq-fakeapp-props-cm.yaml

application.properties is a streamlined version only including values that differ from the ones embedded in the jar.

Expand Down
2 changes: 2 additions & 0 deletions enmasse/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ The deployment is pretty straightforward. I used what was the current release at
Once you have cloned the repository you can follow the http://enmasse.io/documentation/0.19.0/[instructions] to deploy EnMasse. In short the following will have the user admin deploying the EnMasse components in the perftest project using provided ansible playbook:
[source,bash]
----
$ oc new-project perftest
create a persitence volume as statefulset requires it,one can use the template provided here(oc create -f brokerpv.yaml )
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are right we should state that a 2GB PV is required for the provisioning of EnMasse. That said we don't have brokerpv.yaml in the repo and the file would be different for every OCP cluster. We could just have before "In short the following will ..." something like: "Note that you need to have a 2 GB persistent volume available"

$ ./enmasse-0.19.0/deploy-openshift.sh -n perftest -u admin
----

Expand Down
2 changes: 1 addition & 1 deletion jmeter/openshift/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ A label can also be added to the config

Very similar to the test plan certificates can be injected into the container. A secret may be used for this purpose rather than a configMap. A java keystore containing the broker certificates has been created in the <<../../enmasse/README.adoc#,EnMasse section>>. A password is also necessary to access the keystore and may be provided as environment variable. Both can be injected with a single secret running the following command in the same directory that was used for the creation of the java keystore.

$ oc create secret generic broker-jks --from-literal=J_JKS_PWD=xxxxxx --from-file=./amqp-certs/amqp.jks
$ oc create secret generic broker-jks --from-literal=JKS_PWD=xxxxxx --from-file=./amqp-certs/amqp.jks
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JMeter requires a plugin to read environment variables. As a quick workaround the JMeter run script passes env variables with J_ prefix as system parameters. In that case J_JKS_PWD is correct. Alternatively we could add the plugin, remove the logic from script and use env() in the test plan


== Run

Expand Down