diff --git a/docs/v2.0/services/assets/options-1.png b/docs/v2.0/services/assets/options-1.png new file mode 100644 index 0000000..8cdc9c0 Binary files /dev/null and b/docs/v2.0/services/assets/options-1.png differ diff --git a/docs/v2.0/services/assets/options-10.png b/docs/v2.0/services/assets/options-10.png new file mode 100644 index 0000000..3868c97 Binary files /dev/null and b/docs/v2.0/services/assets/options-10.png differ diff --git a/docs/v2.0/services/assets/options-11.png b/docs/v2.0/services/assets/options-11.png new file mode 100644 index 0000000..1656a8c Binary files /dev/null and b/docs/v2.0/services/assets/options-11.png differ diff --git a/docs/v2.0/services/assets/options-12.png b/docs/v2.0/services/assets/options-12.png new file mode 100644 index 0000000..7080382 Binary files /dev/null and b/docs/v2.0/services/assets/options-12.png differ diff --git a/docs/v2.0/services/assets/options-13.png b/docs/v2.0/services/assets/options-13.png new file mode 100644 index 0000000..5042238 Binary files /dev/null and b/docs/v2.0/services/assets/options-13.png differ diff --git a/docs/v2.0/services/assets/options-14.png b/docs/v2.0/services/assets/options-14.png new file mode 100644 index 0000000..e135e3d Binary files /dev/null and b/docs/v2.0/services/assets/options-14.png differ diff --git a/docs/v2.0/services/assets/options-15.png b/docs/v2.0/services/assets/options-15.png new file mode 100644 index 0000000..b2bfadb Binary files /dev/null and b/docs/v2.0/services/assets/options-15.png differ diff --git a/docs/v2.0/services/assets/options-2.png b/docs/v2.0/services/assets/options-2.png new file mode 100644 index 0000000..2452888 Binary files /dev/null and b/docs/v2.0/services/assets/options-2.png differ diff --git a/docs/v2.0/services/assets/options-3.png b/docs/v2.0/services/assets/options-3.png new file mode 100644 index 0000000..d144836 Binary files /dev/null and b/docs/v2.0/services/assets/options-3.png differ diff --git a/docs/v2.0/services/assets/options-4.png b/docs/v2.0/services/assets/options-4.png new file mode 100644 index 0000000..3eb41da Binary files /dev/null and b/docs/v2.0/services/assets/options-4.png differ diff --git a/docs/v2.0/services/assets/options-5.png b/docs/v2.0/services/assets/options-5.png new file mode 100644 index 0000000..5d94277 Binary files /dev/null and b/docs/v2.0/services/assets/options-5.png differ diff --git a/docs/v2.0/services/assets/options-6.png b/docs/v2.0/services/assets/options-6.png new file mode 100644 index 0000000..28e6a69 Binary files /dev/null and b/docs/v2.0/services/assets/options-6.png differ diff --git a/docs/v2.0/services/assets/options-7.png b/docs/v2.0/services/assets/options-7.png new file mode 100644 index 0000000..46a0e75 Binary files /dev/null and b/docs/v2.0/services/assets/options-7.png differ diff --git a/docs/v2.0/services/assets/options-8.png b/docs/v2.0/services/assets/options-8.png new file mode 100644 index 0000000..08b811e Binary files /dev/null and b/docs/v2.0/services/assets/options-8.png differ diff --git a/docs/v2.0/services/assets/options-9.png b/docs/v2.0/services/assets/options-9.png new file mode 100644 index 0000000..dca27de Binary files /dev/null and b/docs/v2.0/services/assets/options-9.png differ diff --git a/docs/v2.0/services/assets/rollback-1.png b/docs/v2.0/services/assets/rollback-1.png new file mode 100644 index 0000000..ee89ce0 Binary files /dev/null and b/docs/v2.0/services/assets/rollback-1.png differ diff --git a/docs/v2.0/services/assets/rollback-2.png b/docs/v2.0/services/assets/rollback-2.png new file mode 100644 index 0000000..17341c8 Binary files /dev/null and b/docs/v2.0/services/assets/rollback-2.png differ diff --git a/docs/v2.0/services/assets/rollback-3.png b/docs/v2.0/services/assets/rollback-3.png new file mode 100644 index 0000000..ddb9196 Binary files /dev/null and b/docs/v2.0/services/assets/rollback-3.png differ diff --git a/docs/v2.0/services/assets/rollback-4.png b/docs/v2.0/services/assets/rollback-4.png new file mode 100644 index 0000000..aea7c23 Binary files /dev/null and b/docs/v2.0/services/assets/rollback-4.png differ diff --git a/docs/v2.0/services/options.md b/docs/v2.0/services/options.md new file mode 100644 index 0000000..138d733 --- /dev/null +++ b/docs/v2.0/services/options.md @@ -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 Services 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 Apply Changes. + +![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 service’s 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. + +It’s 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 service’s 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 application’s source code. + +![options](assets/options-15.png) + +## Notes + +[Contribute to these docs](https://github.com/portainer/portainer-docs/blob/master/contributing.md). \ No newline at end of file diff --git a/docs/v2.0/services/rollback.md b/docs/v2.0/services/rollback.md new file mode 100644 index 0000000..8dcf82f --- /dev/null +++ b/docs/v2.0/services/rollback.md @@ -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 Services, choose the service you want to rollback, and then do a click in Rollback the service. + +![rollback](assets/rollback-1.png) + +![rollback](assets/rollback-2.png) + +![rollback](assets/rollback-3.png) + +![rollback](assets/rollback-4.png) \ No newline at end of file diff --git a/docs/v2.0/stacks/assets/inspect-1.png b/docs/v2.0/stacks/assets/inspect-1.png new file mode 100644 index 0000000..c9e0368 Binary files /dev/null and b/docs/v2.0/stacks/assets/inspect-1.png differ diff --git a/docs/v2.0/stacks/assets/inspect-2.png b/docs/v2.0/stacks/assets/inspect-2.png new file mode 100644 index 0000000..0d44546 Binary files /dev/null and b/docs/v2.0/stacks/assets/inspect-2.png differ diff --git a/docs/v2.0/stacks/migrate_migration.md b/docs/v2.0/stacks/duplicate_migration.md similarity index 100% rename from docs/v2.0/stacks/migrate_migration.md rename to docs/v2.0/stacks/duplicate_migration.md diff --git a/docs/v2.0/stacks/inspect.md b/docs/v2.0/stacks/inspect.md new file mode 100644 index 0000000..15311e1 --- /dev/null +++ b/docs/v2.0/stacks/inspect.md @@ -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 Stacks 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). \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index b68f633..bc702ee 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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: