add service and stack pages

pull/99/head
Ignacio Van Droogenbroeck 2020-10-14 16:54:02 -03:00
parent 05b3976a11
commit a9288273a4
26 changed files with 155 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -0,0 +1,119 @@
# Configure Service Options
Before of after you deploy a service, you can configure a wide range of options to your service. In this article, we going to review each option available that you can use from Portainer.
To make additions or changes of configuration, you need go to <b>Services</b> and choose the service you want configure.
## Container Specification
### Environment Variables
The environment variables are useful to set configuration at the same time that the container is created. If you need to add new environment variables after that service was deployed, you can do it.
![options](assets/options-1.png)
### Labels
Containers labels can be used to leave notes of that container or specify configuration.
![options](assets/options-2.png)
### Mounts
You can mount or bind volumes from Portainer. Also, you can set if that volume needs to set in Read Only. The only thing you need to do is select a created volume, specify the path in container and click in <b>Apply Changes</b>.
![options](assets/options-3.png)
## Networks & ports
### Networks
You can define one or more networks to you service, even, after of deploy it. You only need to create your network and then, select from the dropdown list.
![options](assets/options-4.png)
### Published Ports
Here, you can publish ports to access to this container from outside the host. You can set new or modify the current ports.
![options](assets/options-5.png)
### Host file entries
When you need to specify manually a hostname or url, you can set up from here and associated that URL to a internal or external IP Address.
![options](assets/options-6.png)
## Service specification
### Resource limits and reservations
From Portiner, you can set limitations about the resource utilization, like Memory, CPU Reservation, CPU Limit, etc.
![options](assets/options-7.png)
### Placement constraints
Use placement constraints to control the nodes a service can be assigned to.
![options](assets/options-8.png)
### Placement preferences
While placement constraints limit the nodes a service can run on, placement preferences try to place tasks on appropriate nodes in an algorithmic way (currently, only spread evenly).
![options](assets/options-9.png)
### Restart Policy
Docker provides restart policies to control whether your containers start automatically when they exit, or when Docker restarts. Restart policies ensure that linked containers are started in the correct order.
The options are the following:
* Any: Restart under any condition (Restarted host or Docker daemon).
* On Failure: Restart the container if it exits due to an error, which manifests as a non-zero exit code.
* None: Do not automatically restart the container.
Also, you can adjust Restart Delay, Max Attempts and Restart Window.
![options](assets/options-10.png)
### Update Configuration
Updates a service as described by the specified parameters. The parameters are the same as docker service create. Refer to the description there for further information.
Normally, updating a service will only cause the services tasks to be replaced with new ones if a change to the service requires recreating the tasks for it to take effect.
![options](assets/options-11.png)
### Logging Driver
Docker includes multiple logging mechanisms to help you get information from running containers and services. These mechanisms are called logging drivers.
Each Docker daemon has a default logging driver, which each container uses unless you configure it to use a different logging driver.
![options](assets/options-12.png)
### Service Labels
Add metadata to containers using Docker labels. You can use either an array or a dictionary.
Its recommended that you use reverse-DNS notation to prevent your labels from conflicting with those used by other software.
![options](assets/options-13.png)
### Configs
Docker 17.06 introduces swarm service configs, which allow you to store non-sensitive information, such as configuration files, outside a services image or running containers. This allows you to keep your images as generic as possible, without the need to bind-mount configuration files into the containers or use environment variables.
![options](assets/options-14.png)
### Secrets
In terms of Docker Swarm services, a secret is a blob of data, such as a password, SSH private key, SSL certificate, or another piece of data that should not be transmitted over a network or stored unencrypted in a Dockerfile or in your applications source code.
![options](assets/options-15.png)
## Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -0,0 +1,15 @@
# Rollback a Service
After make a change to a service in Docker Swarm, you can rollback that changes if you applications is not working as expected. You can do this rollback from Portainer UI.
## Rollbacking a Service
To rollback a service to the last state, it's very easy trough Portainer. Do a click in <b>Services</b>, choose the service you want to rollback, and then do a click in <b>Rollback the service</b>.
![rollback](assets/rollback-1.png)
![rollback](assets/rollback-2.png)
![rollback](assets/rollback-3.png)
![rollback](assets/rollback-4.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

View File

@ -0,0 +1,17 @@
# Inspect a Stack
In Portainer, you can inspect your stacks to see where are running or access to their logs and stats.
## Inspecting a Stack
To inspect the task associated to your stack, log in in Portainer, do a click in <b>Stacks</b> and then choose what stack you want to inspect.
![inspect](assets/inspect-1.png)
Here you can view where the service part of this stack are running or stopped, how much replicas running in which host. Also, you can access to logs, inspect of these tasks, stats and even access to the container console.
![inspect](assets/inspect-2.png)
## Notes
[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md).

View File

@ -48,6 +48,8 @@ nav:
- Stacks:
- 'Add/Create a Stack' : 'v2.0/stacks/create.md'
- 'Create a template from a Stack' : 'v2.0/stacks/template.md'
- 'Duplicate / Migrate Stacks' : 'v2.0/stacks/duplicate_migration.md'
- 'Inspect a Stack' : 'v2.0/stacks/inspect.md'
- Containers:
- 'Create New Container' : 'v2.0/containers/create.md'
- Services:
@ -55,6 +57,8 @@ nav:
- 'Scaling a Service' : 'v2.0/services/scale.md'
- 'View Service Logs' : 'v2.0/services/logs.md'
- 'Service Task Status' : 'v2.0/services/status.md'
- 'Configure Service Options' : 'v2.0/services/options.md'
- 'Rollback a Service' : 'v2.0/services/rollback.md'
- Applications:
- 'Create a New Application' : 'v2.0/apps/create.md'
- Volumes: