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.

What is octohost?

733 views

Published on

What is an octohost? Why was it built? A general introduction to octohost.

Published in: Technology
  • Be the first to comment

What is octohost?

  1. 1. AND WHY? WHAT I S A N OCTOHOST?
  2. 2. WHAT? • A micro-Heroku inspired PaaS. • A way to deploy (mostly) web code easily and reliably. • `git push` to running site
  3. 3. WHY? • Heroku is awesome but pretty expensive. • Dependency management for websites everything is super annoying. • Needed an automated way to host lots of small sites. • At the start of the project, wanted to learn about Docker. • Wanted to deploy small web tools here without setting up a new box for each. (And dependencies, oh my.)
  4. 4. RVM ON THE SERVER IS NOT THE ANSWER WHY NOT RVM?
  5. 5. DON’T EVEN HAVE 1.9.X OR 2.1.X THIS IS WASTEFUL
  6. 6. THIS IS BETTER
  7. 7. I T ’ S • A more efficient use of resources. Costs less. • No version and language dependency hell. • Much more flexible. • More control than alternate PaaS services. • Much easier than using Docker manually.
  8. 8. HOW DOES IT WORK?
  9. 9. QUICK TERMINOLOGY • Docker: Open source container virtualization platform. • Image: A read only non-running container. • Container: A running image or series of images. Each container can be running a different OS or series of dependancies and doesn’t interfere with any other. • Registry: A Docker image storage service.
  10. 10. DOCKER USES IMAGES AS LAYERS
  11. 11. PIECES • Lots of bash glue. • End result is a running Docker container. • Thin wrapper around Docker with utility `octo` command.
  12. 12. THE KEY DOCKERFILE
  13. 13. WHAT? • FROM - what container to start with. • ADD - put my git repo in /srv/www • EXPOSE - open this port to the outside. • CMD - run this as the foreground process
  14. 14. YOU MIGHT BE ASKING WHAT ABOUT PYTHON?
  15. 15. SO MANY QUESTIONS BUT WHAT IS “FROM”?
  16. 16. DOCKER USES LAYERS
  17. 17. MAKE YOUR OWN - MIX AND MATCH HERE’S PYTHON 2.7
  18. 18. DEMO TIME ENOUGH TALK
  19. 19. DEMO TIME WHAT DOES `OCTO` DO?
  20. 20. OTHER ITEMS
  21. 21. ALL CONFIG SHOULD USE ENVIRONMENT VARIABLES • 12 Factor App Pattern: http://12factor.net/config • `octo config:set {container}/{KEY} “{VALUE}”` • `octo config {container}` - show all values • Makes it easier to move the container around. • An example: https://github.com/datadog/preston
  22. 22. CNAME • Special file in the root of a repo. • Add arbitrary domain names to the container. • Add one on each line. • You still need to update the external DNS, but this takes care of nginx config.
  23. 23. CAVEAT EMPTOR
  24. 24. YOUR DATA IS EPHEMERAL ——— More than that.
  25. 25. SINGLE PROCESS IT RUNS QUITE WELL BUT KEEP AN EYE ON I T
  26. 26. BUT IS THE BEST DEFAULT THIS MAY CHANGE
  27. 27. THANKS QUESTIONS?

×