Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B20C11525 for ; Mon, 25 Aug 2014 10:22:07 +0000 (UTC) Received: (qmail 45222 invoked by uid 500); 25 Aug 2014 10:22:02 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 45167 invoked by uid 500); 25 Aug 2014 10:22:02 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 45134 invoked by uid 99); 25 Aug 2014 10:22:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Aug 2014 10:22:01 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_REMOTE_IMAGE X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chsnow123@gmail.com designates 209.85.192.50 as permitted sender) Received: from [209.85.192.50] (HELO mail-qg0-f50.google.com) (209.85.192.50) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Aug 2014 10:21:35 +0000 Received: by mail-qg0-f50.google.com with SMTP id z107so9345055qgd.37 for ; Mon, 25 Aug 2014 03:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Kk6Krft8yJOeU/DPdhAv6IRNei7vp6FqcSEQTp66VkU=; b=JRmnAntPI1r17nnG8lGCecmPXSUP0Z3wVFIafGhFZdGAhVUn7gCaLEvpcITPYL0Edg UNc4k6qFW798AsZ1MIaPVnUE7/zmnc7MNSx6VkYfBKWhQWg9ry5EFKT8/BtJaDV9yXJf /1+IcCir42UzBBU2XdogM+cwsFpwMkn1BIxuSee4Ebn7q2zEegn0uc5/gyhQ+NvXeX5Q /bD2rv3M3/+LZBSoqYW8iqqwKZFJfSQ4iOvmuM3sPnh3ovzoLLo1y+/i/ICD7M7Sfwdo nAPDC1+ZkLv8qmtmAU7iIWyz0J6GiulOM13zlFk6c+TVFSFqZyONYHMBzj8IE16Jr0Tf STKw== MIME-Version: 1.0 X-Received: by 10.224.30.14 with SMTP id s14mr34493728qac.70.1408962093582; Mon, 25 Aug 2014 03:21:33 -0700 (PDT) Received: by 10.140.109.11 with HTTP; Mon, 25 Aug 2014 03:21:33 -0700 (PDT) Received: by 10.140.109.11 with HTTP; Mon, 25 Aug 2014 03:21:33 -0700 (PDT) In-Reply-To: References: Date: Mon, 25 Aug 2014 11:21:33 +0100 Message-ID: Subject: Re: Running Stratos inside docker From: chris snow To: dev Content-Type: multipart/alternative; boundary=047d7beb9cf41712d00501718d2d X-Virus-Checked: Checked by ClamAV on apache.org --047d7beb9cf41712d00501718d2d Content-Type: text/plain; charset=UTF-8 Hi Nirmal, The other docker images can be run with a --dns parameter that points to the IP address of the docker host where port 53udp will be bound. Those containers should then use DNS instead of host files. Using the nsupdate command from another networked machine and pointing to the address of the dns server, you can add addresses quite easily to the bind server. This works the same as dhcp updating DNS when hosts are added to a network. The DNS server will allow the other docker stratos runtime images to run on a single host or across multiple hosts, though if across multiple hosts will need to be on the same subnet. The DNS sever I think will be most useful for basic setups (e.g. training, demos, quickstarts). Prod environments should probably already have a DNS server to use. Cheers, Chris On 25 Aug 2014 11:00, "Nirmal Fernando" wrote: > No, Chris, your docker example scripts are pretty easier and useful. I'll > get back to you if I have any concerns. > > Thanks for the hard work on those :-) Now, since we have a base we could > create more images. > > Chris, do you have any pointers as to how we could leverage your DNS > docker image? > > > On Mon, Aug 25, 2014 at 3:15 PM, chris snow wrote: > >> Thanks Nirmal! >> >> Aside from the bugs, do you see any other areas for improvement? E.g. >> Are they too complex, or fiddly to work with, etc? >> >> >> On Mon, Aug 25, 2014 at 10:39 AM, Nirmal Fernando > > wrote: >> >>> Great thanks Chris! I'll commit the changes I've done for your docker >>> images asap. >>> >>> >>> On Mon, Aug 25, 2014 at 3:04 PM, chris snow wrote: >>> >>>> Hi Nirmal, >>>> >>>> I've added a first cut of a DNS image here [1]. >>>> >>>> I'll work over the next few days to integrate it with the other stratos >>>> docker images and also get the complete environment working with >>>> puppetmaster, etc. When it is all looking reasonable, I'll merge it into >>>> the apache source tree and update the wiki. >>>> >>>> Many thanks, >>>> >>>> Chris >>>> >>>> --- >>>> [1] >>>> https://github.com/snowch/stratos/tree/puppet-docker/tools/stratos-docker-images/bind >>>> >>>> >>>> On Mon, Aug 25, 2014 at 6:22 AM, Nirmal Fernando < >>>> nirmal070125@gmail.com> wrote: >>>> >>>>> Great thanks for the prompt response Chris! I'll go through the post. >>>>> >>>>> >>>>> On Mon, Aug 25, 2014 at 10:42 AM, chris snow >>>>> wrote: >>>>> >>>>>> Hi Nirmal, >>>>>> >>>>>> Sshd isn't running on the instances. See [1] for the rationale. If >>>>>> you trying to debug an instance, take a look at nsenter on that page. >>>>>> >>>>>> Cheers, >>>>>> Chris >>>>>> >>>>>> --- >>>>>> [1] http://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/ >>>>>> On 25 Aug 2014 05:01, "Nirmal Fernando" >>>>>> wrote: >>>>>> >>>>>>> Hi Chris, >>>>>>> >>>>>>> How should one SSH into a stratos docker instance? is the user root? >>>>>>> >>>>>>> >>>>>>> On Sun, Aug 24, 2014 at 9:17 PM, Nirmal Fernando < >>>>>>> nirmal070125@gmail.com> wrote: >>>>>>> >>>>>>>> Great.. thanks Chris. >>>>>>>> >>>>>>>> >>>>>>>> On Sun, Aug 24, 2014 at 9:14 PM, chris snow >>>>>>>> wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Sun, Aug 24, 2014 at 4:35 PM, Nirmal Fernando < >>>>>>>>> nirmal070125@gmail.com> wrote: >>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Sun, Aug 24, 2014 at 8:53 PM, chris snow >>>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>>> Sending to the dev list ... >>>>>>>>>>> >>>>>>>>>>> On Sun, Aug 24, 2014 at 4:07 PM, chris snow >>>>>>>>>> > wrote: >>>>>>>>>>> >>>>>>>>>>>> Ah yes, my mistake. Thanks Nirmal! >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> No problem Chris! Also, should we ask people to run build-all.sh >>>>>>>>>> as root user instead of using 'sudo' inside the scripts? I faced few issues >>>>>>>>>> when running on OS X, hence the question Chris. >>>>>>>>>> >>>>>>>>>> >>>>>>>>> >>>>>>>>> Makes sense. Please feel free to make the changes. >>>>>>>>> >>>>>>>>> >>>>>>>>>> Btw, I'm currently re-reading my old books on bind to figure >>>>>>>>>>>> out the best approach for a DNS name server image as I think that will make >>>>>>>>>>>> life a lot cleaner than users having to mess around with the docker host >>>>>>>>>>>> machine's /etc/hosts files. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> Great! >>>>>>>>>> >>>>>>>>>>> When I have the DNS image, I'll pull in the puppetmaster that >>>>>>>>>>>> I have on GitHub [1]. If you want to pull in the code before then, I think >>>>>>>>>>>> it should be working IIRC. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> I already pulled your PM commit in my local repo, will let you >>>>>>>>>> know how it goes. >>>>>>>>>> >>>>>>>>>>> --- >>>>>>>>>>>> [1] >>>>>>>>>>>> https://github.com/snowch/stratos/commit/3528a20c92454331d620ff61fe25cc2bdc618db9 >>>>>>>>>>>> On 24 Aug 2014 15:46, "Nirmal Fernando" < >>>>>>>>>>>> nirmal070125@gmail.com> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Hi Chris, >>>>>>>>>>>>> >>>>>>>>>>>>> While running build-all.sh script, I hit an error; >>>>>>>>>>>>> >>>>>>>>>>>>> Nirmals-MacBook-Pro:stratos-docker-images nirmal$ >>>>>>>>>>>>> ./build-all.sh >>>>>>>>>>>>> >>>>>>>>>>>>> cp: >>>>>>>>>>>>> /home/vagrant/stratos-source/tools/stratos-installer/resources/mysql.sql: >>>>>>>>>>>>> No such file or directory >>>>>>>>>>>>> >>>>>>>>>>>>> grep: files/mysql.tmp.0: No such file or directory >>>>>>>>>>>>> >>>>>>>>>>>>> sed: 1: "files/mysql.sql": invalid command code f >>>>>>>>>>>>> >>>>>>>>>>>>> sed: 1: "files/mysql.sql": invalid command code f >>>>>>>>>>>>> >>>>>>>>>>>>> Password: >>>>>>>>>>>>> >>>>>>>>>>>>> Seems like /home/vagrant/stratos-source/tools/stratos-installer/resources/mysql.sql >>>>>>>>>>>>> is hard-coded in mysql docker files. I'll fix them, meanwhile if I am doing >>>>>>>>>>>>> something wrong, please let me know. >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> On Fri, Aug 8, 2014 at 12:04 PM, Nirmal Fernando < >>>>>>>>>>>>> nirmal070125@gmail.com> wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> On Fri, Aug 8, 2014 at 11:54 AM, chris snow < >>>>>>>>>>>>>> chsnow123@gmail.com> wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> Hi Nirmal, answers inline... >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Fri, Aug 8, 2014 at 5:11 AM, Nirmal Fernando < >>>>>>>>>>>>>>> nirmal070125@gmail.com> wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Also, do you think it's worth to have a puppet master >>>>>>>>>>>>>>>> docker image too? IMO it'll make this even more easier. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I've started work on this: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> https://issues.apache.org/jira/browse/STRATOS-730 >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> https://github.com/snowch/stratos/commit/3528a20c92454331d620ff61fe25cc2bdc618db9 >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Great... appreciate if you could let us know once it is done. >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I'm also wondering whether a dns docker image would be >>>>>>>>>>>>>>> useful too? >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> https://issues.apache.org/jira/browse/STRATOS-736 >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> +1 >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Fri, Aug 8, 2014 at 9:37 AM, Nirmal Fernando < >>>>>>>>>>>>>>>> nirmal070125@gmail.com> wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Hi Chris, >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> I'm currently trying the docker images on OS X and it >>>>>>>>>>>>>>>>> appeared to me that we do not run docker in root mode with OS X docker >>>>>>>>>>>>>>>>> installation (https://docs.docker.com/installation/mac/). >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Should we add a note saying sudo in following command is >>>>>>>>>>>>>>>>> optional and should use with care? >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Please feel free to update the wiki page. >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Sure, will add a note. >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> MB_ID=$(sudo docker run -p 61616 -d >>>>>>>>>>>>>>>>> apachestratos/activemq); sleep 2s; >>>>>>>>>>>>>>>>> MB_IP_ADDR=$(sudo docker inspect --format '{{ >>>>>>>>>>>>>>>>> .NetworkSettings.Gateway }}' $MB_ID) >>>>>>>>>>>>>>>>> MB_PORT=$(sudo docker port $MB_ID 61616 | awk -F':' '{ >>>>>>>>>>>>>>>>> print $2 }') >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/Running+Stratos+inside+docker >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Also, Chris, how long should it usually take to pull the apachestratos/activemq >>>>>>>>>>>>>>>>> docker repository? >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> Have you managed to download the Stratos image? The >>>>>>>>>>>>>>> activemq image is approximately a third of the size of the Stratos image, >>>>>>>>>>>>>>> so should be much quicker to download: >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> Yes Chris, thanks. It downloaded after awhile. >>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> vagrant@vagrant:~/stratos-source/tools/stratos-docker-images$ >>>>>>>>>>>>>>> sudo docker images >>>>>>>>>>>>>>> REPOSITORY TAG IMAGE ID >>>>>>>>>>>>>>> CREATED VIRTUAL SIZE >>>>>>>>>>>>>>> apachestratos/stratos latest 0a7d5a6b38f4 >>>>>>>>>>>>>>> 9 hours ago 1.312 GB >>>>>>>>>>>>>>> apachestratos/activemq latest deff718a15fa >>>>>>>>>>>>>>> 9 hours ago 485 MB >>>>>>>>>>>>>>> apachestratos/mysql latest c3679856e831 >>>>>>>>>>>>>>> 9 hours ago 292.6 MB >>>>>>>>>>>>>>> ubuntu 14.04 ba5877dc9bec >>>>>>>>>>>>>>> 2 weeks ago 192.7 MB >>>>>>>>>>>>>>> stackbrew/ubuntu 12.04 b9e56c8f2cf5 >>>>>>>>>>>>>>> 2 weeks ago 103.9 MB >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> I've added a JIRA ticket to track this. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Sun, Aug 3, 2014 at 6:59 PM, Imesh Gunaratne < >>>>>>>>>>>>>>>>> imesh@apache.org> wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Great stuff!! Thanks Chris!! >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Sat, Aug 2, 2014 at 1:48 AM, Nguyen Anh Tu < >>>>>>>>>>>>>>>>>> tuna@apache.org> wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Perfect! Thanks a lot >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> --Tuna >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Sat, Aug 2, 2014 at 8:06 AM, Nirmal Fernando < >>>>>>>>>>>>>>>>>>> nirmal070125@gmail.com> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> This is awesome Chris! Thanks a lot. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Fri, Aug 1, 2014 at 1:02 PM, Mariangela Hills < >>>>>>>>>>>>>>>>>>>> mariangela@wso2.com> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Thanks, Chris! >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Regards, >>>>>>>>>>>>>>>>>>>>> Mariangela >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> *--* >>>>>>>>>>>>>>>>>>>>> Mariangela Hills >>>>>>>>>>>>>>>>>>>>> Senior Technical Writer >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> *WSO2, Inc. *lean.enterprise.middleware. >>>>>>>>>>>>>>>>>>>>> m: +94 773 500185 >>>>>>>>>>>>>>>>>>>>> w: http://wso2.com >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> On Fri, Aug 1, 2014 at 12:59 PM, Akila Ravihansa >>>>>>>>>>>>>>>>>>>>> Perera wrote: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Great work, Chris! >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Will try it out. >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> On Fri, Aug 1, 2014 at 12:56 PM, chris snow < >>>>>>>>>>>>>>>>>>>>>> chsnow123@gmail.com> wrote: >>>>>>>>>>>>>>>>>>>>>> > Hi All, >>>>>>>>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>>>>>> > I've added a wiki page here [1] with instructions >>>>>>>>>>>>>>>>>>>>>> for running Stratos >>>>>>>>>>>>>>>>>>>>>> > inside docker. >>>>>>>>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>>>>>> > Many thanks, >>>>>>>>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>>>>>> > Chris >>>>>>>>>>>>>>>>>>>>>> > >>>>>>>>>>>>>>>>>>>>>> > --- >>>>>>>>>>>>>>>>>>>>>> > [1] >>>>>>>>>>>>>>>>>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/Running+Stratos+inside+docker >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>>>> Akila Ravihansa Perera >>>>>>>>>>>>>>>>>>>>>> Software Engineer >>>>>>>>>>>>>>>>>>>>>> WSO2 Inc. >>>>>>>>>>>>>>>>>>>>>> http://wso2.com >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Phone: +94 77 64 154 38 >>>>>>>>>>>>>>>>>>>>>> Blog: http://ravihansa3000.blogspot.com >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>>>> Best Regards, >>>>>>>>>>>>>>>>>>>> Nirmal >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Nirmal Fernando. >>>>>>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos, >>>>>>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>>> Imesh Gunaratne >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Technical Lead, WSO2 >>>>>>>>>>>>>>>>>> Committer & PPMC Member, Apache Stratos >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>>> Best Regards, >>>>>>>>>>>>>>>>> Nirmal >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Nirmal Fernando. >>>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos, >>>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc. >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> -- >>>>>>>>>>>>>>>> Best Regards, >>>>>>>>>>>>>>>> Nirmal >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Nirmal Fernando. >>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos, >>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> >>>>>>>>>>>>>> -- >>>>>>>>>>>>>> Best Regards, >>>>>>>>>>>>>> Nirmal >>>>>>>>>>>>>> >>>>>>>>>>>>>> Nirmal Fernando. >>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos, >>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc. >>>>>>>>>>>>>> >>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> Best Regards, >>>>>>>>>>>>> Nirmal >>>>>>>>>>>>> >>>>>>>>>>>>> Nirmal Fernando. >>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos, >>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc. >>>>>>>>>>>>> >>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Best Regards, >>>>>>>>>> Nirmal >>>>>>>>>> >>>>>>>>>> Nirmal Fernando. >>>>>>>>>> PPMC Member & Committer of Apache Stratos, >>>>>>>>>> Senior Software Engineer, WSO2 Inc. >>>>>>>>>> >>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Best Regards, >>>>>>>> Nirmal >>>>>>>> >>>>>>>> Nirmal Fernando. >>>>>>>> PPMC Member & Committer of Apache Stratos, >>>>>>>> Senior Software Engineer, WSO2 Inc. >>>>>>>> >>>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> Best Regards, >>>>>>> Nirmal >>>>>>> >>>>>>> Nirmal Fernando. >>>>>>> PPMC Member & Committer of Apache Stratos, >>>>>>> Senior Software Engineer, WSO2 Inc. >>>>>>> >>>>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Best Regards, >>>>> Nirmal >>>>> >>>>> Nirmal Fernando. >>>>> PPMC Member & Committer of Apache Stratos, >>>>> Senior Software Engineer, WSO2 Inc. >>>>> >>>>> Blog: http://nirmalfdo.blogspot.com/ >>>>> >>>> >>>> >>> >>> >>> -- >>> Best Regards, >>> Nirmal >>> >>> Nirmal Fernando. >>> PPMC Member & Committer of Apache Stratos, >>> Senior Software Engineer, WSO2 Inc. >>> >>> Blog: http://nirmalfdo.blogspot.com/ >>> >> >> > > > -- > Best Regards, > Nirmal > > Nirmal Fernando. > PPMC Member & Committer of Apache Stratos, > Senior Software Engineer, WSO2 Inc. > > Blog: http://nirmalfdo.blogspot.com/ > --047d7beb9cf41712d00501718d2d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Nirmal,

The other docker images can be run with a --dns parameter th= at points to the IP address of the docker host where port 53udp will be bou= nd. Those containers should then use DNS instead of host files.

Using the nsupdate command from another networked machine an= d pointing to the address of the dns server, you can add addresses quite ea= sily to the bind server.=C2=A0 This works the same as dhcp updating DNS whe= n hosts are added to a network.

The DNS server will allow the other docker stratos runtime i= mages to run on a single host or across multiple hosts, though if across mu= ltiple hosts will need to be on the same subnet.

The DNS sever I think will be most useful for basic setups (= e.g. training, demos, quickstarts).=C2=A0 Prod environments should probably= already have a DNS server to use.

Cheers,

Chris

On 25 Aug 2014 11:00, "Nirmal Fernando"= ; <nirmal070125@gmail.com&= gt; wrote:
No, Chris, your docker example scripts are pretty easier a= nd useful. I'll get back to you if I have any concerns.

<= div>Thanks for the hard work on those :-) Now, since we have a base we coul= d create more images.

Chris, do you have any pointers as to how we could leve= rage your DNS docker image?


<= div class=3D"gmail_quote">On Mon, Aug 25, 2014 at 3:15 PM, chris snow <c= hsnow123@gmail.com> wrote:
Thanks Nirmal!

