Skip to content

Commit

Permalink
Intances
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekwuno committed Jan 7, 2025
1 parent 898576e commit d347ff6
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions src/content/doc-surrealdb/deployment/surreal cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,37 +43,37 @@ In this guide, we'll walk through the process and options to deploy SurrealDB us
To get [started with Surreal Cloud](/docs/cloud/getting-started), you'll need to have an account. If you don't have one, you can sign up for a free account by [downloading Surrealist](https://github.com/surrealdb/surrealist/releases) or using the [Surrealist web app](https://surrealist.app/cloud).


## Create an instance
## Create an Instance

To create an instance, in Surrealist, click on the **Surreal Cloud** tab and select **Continue**. This will prompt you to the authentication page. If you don't have an account, you'll be asked to [sign up](/docs/cloud/getting-started/create-an-account) with an email address, Google, or GitHub.
To create an Instance, in Surrealist, click on the **Surreal Cloud** tab and select **Continue**. This will prompt you to the authentication page. If you don't have an account, you'll be asked to [sign up](/docs/cloud/getting-started/create-an-account) with an email address, Google, or GitHub.

After you've signed up, you'll be redirected to the Surreal Cloud dashboard. Here, you can create an instance by clicking on the **Create Instance** button.
After you've signed up, you'll be redirected to the Surreal Cloud dashboard. Here, you can create an Instance by clicking on the **Create Instance** button.

### Configure your instance
### Configure your Instance

While creating an instance, you'll be asked to provide a few details about your instance. These include:
While creating an Instance, you'll be asked to provide a few details about your Instance. These include:

- **Instance Name**: This is the name of your instance. It's used to identify your instance in the Surreal Cloud dashboard.
- **Instance Name**: This is the name of your Instance. It's used to identify your Instance in the Surreal Cloud dashboard.
- **SurrealDB Version**: This is the version of SurrealDB that you want to use. You can choose the version that best fits your needs.
- **Instance Region**: This is the region where your instance will be deployed. You can choose the region that's closest to you for better performance.
- **Instance Size**: This is the size of your instance. You can choose the size that best fits your needs.For free instances, this is set to **0.25 vCPU and 512.00MB** of memory on a single node.
- **Instance category**: This is the category of your instance. You can choose the category that best fits your needs.
- **Instance Region**: This is the region where your Instance will be deployed. You can choose the region that's closest to you for better performance.
- **Instance Size**: This is the size of your Instance. You can choose the size that best fits your needs.For free Instances, this is set to **0.25 vCPU and 512.00MB** of memory on a single node.
- **Instance category**: This is the category of your Instance. You can choose the category that best fits your needs.
- **Production**: This is the default category. It's designed for high-performance and high-availability use cases.
- **Development**: This is a lower-cost category. It's designed for development and testing purposes.
- **Free**: This is a free category. It's designed for learning and experimenting purposes.

> [!NOTE]
> Both Production and Development categories are paid plans and allows you to further customize your instance vCPU and memory. To use them, you'll need to upgrade to a paid plan by adding billing information. In this guide, we'll be using the free category which has a **0.25 vCPU and 512.00MB** of memory on a single node.
> Both Production and Development categories are paid plans and allows you to further customize your Instance vCPU and memory. To use them, you'll need to upgrade to a paid plan by adding billing information. In this guide, we'll be using the free category which has a **0.25 vCPU and 512.00MB** of memory on a single node.
After you've provided the required information, click on the **Create** button. This will start the instance provisioning process.
After you've provided the required information, click on the **Create** button. This will start the Instance provisioning process.

## Query your instance
## Query your Instance

### Query via Surrealist

You can connect to your instance using [Surrealist, the SurrealDB CLI, or the SurrealDB SDKs](/docs/cloud#what-can-you-do). In this guide, we'll be using Surrealist as our client.
You can connect to your Instance using [Surrealist, the SurrealDB CLI, or the SurrealDB SDKs](/docs/cloud#what-can-you-do). In this guide, we'll be using Surrealist as our client.

In the connect dropdown, select the **Open in Surrealist** option. This will open the [query view](/docs/surrealist/concepts/sending-queries) in Surrealist. Before you can start querying your instance, you'll need to create a namespace and a database.
In the connect dropdown, select the **Open in Surrealist** option. This will open the [query view](/docs/surrealist/concepts/sending-queries) in Surrealist. Before you can start querying your Instance, you'll need to create a namespace and a database.

To create a namespace, click on the **Create Namespace** button. This will open a modal to input the name of the namespace. Once you've input the name, click on the **Create** button.

Expand All @@ -94,7 +94,7 @@ To create a database, click on the **Create Database** button. This will open a
> A database is a collection of data. It's used to store your data and provide a way to manage access control.

After you've created a namespace and a database, you can start querying your instance.
After you've created a namespace and a database, you can start querying your Instance.

<Image
alt="Querying Instance"
Expand All @@ -107,14 +107,14 @@ src={{

## Additional Querying Options

You can also query your instance using the SurrealDB CLI and the SurrealDB SDKs. The work similarly by providing a connection string to your instance. The only difference is that with the CLI, you'll be provided an authentication token to use with your instance.
You can also query your Instance using the SurrealDB CLI and the SurrealDB SDKs. The work similarly by providing a connection string to your Instance. The only difference is that with the CLI, you'll be provided an authentication token to use with your Instance.

With the SDKs, you'll use the `connect` method to connect to your instance and then additional provide the namespace and database you want to work in. Lets take a look at some examples of how these work.
With the SDKs, you'll use the `connect` method to connect to your Instance and then additional provide the namespace and database you want to work in. Lets take a look at some examples of how these work.


### Connect via CLI

In your Instances dashboard, you'll see a **Connect** button, select the **Connect via CLI** option. This will provide you with a connection string to your instance. You can then copy the connection string and use it to connect to your instance using the SurrealDB CLI.
In your Instances dashboard, you'll see a **Connect** button, select the **Connect via CLI** option. This will provide you with a connection string to your Instance. You can then copy the connection string and use it to connect to your Instance using the SurrealDB CLI.

> [!IMPORTANT]
> To connect via CLI, you'll need to have the SurrealDB CLI installed. You can install the CLI by following the instructions [in the installation guide](/docs/surrealdb/cli).
Expand All @@ -124,13 +124,13 @@ Open your terminal and run the following command:
```bash title="Connect via CLI example"
surreal connect --endpoint surreal sql --endpoint wss://deploy-to-surre-06a3n6cirprtjdn3gj0np4l9kg.aws-use1.surreal.cloud --token eyJhbGciOiJQUzI1NiIsImtpZCI6IjFkNmViYjAyLWM5ZjEtNDg4Zi1iNjhjLWNlMzMzMzU4YzgyOCIsInR5cCI6IkpXVCJ9.eyJhYyI6ImNsb3VkIiwiYXVkIjoiMDZhM242Y2lycHJ0amRuM2dqMG5wNGw5a2ciLCJleHAiOjE3MzYxNzg5ODEsImlhdCI6MTczNjE3ODkyMSwicmwiOlsiT3duZXIiXX0.Lr2J7psiQc5d8X95IPYjsmkKdENB1jyKPi-PHvoBotD4EXPROuGYhnk8zquEHY10lRNUSMZEF-RDsPBmhV3cPSyUnu5nVMJgD9ii82uieXa3T4DpPfbba6LA2gnqQpqkCFBsLrn1oOU4PdcaimzzSALV-JSAfs2yqkeN0rpi6BnIsX5Xj6MWIXOWtyGW9sVXcKdTjCzo7FVm7sBABPVLqqeDo6xJwyYeEYTwHZo9PmieQnQkgPqz5d4eGIUqjKsY7CU-49Jjs8Mix7QsMCRrW7FrnDOf9D0ZjdNUTfLppipa8DussMWQWHEDkvVthxjViva0lqiXors9B792RIocog
```
This will connect you to your instance and you can start writing queries to your instance.
This will connect you to your Instance and you can start writing queries to your Instance.

### Connect via SDKs

In addition to the first two methods, you can also connect to your instance using the SurrealDB SDKs. The SurrealDB SDKs are available for a variety of languages, including [JavaScript / TypeScript](/docs/sdk/javascript), [Python](/docs/sdk/python), [Rust](/docs/sdk/rust), [Go](/docs/sdk/golang), and [Java](/docs/sdk/java).
In addition to the first two methods, you can also connect to your Instance using the SurrealDB SDKs. The SurrealDB SDKs are available for a variety of languages, including [JavaScript / TypeScript](/docs/sdk/javascript), [Python](/docs/sdk/python), [Rust](/docs/sdk/rust), [Go](/docs/sdk/golang), and [Java](/docs/sdk/java).

To use this method, you'll need to have the SurrealDB SDK for your language installed. Once you've installed the SDK, you can use the `connect` method to connect to your instance.
To use this method, you'll need to have the SurrealDB SDK for your language installed. Once you've installed the SDK, you can use the `connect` method to connect to your Instance.

From the Surreal Cloud dashboard, you'll see a **Connect** button, select the **Connect via SDK** option. This will provide you modal to carry out the following steps:

Expand All @@ -147,11 +147,11 @@ src={{
}}
/>

Once you've completed these steps, you can use the SDK to connect to your instance and start querying your instance.
Once you've completed these steps, you can use the SDK to connect to your Instance and start querying your Instance.

### Connect via HTTP

You can also connect to your instance using the HTTP API. This allows you to connect to your instance using any HTTP client. To get started, select the **Connect** button on your Instance. Then select **HTTP cURL**.
You can also connect to your Instance using the HTTP API. This allows you to connect to your Instance using any HTTP client. To get started, select the **Connect** button on your Instance. Then select **HTTP cURL**.

This will open a modal to fill in your credentials for **Namespace** and **Database** and authentication before you can copy the URL.

Expand All @@ -165,5 +165,5 @@ src={{

## Conclusion

In this guide, we've shown you how to deploy SurrealDB using Surreal Cloud (beta). We've also shown you how to query your instance using Surrealist, the SurrealDB CLI, and the SurrealDB SDKs. For more information on Surreal Cloud, you can visit the [Surreal Cloud documentation](/docs/cloud).
In this guide, we've shown you how to deploy SurrealDB using Surreal Cloud (beta). We've also shown you how to query your Instance using Surrealist, the SurrealDB CLI, and the SurrealDB SDKs. For more information on Surreal Cloud, you can visit the [Surreal Cloud documentation](/docs/cloud).

0 comments on commit d347ff6

Please sign in to comment.