Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC-9717][DOC-10646][DOC-9718][DOC-10647] Update deployment tutorials for Cloud 2.0 #18843

Merged
merged 11 commits into from
Sep 12, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a name="connection-string"></a>After the cluster is created, the **Connection info** window appears. Click the **Connection string** tab and copy the connection string to a secure location. You will use this connection string to connect to CockroachDB later in the tutorial.

The connection string is pre-populated with your SQL username and password, the cluster name, and other details. Save the password in a secure place such a password manager. You can find the connection string at any time from the CockroachDB Cloud Console. You can reset your SQL password for this cluster from the cluster's **SQL Users** page.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% include_cached copy-clipboard.html %}
~~~ shell
curl --create-dirs -o ~/.postgresql/root.crt -O https://cockroachlabs.cloud/clusters/<cluster-id>/cert
curl --create-dirs -o ~/.postgresql/root.crt -O https://cockroachlabs.cloud/clusters/{cluster-id}/cert
~~~

Your `cert` file will be downloaded to `~/.postgresql/root.crt`.
Expand All @@ -13,7 +13,7 @@

{% include_cached copy-clipboard.html %}
~~~ shell
curl --create-dirs -o ~/.postgresql/root.crt -O https://cockroachlabs.cloud/clusters/<cluster-id>/cert
curl --create-dirs -o ~/.postgresql/root.crt -O https://cockroachlabs.cloud/clusters/{cluster-id}/cert
~~~

Your `cert` file will be downloaded to `~/.postgresql/root.crt`.
Expand All @@ -23,8 +23,8 @@
<section class="filter-content" markdown="1" data-scope="windows">

{% include_cached copy-clipboard.html %}
~~~ shell
mkdir -p $env:appdata\.postgresql\; Invoke-WebRequest -Uri https://cockroachlabs.cloud/clusters/<cluster-id>/cert -OutFile $env:appdata\.postgresql\root.crt
~~~ powershell
mkdir -p $env:appdata\.postgresql\; Invoke-WebRequest -Uri https://cockroachlabs.cloud/clusters/{cluster-id}/cert -OutFile $env:appdata\.postgresql\root.crt
~~~

Your `cert` file will be downloaded to `%APPDATA%/.postgresql/root.crt`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,18 @@
After the free trial details are finalized, add a link to free trial page to check for free trial eligibility.
{% endcomment %}