Aside from the bugs, do you see any other areas for improvement? =C2= =A0E.g. Are they too complex, or fiddly to work with, etc?


On Mon, Aug 25, 2014 at 10:39 AM, Nirmal Fernando <nirmal070125@gmail= .com> wrote:
Great thanks Chris! I'll commit the changes I've d= one for your docker images asap.
=

On Mon, Aug 25, 2014 at 3:04 PM, chris s= now <chsnow123@gmail.com> wrote:
Hi Nirmal,

I've added a first cut of a DNS image here [1].

=
I'll work over the next few days to integrate it with the other stratos= docker images and also get the complete environment working with puppetmas= ter, etc. =C2=A0When it is all looking reasonable, I'll merge it into t= he apache source tree and update the wiki.

Many thanks,

Chris

---


On Mon, Aug 2= 5, 2014 at 6:22 AM, Nirmal Fernando <nirmal070125@gmail.com> wrote:
Great thanks for the prompt= response Chris! I'll go through the post.


On Mon, Aug 2= 5, 2014 at 10:42 AM, chris snow <chsnow123@gmail.com> wrot= e:

Hi Nirmal,

Sshd isn't running on the instances.=C2=A0 See [1] for t= he rationale.=C2=A0 If you trying to debug an instance, take a look at nsen= ter on that page.

