You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ma...@apache.org on 2013/09/05 08:36:04 UTC

git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Updated Branches:
  refs/heads/master b7d1abdb4 -> 858799f6b


Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6

Branch: refs/heads/master
Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
Parents: b7d1abd
Author: Manula Thantriwatte <ma...@wso2.com>
Authored: Thu Sep 5 12:02:53 2013 +0530
Committer: Manula Thantriwatte <ma...@wso2.com>
Committed: Thu Sep 5 12:02:53 2013 +0530

----------------------------------------------------------------------
 tools/ec2-demo-setup/config.sh | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
----------------------------------------------------------------------
diff --git a/tools/ec2-demo-setup/config.sh b/tools/ec2-demo-setup/config.sh
index e405de3..5c4736a 100755
--- a/tools/ec2-demo-setup/config.sh
+++ b/tools/ec2-demo-setup/config.sh
@@ -26,6 +26,8 @@ CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
 SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
 PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
 SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
+MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
+MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
 
 # Make sure the user is running as root.
 if [ "$UID" -ne "0" ]; then
@@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g" $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
 mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp $SC_CONF_MT/features-dashboard.xml
 chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
 
+echo "Copying mysql connector jar" >> $LOG
+cp -f $MYSQL_JAR $MYSQL_COPY_PATH
+
 echo "You have successfully configured Apache Stratos!!"
 
 su - ubuntu -c /opt/start_servers.sh


Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Isuru Perera <is...@wso2.com>.
On Sat, Sep 7, 2013 at 2:51 AM, Nirmal Fernando <ni...@gmail.com>wrote:

>
>
>
> On Sat, Sep 7, 2013 at 1:31 AM, Isuru Perera <is...@wso2.com> wrote:
>
>>
>>
>>
>> On Sat, Sep 7, 2013 at 1:21 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>>
>>>
>>>
>>>
>>> On Fri, Sep 6, 2013 at 2:47 PM, Isuru Perera <is...@wso2.com> wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> On Fri, Sep 6, 2013 at 2:01 PM, Nirmal Fernando <nirmal070125@gmail.com
>>>> > wrote:
>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>>>>>
>>>>>> Hi Manula,
>>>>>>
>>>>>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>>>>>
>>>>>
>>>>> What's the solution?
>>>>>
>>>> Solution is to have a common installer. When setting up EC2 demo, we
>>>> can use the installer and then clean up IaaS configurations from the image.
>>>>
>>>> We use config.sh only to get user-data from EC2 and it's EC2 specific.
>>>> (No need to mention this since you created the config.sh script!
>>>>
>>>
>>> Wrong! I've just added the user-data extraction section to config.sh.
>>>
>>
>> I don't understand what you mean!
>>
>> I meant following part in config.sh
>>
>
> :D You sounded like I created config.sh!
>
oh! :D

Then you are right! You *just added the user-data extraction section to
config.sh* :)

>
>
>> ------------------------------------------------------------------
>>
>> # following is helpful if you've mistakenly added data in user-data and
>> want to recover.
>> read -p "Please confirm that you want to be prompted, irrespective of
>> whether the data is available in the user-data? [y/n]" answer
>> if [[ $answer = n ]] ; then
>>
>> echo "Trying to find values via user-data.." >> $LOG
>> wget http://169.254.169.254/latest/user-data -O /opt/user-data.txt >>
>> $LOG
>> userData=`cat /opt/user-data.txt`
>> echo "Extracted user-data: $userData" >> $LOG
>>
>> #assign values obtained through user-data
>> for i in {1..8}
>> do
>> entry=`echo $userData  | cut -d',' -f$i | sed 's/,//g'`
>> key=`echo $entry  | cut -d'=' -f1 | sed 's/=//g'`
>> value=`echo $entry  | cut -d'=' -f2 | sed 's/=//g'`
>> if [[ "$key" == *EC2_KEY_PATH* ]] ; then EC2_KEY_PATH=$value;
>> elif [[ "$key" == *ACCESS_KEY* ]] ; then ACCESS_KEY=$value;
>> elif [[ "$key" == *SECRET_KEY* ]] ; then SECRET_KEY=$value;
>> elif [[ "$key" == *OWNER_ID* ]] ; then OWNER_ID=$value;
>> elif [[ "$key" == *AVAILABILITY_ZONE* ]] ; then AVAILABILITY_ZONE=$value;
>> elif [[ "$key" == *SECURITY_GROUP* ]] ; then SECURITY_GROUP=$value;
>> elif [[ "$key" == *KEY_PAIR_NAME* ]] ; then KEY_PAIR_NAME=$value;
>> elif [[ "$key" == *DOMAIN* ]] ; then DOMAIN=$value;
>> fi
>> done
>> fi
>> ------------------------------------------------------------------
>>
>>
>>>  :D)
>>>>
>>>> With config.sh, we can just configure the IaaS account details as
>>>> entered by the user.
>>>>
>>>>>
>>>>>> And you have copied only to Stratos Controller. Usually ELB also need
>>>>>> to use the same userstore database.
>>>>>>
>>>>>> Let's not complicate the config script as it was written only to get
>>>>>> user data from the EC2 meta data service and configure the instance.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> ---------- Forwarded message ----------
>>>>>> From: <ma...@apache.org>
>>>>>> Date: Thu, Sep 5, 2013 at 12:06 PM
>>>>>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding
>>>>>> copy mysql connector to sc
>>>>>> To: commits@stratos.incubator.apache.org
>>>>>>
>>>>>>
>>>>>> Updated Branches:
>>>>>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>>>>>
>>>>>>
>>>>>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector
>>>>>> to sc
>>>>>>
>>>>>>
>>>>>> Project:
>>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>>>>>> Commit:
>>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>>>>>> Tree:
>>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>>>>>> Diff:
>>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>>>>>
>>>>>> Branch: refs/heads/master
>>>>>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>>>>>> Parents: b7d1abd
>>>>>> Author: Manula Thantriwatte <ma...@wso2.com>
>>>>>> Authored: Thu Sep 5 12:02:53 2013 +0530
>>>>>> Committer: Manula Thantriwatte <ma...@wso2.com>
>>>>>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>>>>>
>>>>>> ----------------------------------------------------------------------
>>>>>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>>>>>  1 file changed, 5 insertions(+)
>>>>>> ----------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>>>>>> ----------------------------------------------------------------------
>>>>>> diff --git a/tools/ec2-demo-setup/config.sh
>>>>>> b/tools/ec2-demo-setup/config.sh
>>>>>> index e405de3..5c4736a 100755
>>>>>> --- a/tools/ec2-demo-setup/config.sh
>>>>>> +++ b/tools/ec2-demo-setup/config.sh
>>>>>> @@ -26,6 +26,8 @@
>>>>>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>>>>>
>>>>>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>>>>>
>>>>>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>>>>>
>>>>>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>>>>>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>>>>>
>>>>>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>>>>>
>>>>>>  # Make sure the user is running as root.
>>>>>>  if [ "$UID" -ne "0" ]; then
>>>>>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>>>>>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>>>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>>>> $SC_CONF_MT/features-dashboard.xml
>>>>>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>>>>>
>>>>>> +echo "Copying mysql connector jar" >> $LOG
>>>>>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>>>>>> +
>>>>>>  echo "You have successfully configured Apache Stratos!!"
>>>>>>
>>>>>>  su - ubuntu -c /opt/start_servers.sh
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Isuru Perera
>>>>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>>>>> Lean . Enterprise . Middleware
>>>>>>
>>>>>> about.me/chrishantha
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> C.S.Nirmal J. Fernando
>>>>> Senior Software Engineer,
>>>>> WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Isuru Perera
>>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>>> Lean . Enterprise . Middleware
>>>>
>>>> about.me/chrishantha
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> C.S.Nirmal J. Fernando
>>> Senior Software Engineer,
>>> WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Senior Software Engineer,
> WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Nirmal Fernando <ni...@gmail.com>.
On Sat, Sep 7, 2013 at 1:31 AM, Isuru Perera <is...@wso2.com> wrote:

