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

Add the guides for running ceramic-one #96

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/composedb/guides/composedb-server/running-locally.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Running Locally
Run a ComposeDB server on your local machine, e.g. your laptop
Run a ComposeDB server on your local server, e.g. your laptop.

## Things to Know
- ComposeDB requires running a Ceramic node (which uses IPFS) for decentralized data and a SQL instance for your index database.
- ComposeDB requires running a Ceramic node for decentralized data and a SQL instance for your index database.
- ComposeDB requires a running `ceramic-one` node which is responsible for storing the data and coordinating with network participants.
Make sure to configure and run the `ceramic-one` node first. You can find the steps of how to install and start the `ceramic-one` instance [here](../../set-up-your-environment#2-installation).
- ComposeDB server can also be run locally [using Docker](../../guides/composedb-server/running-in-the-cloud.mdx).

:::tip
Expand Down
46 changes: 45 additions & 1 deletion docs/composedb/set-up-your-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,45 @@ There are a few ways to set up your environment. Choose the one that best fits y
- [Using the Wheel](#installation-using-wheel) - the recommended and the easiest way to configure your full working environment and install the necessary dependencies.
- [Using JavaScript package managers](#installation-using-javascript-package-managers) - an alternative, more manual, way to configure your working environment which supports `npm`, `pnpm` and `yarn`.

**Install and start the `ceramic-one` binary**
JustinaPetr marked this conversation as resolved.
Show resolved Hide resolved

All of the configuration options listed above **require a `ceramic-one` binary up and running**, which provides a data network access. You can run `ceramic-one` on your
local machine using two simple steps listed below.

:::note
The instructions below cover the steps for the MacOS-based systems. If you are running on a Linux-based system, you can find the
instructions [here](https://github.com/ceramicnetwork/rust-ceramic?tab=readme-ov-file#linux---debian-based-distributions).
:::

1. Install the component using [Homebrew](https://brew.sh/):

```bash
brew install ceramicnetwork/tap/ceramic-one
```

2. Start the `ceramic-one` using the following command:
```bash
ceramic-one daemon
```

:::note
By default, the command above will spin off a node which connects to a `clay-testnet` network. You can change this behaviour by providing a `--network` flag and specifying a network of your choice. For example:

```ceramic-one daemon --network clay-testnet```
:::


By default `ceramic-one` will store its data in the current directory. You can configure this behaviour by
specifying the `--store-dir`and `--p2p-key-dir` arguments. For example:

```bash
ceramic-one daemon --store-dir ~/.ceramic-one --p2p-key-dir ~/.ceramic-one
```


With `ceramic-one` binary up and running you can move on with the ComposeDB installation and configuration method of your choice.


---

### 2a. Installation using create-ceramic-app
Expand Down Expand Up @@ -145,8 +184,9 @@ GRANT ALL PRIVILEGES ON DATABASE "ceramic" to ceramic;
```

#### Configure the development environment
Make sure you have the `ceramic-one` binary up and running. To do that, follow the steps listed [here](#2-installation).

Once you have taken care of the prerequisites above, use Wheel to install all of the dependencies needed to run Ceramic and ComposeDB as well as configure the working environment
Now you can use Wheel to install all of the dependencies needed to run Ceramic and ComposeDB as well as configure the working environment
for your project.

To download Wheel, run the command below:
Expand Down Expand Up @@ -296,6 +336,10 @@ node -v
pnpm -v
```

→ **ceramic-one**

Make sure you have the `ceramic-one` binary up and running. To do that, follow the steps listed [here](#2-installation).

→ **Ceramic**

ComposeDB runs on Ceramic, so you will need to run a Ceramic node. To get started, we recommend running a local Ceramic node. If you're interested in running the production node, you can follow one of the [guides here](./guides/composedb-server/).
Expand Down
16 changes: 9 additions & 7 deletions docs/introduction/technical-reqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ Ceramic is a decentralized data storage network made up of different components,

To make it easier to grasp, you can think about implementing Ceramic just like you might think about implementing a traditional SQL or PostgreSQL database.

When integrating with Ceramic, you will be running three pieces of server software:
When integrating with Ceramic, you will be running a few different services and components, each serving a specific purpose for running your application:

- Ceramic node
- PostgreSQL
- IPFS node
- `js-ceramic` - provides the HTTP API access for connected clients to read the streams stored on the Ceramic network
- `ceramic-one` - responsible for storing the actual data and coordinate with network participants.
- `PostgreSQL` - used for indexing data
- `Ethereum RPC node API access` - required to validate Ceramic Anchor Service (CAS) anchors.
- `Ceramic Anchor Service (CAS) access` - Anchors Ceramic protocol proofs to the blockchain. This service is currently funded by 3box Labs, however, eventually, this function will be provided by node operators and with some expected cost.

Ceramic and IPFS nodes are simply pieces of software than run on a server. PostgreSQL is a type of traditional database.
Ceramic nodes are simply pieces of software than run on a server. PostgreSQL is a type of traditional database.

## Hardware requirements

Expand Down Expand Up @@ -46,13 +48,13 @@ As your project scales, you may need to expand your storage beyond 180GB.

### Advanced (heavy throughput)

Advanced users may want to consider running the PostgreSQL database on a different server than the Ceramic node + IPFS node. If you choose to run them on different servers, a VPC can be used to establish the communication between them.
Advanced users may want to consider running the PostgreSQL database on a different server than the Ceramic node. If you choose to run them on different servers, a VPC can be used to establish the communication between them.



<div style={{ display: "flex", justifyContent: "flex-start" }}>
<div style={{ marginRight: "100px" }}>
<div style={{ fontWeight: "bold", marginBottom: "8px" }}>Ceramic node + IPFS node</div>
<div style={{ fontWeight: "bold", marginBottom: "8px" }}>Ceramic node</div>
<table style={{ borderCollapse: "collapse", width: "100%" }}>
<thead>
<tr>
Expand Down
Loading
Loading