Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Asosio Talk #1 – Simplicity is scalable

Asosio Talk #1 – Simplicity is scalable

Asosio is hosting a low-key tech-talk on Rainmaking Loft Copenhagen about concepts every tech startup should think about. We are primarily going to focus on containerization and de-coupled systems architecture.

Our point of departure will be in our own web-app, which is a typical seed-stage-startup PHP app.

We are going to introduce technology and concepts like Docker, Fig, Kubernetes in an accessible and understandable way.

We want you to understand why Docker, Fig and Kubernetes is something that is worthwhile looking into.

This talk is relevant for everyone who’d like to be introduced to, and know more about the containerization mind-set and how that fits into your product/idea.

Asosio.com

March 27, 2015
Tweet

Other Decks in Technology

Transcript

  1. ASOSIO Asosio.com Community centered platform that offers a space for

    all your communities online, where you can talk, chat, organise, gather, and share. Sign up for free at asosio.com
  2. ASOSIO The problem Config & maintenance hell • House of

    Cards • New services required • Operations/maintenance • Sudden Scaling
  3. ASOSIO Sudden Scalability Requirements • An entrepreneur’s dream: ◦ Extreme

    growth in user base • And (possibly) nightmare: ◦ The database taps out ◦ Web Server request times shoot through the roof ◦ Users get angry >:( Do you want these devs to scale your business under pressure ?
  4. ASOSIO House of Cards • Update this • Bugfix that

    • Connect these Or The entire server dies
  5. ASOSIO We Got Hacked..! • Software changes rapidly • Our

    product consists of many components ◦ (And they all have security flaws..) • Once a system is compromised ◦ How do you know that it’s secure again ? • Wouldn’t it be neat to refine a few configs, update the framework and go again?
  6. ASOSIO Dockerfile FROM ubuntu:14.04 RUN apt-get install -y nginx php5-fpm

    COPY src /opt/sites/my-web-app CMD /bin/nginx EXPOSE 80 Scripted Baking Recipe Easy to iterate on
  7. ASOSIO Fig dbdata: image: busybox volumes: - /var/lib/mysql db: image:

    tutum/mariadb volumes_from: - dbdata environment: MARIADB_PASS: password web: image: my-own-web-image ports: - 8080:80 links: - db:database.app Dev orchestration
  8. ASOSIO Building an army of Web Servers { “id”: “webserver”,

    “kind”: “ReplicationController”, “desiredState”: { “replicas”: 2, “replicaselector”: { “version”: “250315-1”}, “podTemplate”: { desiredState: { “manifest”: { “id”: “webserver-pod”, “containers”: [{ “name”: “webserver-container”, “image”: “gcr.io/_b_the_empire/webserver:latest”, “ports”: [{“name”: “http”, “containerPort”: 80}] }] } } } } } How many replicas clones do we want ?
  9. ASOSIO Building an army of Web Servers { “id”: “webserver”,

    “kind”: “ReplicationController”, “desiredState”: { “replicas”: 2, “replicaselector”: { “version”: “250315-1”}, “podTemplate”: { desiredState: { “manifest”: { “id”: “webserver-pod”, “containers”: [{ “name”: “webserver-container”, “image”: “gcr.io/_b_the_empire/webserver:latest”, “ports”: [{“name”: “http”, “containerPort”: 80}] }] } } } } } What version are we running? Bump this when updating our docker images!
  10. ASOSIO Building an army of Web Servers { “id”: “webserver”,

    “kind”: “ReplicationController”, “desiredState”: { “replicas”: 2, “replicaselector”: { “version”: “250315-1”}, “podTemplate”: { desiredState: { “manifest”: { “id”: “webserver-pod”, “containers”: [{ “name”: “webserver-container”, “image”: “gcr.io/_b_the_empire/webserver:latest”, “ports”: [{“name”: “http”, “containerPort”: 80}] }] } } } } } This is the DNA of our pods - determines the number and nature of the containers in the pod
  11. ASOSIO Building an army of Web Servers { “id”: “webserver”,

    “kind”: “ReplicationController”, “desiredState”: { “replicas”: 2, “replicaselector”: { “version”: “250315-1”}, “podTemplate”: { desiredState: { “manifest”: { “id”: “webserver-pod”, “containers”: [{ “name”: “webserver-container”, “image”: “gcr.io/_b_the_empire/webserver:latest”, “ports”: [{“name”: “http”, “containerPort”: 80}] }] } } } } } The name we would see when getting a list of our pods
  12. ASOSIO Building an army of Web Servers { “id”: “webserver”,

    “kind”: “ReplicationController”, “desiredState”: { “replicas”: 2, “replicaselector”: { “version”: “250315-1”}, “podTemplate”: { desiredState: { “manifest”: { “id”: “webserver-pod”, “containers”: [{ “name”: “webserver-container”, “image”: “gcr.io/_b_the_empire/webserver:latest”, “ports”: [{“name”: “http”, “containerPort”: 80}] }] } } } } } Where to fetch the docker image from. (We store ours at Google :) )
  13. ASOSIO Server configuration fully documented • Each container is described

    by its Dockerfile and associated configuration files • All files can be under version control • Every change can be documented by a commit Adaptability • Easy to adapt - just fork off a similar image and make the changes needed ! • Easy to refine - just make a few changes to the image! Cooking containers from scratch is hard - just add goodness!
  14. ASOSIO Lessons Learned • Servers as Pets - no more!

    • Server configuration fully documented ◦ and under version-control • Adaptability is greater ◦ leverage similarities between services • Seems an expensive investment up front ◦ but well worth it in time saved later. • Allows High-Availability & Fault Tolerance
  15. ASOSIO Tech Startup Devs Community Join us on Asosio! Where

    we can share knowledge and experiences connected to developing a tech startup. https://asosio.com/sign-up?tech-stasF3BO