>
>
>
> On Sat, Sep 7, 2013 at 1:21 AM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>>
>>
>>
>> On Fri, Sep 6, 2013 at 2:47 PM, Isuru Perera <is...@wso2.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> On Fri, Sep 6, 2013 at 2:01 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>>>
>>>>
>>>>
>>>>
>>>> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>>>>
>>>>> Hi Manula,
>>>>>
>>>>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>>>>
>>>>
>>>> What's the solution?
>>>>
>>> Solution is to have a common installer. When setting up EC2 demo, we can
>>> use the installer and then clean up IaaS configurations from the image.
>>>
>>> We use config.sh only to get user-data from EC2 and it's EC2 specific.
>>> (No need to mention this since you created the config.sh script!
>>>
>>
>> Wrong! I've just added the user-data extraction section to config.sh.
>>
>
> I don't understand what you mean!
>
> I meant following part in config.sh
>

:D You sounded like I created config.sh!


> ------------------------------------------------------------------
>
> # following is helpful if you've mistakenly added data in user-data and
> want to recover.
> read -p "Please confirm that you want to be prompted, irrespective of
> whether the data is available in the user-data? [y/n]" answer
> if [[ $answer = n ]] ; then
>
> echo "Trying to find values via user-data.." >> $LOG
> wget http://169.254.169.254/latest/user-data -O /opt/user-data.txt >> $LOG
> userData=`cat /opt/user-data.txt`
> echo "Extracted user-data: $userData" >> $LOG
>
> #assign values obtained through user-data
> for i in {1..8}
> do
> entry=`echo $userData  | cut -d',' -f$i | sed 's/,//g'`
> key=`echo $entry  | cut -d'=' -f1 | sed 's/=//g'`
> value=`echo $entry  | cut -d'=' -f2 | sed 's/=//g'`
> if [[ "$key" == *EC2_KEY_PATH* ]] ; then EC2_KEY_PATH=$value;
> elif [[ "$key" == *ACCESS_KEY* ]] ; then ACCESS_KEY=$value;
> elif [[ "$key" == *SECRET_KEY* ]] ; then SECRET_KEY=$value;
> elif [[ "$key" == *OWNER_ID* ]] ; then OWNER_ID=$value;
> elif [[ "$key" == *AVAILABILITY_ZONE* ]] ; then AVAILABILITY_ZONE=$value;
> elif [[ "$key" == *SECURITY_GROUP* ]] ; then SECURITY_GROUP=$value;
> elif [[ "$key" == *KEY_PAIR_NAME* ]] ; then KEY_PAIR_NAME=$value;
> elif [[ "$key" == *DOMAIN* ]] ; then DOMAIN=$value;
> fi
> done
> fi
> ------------------------------------------------------------------
>
>
>>  :D)
>>>
>>> With config.sh, we can just configure the IaaS account details as
>>> entered by the user.
>>>
>>>>
>>>>> And you have copied only to Stratos Controller. Usually ELB also need
>>>>> to use the same userstore database.
>>>>>
>>>>> Let's not complicate the config script as it was written only to get
>>>>> user data from the EC2 meta data service and configure the instance.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: <ma...@apache.org>
>>>>> Date: Thu, Sep 5, 2013 at 12:06 PM
>>>>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding
>>>>> copy mysql connector to sc
>>>>> To: commits@stratos.incubator.apache.org
>>>>>
>>>>>
>>>>> Updated Branches:
>>>>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>>>>
>>>>>
>>>>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector
>>>>> to sc
>>>>>
>>>>>
>>>>> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>>>>> Commit:
>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>>>>> Tree:
>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>>>>> Diff:
>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>>>>
>>>>> Branch: refs/heads/master
>>>>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>>>>> Parents: b7d1abd
>>>>> Author: Manula Thantriwatte <ma...@wso2.com>
>>>>> Authored: Thu Sep 5 12:02:53 2013 +0530
>>>>> Committer: Manula Thantriwatte <ma...@wso2.com>
>>>>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>>>>  1 file changed, 5 insertions(+)
>>>>> ----------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>>>>> ----------------------------------------------------------------------
>>>>> diff --git a/tools/ec2-demo-setup/config.sh
>>>>> b/tools/ec2-demo-setup/config.sh
>>>>> index e405de3..5c4736a 100755
>>>>> --- a/tools/ec2-demo-setup/config.sh
>>>>> +++ b/tools/ec2-demo-setup/config.sh
>>>>> @@ -26,6 +26,8 @@
>>>>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>>>>
>>>>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>>>>
>>>>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>>>>
>>>>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>>>>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>>>>
>>>>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>>>>
>>>>>  # Make sure the user is running as root.
>>>>>  if [ "$UID" -ne "0" ]; then
>>>>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>>>>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>>> $SC_CONF_MT/features-dashboard.xml
>>>>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>>>>
>>>>> +echo "Copying mysql connector jar" >> $LOG
>>>>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>>>>> +
>>>>>  echo "You have successfully configured Apache Stratos!!"
>>>>>
>>>>>  su - ubuntu -c /opt/start_servers.sh
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Isuru Perera
>>>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>>>> Lean . Enterprise . Middleware
>>>>>
>>>>> about.me/chrishantha
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> C.S.Nirmal J. Fernando
>>>> Senior Software Engineer,
>>>> WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Isuru Perera
>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> C.S.Nirmal J. Fernando
>> Senior Software Engineer,
>> WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Senior Software Engineer,
WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Isuru Perera <is...@wso2.com>.
On Sat, Sep 7, 2013 at 1:21 AM, Nirmal Fernando <ni...@gmail.com>wrote:

