-
Notifications
You must be signed in to change notification settings - Fork 8
Home
Ibnu Yahya edited this page Jan 8, 2017
·
3 revisions
Container orchestration management tools for docker swarm mode.
- Linux 64 bit
- Docker 1.12+
- Nodejs (optional)
npm install orcinus -g
curl -L http://dl.aksaramaya.id/orcinus/stable/orcinus-linux-x86_64.bin -o /usr/bin/orcinus
chmod +x /usr/bin/orcinus
- One or more linux 64 bit machines. Example :
- 1 manager with ip address : 192.168.7.11.
- 1 worker with ip address : 192.168.7.12.
- Full network connectivity between all machines in the cluster (public or private network is fine).
- Install orcinus to each machines.
- SSH into the machine and become root if you are not already (for example, run
sudo su -
). - Initializing your machine as manager.
[[email protected] ~]$ orcinus cluster init [IP ADDRESS MACHINE]
[[email protected] ~]$ orcinus cluster init 192.168.7.11
Add a worker to this manager.
Token : eyJhZGRyIjoiMTkyLjE2OC43LjExOjIzNzciLCJ0b2tlbiI6IlNXTVRLTi0xLTVqbmZ3b3ltbW1haW5nb3poNnh2Y3ZreDA0N3NlOTJrYmF2dXlscTlkbDF5b3czcWliLTUzM2dwbjN4b2lxeWJkOHN2NXl2bzg2anFcbiJ9
or run the following command:
orcinus cluster join eyJhZGRyIjoiMTkyLjE2OC43LjExOjIzNzciLCJ0b2tlbiI6IlNXTVRLTi0xLTVqbmZ3b3ltbW1haW5nb3poNnh2Y3ZreDA0N3NlOTJrYmF2dXlscTlkbDF5b3czcWliLTUzM2dwbjN4b2lxeWJkOHN2NXl2bzg2anFcbiJ9
# Get manager token
[[email protected] ~]$ orcinus cluster token
If you want to add any new machines as worker to your cluster, for each machine:
- SSH into the machine and become root if you are not already (for example, run
sudo su -
). - Initializing your machine as a worker.
[[email protected] ~]$ orcinus cluster join [TOKEN]
[[email protected] ~]$ orcinus cluster join eyJhZGRyIjoiMTkyLjE2OC43LjExOjIzNzciLCJ0b2tlbiI6IlNXTVRLTi0xLTVqbmZ3b3ltbW1haW5nb3poNnh2Y3ZreDA0N3NlOTJrYmF2dXlscTlkbDF5b3czcWliLTUzM2dwbjN4b2lxeWJkOHN2NXl2bzg2anFcbiJ9
This node joined a cluster as a worker.
Get information all nodes cluster.
- SSH into the manager machine and become root if you are not already (for example, run
sudo su -
).
[[email protected] ~]$ orcinus cluster ls
ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS
6hbhi274x0gslf1bfuu1ei91r * ak1 Ready Active Leader
ecyy1uswuciolsfve4vn38h8m ak2 Ready Active
# Inspect node
[[email protected] ~]$ orcinus cluster inspect ak1
ID: 6hbhi274x0gslf1bfuu1ei91r
Hostname: ak1
Joined at: 2017-01-08 09:11:56.313485437 +0000 utc
Status:
State: Ready
Availability: Active
Manager Status:
Address: 192.168.7.11:2377
Raft Status: Reachable
Leader: Yes
Platform:
Operating System: linux
Architecture: x86_64
Resources:
CPUs: 1
Memory: 489 MiB
Plugins:
Network: bridge, host, null, overlay
Volume: local
Engine Version: 1.12.3
Deploy your first service.
# orcinus compose
[[email protected] ~]$ mkdir test/
[[email protected] test]$ ls
orcinus.yml
[[email protected] test]$ cat orcinus.yml
stack: "mystack"
services:
web1:
image: "aksaramaya/docker-http-server:v1"
ports:
- "80:80"
replicas: 4
cpu: "2"
memory: "512mb"
web2:
image: "nginx"
cpu: "2"
memory: "512mb"
# create service
[[email protected] test]$ orcinus create
Service web2 created
2cct8xzckyfwkmhlfprxy8tj3
Service web1 created
50a7ftc5f1jjvsz09h1bwt487
# list Services
[[email protected] test]$ orcinus ls
2cct8xzckyfw web2 0/1 nginx
50a7ftc5f1jj web1 3/3 aksaramaya/docker-http-server
# remove service
[email protected] test]$ orcinus rm