From ebe0c07980733fa74c3e9a7bd4b17431d5728f5e Mon Sep 17 00:00:00 2001 From: Matt Linville Date: Mon, 19 Aug 2024 14:41:30 -0700 Subject: [PATCH 1/2] [DOC-10949] Update Docker instructions for Cloud-first --- .../_includes/v24.2/install-docker-steps.md | 57 +++++++++++++++++++ .../v24.2/install-cockroachdb-linux.md | 41 +------------ src/current/v24.2/install-cockroachdb-mac.md | 39 +------------ .../v24.2/install-cockroachdb-windows.md | 38 +------------ 4 files changed, 66 insertions(+), 109 deletions(-) create mode 100644 src/current/_includes/v24.2/install-docker-steps.md diff --git a/src/current/_includes/v24.2/install-docker-steps.md b/src/current/_includes/v24.2/install-docker-steps.md new file mode 100644 index 00000000000..93a5ec0ed98 --- /dev/null +++ b/src/current/_includes/v24.2/install-docker-steps.md @@ -0,0 +1,57 @@ +{% comment %}This include is used in install-cockroachdb-*.md{% endcomment %} +{% capture deployment_link %} +{% if page.name contains "mac" %}[Deploy a local container in Docker]({% link {{ page.version.version }}/start-a-local-cluster-in-docker-mac.md %}) +{% elsif page.name contains "windows" %}[Deploy a local container in Docker]({% link {{ page.version.version }}/start-a-local-cluster-in-docker-windows.md %}) +{% else %}[Deploy a local container in Docker]({% link {{ page.version.version }}/start-a-local-cluster-in-docker-linux.md %}) +{% endif %} +{% endcapture %} + +{{site.data.alerts.callout_danger}} +Running a stateful application like CockroachDB in Docker is more complex and error-prone than most uses of Docker. Unless you are very experienced with Docker, we recommend starting with a different installation and deployment method. +{{site.data.alerts.end}} + +CockroachDB's Docker images are [multi-platform images](https://docs.docker.com/build/building/multi-platform/) that contain binaries for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host. + +Experimental images are not qualified for production use and not eligible for support or uptime SLA commitments. + +1. Install a container runtime, such as [Docker Desktop](https://docs.docker.com/desktop/install/). +1. Verify that the runtime service is installed correctly and running in the background. Refer to the runtime's documentation. For Docker, start a terminal and run `docker version`. If you get an error, verify your installation and try again. +1. Visit [Docker Hub](https://hub.docker.com/r/cockroachdb/cockroach) and decide which image tag to pull. CockroachDB images are published on [Docker Hub](https://hub.docker.com/r/cockroachdb/cockroach). Releases are rolled out gradually. Docker images for a new release are published when other binary artifacts are published. The following tag formats are commonly used, although other tags are available. + + + + + + + + + + + + + + + + + + + + + + + + + +
TagExample>Description
An exact patch`{{ page.version.name }}`Pins a cluster to an exact patch. The cluster is upgraded to a newer patch or major version only when you pull a newer tag.
Latest patch within a major version`latest-{{ page.version.version }}`Automatically updates a cluster to the latest patch of the version you specify. This tag is recommended in production, because it keeps your cluster updated within a major version but does not automatically upgrade your cluster to a new major version.
`latest`The latest patch within the latest major version. + This is the default default if you do not specify a tag. It updates your cluster automatically to each new patch and major version, and is not recommended in production.
+ + Copy the tag you want to pull. + +1. Pull the image. Replace `{TAG}` with the tag from the previous step. + + {% include_cached copy-clipboard.html %} + ~~~ shell + docker pull cockroachdb/cockroach:{TAG} + ~~~ + +1. Start a cluster by starting the container on each node using `docker start`. The default command is `cockroach start`. Pass your desired flags as the final argument. For details, refer to {{ deployment_link | strip }}. diff --git a/src/current/v24.2/install-cockroachdb-linux.md b/src/current/v24.2/install-cockroachdb-linux.md index 2dff4e3ad46..cda3a833fe7 100644 --- a/src/current/v24.2/install-cockroachdb-linux.md +++ b/src/current/v24.2/install-cockroachdb-linux.md @@ -114,46 +114,11 @@ true -
-

Use Docker

+
+

Use Docker

- {{site.data.alerts.callout_danger}}Running a stateful application like CockroachDB in Docker is more complex and error-prone than most uses of Docker. Unless you are very experienced with Docker, we recommend starting with a different installation and deployment method.{{site.data.alerts.end}} +{% include {{ page.version.version }}/install-docker-steps.md %} -

For CockroachDB v22.2.beta-5 and above, Docker images are multi-platform images that contain binaries for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.

-

Docker images for previous releases contain Intel binaries only. Intel binaries can run on ARM systems, but with a significant reduction in performance.

-

CockroachDB on ARM is in Limited Access in v22.2.13, and is experimental in all other versions. Experimental images are not qualified for production use and not eligible for support or uptime SLA commitments.

- -
    -
  1. -

    Install Docker for Linux. Please carefully check that you meet all prerequisites.

    -
  2. -
  3. -

    Confirm that the Docker daemon is running in the background:

    - -
    - icon/buttons/copy - -
    -
    $ docker version
    -

    If you do not see the server listed, start the Docker daemon.

    - - {{site.data.alerts.callout_info}}On Linux, Docker needs sudo privileges.{{site.data.alerts.end}} -
  4. -
  5. -

    Pull the image for the {{page.release_info.version}} release of CockroachDB from Docker Hub:

    - -
    - icon/buttons/copy - -
    -
    $ sudo docker pull {{page.release_info.docker_image}}:{{page.release_info.version}}
    -
    -
  6. -
  7. -

    Keep up-to-date with CockroachDB releases and best practices:

    -{% include marketo-install.html uid="2" %} -
  8. -
diff --git a/src/current/v24.2/install-cockroachdb-mac.md b/src/current/v24.2/install-cockroachdb-mac.md index dc2c8382577..181fa386316 100644 --- a/src/current/v24.2/install-cockroachdb-mac.md +++ b/src/current/v24.2/install-cockroachdb-mac.md @@ -21,8 +21,6 @@ docs_area: deploy {% capture arch_note_binaries %}

For CockroachDB v22.2.x and above, download the binaries for your system architecture, either Intel or ARM (Apple Silicon).

For previous releases, download Intel binaries. Intel binaries can run on ARM systems, but with a significant reduction in performance. CockroachDB on ARM for macOS is experimental and is not yet qualified for production use and not eligible for support or uptime SLA commitments.

{% endcapture %} -{% capture arch_note_docker %}

For CockroachDB v22.2.beta-5 and above, Docker images are multi-platform images that contain binaries for both Intel and ARM (Apple Silicon). Multi-platform images do not take up additional space on your Docker host.

Docker images for previous releases contain Intel binaries only. Intel binaries can run on ARM systems, but with a significant reduction in performance.

CockroachDB on ARM for macOS is experimental and is not yet qualified for production use and not eligible for support or uptime SLA commitments.

{% endcapture %} - {{site.data.alerts.callout_info}} CockroachDB on macOS is experimental and not suitable for production deployments. {{site.data.alerts.end}} @@ -172,42 +170,11 @@ true

To orchestrate CockroachDB locally using Kubernetes, either with configuration files or the Helm package manager, see Orchestrate CockroachDB Locally with Minikube.

-
-

Use Docker

- - {{site.data.alerts.callout_danger}}Running a stateful application like CockroachDB in Docker is more complex and error-prone than most uses of Docker. Unless you are very experienced with Docker, we recommend starting with a different installation and deployment method.{{site.data.alerts.end}} - - {{ arch_note_docker }} +
+

Use Docker

-
    -
  1. -

    Install Docker for Mac. Please carefully check that you meet all prerequisites.

    -
  2. -
  3. -

    Confirm that the Docker daemon is running in the background:

    - -
    - icon/buttons/copy - -
    -
    $ docker version
    -

    If you do not see the server listed, start the Docker daemon.

    -
  4. -
  5. -

    Pull the image for the {{page.release_info.version}} release of CockroachDB from Docker Hub:

    +{% include {{ page.version.version }}/install-docker-steps.md %} -
    - icon/buttons/copy - -
    -
    $ docker pull {{page.release_info.docker_image}}:{{page.release_info.version}}
    -
    -
  6. -
  7. -

    Keep up-to-date with CockroachDB releases and best practices:

    -{% include marketo-install.html uid="3" %} -
  8. -
diff --git a/src/current/v24.2/install-cockroachdb-windows.md b/src/current/v24.2/install-cockroachdb-windows.md index 9a9af4693bc..606e5b11ef1 100644 --- a/src/current/v24.2/install-cockroachdb-windows.md +++ b/src/current/v24.2/install-cockroachdb-windows.md @@ -56,44 +56,12 @@ Use one of the options below to install CockroachDB. To upgrade an existing clus To orchestrate CockroachDB locally using Kubernetes, either with configuration files or the Helm package manager, see Orchestrate CockroachDB Locally with Minikube. -
+

Use Docker

-{{site.data.alerts.callout_danger}}Running a stateful application like CockroachDB in Docker is more complex and error-prone than most uses of Docker. Unless you are very experienced with Docker, we recommend starting with a different installation and deployment method.{{site.data.alerts.end}} +{% include {{ page.version.version }}/install-docker-steps.md %} -For CockroachDB v22.2.beta-5 and above, Docker images are multi-platform images that contains binaries for both Intel and ARM. CockroachDB on ARM systems is experimental and is not yet qualified for production use and not eligible for support or uptime SLA commitments. Multi-platform images do not take up additional space on your Docker host. - -Docker images for previous releases contain Intel binaries only. Intel binaries can run on ARM systems, but with a significant reduction in performance. - -1. Install Docker for Windows. - - {{site.data.alerts.callout_success}} - Docker for Windows requires 64bit Windows 10 Pro and Microsoft Hyper-V. Please see the official documentation for more details. Note that if your system does not satisfy the stated requirements, you can try using Docker Toolbox. - {{site.data.alerts.end}} - -1. In PowerShell, confirm that the Docker daemon is running in the background: - - {% include_cached copy-clipboard.html %} - ~~~ powershell - docker version - ~~~ - - If you see an error, start Docker for Windows. - -1. Share your local drives. This makes it possible to mount local directories as data volumes to persist node data after containers are stopped or deleted. - -1. In PowerShell, pull the image for the {{page.release_info.version}} release of CockroachDB from Docker Hub: - - {% include_cached copy-clipboard.html %} - ~~~ powershell - docker pull {{page.release_info.docker_image}}:{{page.release_info.version}} - ~~~ - -1. Keep up-to-date with CockroachDB releases and best practices: - - {% include marketo-install.html uid="2" %} - -
+

What's next?

From 78aba0e34144b93818e8fc3b0a4a51dd2b7d206d Mon Sep 17 00:00:00 2001 From: "Matt Linville (he/him)" Date: Tue, 20 Aug 2024 13:51:46 -0700 Subject: [PATCH 2/2] Apply suggestions from code review --- src/current/_includes/v24.2/install-docker-steps.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/current/_includes/v24.2/install-docker-steps.md b/src/current/_includes/v24.2/install-docker-steps.md index 93a5ec0ed98..cf8adfd2429 100644 --- a/src/current/_includes/v24.2/install-docker-steps.md +++ b/src/current/_includes/v24.2/install-docker-steps.md @@ -14,15 +14,15 @@ CockroachDB's Docker images are [multi-platform images](https://docs.docker.com/ Experimental images are not qualified for production use and not eligible for support or uptime SLA commitments. -1. Install a container runtime, such as [Docker Desktop](https://docs.docker.com/desktop/install/). +1. Install a container runtime, such as [Docker Desktop](https://www.docker.com/products/docker-desktop/). 1. Verify that the runtime service is installed correctly and running in the background. Refer to the runtime's documentation. For Docker, start a terminal and run `docker version`. If you get an error, verify your installation and try again. -1. Visit [Docker Hub](https://hub.docker.com/r/cockroachdb/cockroach) and decide which image tag to pull. CockroachDB images are published on [Docker Hub](https://hub.docker.com/r/cockroachdb/cockroach). Releases are rolled out gradually. Docker images for a new release are published when other binary artifacts are published. The following tag formats are commonly used, although other tags are available. +1. Visit [Docker Hub](https://hub.docker.com/r/cockroachdb/cockroach) and decide which image tag to pull. Releases are rolled out gradually. Docker images for a new release are published when other binary artifacts are published. The following tag formats are commonly used; other tags are available. - + @@ -40,7 +40,7 @@ Experimental images are not qualified for production use and not eligible for su +
TagExample>Example Description
`latest` The latest patch within the latest major version. - This is the default default if you do not specify a tag. It updates your cluster automatically to each new patch and major version, and is not recommended in production.This is the default if you do not specify a tag. It updates your cluster automatically to each new patch and major version, and is not recommended in production.