1. If you haven't already, <a href="https://cockroachlabs.cloud/signup?referralId={{page.referral_id}}" rel="noopener" target="_blank">sign up for a CockroachDB {{ site.data.products.cloud }} account</a>.
1. [Log in](https://cockroachlabs.cloud/) to your CockroachDB {{ site.data.products.cloud }} account.
1. Create a [CockroachDB {{ site.data.products.cloud }}](https://cockroachlabs.cloud/signup?referralId={{page.referral_id}}) account and log in.
1. On the **Clusters** page, click **Create cluster**.
1. On the **Select a plan** page, select **Standard**.
1. On the **Cloud & Regions** page, select a cloud provider (GCP or AWS) in the **Cloud provider** section.
1. On the **Cloud & Regions** page, select a cloud provider (GCP or AWS) in the **Cloud provider** section.
1. In the **Regions** section, select a region for the cluster. Refer to [CockroachDB {{ site.data.products.cloud }} Regions]({% link cockroachcloud/regions.md %}) for the regions where CockroachDB {{ site.data.products.standard }} clusters can be deployed. To create a multi-region cluster, click **Add region** and select additional regions.
1. Click **Next: Capacity**.
1. On the **Capacity** page, keep the **Provisioned capacity** at the default value of 1000 RUs/second.

Click **Next: Finalize**.

1. On the **Finalize** page, name your cluster. If applicable, the 30-day trial code is pre-applied to your cluster.

Click **Create cluster**.

Your cluster will be created in a few seconds and the **Create SQL user** dialog will display.
Your cluster will be created in a few seconds and the **Create SQL user** dialog will display.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach sql --url 'postgresql://<username>:<password>@<serverless-host>:26257/defaultdb?sslmode=verify-full&sslrootcert='$HOME'/.postgresql/root.crt'
cockroach sql --url 'postgresql://<username>:<password>@<cluster-host>:26257/defaultdb?sslmode=verify-full&sslrootcert='$HOME'/.postgresql/root.crt'
~~~

</section>
Expand All @@ -11,7 +11,7 @@

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach sql --url 'postgresql://<username>:<password>@<serverless-host>:26257/defaultdb?sslmode=verify-full&sslrootcert='$HOME'/.postgresql/root.crt'
cockroach sql --url 'postgresql://<username>:<password>@<cluster-host>:26257/defaultdb?sslmode=verify-full&sslrootcert='$HOME'/.postgresql/root.crt'
~~~

</section>
Expand All @@ -20,15 +20,15 @@

{% include_cached copy-clipboard.html %}
~~~ shell
cockroach sql --url "postgresql://<username>:<password>@<serverless-host>:26257/defaultdb?sslmode=verify-full&sslrootcert=$env:appdata/.postgresql/root.crt"
cockroach sql --url "postgresql://<username>:<password>@<cluster-host>:26257/defaultdb?sslmode=verify-full&sslrootcert=$env:appdata/.postgresql/root.crt"
~~~

</section>

Where:
- `<username>` is the SQL user. By default, this is your CockroachDB {{ site.data.products.cloud }} account username.
- `<password>` is the password for the SQL user. The password will be shown only once in the **Connection info** dialog after creating the cluster.
- `<serverless-host>` is the hostname of the CockroachDB {{ site.data.products.serverless }} cluster.
- `<cluster-hostname>` is the hostname of your CockroachDB {{ site.data.products.cloud }} cluster.
- `<cluster-id>` is a unique string used to identify your cluster when downloading the CA certificate. For example, `12a3bcde-4fa5-6789-1234-56bc7890d123`.

You can find these settings in the **Connection parameters** tab of the **Connection info** dialog.
You can find these settings in the **Connection parameters** tab of the **Connection info** dialog.
19 changes: 19 additions & 0 deletions src/current/_includes/v22.1/connect/connection-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<div class="filter-content" markdown="1" data-scope="mac linux">
Set a `DATABASE_URL` environment variable to your connection string.

{% include_cached copy-clipboard.html %}
~~~ shell
export DATABASE_URL="{connection string}"
~~~

</div>

<div class="filter-content" markdown="1" data-scope="windows">
Set a `DATABASE_URL` environment variable to your connection string.

{% include_cached copy-clipboard.html %}
~~~ shell
$env:DATABASE_URL = "{connection string}"
~~~

</div>
7 changes: 7 additions & 0 deletions src/current/_includes/v22.1/connect/core-note.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{site.data.alerts.callout_info}}
The connection information shown on this page uses [client certificate and key authentication]({% link {{ page.version.version }}/authentication.md %}#client-authentication) to connect to a secure, CockroachDB {{ site.data.products.core }} cluster.

To connect to a CockroachDB {{ site.data.products.core }} cluster with client certificate and key authentication, you must first [generate server and client certificates]({% link {{ page.version.version }}/authentication.md %}#using-digital-certificates-with-cockroachdb).

For instructions on starting a secure cluster, see [Start a Local Cluster (Secure)]({% link {{ page.version.version }}/secure-a-cluster.md %}).
{{site.data.alerts.end}}
19 changes: 19 additions & 0 deletions src/current/_includes/v22.1/connect/jdbc-connection-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Set a `JDBC_DATABASE_URL` environment variable to your JDBC connection string.

<div class="filter-content" markdown="1" data-scope="mac linux">

{% include_cached copy-clipboard.html %}
~~~ shell
export JDBC_DATABASE_URL="{connection string}"
~~~

</div>

<div class="filter-content" markdown="1" data-scope="windows">

{% include_cached copy-clipboard.html %}
~~~ shell
$env:JDBC_DATABASE_URL = "{connection string}"
~~~

</div>
7 changes: 7 additions & 0 deletions src/current/_includes/v22.1/core-note.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{{site.data.alerts.callout_info}}
The connection information shown on this page uses [client certificate and key authentication]({% link {{ page.version.version }}/authentication.md %}#client-authentication) to connect to a secure, CockroachDB {{ site.data.products.core }} cluster.

To connect to a CockroachDB {{ site.data.products.core }} cluster with client certificate and key authentication, you must first [generate server and client certificates]({% link {{ page.version.version }}/authentication.md %}#using-digital-certificates-with-cockroachdb).

For instructions on starting a secure cluster, see [Start a Local Cluster (Secure)]({% link {{ page.version.version }}/secure-a-cluster.md %}).
{{site.data.alerts.end}}
7 changes: 7 additions & 0 deletions src/current/_includes/v22.1/faq/what-is-crdb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CockroachDB is a [distributed SQL](https://www.cockroachlabs.com/blog/what-is-distributed-sql/) database built on a transactional and strongly-consistent key-value store. It **scales** horizontally; **survives** disk, machine, rack, and even datacenter failures with minimal latency disruption and no manual intervention; supports **strongly-consistent** ACID transactions; and provides a familiar **SQL** API for structuring, manipulating, and querying data.

CockroachDB is inspired by Google's [Spanner](http://research.google.com/archive/spanner.html) and [F1](http://research.google.com/pubs/pub38125.html) technologies, and the [source code](https://github.com/cockroachdb/cockroach) is freely available.

{{site.data.alerts.callout_success}}
For a deeper dive into CockroachDB's capabilities and how it fits into the database landscape, take the free [**Intro to Distributed SQL and CockroachDB**](https://university.cockroachlabs.com/courses/course-v1:crl+intro-to-distributed-sql-and-cockroachdb+self-paced/about) course on Cockroach University.
{{site.data.alerts.end}}
19 changes: 19 additions & 0 deletions src/current/_includes/v22.1/jdbc-connection-url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Set a `JDBC_DATABASE_URL` environment variable to your JDBC connection string.

<div class="filter-content" markdown="1" data-scope="mac linux">

{% include_cached copy-clipboard.html %}
~~~ shell
export JDBC_DATABASE_URL="{connection string}"
~~~

</div>

<div class="filter-content" markdown="1" data-scope="windows">

{% include_cached copy-clipboard.html %}
~~~ shell
$env:JDBC_DATABASE_URL = "{connection string}"
~~~

</div>
Loading
Loading