From 2d38f3db6a777f1115ca53053ed7c7e930ea192d Mon Sep 17 00:00:00 2001 From: John Mulhausen Date: Mon, 23 Oct 2017 18:09:12 -0700 Subject: [PATCH] Template for EE Tasks alpha (#5066) * Template for EE Tasks alpha * Attempt to avoid includes * Cleanup * Cleanup --- _config.yml | 7 +++++++ _layouts/docs.html | 46 ++++++++++++++++++++++++++++++++++++++++ deploy/test.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 deploy/test.md diff --git a/_config.yml b/_config.yml index 6cb473e6b2..79d1896745 100644 --- a/_config.yml +++ b/_config.yml @@ -46,6 +46,13 @@ dtr_versions: - version: "2.0" path: /datacenter/dtr/2.0/ +tablabels: + ucp-3.0: Universal Control Plane 3.0 + ucp-2.2: Universal Control Plane 2.2 + docker-cli-linux: Docker CLI on Mac/Linux + docker-cli-win: Docker CLI on Windows + kubectl: Kubernetes CLI + collections: samples: output: true diff --git a/_layouts/docs.html b/_layouts/docs.html index dbac246981..e422fc27d2 100644 --- a/_layouts/docs.html +++ b/_layouts/docs.html @@ -118,7 +118,53 @@

{{ page.title }}

{% endif %} {% if page.advisory %}
{{ site.data.advisories.texts[page.advisory] | markdownify }}
{% endif %}{% endif %} {% unless page.tree == false %}{% include read_time.html %}{% endunless %} {% if page.enterprise %}{% include ee_dropdown.html %}{% endif %} + {% if page.ui_tabs or page.cli_tabs %} + {{ page.description | markdownify }} + + {% if page.ui_tabs %} + +

{{ page.title }} in the UI

+ +
+

These instructions require Docker Enterprise

+

The UI instructions shown here are for the dashboard provided with + Docker Enterprise Standard + or higher.

+
+ + +
{% for tab in page.ui_tabs %} +
{% capture thistab %}{% include_relative {{ page.path | split: "/" | last }} version=tab.version ui="true" %}{% endcapture %}{{ thistab | split: "---" | last | markdownify }}
{% endfor %} +
+ + {% endif %} + {% if page.cli_tabs %} + +

{{ page.title }} in the CLI

+ + +
{% for tab in page.cli_tabs %} +
{% capture thistab %}{% include_relative {{ page.path | split: "/" | last }} version=tab.version cli="true" %}{% endcapture %}{{ thistab | split: "---" | last | markdownify }}
{% endfor %} +
+ + {% endif %} + + {% if page.next_steps %} + +

Next steps

+ + + {% endif %} + {% else %} {{ content }} + {% endif %} {% unless page.notags == true %} {% assign keywords = page.keywords | split:"," %} diff --git a/deploy/test.md b/deploy/test.md new file mode 100644 index 0000000000..ae5b2a2f4a --- /dev/null +++ b/deploy/test.md @@ -0,0 +1,52 @@ +--- +title: Manage logs +description: | + The reason you would do this is X, Y, and Z. + + This can be a multiline description but should probably `be brief`. +ui_tabs: +- version: ucp-3.0 + orhigher: true +- version: ucp-2.2 + orlower: true +cli_tabs: +- version: docker-cli-linux +- version: docker-cli-win +- version: kubectl +next_steps: +- path: /engine/install + title: Install Docker +- path: /get-started/ + title: Get Started with Docker +--- +{% if include.ui %} +To do this foobar task, you'll want to flip the switch under **Tasks > Foobar**, +enter your Lorem Ipsum value for {{ site.tablabels[tab.version] }}, then +click **Save**. + +{% if include.version=="ucp-3.0" %} +![Image number 1](https://docs.docker.com/datacenter/ucp/2.2/guides/images/monitor-ucp-0.png) +{% elsif include.version=="ucp-2.2" %} +![Image number 2](https://docs.docker.com/datacenter/ucp/2.2/guides/images/monitor-ucp-1.png) +{% endif %} +{% endif %} + +{% if include.cli %} +The command line workflow is essentially the same across the various CLIs. +First you enumerate the services on the node of choice, then you run the +`foobar` command. + +{% if include.version=="docker-cli-linux" %} +```bash +$ docker stack deploy -c test.yml smokestack +``` +{% elsif include.version=="docker-cli-win" %} +```powershell +PS> docker stack deploy -c test.yml smokestack +``` +{% elsif include.version=="kubectl" %} +```bash +$ kubectl get pod -f ./pod.yaml +``` +{% endif %} +{% endif %}