Cheers,
Chris

---
[1] http://jpetazzo.github.io/2014/06/23/docker-ssh-con= sidered-evil/

On 25 Aug 2014 05:01, "Nirmal Fernando"= ; <nirmal070= 125@gmail.com> wrote:
Hi Chris,

How should one SSH into a str= atos docker instance? is the user root?


On Sun, Aug 24, 2014 at 9:17 PM, Nirm= al Fernando <nirmal070125@gmail.com> wrote:
Great.. thanks Chris.
=


On Sun, Aug 24, 2014 at 9:14 PM, chris snow <chsnow123@gmail.com&g= t; wrote:



On Sun, Aug 24, 2014 at 4:35 PM= , Nirmal Fernando <nirmal070125@gmail.com> wrote:



On Sun, Aug 24, 2014 at 8:53 PM= , chris snow <chsnow123@gmail.com> wrote:
Sending to the dev list ...=

On Sun,= Aug 24, 2014 at 4:07 PM, chris snow <chsnow123@gmail.com>= wrote:

Ah yes, my mistake. Thanks Ni= rmal!


<= /div>
No problem Chris! Also, should we ask people to run build-all.sh= as root user instead of using 'sudo' inside the scripts? I faced f= ew issues when running on OS X, hence the question Chris.
=C2=A0

=
Makes sense. =C2=A0Please feel free to make the changes.
=C2=A0

Btw, I'm currently re-reading my old books on bind to fi= gure out the best approach for a DNS name server image as I think that will= make life a lot cleaner than users having to mess around with the docker h= ost machine's /etc/hosts files.


Great!=C2=A0

When I have the DNS image, I'll pull in the puppetmaster= that I have on GitHub [1]. If you want to pull in the code before then, I = think it should be working IIRC.


I already pulled your PM commi= t in my local repo, will let you know how it goes.

---
[1] https://github.com/snowch/stratos/= commit/3528a20c92454331d620ff61fe25cc2bdc618db9

On 24 Aug 2014 15:46, "Nirmal Fernando"= ; <nirmal070= 125@gmail.com> wrote:
Hi Chris,

While running build-all.sh sc= ript, I hit an error;

Nirmals-MacBook-Pro:stratos-docker-images nirm= al$ ./build-all.sh=C2=A0

cp: /home/vagrant/= stratos-source/tools/stratos-installer/resources/mysql.sql: No such file or= directory

grep: files/mysql.= tmp.0: No such file or directory

sed: 1: "file= s/mysql.sql": invalid command code f

sed: 1: "file= s/mysql.sql": invalid command code f

Password:


Seems like=C2=A0/home/vagrant/stratos-source/tools/stratos-installer/resources/m= ysql.sql is hard-coded in mysql docker files. I'll fix them, meanwhile = if I am doing something wrong, please let me know.