>
>
>
> On Fri, Sep 6, 2013 at 2:47 PM, Isuru Perera <is...@wso2.com> wrote:
>
>>
>> Hi,
>>
>> On Fri, Sep 6, 2013 at 2:01 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>>
>>>
>>>
>>>
>>> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>>>
>>>> Hi Manula,
>>>>
>>>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>>>
>>>
>>> What's the solution?
>>>
>> Solution is to have a common installer. When setting up EC2 demo, we can
>> use the installer and then clean up IaaS configurations from the image.
>>
>> We use config.sh only to get user-data from EC2 and it's EC2 specific.
>> (No need to mention this since you created the config.sh script!
>>
>
> Wrong! I've just added the user-data extraction section to config.sh.
>

I don't understand what you mean!

I meant following part in config.sh
------------------------------------------------------------------
# following is helpful if you've mistakenly added data in user-data and
want to recover.
read -p "Please confirm that you want to be prompted, irrespective of
whether the data is available in the user-data? [y/n]" answer
if [[ $answer = n ]] ; then

echo "Trying to find values via user-data.." >> $LOG
wget http://169.254.169.254/latest/user-data -O /opt/user-data.txt >> $LOG
userData=`cat /opt/user-data.txt`
echo "Extracted user-data: $userData" >> $LOG

#assign values obtained through user-data
for i in {1..8}
do
entry=`echo $userData  | cut -d',' -f$i | sed 's/,//g'`
key=`echo $entry  | cut -d'=' -f1 | sed 's/=//g'`
value=`echo $entry  | cut -d'=' -f2 | sed 's/=//g'`
if [[ "$key" == *EC2_KEY_PATH* ]] ; then EC2_KEY_PATH=$value;
elif [[ "$key" == *ACCESS_KEY* ]] ; then ACCESS_KEY=$value;
elif [[ "$key" == *SECRET_KEY* ]] ; then SECRET_KEY=$value;
elif [[ "$key" == *OWNER_ID* ]] ; then OWNER_ID=$value;
elif [[ "$key" == *AVAILABILITY_ZONE* ]] ; then AVAILABILITY_ZONE=$value;
elif [[ "$key" == *SECURITY_GROUP* ]] ; then SECURITY_GROUP=$value;
elif [[ "$key" == *KEY_PAIR_NAME* ]] ; then KEY_PAIR_NAME=$value;
elif [[ "$key" == *DOMAIN* ]] ; then DOMAIN=$value;
fi
done
fi
------------------------------------------------------------------


>  :D)
>>
>> With config.sh, we can just configure the IaaS account details as entered
>> by the user.
>>
>>>
>>>> And you have copied only to Stratos Controller. Usually ELB also need
>>>> to use the same userstore database.
>>>>
>>>> Let's not complicate the config script as it was written only to get
>>>> user data from the EC2 meta data service and configure the instance.
>>>>
>>>> Thanks!
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: <ma...@apache.org>
>>>> Date: Thu, Sep 5, 2013 at 12:06 PM
>>>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding
>>>> copy mysql connector to sc
>>>> To: commits@stratos.incubator.apache.org
>>>>
>>>>
>>>> Updated Branches:
>>>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>>>
>>>>
>>>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to
>>>> sc
>>>>
>>>>
>>>> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>>>> Commit:
>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>>>> Tree:
>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>>>> Diff:
>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>>>
>>>> Branch: refs/heads/master
>>>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>>>> Parents: b7d1abd
>>>> Author: Manula Thantriwatte <ma...@wso2.com>
>>>> Authored: Thu Sep 5 12:02:53 2013 +0530
>>>> Committer: Manula Thantriwatte <ma...@wso2.com>
>>>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>>>
>>>> ----------------------------------------------------------------------
>>>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>>>  1 file changed, 5 insertions(+)
>>>> ----------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>>>> ----------------------------------------------------------------------
>>>> diff --git a/tools/ec2-demo-setup/config.sh
>>>> b/tools/ec2-demo-setup/config.sh
>>>> index e405de3..5c4736a 100755
>>>> --- a/tools/ec2-demo-setup/config.sh
>>>> +++ b/tools/ec2-demo-setup/config.sh
>>>> @@ -26,6 +26,8 @@
>>>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>>>
>>>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>>>
>>>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>>>
>>>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>>>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>>>
>>>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>>>
>>>>  # Make sure the user is running as root.
>>>>  if [ "$UID" -ne "0" ]; then
>>>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>>>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>> $SC_CONF_MT/features-dashboard.xml
>>>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>>>
>>>> +echo "Copying mysql connector jar" >> $LOG
>>>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>>>> +
>>>>  echo "You have successfully configured Apache Stratos!!"
>>>>
>>>>  su - ubuntu -c /opt/start_servers.sh
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Isuru Perera
>>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>>> Lean . Enterprise . Middleware
>>>>
>>>> about.me/chrishantha
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> C.S.Nirmal J. Fernando
>>> Senior Software Engineer,
>>> WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Senior Software Engineer,
> WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Nirmal Fernando <ni...@gmail.com>.
On Fri, Sep 6, 2013 at 2:47 PM, Isuru Perera <is...@wso2.com> wrote:

