stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lahiru Sandaruwan <lahi...@wso2.com>
Subject Re: git commit: Update tools/ec2-demo-setup/config.sh by adding copy mysql connector to sc
Date Fri, 06 Sep 2013 09:44:24 GMT
On Fri, Sep 6, 2013 at 3:03 PM, Isuru Perera <isurup@wso2.com> wrote:

>
>
>
> On Fri, Sep 6, 2013 at 2:52 PM, Lahiru Sandaruwan <lahirus@wso2.com>wrote:
>
>>
>>
>>
>> On Fri, Sep 6, 2013 at 2:47 PM, Isuru Perera <isurup@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 <isurup@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: <manula@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 <manulac@wso2.com>
>>>>> Authored: Thu Sep 5 12:02:53 2013 +0530
>>>>> Committer: Manula Thantriwatte <manulac@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

Mime
View raw message