-
Notifications
You must be signed in to change notification settings - Fork 8
Orcinus CLI
Create services using default orcinus file orcinus.yml
.
$ orcinus create
Service web2 created
2cct8xzckyfwkmhlfprxy8tj3
Service web1 created
50a7ftc5f1jjvsz09h1bwt487
Create services using custom orcinus file (e.g., app.yml
)
$ orcinus create -f app.yml
Service web2 created
2cct8xzckyfwkmhlfprxy8tj3
Service web1 created
50a7ftc5f1jjvsz09h1bwt487
$ orcinus ls -f app.yml
2cct8xzckyfw web2 0/1 nginx
50a7ftc5f1jj web1 3/3 aksaramaya/docker-http-server
$ orcinus ps -f app.yml
Remove all services which are created using default orcinus file orcinus.yml
$ orcinus rm
delete :web1
delete :web2
Remove all services which are created using custom orcinus file (e.g., app.yml
)
$ orcinus rm -f app.yml
delete :web1
delete :web2
Scaling service using scale
command enables you to scale replicated service either
up or down to the desired number of replicas. To stop replicas of a service
while keeping the service active in the swarm, you can scale to 0.
command:
$ orcinus scale [service_name=num_scale]
Example: Scaling webapp
service to 5 replicas.
$ orcinus scale webapp=5
webapp scaled to 5
Rolling update on Orcinus can be done by changing the orcinus file (e.g., Changing the image of the service).
Update running service which are created using default orcinus file orcinus.yml
$ orcinus update
Service updated: visualizer
Service updated: webapp
Update running service which are created using custom orcinus file (e.g.,
app.yml
)
$ orcinus update -f app.yml
Service updated: visualizer
Service updated: webapp
Display detailed information on one or more services which are running using
default orcinus file orcinus.yml
$ orcinus inspect
ID: tt4ax6jznj3rlztgwmc0dh2ct
Name: webapp
Service Mode: Replicated
Replicas: 1
Placement:
UpdateConfig:
Parallelism: 1
On failure: pause
Max failure ratio: 0
ContainerSpec:
Image: aksaramaya/docker-http-server:v2@sha256:fa54e8112282f54c27654037e5ad36eb03935935d3d301728c8b6fbcf9678312
Resources:
Limits:
CPU: 2
Memory: 512 MiB
Networks: mystack
Endpoint Mode: vip
Ports:
PublishedPort 80
Protocol = tcp
TargetPort = 80
ID: nsb3eywgmh4l2hyfyvben8alk
Name: visualizer
Service Mode: Replicated
Replicas: 1
Placement:Contraints: [node.role==manager]
UpdateConfig:
Parallelism: 1
On failure: pause
Max failure ratio: 0
ContainerSpec:
Image: dockersamples/visualizer:stable@sha256:0592e1bdc165d53831ad250eeaa8ac25925dd28c12773b27ea19ba8d8b2b155a
Mounts:
Target = /var/run/docker.sock
Source = /var/run/docker.sock
ReadOnly = false
Type = bind
Resources:
Networks: mystack
Endpoint Mode: vip
Ports:
PublishedPort 8080
Protocol = tcp
TargetPort = 8080
Display detailed information on one or more services which are running using
custom orcinus file (e.g., app.yml
)
$ orcinus inspect -f app.yml
ID: tt4ax6jznj3rlztgwmc0dh2ct
Name: webapp
Service Mode: Replicated
Replicas: 1
Placement:
UpdateConfig:
Parallelism: 1
On failure: pause
Max failure ratio: 0
ContainerSpec:
Image: aksaramaya/docker-http-server:v2@sha256:fa54e8112282f54c27654037e5ad36eb03935935d3d301728c8b6fbcf9678312
Resources:
Limits:
CPU: 2
Memory: 512 MiB
Networks: mystack
Endpoint Mode: vip
Ports:
PublishedPort 80
Protocol = tcp
TargetPort = 80
ID: nsb3eywgmh4l2hyfyvben8alk
Name: visualizer
Service Mode: Replicated
Replicas: 1
Placement:Contraints: [node.role==manager]
UpdateConfig:
Parallelism: 1
On failure: pause
Max failure ratio: 0
ContainerSpec:
Image: dockersamples/visualizer:stable@sha256:0592e1bdc165d53831ad250eeaa8ac25925dd28c12773b27ea19ba8d8b2b155a
Mounts:
Target = /var/run/docker.sock
Source = /var/run/docker.sock
ReadOnly = false
Type = bind
Resources:
Networks: mystack
Endpoint Mode: vip
Ports:
PublishedPort 8080
Protocol = tcp
TargetPort = 8080