From 30497d5ba16c19843f266b937c96a0cc7e0e2280 Mon Sep 17 00:00:00 2001 From: cluse Date: Thu, 12 Nov 2020 19:15:18 -0700 Subject: [PATCH] Add --privileged flag to install command previously in shortcode --- .../single-node-docker/advanced/_index.md | 14 +++++++++++++- .../single-node-install-external-lb/_index.md | 14 +++++++++++++- layouts/shortcodes/persistentdata.html | 17 ----------------- 3 files changed, 26 insertions(+), 19 deletions(-) delete mode 100644 layouts/shortcodes/persistentdata.html diff --git a/content/rancher/v2.x/en/installation/other-installation-methods/single-node-docker/advanced/_index.md b/content/rancher/v2.x/en/installation/other-installation-methods/single-node-docker/advanced/_index.md index 8eefb2db503..b8cf98496f0 100644 --- a/content/rancher/v2.x/en/installation/other-installation-methods/single-node-docker/advanced/_index.md +++ b/content/rancher/v2.x/en/installation/other-installation-methods/single-node-docker/advanced/_index.md @@ -83,7 +83,19 @@ If you are visiting this page to complete an air gap installation, you must prep ### Persistent Data -{{< persistentdata >}} +Rancher uses etcd as a datastore. When Rancher is installed with Docker, the embedded etcd is being used. The persistent data is at the following path in the container: `/var/lib/rancher`. + +You can bind mount a host volume to this location to preserve data on the host it is running on: + +``` +docker run -d --restart=unless-stopped \ + -p 80:80 -p 443:443 \ + -v /opt/rancher:/var/lib/rancher \ + --privileged \ + rancher/rancher:latest +``` + +As of Rancher v2.5, privileged access is [required.](../#privileged-access-for-rancher-v2-5) ### Running `rancher/rancher` and `rancher/rancher-agent` on the Same Node diff --git a/content/rancher/v2.x/en/installation/resources/advanced/single-node-install-external-lb/_index.md b/content/rancher/v2.x/en/installation/resources/advanced/single-node-install-external-lb/_index.md index c2f9b6ea1dd..eeabd44485b 100644 --- a/content/rancher/v2.x/en/installation/resources/advanced/single-node-install-external-lb/_index.md +++ b/content/rancher/v2.x/en/installation/resources/advanced/single-node-install-external-lb/_index.md @@ -197,7 +197,19 @@ If you are visiting this page to complete an [Air Gap Installation]({{} ### Persistent Data -{{< persistentdata >}} +Rancher uses etcd as a datastore. When Rancher is installed with Docker, the embedded etcd is being used. The persistent data is at the following path in the container: `/var/lib/rancher`. + +You can bind mount a host volume to this location to preserve data on the host it is running on: + +``` +docker run -d --restart=unless-stopped \ + -p 80:80 -p 443:443 \ + -v /opt/rancher:/var/lib/rancher \ + --privileged \ + rancher/rancher:latest +``` + +As of Rancher v2.5, privileged access is [required.](../#privileged-access-for-rancher-v2-5) This layer 7 NGINX configuration is tested on NGINX version 1.13 (mainline) and 1.14 (stable). diff --git a/layouts/shortcodes/persistentdata.html b/layouts/shortcodes/persistentdata.html deleted file mode 100644 index f816e7fff37..00000000000 --- a/layouts/shortcodes/persistentdata.html +++ /dev/null @@ -1,17 +0,0 @@ -
-

Rancher uses etcd as datastore. When using the Docker Install, the embedded etcd is - being used. The persistent data is at the following path in the container: /var/lib/rancher. You can - bind mount a host volume to this location to preserve data on the host it is running on. When using RancherOS, - please check what persistent storage - directories you can use to store the data.

- -

Command:

- -
-docker run -d --restart=unless-stopped \
-  -p 80:80 -p 443:443 \
-  -v /opt/rancher:/var/lib/rancher \
-  rancher/rancher:latest
-
-