Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eBayClassifiedsGroup/KomPaaS
Compact PaaS - PoC small based golang app PaaS closed in one container
https://github.com/eBayClassifiedsGroup/KomPaaS
consul docker fabio nomad paas
Last synced: 5 days ago
JSON representation
Compact PaaS - PoC small based golang app PaaS closed in one container
- Host: GitHub
- URL: https://github.com/eBayClassifiedsGroup/KomPaaS
- Owner: eBayClassifiedsGroup
- License: mit
- Created: 2015-11-20T10:13:44.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-10T20:07:50.000Z (over 7 years ago)
- Last Synced: 2024-08-01T12:37:57.139Z (3 months ago)
- Topics: consul, docker, fabio, nomad, paas
- Homepage:
- Size: 24.4 KB
- Stars: 47
- Watchers: 12
- Forks: 10
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-starred - eBayClassifiedsGroup/KomPaaS - Compact PaaS - PoC small based golang app PaaS closed in one container (docker)
README
# KomPaaS
Compact PaaS - PoC - playgroud mode - small based golang app PaaS closed in one container
[Watch](https://www.youtube.com/watch?v=gf43TcWjBrE&list=PL81sUbsFNc5b-Gd59Lpz7BW0eHJBt0GvE&index=1) Kelsey Hightower demo Consul, Nomad, Vault and fabio at HashiConf EU 2016.
* Requirements:
* docker 1.9 or higher
* `docker pull python:alpine` #(only for an example)* Components:
* Nomad
* Consul
* Fabio
* Nomad-ui jippi version (with docker-compose only)* Most important ports:
service | port
---------|-----
Consul UI| 8500
Fabio UI| 9998
Nomad UI| 3000
Fabio router | 9999## Build image or get it
```bash
$ ./build.it
```
or
```bash
$ docker pull kompaas/kompaas
```## Usage:
### interactive:
(tmux knowledge required)
```bash
$ docker run \
--net=host \
--privileged \
--volume "/var/run/docker.sock:/var/run/docker.sock" \
--volume "/tmp:/tmp" \
-ti kompaas/kompaas tmux attach
```
### docker compose:
```bash
$ docker-compose up -d
Creating kompaas_consul_1
Creating kompaas_nomad_1
Creating kompaas_fabio_1
Creating kompaas_nui_1
```## Start example
if you run tmux:
```bash
$ nomad run example.nomad
```
else:
```bash
$ docker exec -ti kompaas_nomad_1 nomad run example.nomad
==> Monitoring evaluation "cbbea755"
Evaluation triggered by job "example"
Allocation "b00798bf" created: node "4522e2f4", group "python"
Allocation "64a73a0f" created: node "4522e2f4", group "python"
Allocation "669afa7b" created: node "4522e2f4", group "python"
Allocation "80de4c42" created: node "4522e2f4", group "python"
Evaluation status changed: "pending" -> "complete"
==> Evaluation "cbbea755" finished with status "complete"$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5920ecba205e python:alpine "/bin/sh -c 'echo $HO" 7 seconds ago Up 6 seconds 127.0.0.1:31873->8000/tcp, 127.0.0.1:31873->8000/udp server-64a73a0f-5999-fcc2-6aa6-b1cf228d1b74
91a51e1ced32 python:alpine "/bin/sh -c 'echo $HO" 7 seconds ago Up 6 seconds 127.0.0.1:42008->8000/tcp, 127.0.0.1:42008->8000/udp server-80de4c42-4786-2c09-40c9-69002c7f79b4
f1ea7b8984ef python:alpine "/bin/sh -c 'echo $HO" 7 seconds ago Up 6 seconds 127.0.0.1:28821->8000/tcp, 127.0.0.1:28821->8000/udp server-b00798bf-8b32-c40a-a5fb-6496c7112748
66df4804ee1e python:alpine "/bin/sh -c 'echo $HO" 7 seconds ago Up 6 seconds 127.0.0.1:55579->8000/tcp, 127.0.0.1:55579->8000/udp server-669afa7b-8f33-9dbd-0f21-c83ccf369485
557511c14cf5 kompaas/kompaas "fabio" 17 seconds ago Up 16 seconds kompaas_fabio_1
b538488d26ac kompaas/kompaas "consul agent -client" 17 seconds ago Up 16 seconds kompaas_consul_1
0f643244ef92 kompaas/kompaas "nomad agent -dev" 17 seconds ago Up 16 seconds kompaas_nomad_1
e30d12884ce5 jippi/nomad-ui "apache2-foreground" 17 seconds ago Up 16 seconds kompaas_nui_1
```## Test example
```bash
$ while true; do
curl -H 'Host: python.service.consul' http://localhost:9999
done
```