>
> Hi,
>
> On Fri, Sep 6, 2013 at 2:01 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>>
>>
>>
>> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>>
>>> Hi Manula,
>>>
>>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>>
>>
>> What's the solution?
>>
> Solution is to have a common installer. When setting up EC2 demo, we can
> use the installer and then clean up IaaS configurations from the image.
>
> We use config.sh only to get user-data from EC2 and it's EC2 specific. (No
> need to mention this since you created the config.sh script!
>

Wrong! I've just added the user-data extraction section to config.sh.

> :D)
>
> With config.sh, we can just configure the IaaS account details as entered
> by the user.
>
>>
>>> And you have copied only to Stratos Controller. Usually ELB also need to
>>> use the same userstore database.
>>>
>>> Let's not complicate the config script as it was written only to get
>>> user data from the EC2 meta data service and configure the instance.
>>>
>>> Thanks!
>>>
>>> ---------- Forwarded message ----------
>>> From: <ma...@apache.org>
>>> Date: Thu, Sep 5, 2013 at 12:06 PM
>>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding
>>> copy mysql connector to sc
>>> To: commits@stratos.incubator.apache.org
>>>
>>>
>>> Updated Branches:
>>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>>
>>>
>>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to
>>> sc
>>>
>>>
>>> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>>> Commit:
>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>>> Tree:
>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>>> Diff:
>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>>
>>> Branch: refs/heads/master
>>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>>> Parents: b7d1abd
>>> Author: Manula Thantriwatte <ma...@wso2.com>
>>> Authored: Thu Sep 5 12:02:53 2013 +0530
>>> Committer: Manula Thantriwatte <ma...@wso2.com>
>>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>>
>>> ----------------------------------------------------------------------
>>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>> ----------------------------------------------------------------------
>>>
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>>> ----------------------------------------------------------------------
>>> diff --git a/tools/ec2-demo-setup/config.sh
>>> b/tools/ec2-demo-setup/config.sh
>>> index e405de3..5c4736a 100755
>>> --- a/tools/ec2-demo-setup/config.sh
>>> +++ b/tools/ec2-demo-setup/config.sh
>>> @@ -26,6 +26,8 @@
>>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>>
>>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>>
>>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>>
>>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>>
>>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>>
>>>  # Make sure the user is running as root.
>>>  if [ "$UID" -ne "0" ]; then
>>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>> $SC_CONF_MT/features-dashboard.xml
>>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>>
>>> +echo "Copying mysql connector jar" >> $LOG
>>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>>> +
>>>  echo "You have successfully configured Apache Stratos!!"
>>>
>>>  su - ubuntu -c /opt/start_servers.sh
>>>
>>>
>>>
>>>
>>> --
>>> Isuru Perera
>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> C.S.Nirmal J. Fernando
>> Senior Software Engineer,
>> WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Senior Software Engineer,
WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Fri, Sep 6, 2013 at 3:03 PM, Isuru Perera <is...@wso2.com> wrote:

>
>
>
> On Fri, Sep 6, 2013 at 2:52 PM, Lahiru Sandaruwan <la...@wso2.com>wrote:
>
>>
>>
>>
>> On Fri, Sep 6, 2013 at 2:47 PM, Isuru Perera <is...@wso2.com> wrote:
>>
>>>
>>> Hi,
>>>
>>> On Fri, Sep 6, 2013 at 2:01 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>>>
>>>>
>>>>
>>>>
>>>> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>>>>
>>>>> Hi Manula,
>>>>>
>>>>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>>>>
>>>>
>>>> What's the solution?
>>>>
>>> Solution is to have a common installer. When setting up EC2 demo, we can
>>> use the installer and then clean up IaaS configurations from the image.
>>>
>>> We use config.sh only to get user-data from EC2 and it's EC2 specific.
>>> (No need to mention this since you created the config.sh script! :D)
>>>
>>> With config.sh, we can just configure the IaaS account details as
>>> entered by the user.
>>>
>> We can set user data in conf/setup.conf as we have in Openstack as well.
>> Then the user is capable of even editing after spawning.
>>
> Yes, but we need to support passing user-data when we launch Apache
> Stratos (incubating) EC2 Demo image.
>

Agree. Sorry that i was not clear in last mail. I meant was we should add
an additional script to set passed user-data information in
'conf/setup.conf'.


>
> That's how we usually release a demo image. Demo is configured to run in a
> single node. A user will just need to spawn an instance (by passing
> user-data) and then run config.sh. If the user-data is passed, the
> config.sh will just configure the instance and run all the servers. If the
> user-data is not passed, the config.sh will prompt for values.
>

Yes. We can have this in same script i have mentioned above. In addition we
can also set those questions in 'conf/setup.conf' for using if he run the
script again and again.
I felt answering those questions again and again is a headache if i missed
to add user-data :)

So in the EC2 demo case, we can just add one line to call the new script
from common script.
WDYT?





