[
https://issues.jboss.org/browse/JBIDE-15484?page=com.atlassian.jira.plugi...
]
Andre Dietisheim commented on JBIDE-15484:
------------------------------------------
For our own documentation purpose:
It's crucial to make sure the application is running on several gears.
1.) You need an application that creates some logs:
{code}
git clone
https://github.com/jboss-jdf/ticket-monster.git
{code}
Then modify persistence.xml so that hibernate logs its queries to the log:
{code:title=src/main/resources/META-INF/persistence.xml}
<property name="hibernate.show_sql" value="true" />
{code}
Then build, copy the resulting war to the application git-repository and push it to
OpenShift:
{code}
mvn clean package
cp target/ticket-monster.war ../../scaled/deployments/
git add ../../scaled/deployments/ticket-monster.war
git commit
git push origin
{code}
2.) to check whether the application is running on several gears, curl the application:
{code}
curl -H "Accept: application/xml; version=1.2" --user USER:PASSWORD
https://openshift.redhat.com/broker/rest/domains/foogoo/applications/scaled -X GET | grep
gear-count
{code}
In the response you'll spot the gears it's running on via the *gear-count*
property:
{code}
<gear-count>2</gear-count>
{code}
3.) Then produce some load via a bash-script that curls to the database-backend within
ticketmonster:
{code}
#!/bin/sh
for i in {1..10000}
do
curl
"http://scaled-foogoo.rhcloud.com/ticket-monster/rest/shows?event=1&_=1380112212405"
-H "Host: scaled-foogoo.rhcloud.com" -H "Accept: application/json,
text/javascript" -H "Referer:
http://scaled-foogoo.rhcloud.com/ticket-monster/" -H "X-Requested-With:
XMLHttpRequest"
done
{code}
4.) watch the application logs
Provide support for scaled app when tailing log files
-----------------------------------------------------
Key: JBIDE-15484
URL:
https://issues.jboss.org/browse/JBIDE-15484
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 4.1.0.Final
Reporter: Xavier Coulon
Assignee: Xavier Coulon
Fix For: 4.1.1.Alpha2, 4.2.0.Alpha1
Seems like it's simply a matter of adding a '--gears' parameter in the ssh
command when the application is scalable.
The dialog could provide a checkbox (enabled by default) to let the user choose whether
she wants to grab all logs or just those on the HA-Proxy
See [~lincolnthree]'s blog post on the subject:
http://ocpsoft.org/jboss/openshift-pro-tip-scaling-tail-server-logs-on-al...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira