From 822d59b5e49b148bfbf831e71c6f297a26bd601f Mon Sep 17 00:00:00 2001 From: steveperry-53 Date: Fri, 23 Sep 2016 15:40:21 -0700 Subject: [PATCH] Write page templates and canonical examples. Conflicts: _data/tasks.yml _data/tutorials.yml docs/tasks/access-kubernetes-api/http-proxy-access-api.md docs/tasks/index.md docs/tutorials/index.md --- _data/concepts.yml | 8 + _data/globals.yml | 5 +- _data/support.yml | 5 + _data/tasks.yml | 13 ++ _data/tutorials.yml | 10 + _includes/templates/concept.md | 32 +++ _includes/templates/task.md | 63 ++++-- _includes/templates/tutorial.md | 68 ++++++ _layouts/docwithnav.html | 31 +-- docs/concepts/index.md | 14 ++ docs/concepts/object-metadata/annotations.md | 60 +++++ docs/contribute/page-templates.md | 205 ++++++++++++++++++ ...load-balance-access-application-cluster.md | 133 ++++++++++++ ...port-forward-access-application-cluster.md | 101 +++++++++ .../redis-master.yaml | 33 +++ .../http-proxy-access-api.md | 90 ++++++++ .../http-proxy-access-api.md | 90 ++++++++ docs/tasks/index.md | 19 ++ docs/tutorials/index.md | 16 ++ .../deployment-update.yaml | 16 ++ .../stateless-application/deployment.yaml | 19 ++ .../expose-external-ip-address-service.md | 146 +++++++++++++ .../run-stateless-application-deployment.md | 114 ++++++++++ 23 files changed, 1254 insertions(+), 37 deletions(-) create mode 100644 _data/concepts.yml create mode 100644 _data/tasks.yml create mode 100644 _data/tutorials.yml create mode 100644 _includes/templates/concept.md create mode 100644 _includes/templates/tutorial.md create mode 100644 docs/concepts/index.md create mode 100644 docs/concepts/object-metadata/annotations.md create mode 100644 docs/contribute/page-templates.md create mode 100644 docs/tasks/access-application-cluster/load-balance-access-application-cluster.md create mode 100644 docs/tasks/access-application-cluster/port-forward-access-application-cluster.md create mode 100644 docs/tasks/access-application-cluster/redis-master.yaml create mode 100644 docs/tasks/access-kubernetes-api/access-kubernetes-api/http-proxy-access-api.md create mode 100644 docs/tasks/access-kubernetes-api/http-proxy-access-api.md create mode 100644 docs/tasks/index.md create mode 100644 docs/tutorials/index.md create mode 100644 docs/tutorials/stateless-application/deployment-update.yaml create mode 100644 docs/tutorials/stateless-application/deployment.yaml create mode 100644 docs/tutorials/stateless-application/expose-external-ip-address-service.md create mode 100644 docs/tutorials/stateless-application/run-stateless-application-deployment.md diff --git a/_data/concepts.yml b/_data/concepts.yml new file mode 100644 index 0000000000..a69276201e --- /dev/null +++ b/_data/concepts.yml @@ -0,0 +1,8 @@ +bigheader: "Concepts" +toc: +- title: Concepts + path: /docs/concepts/ +- title: Object Metadata + section: + - title: Annotations + path: /docs/concepts/object-metadata/annotations/ diff --git a/_data/globals.yml b/_data/globals.yml index fd3be92a16..c83dae26dd 100644 --- a/_data/globals.yml +++ b/_data/globals.yml @@ -1,5 +1,8 @@ tocs: - guides +- tutorials +- tasks +- concepts - reference - samples -- support \ No newline at end of file +- support diff --git a/_data/support.yml b/_data/support.yml index 4ca3b339c8..d287f0ecaa 100644 --- a/_data/support.yml +++ b/_data/support.yml @@ -4,6 +4,11 @@ toc: - title: Support path: /docs/troubleshooting/ +- title: Contributing to the Kubernetes Docs + section: + - title: Using Page Templates + path: /docs/contribute/page-templates/ + - title: Troubleshooting section: - title: Debugging Pods and Replication Controllers diff --git a/_data/tasks.yml b/_data/tasks.yml new file mode 100644 index 0000000000..1019671e66 --- /dev/null +++ b/_data/tasks.yml @@ -0,0 +1,13 @@ +bigheader: "Tasks" +toc: +- title: Tasks + path: /docs/tasks/ +- title: Accessing Applications in a Cluster + section: + - title: Using Port Forwarding to Access Applications in a Cluster + path: /docs/tasks/access-application-cluster/port-forward-access-application-cluster/ +- title: Accessing the Kubernetes API + section: + - title: Using an HTTP Proxy to Access the Kubernetes API + path: /docs/tasks/access-kubernetes-api/http-proxy-access-api/ + diff --git a/_data/tutorials.yml b/_data/tutorials.yml new file mode 100644 index 0000000000..101a21771a --- /dev/null +++ b/_data/tutorials.yml @@ -0,0 +1,10 @@ +bigheader: "Tutorials" +toc: +- title: Tutorials + path: /docs/tutorials/ +- title: Stateless Applications + section: + - title: Running a Stateless Application Using a Deployment + path: /docs/tutorials/stateless-application/run-stateless-application-deployment/ + - title: Exposing an External IP Address Using a Service + path: /docs/tutorials/stateless-application/expose-external-ip-address-service/ diff --git a/_includes/templates/concept.md b/_includes/templates/concept.md new file mode 100644 index 0000000000..dc6efdad13 --- /dev/null +++ b/_includes/templates/concept.md @@ -0,0 +1,32 @@ +{% if overview %} + +{{ overview }} + +{% else %} + +{% include templates/_errorthrower.md missing_block='overview' purpose='provides an overview of this concept.' %} + +{% endif %} + +* TOC +{:toc} + +{% if body %} + +{{ body }} + +{% else %} + +{% include templates/_errorthrower.md missing_block='body' purpose='supplies the body of the page content.' %} + +{% endif %} + + +{% if whatsnext %} + +### What's next + +{{ whatsnext }} + +{% endif %} + diff --git a/_includes/templates/task.md b/_includes/templates/task.md index abb7ea6b10..d74ff3b97a 100644 --- a/_includes/templates/task.md +++ b/_includes/templates/task.md @@ -1,36 +1,55 @@ -{% if purpose %} +{% if overview %} -### Purpose - -{{ purpose }} +{{ overview }} {% else %} -{% include templates/_errorthrower.md missing_block='purpose' heading='Purpose' purpose='states, in one sentence, what the purpose of this document is, so that the user will know what they are able to achieve if they follow the provided steps.' %} - -{% endif %} - -{% if recommended_background %} - -### Recommended background - -{{ recommended_background }} - -{% else %} - -{% include templates/_errorthrower.md missing_block='recommended_background' heading='Recommended background' purpose='lists assumptions of baseline knowledge that you expect the user to have before reading ahead.' %} +{% include templates/_errorthrower.md missing_block='overview' purpose='states, in one or two sentences, the purpose of this document' %} {% endif %} -{% if step_by_step %} +* TOC +{: toc} -### Step by step -{{ step_by_step }} +{% if prerequisites %} + +### Before you begin + +{{ prerequisites }} {% else %} -{% include templates/_errorthrower.md missing_block='step_by_step' heading='Step by step' purpose='lists a series of linear, numbered steps that accomplish the described task.' %} +{% include templates/_errorthrower.md missing_block='prerequisites' heading='Before you begin' purpose='lists action prerequisites and knowledge prerequisites' %} -{% endif %} \ No newline at end of file +{% endif %} + + +{% if steps %} + +{{ steps }} + +{% else %} + +{% include templates/_errorthrower.md missing_block='steps' purpose='lists a sequence of numbered steps that accomplish the task.' %} + +{% endif %} + + +{% if discussion %} + +{{ discussion }} + +{% else %} + +{% endif %} + + +{% if whatsnext %} + +### What's next + +{{ whatsnext }} + +{% endif %} diff --git a/_includes/templates/tutorial.md b/_includes/templates/tutorial.md new file mode 100644 index 0000000000..9c2d680643 --- /dev/null +++ b/_includes/templates/tutorial.md @@ -0,0 +1,68 @@ +{% if overview %} + +{{ overview }} + +{% else %} + +{% include templates/_errorthrower.md missing_block='overview' purpose='states, in one or two sentences, the purpose of this document' %} + +{% endif %} + + +* TOC +{: toc} + + +{% if objectives %} + +### Objectives + +{{ objectives }} + +{% else %} + +{% include templates/_errorthrower.md missing_block='objectives' heading='Objectives' purpose='lists the objectives for this tutorial.' %} + +{% endif %} + + +{% if prerequisites %} + +### Before you begin + +{{ prerequisites }} + +{% else %} + +{% include templates/_errorthrower.md missing_block='prerequisites' heading='Before you begin' purpose='lists action prerequisites and knowledge prerequisites' %} + +{% endif %} + + +{% if lessoncontent %} + +{{ lessoncontent }} + +{% else %} + +{% include templates/_errorthrower.md missing_block='lessoncontent' purpose='provides the lesson content for this tutorial.' %} + +{% endif %} + + +{% if cleanup %} + +### Cleaning up + +{{ cleanup }} + +{% endif %} + + +{% if whatsnext %} + +### What's next + +{{ whatsnext }} + +{% endif %} diff --git a/_layouts/docwithnav.html b/_layouts/docwithnav.html index 026e4ec287..735fd6adf7 100755 --- a/_layouts/docwithnav.html +++ b/_layouts/docwithnav.html @@ -7,19 +7,22 @@
-

{{ site.data[foundTOC].bigheader }}

-
{{ site.data[foundTOC].abstract }}
-
- - -
+

{{ site.data[foundTOC].bigheader }}

+
{{ site.data[foundTOC].abstract }}
+
+ + +
@@ -34,7 +37,7 @@ {% if notitle != "true" %}

{{ title }}

{% endif %} {{ content }}

Analytics - {% if page.url != "/404.html" && page.url != "/docs/search/" %}

+ {% if page.url != "/404.html" and page.url != "/docs/search/" %}