>> Thanks.
>>
>>>
>>>>> And you have copied only to Stratos Controller. Usually ELB also need
>>>>> to use the same userstore database.
>>>>>
>>>>> Let's not complicate the config script as it was written only to get
>>>>> user data from the EC2 meta data service and configure the instance.
>>>>>
>>>>> Thanks!
>>>>>
>>>>> ---------- Forwarded message ----------
>>>>> From: <ma...@apache.org>
>>>>> Date: Thu, Sep 5, 2013 at 12:06 PM
>>>>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding
>>>>> copy mysql connector to sc
>>>>> To: commits@stratos.incubator.apache.org
>>>>>
>>>>>
>>>>> Updated Branches:
>>>>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>>>>
>>>>>
>>>>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector
>>>>> to sc
>>>>>
>>>>>
>>>>> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>>>>> Commit:
>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>>>>> Tree:
>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>>>>> Diff:
>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>>>>
>>>>> Branch: refs/heads/master
>>>>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>>>>> Parents: b7d1abd
>>>>> Author: Manula Thantriwatte <ma...@wso2.com>
>>>>> Authored: Thu Sep 5 12:02:53 2013 +0530
>>>>> Committer: Manula Thantriwatte <ma...@wso2.com>
>>>>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>>>>
>>>>> ----------------------------------------------------------------------
>>>>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>>>>  1 file changed, 5 insertions(+)
>>>>> ----------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>>>>> ----------------------------------------------------------------------
>>>>> diff --git a/tools/ec2-demo-setup/config.sh
>>>>> b/tools/ec2-demo-setup/config.sh
>>>>> index e405de3..5c4736a 100755
>>>>> --- a/tools/ec2-demo-setup/config.sh
>>>>> +++ b/tools/ec2-demo-setup/config.sh
>>>>> @@ -26,6 +26,8 @@
>>>>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>>>>
>>>>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>>>>
>>>>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>>>>
>>>>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>>>>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>>>>
>>>>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>>>>
>>>>>  # Make sure the user is running as root.
>>>>>  if [ "$UID" -ne "0" ]; then
>>>>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>>>>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>>> $SC_CONF_MT/features-dashboard.xml
>>>>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>>>>
>>>>> +echo "Copying mysql connector jar" >> $LOG
>>>>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>>>>> +
>>>>>  echo "You have successfully configured Apache Stratos!!"
>>>>>
>>>>>  su - ubuntu -c /opt/start_servers.sh
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Isuru Perera
>>>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>>>> Lean . Enterprise . Middleware
>>>>>
>>>>> about.me/chrishantha
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> C.S.Nirmal J. Fernando
>>>> Senior Software Engineer,
>>>> WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Isuru Perera
>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>>
>>
>>
>>
>> --
>> --
>> Lahiru Sandaruwan
>> Software Engineer,
>> Platform Technologies,
>> WSO2 Inc., http://wso2.com
>> lean.enterprise.middleware
>>
>> email: lahirus@wso2.com cell: (+94) 773 325 954
>> blog: http://lahiruwrites.blogspot.com/
>> twitter: http://twitter.com/lahirus
>> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>>
>>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
--
Lahiru Sandaruwan
Software Engineer,
Platform Technologies,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com cell: (+94) 773 325 954
blog: http://lahiruwrites.blogspot.com/
twitter: http://twitter.com/lahirus
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Isuru Perera <is...@wso2.com>.
On Fri, Sep 6, 2013 at 2:52 PM, Lahiru Sandaruwan <la...@wso2.com> wrote:

>
>
>
> On Fri, Sep 6, 2013 at 2:47 PM, Isuru Perera <is...@wso2.com> wrote:
>
>>
>> Hi,
>>
>> On Fri, Sep 6, 2013 at 2:01 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>>
>>>
>>>
>>>
>>> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>>>
>>>> Hi Manula,
>>>>
>>>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>>>
>>>
>>> What's the solution?
>>>
>> Solution is to have a common installer. When setting up EC2 demo, we can
>> use the installer and then clean up IaaS configurations from the image.
>>
>> We use config.sh only to get user-data from EC2 and it's EC2 specific.
>> (No need to mention this since you created the config.sh script! :D)
>>
>> With config.sh, we can just configure the IaaS account details as entered
>> by the user.
>>
> We can set user data in conf/setup.conf as we have in Openstack as well.
> Then the user is capable of even editing after spawning.
>
Yes, but we need to support passing user-data when we launch Apache Stratos
(incubating) EC2 Demo image.

That's how we usually release a demo image. Demo is configured to run in a
single node. A user will just need to spawn an instance (by passing
user-data) and then run config.sh. If the user-data is passed, the
config.sh will just configure the instance and run all the servers. If the
user-data is not passed, the config.sh will prompt for values.

>
> Thanks.
>
>>
>>>> And you have copied only to Stratos Controller. Usually ELB also need
>>>> to use the same userstore database.
>>>>
>>>> Let's not complicate the config script as it was written only to get
>>>> user data from the EC2 meta data service and configure the instance.
>>>>
>>>> Thanks!
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: <ma...@apache.org>
>>>> Date: Thu, Sep 5, 2013 at 12:06 PM
>>>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding
>>>> copy mysql connector to sc
>>>> To: commits@stratos.incubator.apache.org
>>>>
>>>>
>>>> Updated Branches:
>>>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>>>
>>>>
>>>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to
>>>> sc
>>>>
>>>>
>>>> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>>>> Commit:
>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>>>> Tree:
>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>>>> Diff:
>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>>>
>>>> Branch: refs/heads/master
>>>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>>>> Parents: b7d1abd
>>>> Author: Manula Thantriwatte <ma...@wso2.com>
>>>> Authored: Thu Sep 5 12:02:53 2013 +0530
>>>> Committer: Manula Thantriwatte <ma...@wso2.com>
>>>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>>>
>>>> ----------------------------------------------------------------------
>>>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>>>  1 file changed, 5 insertions(+)
>>>> ----------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>>>> ----------------------------------------------------------------------
>>>> diff --git a/tools/ec2-demo-setup/config.sh
>>>> b/tools/ec2-demo-setup/config.sh
>>>> index e405de3..5c4736a 100755
>>>> --- a/tools/ec2-demo-setup/config.sh
>>>> +++ b/tools/ec2-demo-setup/config.sh
>>>> @@ -26,6 +26,8 @@
>>>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>>>
>>>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>>>
>>>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>>>
>>>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>>>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>>>
>>>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>>>
>>>>  # Make sure the user is running as root.
>>>>  if [ "$UID" -ne "0" ]; then
>>>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>>>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>> $SC_CONF_MT/features-dashboard.xml
>>>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>>>
>>>> +echo "Copying mysql connector jar" >> $LOG
>>>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>>>> +
>>>>  echo "You have successfully configured Apache Stratos!!"
>>>>
>>>>  su - ubuntu -c /opt/start_servers.sh
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Isuru Perera
>>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>>> Lean . Enterprise . Middleware
>>>>
>>>> about.me/chrishantha
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> C.S.Nirmal J. Fernando
>>> Senior Software Engineer,
>>> WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> --
> Lahiru Sandaruwan
> Software Engineer,
> Platform Technologies,
> WSO2 Inc., http://wso2.com
> lean.enterprise.middleware
>
> email: lahirus@wso2.com cell: (+94) 773 325 954
> blog: http://lahiruwrites.blogspot.com/
> twitter: http://twitter.com/lahirus
> linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146
>
>


-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Fri, Sep 6, 2013 at 2:47 PM, Isuru Perera <is...@wso2.com> wrote:

>
> Hi,
>
> On Fri, Sep 6, 2013 at 2:01 PM, Nirmal Fernando <ni...@gmail.com>wrote:
>
>>
>>
>>
>> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>>
>>> Hi Manula,
>>>
>>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>>
>>
>> What's the solution?
>>
> Solution is to have a common installer. When setting up EC2 demo, we can
> use the installer and then clean up IaaS configurations from the image.
>
> We use config.sh only to get user-data from EC2 and it's EC2 specific. (No
> need to mention this since you created the config.sh script! :D)
>
> With config.sh, we can just configure the IaaS account details as entered
> by the user.
>
We can set user data in conf/setup.conf as we have in Openstack as well.
Then the user is capable of even editing after spawning.

Thanks.

>
>>> And you have copied only to Stratos Controller. Usually ELB also need to
>>> use the same userstore database.
>>>
>>> Let's not complicate the config script as it was written only to get
>>> user data from the EC2 meta data service and configure the instance.
>>>
>>> Thanks!
>>>
>>> ---------- Forwarded message ----------
>>> From: <ma...@apache.org>
>>> Date: Thu, Sep 5, 2013 at 12:06 PM
>>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding
>>> copy mysql connector to sc
>>> To: commits@stratos.incubator.apache.org
>>>
>>>
>>> Updated Branches:
>>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>>
>>>
>>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to
>>> sc
>>>
>>>
>>> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>>> Commit:
>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>>> Tree:
>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>>> Diff:
>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>>
>>> Branch: refs/heads/master
>>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>>> Parents: b7d1abd
>>> Author: Manula Thantriwatte <ma...@wso2.com>
>>> Authored: Thu Sep 5 12:02:53 2013 +0530
>>> Committer: Manula Thantriwatte <ma...@wso2.com>
>>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>>
>>> ----------------------------------------------------------------------
>>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>>  1 file changed, 5 insertions(+)
>>> ----------------------------------------------------------------------
>>>
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>>> ----------------------------------------------------------------------
>>> diff --git a/tools/ec2-demo-setup/config.sh
>>> b/tools/ec2-demo-setup/config.sh
>>> index e405de3..5c4736a 100755
>>> --- a/tools/ec2-demo-setup/config.sh
>>> +++ b/tools/ec2-demo-setup/config.sh
>>> @@ -26,6 +26,8 @@
>>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>>
>>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>>
>>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>>
>>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>>
>>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>>
>>>  # Make sure the user is running as root.
>>>  if [ "$UID" -ne "0" ]; then
>>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>> $SC_CONF_MT/features-dashboard.xml
>>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>>
>>> +echo "Copying mysql connector jar" >> $LOG
>>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>>> +
>>>  echo "You have successfully configured Apache Stratos!!"
>>>
>>>  su - ubuntu -c /opt/start_servers.sh
>>>
>>>
>>>
>>>
>>> --
>>> Isuru Perera
>>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>>> Lean . Enterprise . Middleware
>>>
>>> about.me/chrishantha
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> C.S.Nirmal J. Fernando
>> Senior Software Engineer,
>> WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
--
Lahiru Sandaruwan
Software Engineer,
Platform Technologies,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com cell: (+94) 773 325 954
blog: http://lahiruwrites.blogspot.com/
twitter: http://twitter.com/lahirus
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Isuru Perera <is...@wso2.com>.
Hi,

On Fri, Sep 6, 2013 at 2:01 PM, Nirmal Fernando <ni...@gmail.com>wrote:

>
>
>
> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>
>> Hi Manula,
>>
>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>
>
> What's the solution?
>
Solution is to have a common installer. When setting up EC2 demo, we can
use the installer and then clean up IaaS configurations from the image.

We use config.sh only to get user-data from EC2 and it's EC2 specific. (No
need to mention this since you created the config.sh script! :D)

With config.sh, we can just configure the IaaS account details as entered
by the user.

>
>> And you have copied only to Stratos Controller. Usually ELB also need to
>> use the same userstore database.
>>
>> Let's not complicate the config script as it was written only to get user
>> data from the EC2 meta data service and configure the instance.
>>
>> Thanks!
>>
>> ---------- Forwarded message ----------
>> From: <ma...@apache.org>
>> Date: Thu, Sep 5, 2013 at 12:06 PM
>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding copy
>> mysql connector to sc
>> To: commits@stratos.incubator.apache.org
>>
>>
>> Updated Branches:
>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>
>>
>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>> Commit:
>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>> Tree:
>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>> Diff:
>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>
>> Branch: refs/heads/master
>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>> Parents: b7d1abd
>> Author: Manula Thantriwatte <ma...@wso2.com>
>> Authored: Thu Sep 5 12:02:53 2013 +0530
>> Committer: Manula Thantriwatte <ma...@wso2.com>
>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>
>> ----------------------------------------------------------------------
>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>  1 file changed, 5 insertions(+)
>> ----------------------------------------------------------------------
>>
>>
>>
>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>> ----------------------------------------------------------------------
>> diff --git a/tools/ec2-demo-setup/config.sh
>> b/tools/ec2-demo-setup/config.sh
>> index e405de3..5c4736a 100755
>> --- a/tools/ec2-demo-setup/config.sh
>> +++ b/tools/ec2-demo-setup/config.sh
>> @@ -26,6 +26,8 @@
>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>
>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>
>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>
>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>
>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>
>>  # Make sure the user is running as root.
>>  if [ "$UID" -ne "0" ]; then
>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>> $SC_CONF_MT/features-dashboard.xml
>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>
>> +echo "Copying mysql connector jar" >> $LOG
>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>> +
>>  echo "You have successfully configured Apache Stratos!!"
>>
>>  su - ubuntu -c /opt/start_servers.sh
>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> C.S.Nirmal J. Fernando
> Senior Software Engineer,
> WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Nirmal Fernando <ni...@gmail.com>.
On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:

> Hi Manula,
>
> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>

What's the solution?

>
> And you have copied only to Stratos Controller. Usually ELB also need to
> use the same userstore database.
>
> Let's not complicate the config script as it was written only to get user
> data from the EC2 meta data service and configure the instance.
>
> Thanks!
>
> ---------- Forwarded message ----------
> From: <ma...@apache.org>
> Date: Thu, Sep 5, 2013 at 12:06 PM
> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding copy
> mysql connector to sc
> To: commits@stratos.incubator.apache.org
>
>
> Updated Branches:
>   refs/heads/master b7d1abdb4 -> 858799f6b
>
>
> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc
>
>
> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
> Tree:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
> Diff:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>
> Branch: refs/heads/master
> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
> Parents: b7d1abd
> Author: Manula Thantriwatte <ma...@wso2.com>
> Authored: Thu Sep 5 12:02:53 2013 +0530
> Committer: Manula Thantriwatte <ma...@wso2.com>
> Committed: Thu Sep 5 12:02:53 2013 +0530
>
> ----------------------------------------------------------------------
>  tools/ec2-demo-setup/config.sh | 5 +++++
>  1 file changed, 5 insertions(+)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
> ----------------------------------------------------------------------
> diff --git a/tools/ec2-demo-setup/config.sh
> b/tools/ec2-demo-setup/config.sh
> index e405de3..5c4736a 100755
> --- a/tools/ec2-demo-setup/config.sh
> +++ b/tools/ec2-demo-setup/config.sh
> @@ -26,6 +26,8 @@
> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>
>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>
>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>
>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>
> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>
>  # Make sure the user is running as root.
>  if [ "$UID" -ne "0" ]; then
> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
> $SC_CONF_MT/features-dashboard.xml
>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>
> +echo "Copying mysql connector jar" >> $LOG
> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
> +
>  echo "You have successfully configured Apache Stratos!!"
>
>  su - ubuntu -c /opt/start_servers.sh
>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
Best Regards,
Nirmal

C.S.Nirmal J. Fernando
Senior Software Engineer,
WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Lahiru Sandaruwan <la...@wso2.com>.
On Fri, Sep 6, 2013 at 9:26 AM, Imesh Gunaratne <im...@wso2.com> wrote:

> Hi Isuru,
>
> I think we should be able to remove tools/ec2-demo-setup now since we have
> tools/stratos-installer for installing Apache Stratos on EC2.
>
+1. Maintaining 2 scripts is a hassle. We should test with
stratos-installer and setup the demo with same.

Thanks.

>
> Thanks
>
>
> On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:
>
>> Hi Manula,
>>
>> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>>
>> And you have copied only to Stratos Controller. Usually ELB also need to
>> use the same userstore database.
>>
>> Let's not complicate the config script as it was written only to get user
>> data from the EC2 meta data service and configure the instance.
>>
>> Thanks!
>>
>> ---------- Forwarded message ----------
>> From: <ma...@apache.org>
>> Date: Thu, Sep 5, 2013 at 12:06 PM
>> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding copy
>> mysql connector to sc
>> To: commits@stratos.incubator.apache.org
>>
>>
>> Updated Branches:
>>   refs/heads/master b7d1abdb4 -> 858799f6b
>>
>>
>> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
>> Commit:
>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
>> Tree:
>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
>> Diff:
>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>>
>> Branch: refs/heads/master
>> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
>> Parents: b7d1abd
>> Author: Manula Thantriwatte <ma...@wso2.com>
>> Authored: Thu Sep 5 12:02:53 2013 +0530
>> Committer: Manula Thantriwatte <ma...@wso2.com>
>> Committed: Thu Sep 5 12:02:53 2013 +0530
>>
>> ----------------------------------------------------------------------
>>  tools/ec2-demo-setup/config.sh | 5 +++++
>>  1 file changed, 5 insertions(+)
>> ----------------------------------------------------------------------
>>
>>
>>
>> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
>> ----------------------------------------------------------------------
>> diff --git a/tools/ec2-demo-setup/config.sh
>> b/tools/ec2-demo-setup/config.sh
>> index e405de3..5c4736a 100755
>> --- a/tools/ec2-demo-setup/config.sh
>> +++ b/tools/ec2-demo-setup/config.sh
>> @@ -26,6 +26,8 @@
>> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>>
>>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>>
>>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>>
>>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
>> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>>
>> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>>
>>  # Make sure the user is running as root.
>>  if [ "$UID" -ne "0" ]; then
>> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
>> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>> $SC_CONF_MT/features-dashboard.xml
>>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>>
>> +echo "Copying mysql connector jar" >> $LOG
>> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
>> +
>>  echo "You have successfully configured Apache Stratos!!"
>>
>>  su - ubuntu -c /opt/start_servers.sh
>>
>>
>>
>>
>> --
>> Isuru Perera
>> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
>> Lean . Enterprise . Middleware
>>
>> about.me/chrishantha
>>
>
>
>
> --
> *Imesh Gunaratne*
> Technical Lead
> WSO2 Inc | http://wso2.com
> Mobile: +94 77 374 2057
> Blog: http://imesh.gunaratne.org
>
>
> Lean . Enterprise . Middleware
>
>


-- 
--
Lahiru Sandaruwan
Software Engineer,
Platform Technologies,
WSO2 Inc., http://wso2.com
lean.enterprise.middleware