On Fri,= Aug 8, 2014 at 12:04 PM, Nirmal Fernando <nirmal070125@gmail.com= > wrote:



On Fri, Aug 8, 2014 at 11:54 AM= , chris snow <chsnow123@gmail.com> wrote:
Hi Nirmal, =C2=A0answers in= line...


O= n Fri, Aug 8, 2014 at 5:11 AM, Nirmal Fernando <nirmal070125@gmail.co= m> wrote:
Also, do you think it's worth to have= a puppet master docker image too? IMO it'll make this even more easier= .

I've started work on this: =C2= =A0


Great... appreciate if you could let= us know once it is done.


I'm also wondering whether a dns docker image= would be useful too?


=C2=A0+1

=C2=A0


On Fri, Aug 8, 2014 at 9:37 AM, Nirmal F= ernando <nirmal070125@gmail.com> wrote:
Hi Chris,

I'm curr= ently trying the docker images on OS X and it appeared to me that we do not= run docker in root mode with OS X docker installation (https://docs.docker.co= m/installation/mac/).

Should we add a note saying sudo in following command i= s optional and should use with care?

Please feel free to update= the wiki page.

Sure, will add a n= ote.=C2=A0
=C2=A0

MB_ID=3D$(sudo docker run -p=C2=A061616=C2=A0-d apache= stratos/activemq); sleep 2s;
MB_IP_ADDR=3D$(sudo docker inspect --format=C2=A0<= /code>'{{ .NetworkSettings.Gateway }}'=C2=A0$MB_ID)
MB_PORT=3D$(sudo docker port $MB_ID=C2=A061616=C2=A0| = awk -F':'=C2=A0'{ print $2 }')


Also, Chris, how long should it usually take to pull the=C2=A0apachestratos/activemq docke= r repository?


Have you managed to download the Stratos image? =C2= =A0The activemq image is approximately a third of the size of the Stratos i= mage, so should be much quicker to download:

Yes Chris, thanks.= It downloaded after awhile. =C2=A0

vagrant@vagrant:~/stratos-source/tools/stratos-doc= ker-images$ sudo docker images
REPOSITORY =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 TAG =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 IMAGE ID =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0CREATED =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 VIRTUAL SIZE
apachestratos/stratos =C2=A0 =C2=A0latest =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A00a7d5a6b38f4 =C2=A0 =C2=A0 =C2=A0 =C2=A09 hours ago =C2=A0= =C2=A0 =C2=A0 =C2=A0 1.312 GB
apachestratos/activemq =C2=A0 late= st =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0deff718a15fa =C2=A0 =C2= =A0 =C2=A0 =C2=A09 hours ago =C2=A0 =C2=A0 =C2=A0 =C2=A0 485 MB
a= pachestratos/mysql =C2=A0 =C2=A0 =C2=A0latest =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0c3679856e831 =C2=A0 =C2=A0 =C2=A0 =C2=A09 hours ago =C2= =A0 =C2=A0 =C2=A0 =C2=A0 292.6 MB
ubuntu =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = 14.04 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ba5877dc9bec =C2=A0 = =C2=A0 =C2=A0 =C2=A02 weeks ago =C2=A0 =C2=A0 =C2=A0 =C2=A0 192.7 MB
<= div>stackbrew/ubuntu =C2=A0 =C2=A0 =C2=A0 =C2=A0 12.04 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 b9e56c8f2cf5 =C2=A0 =C2=A0 =C2=A0 =C2=A02 week= s ago =C2=A0 =C2=A0 =C2=A0 =C2=A0 103.9 MB

