completed the deployment section for v2.0

pull/94/head
Ignacio Van Droogenbroeck 2020-09-08 16:35:05 -03:00
parent 1b2323321d
commit 2adc363660
14 changed files with 201 additions and 10 deletions

BIN
docs/assets/icon.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

107
docs/v2.0/deploy/cli.md Normal file
View File

@ -0,0 +1,107 @@
# CLI Configuration Options
Portainer can be easily tuned using CLI flags.
## Admin password
### From the command line
Portainer allows you to specify a bcrypt encrypted password from the command line for the admin account. You need to generate the bcrypt encrypted password first.
You can generate the encrypted password with the following command if you have installed apache2-utils package:
<pre><code>$ htpasswd -nb -B admin "your-password" | cut -d ":" -f 2</code></pre>
If you system don't have the mentioned package, you can run a container to run the command:
<pre><code>docker run --rm httpd:2.4-alpine htpasswd -nbB admin "your-password" | cut -d ":" -f 2</pre></code>
To specify the admin password from the command line, start Portainer with the <code>--admin-password</code> flag:
<pre><code>docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --admin-password='$2y$05$8oz75U8m5tI/xT4P0NbSHeE7WyRzOWKRBprfGotwDkhBOGP/u802u'</code></pre>
### Inside a file
You can also store the plaintext password inside a file and use the <code>--admin-password-file</code> flag:
Add your password to a file running the following command:
<pre><code>$ echo -n mypassword > /tmp/portainer_password</code></pre>
Now you can start the Portainer container running:
<pre><code>$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/portainer_password:/tmp/portainer_password portainer/portainer-ce --admin-password-file /tmp/portainer_password</code></pre>
This works well with Docker Swarm and Docker secrets too:
<pre><code>$ echo -n mypassword | docker secret create portainer-pass -</code></pre>
<pre><code>$ docker service create \
--name portainer \
--secret portainer-pass \
--publish 9000:9000 \
--publish 8000:8000 \
--replicas=1 \
--constraint 'node.role == manager' \
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
portainer/portainer-ce \
--admin-password-file '/run/secrets/portainer-pass' \
-H unix:///var/run/docker.sock</code></pre>
Note: This will automatically create an administrator account called admin with the specified password.
## Hiding specific containers
Portainer allows you to hide containers with a specific label by using the -l flag.
For example, take a container started with the label owner=acme (note that this is an example label, you can define your own labels):
<pre><code>$ docker run -d --label owner=acme nginx</code></pre>
To hide this container, simply add the -l owner=acme option on the CLI when starting Portainer:
<pre><code>$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce -l owner=acme</code></pre>
Note that the -l flag can be repeated multiple times to specify multiple labels:
<pre><code>$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce -l owner=acme -l service=secret</code></pre>
## Use your own logo
You do not like our logo? Want to make Portainer more corporate? Dont worry, you can easily switch for an external logo (it must be exactly 155px by 55px) using the <code>--logo flag</code>:
<pre><code>$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --logo "https://www.docker.com/sites/all/themes/docker/assets/images/brand-full.svg"</code></pre>
## Use your own templates
Portainer allows you to rapidly deploy containers using App Templates.
By default Portainer templates will be used but you can also define your own templates.
Note: at the moment, templates are only loaded once at first Portainer startup. If you already deployed a Portainer instance and want to use your own templates after this, youll need to clear any existing templates (default templates) via the HTTP API.
Using the <code>--templates</code> flag you can specify an URL where the template file can be accessed via HTTP.
<pre><code>$ docker run -d -p 9000:9000 -p 8000:8000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer-ce --templates http://my-host.my-domain/templates.json</code></pre>
Suggestion: You can host yours templates files in [Github](https://www.github.com)
## Available flags
The following CLI flags are available:
* <code>--admin-password</code>: Specify a bcrypt hashed password for the admin user
* <code>--admin-password-file</code>: Path to the file containing the password for the admin user
* <code>--bind, -p</code>: Address and port to serve Portainer (default: :9000)
* <code>--data, -d</code>: Directory where Portainer data will be stored (default: /data on Linux, C:\data on Windows)
* <code>--edge-compute</code>: Automatically enable edge-compute features
* <code>--hide-label, -l</code>: Hide containers with a specific label in the UI
* <code>--host, -H</code>: Docker daemon endpoint
* <code>--logo</code>: URL to a picture to be displayed as a logo in the UI, use Portainer logo if not specified
* <code>--snapshot-interval</code>: Time interval between two endpoint snapshot jobs expressed as a string, e.g. 30s, 5m, 1h… as supported by the time.ParseDuration method (default: 5m)
* <code>--ssl</code>: Secure Portainer instance using SSL (default: false)
* <code>--sslcert</code>: Path to the SSL certificate used to secure the Portainer instance (default: /certs/portainer.crt, C:\certs\portainer.crt on Windows)
* <code>--sslkey</code>: Path to the SSL key used to secure the Portainer instance (default: /certs/portainer.key, C:\certs\portainer.key on Windows)
* <code>--templates, -t</code>: URL to templates (apps) definitions
* <code>--tlscacert</code>: Path to the CA (default: /certs/ca.pem on Linux, C:\certs\ca.pem on Windows)
* <code>--tlscert</code>: Path to the TLS certificate file (default: /certs/cert.pem, C:\certs\cert.pem on Windows)
* <code>--tlskey</code>: Path to the TLS key (default: /certs/key.pem, C:\certs\key.pem on Windows)
* <code>--tlsverify</code>: TLS support (default: false)
* <code>--tunnel-port</code>: Specify an alternate tunnel port to use with the Edge agent. Use --tunnel-port 8001 with -p 8001:8001 to make the Edge agent communicate on port 8001

View File

@ -0,0 +1,35 @@
# Initial screen after installation
Once you deploy Portainer and head your browser to http://ip-server:9000, you will see the following screens.
## Set Password Admin
The first thing to do is set a password for the admin user. This password needs to be at least eight characters long.
![admin_password](assets/initial-1.png)
## Collection of statics
We anonymously collect information about how Portainer is used. You can disable this option, but we recommend leaving it activated. This will help us understand how our users use Portainer and improve it.
You can read more about our privacy policy [here](https://www.portainer.io/documentation/in-app-analytics-and-privacy-policy/)
You can leave enable or disable doing a click in the checkbox:
![statics](assets/initial-2.png)
## Connect Portainer to the container environment
If you installed [Portainer in Kubernetes](/v2.0/deploy/linux/#deploy-portainer-in-kubernetes) you would choose Kubernetes, but if you [installed in Docker](/v2.0/deploy/linux/#deploy-portainer-in-docker), you may want choose manage the local Docker environment.
![kubernetes-initial](assets/initial-3.png)
![docker-initial](assets/initial-4.png)
Once that is decided, do a click in connect. If everything works as expected, you will see the Portainer homepage.
![portainer-initial](assets/initial-5.png)
## Notes
Do you think that is missing something here? Contribute with this admin guide forking the repo [Portainer-Docs](https://github.com/portainer/portainer-docs) and propose changes.

View File

@ -55,7 +55,7 @@ Portainer is comprised of two elements, the Portainer Server, and the Portainer
Note that the recommended deployment mode when using Swarm is using the Portainer Agent.
To see the requeriments, please, visit the page of [requirements](v2.0/deploy/requeriments.md)
To see the requeriments, please, visit the page of [requirements](/v2.0/deploy/requeriments.md)
### Docker Standalone
@ -86,4 +86,4 @@ Deploy Portainer Agent on a remote LINUX Swarm Cluster as a Swarm Service, run t
## Notes
Do you think that is missing something here? Contribute with this admin guide forking the repo [Portainer-Docs](https://github.com/portainer/portainer-docs) and propose changes.
Do you think that is missing something here? Contribute with this admin guide forking the repo [Portainer-Docs](https://github.com/portainer/portainer-docs) and propose changes.

View File

@ -0,0 +1,35 @@
# Requeriments
In this article, you will find information about the supported platforms and Docker versions.
## Supported Platforms
Portainer can be deployed on the following platforms:
- Linux amd64
- Linux arm
- Linux arm64
- Linux ppc64le
- Linux s390x
- Windows amd64
- Darwin amd64
## Supported Docker Versions
The required Docker version to have full support is 1.9.1 or newest. Docker 1.9 is partially supported. Older versions than indicated here, are not supported.
## Supported Docker Swarm
Portainer is compatible with the following versions of Docker Swarm: v1.2.3
## Supported Kubernetes versions
The following versions of Kubernetes are fully supported:
- 1.16
- 1.17
- 1.18
## Notes
Do you think that is missing something here? Contribute with this admin guide forking the repo [Portainer-Docs](https://github.com/portainer/portainer-docs) and propose changes.

13
docs/v2.0/deploy/ssl.md Normal file
View File

@ -0,0 +1,13 @@
# Secure Portainer using SSL
By default, Portainers web interface and API is exposed over HTTP. This is not secured, its recommended to enable SSL in a production environment.
To do so, you can use the following flags <code>--ssl</code>, <code>--sslcert</code> and <code>--sslkey</code>:
<pre><code>$ docker run -d -p 443:9000 -p 8000:8000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v ~/local-certs:/certs -v portainer_data:/data portainer/portainer-ce --ssl --sslcert /certs/portainer.crt --sslkey /certs/portainer.key</code></pre>
Now, you can navigate to https://$ip-docker-host
## Notes
Do you think that is missing something here? Contribute with this admin guide forking the repo [Portainer-Docs](https://github.com/portainer/portainer-docs) and propose changes.

View File

@ -42,7 +42,7 @@ Portainer is comprised of two elements, the Portainer Server, and the Portainer
Note that the recommended deployment mode when using Swarm is using the Portainer Agent.
To see the requeriments, please, visit the page of [requirements](v2.0/deploy/requeriments.md)
To see the requeriments, please, visit the page of [requirements](/v2.0/deploy/requeriments.md)
### Docker Standalone in WSL2

View File

@ -5,12 +5,12 @@ nav:
- Portainer CE 2.0:
- Deploying Portainer:
- 'Requirements' : 'v2.0/deploy/requirements.md'
- 'CLI options' : 'v2.0/deploy/clioptions.md'
- 'CLI options' : 'v2.0/deploy/cli.md'
- 'Deploying on Linux' : 'v2.0/deploy/linux.md'
- 'Deploying on Windows Server' : 'v2.0/deploy/windowsserver.md'
- 'Deploying on Windows 10' : 'v2.0/deploy/windows10.md'
- 'Using SSL with Portainer' : 'v2.0/deploy/ssl.md'
- 'Initial Setup' : 'v2.0/deploy/initialsetup.md'
- 'Initial Setup' : 'v2.0/deploy/initial.md'
- Adding Endpoints:
- 'Local Endpoint' : 'v2.0/endpoints/local.md'
- 'Deploy and connect Portainer agent in Docker' : 'v2.0/endpoints/docker.md'
@ -43,6 +43,7 @@ theme:
features:
- instant
logo: assets/logo.png
favicon: assets/icon.webp
name: material
palette:
primary: light-blue
@ -51,12 +52,12 @@ repo_url: https://github.com/portainer/portainer-docs
extra:
social:
- icon: fontawesome/brands/twitter
link: https://twitter.com/squidfunk
link: https://twitter.com/portainerio
- icon: fontawesome/brands/linkedin
link: https://twitter.com/squidfunk
link: https://www.linkedin.com/company/portainer/
- icon: fontawesome/brands/youtube
link: https://twitter.com/squidfunk
link: https://www.youtube.com/channel/UC7diMJcrULjDseq5yhSUZgg
- icon: fontawesome/brands/facebook
link: https://twitter.com/squidfunk
link: https://www.facebook.com/portainerio/
- icon: fontawesome/brands/reddit
link: https://twitter.com/squidfunk
link: https://reddit.com/r/portainer