email: lahirus@wso2.com cell: (+94) 773 325 954
blog: http://lahiruwrites.blogspot.com/
twitter: http://twitter.com/lahirus
linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146

Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Imesh Gunaratne <im...@wso2.com>.
Hi Isuru,

I think we should be able to remove tools/ec2-demo-setup now since we have
tools/stratos-installer for installing Apache Stratos on EC2.

Thanks


On Fri, Sep 6, 2013 at 7:20 AM, Isuru Perera <is...@wso2.com> wrote:

> Hi Manula,
>
> As I mentioned, config.sh doesn't need to copy MySQL connector jar.
>
> And you have copied only to Stratos Controller. Usually ELB also need to
> use the same userstore database.
>
> Let's not complicate the config script as it was written only to get user
> data from the EC2 meta data service and configure the instance.
>
> Thanks!
>
> ---------- Forwarded message ----------
> From: <ma...@apache.org>
> Date: Thu, Sep 5, 2013 at 12:06 PM
> Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding copy
> mysql connector to sc
> To: commits@stratos.incubator.apache.org
>
>
> Updated Branches:
>   refs/heads/master b7d1abdb4 -> 858799f6b
>
>
> Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc
>
>
> Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
> Tree:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
> Diff:
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6
>
> Branch: refs/heads/master
> Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
> Parents: b7d1abd
> Author: Manula Thantriwatte <ma...@wso2.com>
> Authored: Thu Sep 5 12:02:53 2013 +0530
> Committer: Manula Thantriwatte <ma...@wso2.com>
> Committed: Thu Sep 5 12:02:53 2013 +0530
>
> ----------------------------------------------------------------------
>  tools/ec2-demo-setup/config.sh | 5 +++++
>  1 file changed, 5 insertions(+)
> ----------------------------------------------------------------------
>
>
>
> http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
> ----------------------------------------------------------------------
> diff --git a/tools/ec2-demo-setup/config.sh
> b/tools/ec2-demo-setup/config.sh
> index e405de3..5c4736a 100755
> --- a/tools/ec2-demo-setup/config.sh
> +++ b/tools/ec2-demo-setup/config.sh
> @@ -26,6 +26,8 @@
> CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
>
>  SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
>
>  PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
>
>  SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
> +MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
>
> +MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib
>
>  # Make sure the user is running as root.
>  if [ "$UID" -ne "0" ]; then
> @@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
> $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
>  mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
> $SC_CONF_MT/features-dashboard.xml
>  chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml
>
> +echo "Copying mysql connector jar" >> $LOG
> +cp -f $MYSQL_JAR $MYSQL_COPY_PATH
> +
>  echo "You have successfully configured Apache Stratos!!"
>
>  su - ubuntu -c /opt/start_servers.sh
>
>
>
>
> --
> Isuru Perera
> Senior Software Engineer | WSO2, Inc. | http://wso2.com/
> Lean . Enterprise . Middleware
>
> about.me/chrishantha
>



-- 
*Imesh Gunaratne*
Technical Lead
WSO2 Inc | http://wso2.com
Mobile: +94 77 374 2057
Blog: http://imesh.gunaratne.org

Lean . Enterprise . Middleware

Fwd: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc

Posted by Isuru Perera <is...@wso2.com>.
Hi Manula,

As I mentioned, config.sh doesn't need to copy MySQL connector jar.

And you have copied only to Stratos Controller. Usually ELB also need to
use the same userstore database.

Let's not complicate the config script as it was written only to get user
data from the EC2 meta data service and configure the instance.

Thanks!

---------- Forwarded message ----------
From: <ma...@apache.org>
Date: Thu, Sep 5, 2013 at 12:06 PM
Subject: git commit: Update tools/ec2-demo-setup/config.sh by adding copy
mysql connector to sc
To: commits@stratos.incubator.apache.org


Updated Branches:
  refs/heads/master b7d1abdb4 -> 858799f6b


Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit:
http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/858799f6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/858799f6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/858799f6

Branch: refs/heads/master
Commit: 858799f6beca78728bbcfca81b0110667f6a80d9
Parents: b7d1abd
Author: Manula Thantriwatte <ma...@wso2.com>
Authored: Thu Sep 5 12:02:53 2013 +0530
Committer: Manula Thantriwatte <ma...@wso2.com>
Committed: Thu Sep 5 12:02:53 2013 +0530

----------------------------------------------------------------------
 tools/ec2-demo-setup/config.sh | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/858799f6/tools/ec2-demo-setup/config.sh
----------------------------------------------------------------------
diff --git a/tools/ec2-demo-setup/config.sh b/tools/ec2-demo-setup/config.sh
index e405de3..5c4736a 100755
--- a/tools/ec2-demo-setup/config.sh
+++ b/tools/ec2-demo-setup/config.sh
@@ -26,6 +26,8 @@
CARTRIDGE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deploymen
 SERVICE_DEFINITIONS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/deployment/server/services
 PAYLOADS=/opt/apache-stratos-cc-3.0.0-SNAPSHOT/repository/resources/payload
 SC_CONF_MT=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/conf/multitenancy
+MYSQL_JAR=/opt/mysql-connector-java-5.1.25.jar
+MYSQL_COPY_PATH=/opt/apache-stratos-sc-3.0.0-SNAPSHOT/repository/components/lib

 # Make sure the user is running as root.
 if [ "$UID" -ne "0" ]; then
@@ -187,6 +189,9 @@ sed -i "s/S2DOMAIN/$DOMAIN/g"
$TEMP_CONFIG_DIR/features-dashboard.xml.tmp
 mv $TEMP_CONFIG_DIR/features-dashboard.xml.tmp
$SC_CONF_MT/features-dashboard.xml
 chown ubuntu:ubuntu $SC_CONF_MT/features-dashboard.xml

+echo "Copying mysql connector jar" >> $LOG
+cp -f $MYSQL_JAR $MYSQL_COPY_PATH
+
 echo "You have successfully configured Apache Stratos!!"

 su - ubuntu -c /opt/start_servers.sh




-- 
Isuru Perera
Senior Software Engineer | WSO2, Inc. | http://wso2.com/
Lean . Enterprise . Middleware

about.me/chrishantha