Update deployment topics and screenshots (#108)

This commit is contained in:
Jim Galasyn 2017-07-05 15:05:22 -07:00
parent 8c795e851c
commit ef540e6b80
7 changed files with 79 additions and 62 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 KiB

After

Width:  |  Height:  |  Size: 116 KiB

View File

@ -1,34 +1,42 @@
---
title: Deploy a service
description: Learn how to deploy services to a cluster managed by Universal Control Plane.
keywords: docker, ucp, deploy, service
description: Learn how to deploy services to a swarm managed by Universal Control Plane.
keywords: ucp, deploy, service
---
You can deploy and monitor your services from the UCP web UI. In this example
we'll deploy an NGINX web server, and make it accessible on port `8000`.
we'll deploy an [NGINX](https://www.nginx.com/) web server and make it
accessible on port `8000`.
Navigate to the **UCP web UI**, click the **Resources** tab, and choose
**Services**.
In your browser, navigate to the UCP web UI and click **Services**. On the
**Create a Service** page, click **Create Service** to configure the
NGINX service.
![](../../images/deploy-a-service-1.png){: .with-border}
Click the **Create a Service** button to deploy the NGINX service.
![](../../images/deploy-a-service-2.png){: .with-border}
Fill-in the following fields:
Fill in the following fields:
| Field | Value |
|:--------------|:------|
| Service name | nginx |
| Image name | nginx |
| Image name | nginx:latest |
![](../../images/deploy-a-service-1.png){: .with-border}
In the left pane, click **Network**. In the **Ports** section,
click **Publish Port** and fill in the following fields:
| Field | Value |
|:--------------|:------|
| Internal port | 80 |
| Public port | 8000 |
| Protocol | tcp |
| Publish mode | Ingress |
| Public port | 8000 |
![](../../images/deploy-a-service-3.png){: .with-border}
![](../../images/deploy-a-service-2.png){: .with-border}
Once you've specified the service image and ports, click **Deploy now** to
deploy the service into a node in the UCP cluster.
Click **Confirm** to map the ports for the NGINX service.
Once you've specified the service image and ports, click **Create** to
deploy the service into the UCP swarm.
Once the service is up and running, you'll be able to see the default NGINX
page, by going to `http://<node-ip>:8000`.

View File

@ -1,8 +1,7 @@
---
description: Learn how to deploy containerized applications on a swarm, with Docker
Universal Control Plane.
keywords: deploy, application
title: Deploy an app from the CLI
description: Learn how to deploy containerized applications on a swarm, with Docker Universal Control Plane.
keywords: ucp, deploy, application, stack, service, compose
---
With Docker Universal Control Plane you can deploy your apps from the CLI,
@ -11,20 +10,21 @@ application that allows users to vote on whether they prefer cats or dogs.
## Get a client certificate bundle
Docker UCP secures your Docker swarm with role-based access control, so that
only authorized users can deploy applications. To be able to run Docker commands
on a swarm managed by UCP, you need to configure your Docker CLI client to
authenticate to UCP using client certificates.
Docker UCP secures your Docker swarm with
[role-based access control](../../admin/manage-users/index.md),
so that only authorized users can deploy applications. To be able to run Docker
commands on a swarm managed by UCP, you need to configure your Docker CLI
client to authenticate to UCP using client certificates.
[Learn how to set your CLI to use client certificates](../access-ucp/cli-based-access.md).
## Deploy the voting app
## Deploy the voting application
The application we're going to deploy is composed of several services:
* `vote`: The web application that presents the voting interface via port 5000
* `result`: A web application that displays the voting results via port 5001
* `visualizer`: A web application that shows a map of the deployment of the various services across the available nodes via port 8080
* `visualizer`: A web application that shows a map of the deployment of the
various services across the available nodes via port 8080
* `redis`: Collects raw voting data and stores it in a key/value queue
* `db`: A PostgreSQL service which provides permanent storage on a host volume
* `worker`: A background service that transfers votes from the queue to permanent storage
@ -120,15 +120,13 @@ volumes:
> You can define services in this YAML file that feature a `deploy:` key, which
schedules the containers on certain nodes, defines their restart behavior,
configures the number of replicas, and so on. These features are provided by the
Compose V3 file format, which is currently in beta. You can [read the
pre-release documentation for Compose V3 on Docker's preview URL for the
upcoming Compose
documentation](http://docker-docs-vnext-compose.netlify.com/compose/compose-file/#/deploy).
configures the number of replicas, and so on. These features are provided
by the Compose V3 file format.
[Learn about Compose files](/compose/compose-file/).
In your command line, navigate to the place where you've created the
`docker-compose.yml` file and deploy the application to UCP by running `docker
stack deploy` and giving the application a name, such as "VotingApp" used here:
stack deploy` and giving the application a name, like "VotingApp":
```bash
docker stack deploy --compose-file docker-compose.yml VotingApp
@ -148,9 +146,10 @@ op3z6z5ri4k3 VotingApp_worker replicated 1/2 manomarks/examplevotin
umoqinuwegzj VotingApp_vote replicated 6/6 manomarks/examplevotingapp_vote:latest
```
As you saw earlier, a service called `visualizer` was deployed and published to
port 8080. Visiting that port accesses the running instance of the `visualizer`
service in your browser, which shows a map of how this application was deployed:
As you saw earlier, a service called `VotingApp_visualizer` was deployed and
published to port 8080. Visiting that port accesses the running instance of
the visualizer service in your browser, which shows a map of how this application
was deployed:
![Screenshot of visualizer](../../images/deployed_visualizer_detail.png){: .with-border}

View File

@ -1,32 +1,32 @@
---
description: Learn how to deploy containerized applications on a cluster, with Docker
Universal Control Plane.
keywords: ucp, deploy, application
title: Deploy an app from the UI
description: Learn how to deploy containerized applications on a cluster, with Docker Universal Control Plane.
keywords: ucp, deploy, application, stack, service, compose
---
With Docker Universal Control Plane you can deploy applications from the UI
using `docker-compose.yml` files. In this example, we're going to deploy an
application that allows users to vote on whether they prefer cats or dogs. 😺 🐶
## Deploy voting application
In your browser, **log in** to UCP, and navigate to the **Stacks & Applications** page.
There, click the **Deploy** button, to deploy a new application.
![](../../images/deploy-app-ui-1.png){: .with-border}
## Deploy the voting application
The application we're going to deploy is composed of several services:
* `vote`: The web application that presents the voting interface via port 5000
* `result`: A web application that displays the voting results via port 5001
* `visualizer`: A web application that shows a map of the deployment of the various services across the available nodes via port 8080
* `visualizer`: A web application that shows a map of the deployment of the
various services across the available nodes via port 8080
* `redis`: Collects raw voting data and stores it in a key/value queue
* `db`: A PostgreSQL service which provides permanent storage on a host volume
* `worker`: A background service that transfers votes from the queue to permanent storage
Click **Deploy** and paste the following YAML into the **APPLICATION DEFINITION**
field.
In your browser, log in to the UCP web UI, and navigate to the
**Stacks** page. Click **Create Stack** to deploy a new application.
Give the application a name, like "VotingApp", and in the **Mode** field,
select **Services**.
Paste the following YAML into the **COMPOSE.YML** editor.
```none
version: "3"
@ -114,31 +114,41 @@ volumes:
db-data:
```
![](../../images/deploy-app-ui-1.png){: .with-border}
> When "Services" is selected, you can define services in this YAML file that
have a `deploy:` key, which schedules the containers on certain nodes, defines
their restart behavior, configures the number of replicas, and so on. These
features are provided by the Compose V3 file format, which is currently in beta.
You can [read the pre-release documentation for Compose V3 on Docker's preview
URL for the upcoming Compose
documentation](http://docker-docs-vnext-compose.netlify.com/compose/compose-file/#/deploy).
features are provided by the Compose V3 file format.
[Learn about Compose files](/compose/compose-file/).
Give the application a name (such as "VotingApp," used here), and click
**Create**.
Click **Create** to build and deploy the application. When you see the **Created successfully** message, click **Done**.
Once UCP deploys the application, click on **VotingApp** or go to **Services** on the left navigation,
to see the details of the services you have deployed across your nodes. Try
clicking on the `visualizer` service, and scroll to the bottom of the detail page.
You'll see a link to your UCP instance's URL that includes the published port
of that service, which is 8080 in this case.
In the left pane, click **Services** to see the details of the services that
you deployed across your nodes. Click the `VotingApp_vote` service and find the **Published Endpoint** field in the details pane. Click the link to visit
the voting page, which is published on port `5000`.
![Screenshot of deployed service](../../images/deployed_visualizer.png){: .with-border}
Visiting that URL accesses the running instance of the `visualizer` service in
your browser, which shows a map of how this application was deployed:
Click **Cats** and **Dogs** a few times to register some votes, and notice
that each click is processed by a different container.
Go back to the **Services** page in the UCP web UI. Click the
`VotingApp_result` service and find the **Published Endpoint** field in
the details pane. It has the same URL as the other `VotingApp` services,
but it's published on port `5001`. Click the link to view the vote tally.
Back in the **Services** page, click the
`VotingApp_visualizer` service and find the **Published Endpoint** field in
the details pane. You'll see a link to your UCP instance's URL that includes
the published port of the visualizer service, which is 8080 in this case.
Visiting this URL accesses the running instance of the `VotingApp_visualizer`
service in your browser, which shows a map of how this application was deployed:
![Screenshot of visualizer](../../images/deployed_visualizer_detail.png){: .with-border}
Here you can see some of the characteristics of the deployment specification
You can see some of the characteristics of the deployment specification
from the Compose file in play. For example, the manager node is running the
PostgreSQL container, as configured by setting `[node.role == manager]` as a
constraint in the `deploy` key for the `db` service.