Thanks Chris! This is an excellent addition.

Chris, I've one more question w.r.t. the docker image versioning. Do you have any plans for versioning? Otherwise, if people start to publish images, original images would be overwritten, right? Further, IMO we should version based on stratos version too. Wdyt?

https://registry.hub.docker.com/repos/apachestratos/


On Mon, Aug 25, 2014 at 3:51 PM, chris snow <chsnow123@gmail.com> wrote:

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" <nirmal070125@gmail.com> 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 <chsnow123@gmail.com> 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 <nirmal070125@gmail.com> 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 <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 puppetmaster, etc.  When it is all looking reasonable, I'll merge it into the apache source tree and update the wiki.

Many thanks,

Chris

---


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 <chsnow123@gmail.com> 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" <nirmal070125@gmail.com> 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 <chsnow123@gmail.com> 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 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:  


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?


 +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 }')


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.
 



On Fri, Aug 1, 2014 at 12:59 PM, Akila Ravihansa 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 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.





--
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.




--
Best Regards,
Nirmal

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





--
Best Regards,
Nirmal

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




--
Best Regards,
Nirmal

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





--
Best Regards,
Nirmal

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





--
Best Regards,
Nirmal

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




--
Best Regards,
Nirmal

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




--
Best Regards,
Nirmal

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





--
Best Regards,
Nirmal

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





--
Best Regards,
Nirmal

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




--
Best Regards,
Nirmal

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

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