Skip to content
This repository has been archived by the owner on Oct 5, 2021. It is now read-only.

Commit

Permalink
merging ClusterMonitor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Isuru Haththotuwa committed Jun 10, 2014
2 parents 45354f4 + 57ae39c commit d03ab5a
Show file tree
Hide file tree
Showing 76 changed files with 1,294 additions and 111 deletions.
44 changes: 37 additions & 7 deletions boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ cep_artifact_path="$resource_path/cep/artifacts/"
puppet_env="stratos"
puppet_installed="false"
cep_port=7611
cep_port_offset=0
activemq_client_libs=(activemq-broker-5.9.1.jar activemq-client-5.9.1.jar geronimo-j2ee-management_1.1_spec-1.0.1.jar geronimo-jms_1.1_spec-1.1.1.jar hawtbuf-1.9.jar)
export LOG=$log_path/stratos-setup.log

Expand All @@ -49,6 +50,9 @@ silent_mode="false"
puppet_only="false"
deploy_services="true"

#/etc/hosts mapping
using_dns="false"

# Registry databases
registry_db="registry"

Expand Down Expand Up @@ -276,7 +280,16 @@ function setup_apache_stratos() {
}

function run_setup_sh() {
/bin/bash $setup_path/setup.sh -p "default"
separate_cep=$(read_user_input "Do you need to setup WSO2 CEP as a separate service? [y/n] " "" $separate_cep )
if [[ $separate_cep =~ ^[Yy]$ ]]; then
separate_cep="true"
cep_port=7614
cep_port_offset=3
/bin/bash $setup_path/setup.sh -p "stratos"
su - $host_user -c "/bin/bash $setup_path/setup_cep.sh"
else
/bin/bash $setup_path/setup.sh -p "default"
fi
}

function get_service_deployment_confirmations() {
Expand Down Expand Up @@ -705,11 +718,12 @@ function deploy_puppet() {
cp -rf puppet/* /etc/puppet/
echo "Puppet files successfully deployed."

using_dns=$(read_user_input "Do you need to /etc/hosts hostname mapping? [y/n] : " "" $using_dns )
if [[ $using_dns =~ ^[Yy]$ ]]; then
using_etc_host_mapping=$(read_user_input "Do you need to /etc/hosts hostname mapping? [y/n] : " "" $using_etc_host_mapping )
if [[ $using_etc_host_mapping =~ ^[Yy]$ ]]; then
using_dns="false"
else
using_dns="true"

fi

echo "Configuring Puppet scripts..."
Expand Down Expand Up @@ -912,11 +926,15 @@ function start_servers() {

# Get user confirmations to start WSO2 PPaaS core services
get_core_services_confirmations
profile="default"
if [[ $separate_cep = "true" ]]; then
profile="stratos"
fi

if [[ $bam_enabled = "true" ]]; then
# Setup BAM server
echo "Starting BAM core service..."
nohup su - $host_user -c "/bin/bash $setup_path/setup_bam_logging.sh" >> wso2bam.log
nohup su - $host_user -c "/bin/bash $setup_path/setup_bam_logging.sh -p $profile" >> wso2bam.log
while ! echo exit | nc localhost $BAM_PORT; do sleep $SLEEPTIME; done
sleep $SLEEPTIME
fi
Expand All @@ -932,9 +950,21 @@ function start_servers() {
if [[ $wso2_ppaas_enabled = "true" ]]; then
# Start Apache Stratos with default profile
echo -e "Starting WSO2 Private PaaS server as $host_user user... "
su - $host_user -c "source $setup_path/conf/setup.conf;$setup_path/start-servers.sh -p default >> $LOG"
while ! echo exit | nc localhost $PPAAS_PORT; do sleep $SLEEPTIME; done
sleep $SLEEPTIME

if [[ $separate_cep = "true" ]]; then
su - $host_user -c "source $setup_path/conf/setup.conf;$setup_path/start-servers.sh -p stratos >> $LOG"
while ! echo exit | nc localhost $PPAAS_PORT; do sleep $SLEEPTIME; done
sleep $SLEEPTIME

echo -e "Starting WSO2 CEP service..."
nohup su - $host_user -c "source $setup_path/conf/setup.conf;/bin/bash $stratos_install_path/wso2cep-3.0.0/bin/wso2server.sh &" >> wso2cep.log
while ! echo exit | nc localhost $CEP_PORT; do sleep $SLEEPTIME; done
sleep $SLEEPTIME
else
su - $host_user -c "source $setup_path/conf/setup.conf;$setup_path/start-servers.sh -p default >> $LOG"
while ! echo exit | nc localhost $PPAAS_PORT; do sleep $SLEEPTIME; done
sleep $SLEEPTIME
fi
else
echo -e "Skipping WSO2 Private PaaS startup."
fi
Expand Down
7 changes: 7 additions & 0 deletions conf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export SLEEPTIME=30
export PPAAS_PORT=9443
export BAM_PORT=9444
export IS_PORT=9445
export CEP_PORT=9446
export GITBLIT_PORT=9418

# Puppet master configuration
Expand All @@ -43,6 +44,9 @@ export puppet_external=""
export puppet_external_ip=""
export puppet_external_host=""

# cep as a separate profile
export separate_cep=""

# IaaS configuration
export iaas=""
# Region Name
Expand Down Expand Up @@ -81,6 +85,9 @@ export mysql_port=""
export mysql_uname=""
export mysql_password=""

#/etc/hosts mapping
export using_etc_host_mapping=""

# WSO2 PPaaS services
export as_enabled=""
export bps_enabled=""
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventbuilders/HealthStatisticsEventBuilder.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventBuilder name="HealthStatisticsEventBuilder" statistics="disable"
trace="enable" xmlns="http://wso2.org/carbon/eventbuilder">
<from eventAdaptorName="DefaultWSO2EventInputAdaptor" eventAdaptorType="wso2event">
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventbuilders/InstanceStatusStatisticsBuilder.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventBuilder name="InstanceStatusStatisticsBuilder"
statistics="disable" trace="disable" xmlns="http://wso2.org/carbon/eventbuilder">
<from eventAdaptorName="DefaultWSO2EventInputAdaptor" eventAdaptorType="wso2event">
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventbuilders/LoadBalancerStatisticsEventBuilder.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventBuilder name="LoadBalancerStatisticsEventBuilder"
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventbuilder">
<from eventAdaptorName="DefaultWSO2EventInputAdaptor" eventAdaptorType="wso2event">
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventformatters/AverageInFlightRequestsEventFormatter.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventFormatter name="AverageRequestsInflightEventFormatter"
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
<from streamName="average_in_flight_requests" version="1.0.0"/>
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventformatters/AverageLoadAverageEventFormatter.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventFormatter name="AverageLoadAverageEventFormatter"
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
<from streamName="average_load_average_stats" version="1.0.0"/>
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventformatters/AverageMemoryConsumptionEventFormatter.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventFormatter name="AverageMemoryConsumptionEventFormatter"
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
<from streamName="average_memory_consumption_stats" version="1.0.0"/>
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventformatters/FaultMessageEventFormatter.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventFormatter name="FaultMessageEventFormatter"
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
<from streamName="fault_message" version="1.0.0"/>
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventformatters/GradientInFlightRequestsEventFormatter.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventFormatter name="GradientInFlightRequestsEventFormatter" statistics="disable"
trace="disable" xmlns="http://wso2.org/carbon/eventformatter">
<from streamName="gradient_in_flight_requests" version="1.0.0"/>
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventformatters/GradientLoadAverageEventFormatter.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventFormatter name="GradientLoadAverageEventFormatter"
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
<from streamName="gradient_load_average_stats" version="1.0.0"/>
Expand Down
21 changes: 21 additions & 0 deletions resources/cep/artifacts/eventformatters/GradientMemoryConsumptionEventFormatter.xml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<eventFormatter name="GradientMemoryConsumptionEventFormatter"
statistics="disable" trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
<from streamName="gradient_memory_consumption_stats" version="1.0.0"/>
Expand Down
Loading

0 comments on commit d03ab5a

Please sign in to comment.