Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to Kalabox

812 views

Published on

Introduction to Kalabox covers the basic information of Kalabox, an opensource project for building environment on top of Docker.

Published in: Technology
  • Be the first to comment

Introduction to Kalabox

  1. 1. Gerald Z. Villorente Drupal | Linux | DevOps | Consultant | Open-Source Advocate VielSoft Ltd. | MossWood Creative Intro to Kalabox
  2. 2. Our greatest weakness lies in giving up. The most certain way to succeed is always to try just one more time. - T.A Edison
  3. 3. Infuse your life with action. Don't wait for it to happen. Make it happen. Make your own future. Make your own hope. Make your own love. And whatever your beliefs, honor your creator, not by passively waiting for grace to come down from upon high, but by doing what you can to make grace happen... yourself, right now, right down here on Earth. - Bradley Whitford
  4. 4. About Me  Farmer  Tricycle Driver  Disc Jockey  Systems Administrator  Web Developer  Drupalista  DevOps Practitioner  OpenStack Kid  Startup  Father
  5. 5. The Cause of Chaos
  6. 6. Common Reasons ● Inconsistent environment ● Limited/lack of knowledge on the importance of consistency ● It works on my machine
  7. 7. DIY Disadvantages ● Inconsistent environment ● Out of sync with the standards ● Long ramp-up/training for newbie ● It works on my machine! ● Inability to test Ops scripts
  8. 8. The Results ● Buggy ● Unreliable testing ● Ability to break the production
  9. 9. Introducing Kalabox
  10. 10. What is Kalabox?
  11. 11. What is Kalabox? A framework to build reusable, super fast, highly customizable, extensible and local integrated workflow solutions for all kinds of apps.
  12. 12. Importants ● Alpha (v0.10.5-alpha5) ● Works only on Pantheon (for now)
  13. 13. With Kalabox you can: ● Easily mimic your production environment on local ● Setup, develop, pull and deploy your sites super fast ● Standardize your teams dev environments and tools on OSX, Windows and Linux ● Easily customize or extend tooling, deployment options and basically any other functionality ● Free yourself from the tyranny of inferior local development products
  14. 14. Behind Kalabox ● Docker ● Nodejs ● Boot2docker ● Virtualbox
  15. 15. Kalabox Stuf ● Pantheon ● Git ● Drush ● Solr ● SSL ● Terminus ● Redis
  16. 16. Why Kalabox? ● Isolation ● Mirror production ● Test Ops scripts ● Developers and QA can setup their environment easily ● Faster onboarding
  17. 17. Kalabox Installation ● Download the Kalabox binary for your platform from here. ● For Windows just install the binary. ● For Unix and Mac just place the binary to /usr/local/bin/. Rename it to kbox. ● In your terminal you can access it by typing kbox.
  18. 18. Kalabox Filesystem code – Contains project code (Drupal).
  19. 19. Kalabox Filesystem config – Contains configurations for the environment like Drush, Solr, PHP, Terminus, MySQL, NginX, and Tomcat.
  20. 20. Kalabox Filesystem dockerfiles – Contains Docker files for Kalabox images like Appserver, Mariadb, Redis, Solr, and Terminus
  21. 21. Kalabox Filesystem node_modules – Contains nodejs modules.
  22. 22. Kalabox Filesystem plugins – Contains custom extensions needed by the environment.
  23. 23. Kalabox Filesystem scripts – Contains scripts needed by Kalabox to provision stuff or to handle depedency.
  24. 24. Kalabox Filesystem kalabox.json – Main configuration file of Kalabox.
  25. 25. Kalabox Filesystem package.json – Configuration file for packages.
  26. 26. Kalabox Examples
  27. 27. Creating a Project gerald@von-viel:~/Desktop/test$ kbox create pantheon ? Pantheon dashboard email: geraldvillorente@gmail.com ? Pantheon dashboard password: ************ ? Which site? berkeley-test ? Which environment? dev ? What will you call this monster you have created: berkeley-test Building your app... ############################################################### Welcome to Kalabox 2! We see this is your first time running a Kalabox command that requires the use of the Kalabox engine. Before we can do this We need to install some special things to make sure you are good to go. Please agree to the prompt below to install all the magic. (takes about 5 minutes with average download speed) ###############################################################
  28. 28. Starting Kalabox $ kbox up info: BOOT2DOCKER => Starting up. maxRetries=3, max=3 info: BOOT2DOCKER => Initializing boot2docker [1]. info: BOOT2DOCKER => Sharing folders [1]. info: BOOT2DOCKER => Bringing boot2docker up [1]. info: BOOT2DOCKER => Boot2docker is up. Kalabox engine has been activated.
  29. 29. Shutting Kalabox $ kbox down info: BOOT2DOCKER => Shutting down [1]. info: BOOT2DOCKER => Shutting down [2]. info: BOOT2DOCKER => Shut down successful. Kalabox engine has been deactivated.
  30. 30. Running Kalabox Containers $ kbox berkeley-test start info: BOOT2DOCKER => Starting up. maxRetries=3, max=3 info: BOOT2DOCKER => Initializing boot2docker [1]. info: BOOT2DOCKER => Sharing folders [1]. info: BOOT2DOCKER => Bringing boot2docker up [1]. info: BOOT2DOCKER => Boot2docker is up. Kalabox engine has been activated. info: DOCKER => Creating ad hoc container "kalabox/debian:stable". name=kalabox_temp-8c014d39-1b61-4620-9ce3-a3ba30bf4eaa, Cmd=[bash], Tty=true, Image=kalabox/debian:stable, Env=[APPDOMAIN=berkeley-test.kbox, KBOX_CODEDIR=code, KALABOX=true, APPNAME=berkeley-test, SSH_KEY=pantheon.kalabox.id_rsa, GITUSER=Gerald Villorente, GITEMAIL=geraldvillorente@gmail.com, PANTHEON_ACCOUNT=geraldvillorente@gmail.com], VolumesFrom=[kb_berkeley-test_data] info: DOCKER => Ad hoc container created. 1b0fcbe5f01f0f9336e9761f254264113f6008efc97ed674a5c6bbad0d099182 info: DOCKER => Starting ad hoc container "1b0fcbe5f01f0f9336e9761f254264113f6008efc97ed674a5c6bbad0d099182". Binds=[/Users/gerald/Desktop/test/berkeley-test:/src:rw] . . . .
  31. 31. Stopping Kalabox Containers $ kbox stop info: DOCKER => Stopping container. 83e5ea89343a57a33cc8834c68474bdc4ea984b06f42c2a6173381b5448ae649 info: DOCKER => Container stopped. 83e5ea89343a57a33cc8834c68474bdc4ea984b06f42c2a6173381b5448ae649 info: DOCKER => Stopping container. 0d370cb158d7986a07ca750ca22f1cef53b0dd551b62b11ee8b7bad48f2b5e1f info: DOCKER => Container stopped. 0d370cb158d7986a07ca750ca22f1cef53b0dd551b62b11ee8b7bad48f2b5e1f info: DOCKER => Stopping container. 7c65caea63cd92cdb0e6508a99643b04b7d2baab14d57427603b6a3fdd7fb6ca info: DOCKER => Container stopped. 7c65caea63cd92cdb0e6508a99643b04b7d2baab14d57427603b6a3fdd7fb6ca info: DOCKER => Stopping container. 113fba72fc69ba59b5f514d043083544c34145a86b5124638ff1468db6f48772 info: DOCKER => Container stopped. 113fba72fc69ba59b5f514d043083544c34145a86b5124638ff1468db6f48772 info: BOOT2DOCKER => Shutting down [1]. info: BOOT2DOCKER => Shut down successful. Kalabox engine has been deactivated.
  32. 32. SSH'ng to Kalabox $ boot2docker --vm="Kalabox2" ssh ## . ## ## ## == ## ## ## ## ## === /"""""""""""""""""___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ ______ o __/ __/ ___________/ _ _ ____ _ _ | |__ ___ ___ | |_|___ __| | ___ ___| | _____ _ __ | '_ / _ / _ | __| __) / _` |/ _ / __| |/ / _ '__| | |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ | |_.__/ ___/ ___/ __|_______,_|___/ ___|_|____|_| Boot2Docker version 1.8.1, build master : 075b6aa - Tue Aug 25 07:53:54 UTC 2015 Docker version 1.8.1, build d12ea79
  33. 33. Listing Docker containers $ docker ps --all CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES a8f3a6abdb75 kalabox/syncthing:v0.10.0 "/bin/bash /start.sh" 3 hours ago Up 3 hours 0.0.0.0:22000->22000/tcp, 0.0.0.0:21025-21026->21025-21026/udp, 0.0.0.0:60008->60008/tcp kalabox_syncthing 83e5ea89343a kalabox/pantheon-appserver:v0.10.0 "/root/start.sh" 12 hours ago Up 3 hours 0.0.0.0:32769->80/tcp, 0.0.0.0:32768->443/tcp kb_berkeley-test_appserver 113fba72fc69 kalabox/pantheon-mariadb:v0.10.0 "/start.sh" 12 hours ago Up 3 hours 0.0.0.0:32775->3306/tcp kb_berkeley-test_db 7c65caea63cd kalabox/pantheon-solr:v0.10.0 "/bin/bash /start.sh" 12 hours ago Up 3 hours 0.0.0.0:32774->449/tcp kb_berkeley-test_solr 0d370cb158d7 kalabox/pantheon-redis:v0.10.0 "/usr/bin/redis-serve" 12 hours ago Up 3 hours 0.0.0.0:32773->80/tcp, 0.0.0.0:32772->443/tcp, 0.0.0.0:32771->8160/tcp, 0.0.0.0:32770->8161/tcp kb_berkeley-test_redis fa4dcc00208a kalabox/data:v0.10.0 "/bin/true" 12 hours ago Created kb_berkeley-test_data 58dfb5aa9a28 kalabox/skydock:v0.10.0 "/skydock -ttl 214748" 12 hours ago Up 3 hours kalabox_skydock 1461f090bed5 kalabox/hipache:v0.10.0 "supervisord -n" 12 hours ago Up 3 hours 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:8160->8160/tcp kalabox_hipache d5f4167da6e5 kalabox/dnsmasq:v0.10.0 "/root/start.sh" 12 hours ago Up 3 hours 10.13.37.42:53->53/udp, 53/tcp kalabox_dnsmasq b3b391f5cd80 kalabox/data:v0.10.0 "/bin/true" 12 hours ago Exited (0) 3 hours ago kalabox_data 8df876a5b56c kalabox/skydns:v0.10.0 "/skydns -http 0.0.0." 12 hours ago Up 3 hours 172.17.42.1:53->53/udp, 8080/tcp kalabox_skydns
  34. 34. Listing Application Containers $ kbox containers { "id": "0d370cb158d7986a07ca750ca22f1cef53b0dd551b62b11ee8b7bad48f2b5e1f", "name": "kb_berkeley-test_redis", "app": "berkeley-test", "ports": [ "443/tcp=>32772", "80/tcp=>32773", "8160/tcp=>32771", "8161/tcp=>32770" ], "running": true } { "id": "83e5ea89343a57a33cc8834c68474bdc4ea984b06f42c2a6173381b5448ae649", "name": "kb_berkeley-test_appserver", "app": "berkeley-test", "ports": [ "443/tcp=>32768", "80/tcp=>32769" ], "running": true } { "id": "113fba72fc69ba59b5f514d043083544c34145a86b5124638ff1468db6f48772", "name": "kb_berkeley-test_db", "app": "berkeley-test", "ports": [ "3306/tcp=>32775" ], "running": true } { "id": "7c65caea63cd92cdb0e6508a99643b04b7d2baab14d57427603b6a3fdd7fb6ca", "name": "kb_berkeley-test_solr", "app": "berkeley-test", "ports": [ "449/tcp=>32774" ], "running": true }
  35. 35. SSH'ng to Docker containers inside Boot2docker machine $ docker exec -it a8f3a6abdb75 bash root@a8f3a6abdb75:/#
  36. 36. Stopping Docker containers inside Boot2docker machine $ docker stop 83e5ea89343a 83e5ea89343a
  37. 37. Demo
  38. 38. Where to start? ● Vagrant ● Virtualbox ● Docker
  39. 39. In case you need more help ● Google it ● Stackoverflow ● https://github.com/kalabox/kalabox
  40. 40. Question?
  41. 41. Good luck young man!
  42. 42. Contact ● Skype : gerald.villorente ● E-Mail | Hangout : geraldvillorente@gmail.com ● Github: https://github.com/geraldvillorente ● Mobile: 09167332641
  43. 43. Credits ● Mike Pirog of Kalamuna, Kalabox project lead. ● Drupal User Group Cebu headed by Luc Bezier and PrometSource. ● AsiaWorld Advertising for sponsoring my accomodation and food. ● MossWood Creative ● VielSoft Ltd.
  44. 44. Disclaimer All images used in this presentation are not mine. Therefore, all rights reserved to the original owner.

×