I've added a JIRA ticket to track this.
= =C2=A0

On Sun, Aug 3, 2014 at 6:59 PM, Imesh Gunaratne <imesh@apache.org> wrote:
Great stuff!! Thanks Chris!!


On Sat, Aug 2, 2014 at 1:48= AM, Nguyen Anh Tu <tuna@apache.org> wrote:
Perfect! Thanks a lot

--Tuna


On Sat, Aug 2, 2014 at 8:06 AM, Nirmal F= ernando <nirmal070125@gmail.com> wrote:
This is awesome Chris! Thanks a lot.


On Fri, Aug 1= , 2014 at 1:02 PM, Mariangela Hills <mariangela@wso2.com> = wrote:
Thanks, Chris!

Regards,
Mariangela


--

Maria= ngela Hills
Senior Techn= ical Writer
=
WSO2, Inc.
lean.enterprise.middleware.
m:=C2=A0+94 773 500185=
w:=C2=A0
http://wso2.com



On Fri, Aug 1, 2014 at 12:59 PM, Akila R= avihansa Perera <ravihansa@wso2.com> wrote:
Great work, Chris!

Will try it out.

On Fri, Aug 1, 2014 at 12:56 PM, chris snow <chsnow123@gmail.com> wrote:
> Hi All,
>
> I've added a wiki page here [1] with instructions for running Stra= tos
> inside docker.
>
> Many thanks,
>
> Chris
>
> ---
> [1] https://cwiki.apache.org/conf= luence/display/STRATOS/Running+Stratos+inside+docker



--
Akila Ravihansa Perera
Software Engineer
WSO2 Inc.
http://wso2.com

Phone: +94 77 64 154 38
Blog: http:= //ravihansa3000.blogspot.com




--
Best Regards,
Nirmal

Nirmal = Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.





<= span>--
Imesh Gunaratne
Technical Lead, WSO2
Committer & PP= MC Member, Apache Stratos



--
Best Regards,
Nirmal

Nirmal Fernando.
PPMC = Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2= Inc.




--
=
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Me= mber & Committer of Apache Stratos,
Senior Software Engineer, WSO2 I= nc.





--
Best Regards,
Nirmal

Nirmal Fernando.<= br>PPMC Member & Committer of Apache Stratos,
Senior Software Engine= er, WSO2 Inc.




--
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & C= ommitter of Apache Stratos,
Senior Software Engineer, WSO2 Inc.





--
Best Regards,
Nirmal

Nirmal Fernando.<= br>PPMC Member & Committer of Apache Stratos,
Senior Software Engine= er, WSO2 Inc.





--
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & C= ommitter of Apache Stratos,
Senior Software Engineer, WSO2 Inc.




--
=
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Me= mber & Committer of Apache Stratos,
Senior Software Engineer, WSO2 I= nc.




--
=
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Me= mber & Committer of Apache Stratos,
Senior Software Engineer, WSO2 I= nc.





--
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & C= ommitter of Apache Stratos,
Senior Software Engineer, WSO2 Inc.





--
=
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Me= mber & Committer of Apache Stratos,
Senior Software Engineer, WSO2 I= nc.

--047d7beb9cf41712d00501718d2d--