Deploy my application to cluster of multiple vms using orchestration tools

7/31/2015

Kubernetes is orchestration system for Docker containers. This means: I can deploy and scale my application using it, and it will ensure that my application (that consistes of microservices) is up and running.

Now I want to use it to deploy my application to a cluster. My cluster consists of 3 virtual-machines that run Ubuntu (or any other linux distro needed).

So I prepared:

  • 3 vms that run Ubuntu (they all have docker installed).
  • My PC (I am using Windows, but have Ubuntu Desktop installed on a Virtualbox vm).

** My Goal: **

  • Deploy my application to the cluster (that consist of multiple nodes) from my local machine.

My Question(s):

Where do I get started, or what am I missing, because I find it little hard to follow-up.

I would appreciate if you put me on the right direction of learning how to deploy

I am already familier with the concept of Docker, and I already used it on my dev machines, but I am missing something here, please help me.

Thank you.

PS: I need an orchestration tool to manage my cluster, that's why I choose Kubernetes, if you think I need something else (Shipyard, Flynn, Deis) or any other tool, I would be thankful.

PPS: I recently found this page awesome-docker which contains a lot of infos to start with, but I am still missing something.

-- xdeveloper
docker
kubernetes
linux
virtual-machine

2 Answers

7/31/2015

To get started with Kubernetes, try: kubernetes.io, the Getting Started link is pretty good. They show many differnt ways to do it. Starting with installed linux you have two different examples, one that shows a manual installation (which might be what you are looking for), and one has Ansible based installation.

The easiest way to get started is to use the Vagrant installation example.

Your goal makes for a mighty big question. It boils down to:

  • How do I create a Kubernetes cluster?
  • How can I package my application to run in a cloud environment (maybe that is already done)?
  • How can I use my cluster to run my application?

I don't know much about the orchestration tools that you listed (Shipyard, Flynn, Deis). In my opinion, the ones to look at are Kubernetes, Mesos, Fleet, DockerCompose, in that order.

It took me a couple of weeks of trying to get a cluster running before I understood all of the pieces, I think you might have to just slog through it. SO is a good place to go for specific questions. There is also a google group called Google Containers which you can ask questions on. There is a irc channel as well.

-- Greg
Source: StackOverflow

7/31/2015

Kubernetes plus Docker is probably good enough. Good instruction to install kubernetes is https://access.redhat.com/articles/1353773, or from kubernetes docs. After you have it installed, and authorization done, check it with

> kubectl get nodes
> kubectl get services

We ran computational pods directly using JSON files from Docker images, along the line

> kubectl create -f podXXX.json

where podXXX.json looks like

{
    "kind": "Pod",
    "apiVersion": "v1",
    "metadata": {
       "name": "jobXXX"
    },
   "spec": {
     "containers": [
     {
        "name": "jobXXX",
        "image": "my_docker",
        "workingDir": "wrkdir",
        "command": [ "python", "run.py"],
        "args": ["12345678"],
        "resources": {
            "limits": {
                "cpu": "700m"
            }
        }
      }
    ],
    "restartPolicy": "Never"
  }
}

If you need autorestartable services, you could create/use replication

> kubectl get rc
-- Severin Pappadeux
Source: StackOverflow