From d33222a6c3fd47d7e9ebf0d7c1c7425a970d093e Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Mon, 26 Jun 2017 11:12:14 -0700 Subject: [PATCH 1/2] Copy-to-clipboard fix (#4190) * Copy-to-clipboard fix target.setSelectionRange(0, target.value.length); does not always seem to be working. It doesn't work once the text is unselected. Using textarea.select() function: https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select Fixes #3965. Signed-off-by: Ahmet Alp Balkan * Empty commit Signed-off-by: Ahmet Alp Balkan --- js/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/script.js b/js/script.js index d6ff1dacf8..9b9dde3958 100755 --- a/js/script.js +++ b/js/script.js @@ -25,7 +25,7 @@ function copyCode(elem){ } target.value = document.getElementById(elem).innerText; // select the content - target.setSelectionRange(0, target.value.length); + target.select(); // copy the selection var succeed; @@ -520,4 +520,4 @@ $(function() { if (!$('#home').length > 0 ) { $('#hero').addClass('no-sub'); } -}); \ No newline at end of file +}); From 9ec9c73466da9059b60a103d156a26254ad12d15 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Fri, 23 Jun 2017 12:23:36 -0700 Subject: [PATCH 2/2] /docs/samples revamp: move examples to /tutorials Addresses the work described at #4134. - Remove /docs/samples page: This page mostly had links to examples on kubernetes/kubernetes (examples dir) which is now at kubernetes/examples repository. It was linking to README.md files for tutorials. Now removing this page as we are moving tutorials from kubernetes/examples to here: - Create redirects from /docs/samples/ to /docs/tutorials/ (both JS and redirect_from). - Deprecate "MEAN Stack" tutorial: This tutorial overlaps quite a bit with existing "maintained" examples and has been out-of-date for a while. Creating an external redirect to its original and more up-to-date location: https://medium.com/google-cloud/running-a-mean-stack-on-google-cloud-platform-with-app-engine-and-mongolab-4bbd2040ea75 - Import README.md files of maintained examples (guestbook, wordpress+mysql and cassandra) to this repository and serve them under /docs/tutorial. - Update /docs/tutorials ToC: - Link to imported tutorials. - Fix missing articles on sidebar (_data/tutorials.yml) and make the tutorials listed on tutorials/index.md available on the sidebar (closes #4007). Signed-off-by: Ahmet Alp Balkan --- _data/samples.yml | 75 -- _data/tutorials.yml | 7 + _includes/templates/landing-page.md | 121 --- _layouts/docwithnav.html | 1 - docs/getting-started-guides/meanstack.md | 447 --------- docs/samples.md | 96 -- docs/tutorials/index.md | 9 + .../stateful-application/cassandra.md | 859 ++++++++++++++++++ .../mysql-wordpress-persistent-volume.md | 369 ++++++++ .../stateless-application/guestbook.md | 707 ++++++++++++++ .../docs/meanstack/MEANstack_architecture.svg | 4 - images/docs/meanstack/image_0.png | Bin 84959 -> 0 bytes images/docs/meanstack/image_1.png | Bin 43643 -> 0 bytes images/docs/meanstack/image_2.png | Bin 85951 -> 0 bytes images/docs/meanstack/image_3.png | Bin 126249 -> 0 bytes images/docs/meanstack/image_4.png | Bin 14760 -> 0 bytes images/docs/meanstack/image_5.png | Bin 27687 -> 0 bytes images/docs/meanstack/image_6.png | Bin 24413 -> 0 bytes images/docs/meanstack/image_7.png | Bin 41761 -> 0 bytes js/redirects.js | 11 +- 20 files changed, 1961 insertions(+), 745 deletions(-) delete mode 100644 _data/samples.yml delete mode 100644 _includes/templates/landing-page.md delete mode 100644 docs/getting-started-guides/meanstack.md delete mode 100644 docs/samples.md create mode 100644 docs/tutorials/stateful-application/cassandra.md create mode 100644 docs/tutorials/stateful-application/mysql-wordpress-persistent-volume.md create mode 100644 docs/tutorials/stateless-application/guestbook.md delete mode 100644 images/docs/meanstack/MEANstack_architecture.svg delete mode 100644 images/docs/meanstack/image_0.png delete mode 100644 images/docs/meanstack/image_1.png delete mode 100644 images/docs/meanstack/image_2.png delete mode 100644 images/docs/meanstack/image_3.png delete mode 100644 images/docs/meanstack/image_4.png delete mode 100644 images/docs/meanstack/image_5.png delete mode 100644 images/docs/meanstack/image_6.png delete mode 100644 images/docs/meanstack/image_7.png diff --git a/_data/samples.yml b/_data/samples.yml deleted file mode 100644 index 9632a92cc5..0000000000 --- a/_data/samples.yml +++ /dev/null @@ -1,75 +0,0 @@ -bigheader: "Samples" -abstract: "A collection of example applications that show how to use Kubernetes." -toc: -- docs/samples.md - -- title: Storage / Database / KV - section: - - title: Apache Cassandra Database - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/storage/cassandra - - title: Ceph - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/volumes/rbd/ - - title: CephFS - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/volumes/cephfs/ - - title: CockroachDB - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/cockroachdb/ - - title: GlusterFS - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/volumes/glusterfs/ - - title: Hazelcast - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/storage/hazelcast - - title: iSCSI - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/volumes/iscsi/ - - title: MySQL Galera - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/storage/mysql-galera - - title: NFS - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/volumes/nfs/ - - title: Redis - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/storage/redis/ - - title: RethinkDB - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/storage/rethinkdb/ - - title: Vitess - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/storage/vitess/ - -- title: Big Data - section: - - title: Apache Spark - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/spark - - title: Apache Storm - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/storm - -- title: Messaging / Queueing - section: - - title: Hazelcast - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/storage/hazelcast - -- title: Miscellaneous - section: - - title: Meteor Applications - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/meteor/ - - title: OpenShift Origin - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/openshift-origin/ - - title: Selenium - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/selenium/ - -- title: Monitoring and Logging - section: - - title: Elasticsearch - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/elasticsearch/ - - title: NewRelic - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/newrelic - -- title: Multi-tier Applications - section: - - title: Guestbook - Go Server - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/guestbook-go/ - - title: GuestBook - PHP Server - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/guestbook/ - - docs/getting-started-guides/meanstack.md - - title: MySQL + Wordpress - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/mysql-wordpress-pd/ - - title: MySQL + Phabricator Server - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/phabricator/ - - title: Nodejs + Mongo - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/nodesjs-mongodb - - title: Petstore - path: https://github.com/kubernetes/kubernetes/tree/release-1.6/examples/k8petstore/ diff --git a/_data/tutorials.yml b/_data/tutorials.yml index c6ee1e74aa..3989024606 100644 --- a/_data/tutorials.yml +++ b/_data/tutorials.yml @@ -43,10 +43,17 @@ toc: - docs/tutorials/object-management-kubectl/declarative-object-management-configuration.md - title: Stateless Applications section: + - docs/tasks/run-application/run-stateless-application-deployment.md + - docs/tutorials/stateless-application/guestbook.md + - docs/tasks/access-application-cluster/service-access-application-cluster.md - docs/tutorials/stateless-application/expose-external-ip-address.md - title: Stateful Applications section: - docs/tutorials/stateful-application/basic-stateful-set.md + - docs/tasks/run-application/run-single-instance-stateful-application.md + - docs/tasks/run-application/run-replicated-stateful-application.md + - docs/tutorials/stateful-application/mysql-wordpress-persistent-volume.md + - docs/tutorials/stateful-application/cassandra.md - docs/tutorials/stateful-application/zookeeper.md - title: Clusters section: diff --git a/_includes/templates/landing-page.md b/_includes/templates/landing-page.md deleted file mode 100644 index 28bf9cebe5..0000000000 --- a/_includes/templates/landing-page.md +++ /dev/null @@ -1,121 +0,0 @@ -{% if page.cards %} - - -
-{% for card in page.cards %}{% if card.title %} -
-

{{card.title}}

-

{% if card.image %}{% endif %}{{card.description}}

-
-{% endif %}{% endfor %} -
- -{% else %} - -### ERROR: You must define "cards" front-matter YAML -{: style="color:red" } - -This template requires that you insert YAML at the top of your document -that defines the "cards" you'd like to display on the page. The cards will -render in clickable boxes. - -To get rid of this message and take advantage of this template, define `cards`: - -```yaml ---- -cards: -- progression: no -- card: - title: Mean Stack - image: /docs/meanstack/image_0.png - description: Lorem ipsum dolor it verberum. -- card: - title: Guestbook + Redis - image: /images/docs/redis.svg - description: Lorem ipsum dolor it verberum. -- card: - title: Cloud Native Cassandra - image: /images/docs/cassandra.svg - description: Lorem ipsum dolor it verberum. -- card: - title: WordPress + MySQL - image: /images/docs/wordpress.svg - description: Lorem ipsum dolor it verberum. ---- -``` - -**Note:** If `progression` is set to `yes` then a "Start Here!" icon will be -placed on the first card and arrows suggesting linear reading will be overlayed -between the other cards, telling the reader that they should explore the content -in a certain order. - -{% endif %} diff --git a/_layouts/docwithnav.html b/_layouts/docwithnav.html index aacead888e..b7da71eb57 100755 --- a/_layouts/docwithnav.html +++ b/_layouts/docwithnav.html @@ -28,7 +28,6 @@
  • TASKS
  • TUTORIALS
  • REFERENCE
  • -
  • SAMPLES