Skip to content

Commit

Permalink
Merge pull request #30 from ceramicnetwork/adding-node-running-items
Browse files Browse the repository at this point in the history
adding node running items
  • Loading branch information
JustinaPetr authored Nov 24, 2023
2 parents 3e83cb0 + 57432fb commit 4a74796
Show file tree
Hide file tree
Showing 9 changed files with 93 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/introduction/protocol-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The Ceramic protocol consists of the following components:
- [**Accounts →**](../protocol/js-ceramic/accounts/accounts-index.md)
- [**Networking →**](../protocol/js-ceramic/networking/networking-index.md)
- [**Ceramic API →**](../protocol/js-ceramic/api.md)
- [**Ceramic Nodes →**](../protocol/js-ceramic/nodes.md)
- [**Ceramic Nodes →**](../protocol/js-ceramic/nodes/overview.md)


## Specification Status
Expand All @@ -38,7 +38,7 @@ The Ceramic protocol consists of the following components:
| [3.3. Event Fetching](../protocol/js-ceramic/networking/event-fetching) | **[<span styles="color:rgba(68, 131, 97, 1)">Reliable</span>](../protocol/js-ceramic/networking/event-fetching)** |
| [3.4. Network Identifiers](../protocol/js-ceramic/networking/networks) | **[<span styles="color:rgba(68, 131, 97, 1)">Reliable</span>](../protocol/js-ceramic/networking/networks)** |
| [4. API](../protocol/js-ceramic/api) | **[<span styles="color:rgba(212, 76, 71, 1)">Missing</span>](../protocol/js-ceramic/api)** |
| [5. Nodes](../protocol/js-ceramic/nodes) | **[<span styles="color:rgba(203, 145, 47, 1)">Draft/WIP</span>](../protocol/js-ceramic/nodes)** |
| [5. Nodes](../protocol/js-ceramic/nodes/overview) | **[<span styles="color:rgba(203, 145, 47, 1)">Draft/WIP</span>](../protocol/js-ceramic/nodes/overview)** |

#### **Legend**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ async function authenticateCeramic(seed) {

### Authenticate the user

::caution
:::caution

This will flow will vary slightly depending on which account provider library you use. Please see the documentation specific to your provider library.
::
:::

```ts
import { CeramicClient } from '@ceramicnetwork/http-client'
Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/js-ceramic/networking/networking-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Ceramic streams and nodes are grouped into independent networks. These networks

### [Networks](networks.md)

Networks are collections of Ceramic [nodes](../nodes.md) that share specific configurations and communicate over dedicated [libp2p](https://libp2p.io/) pubsub topics. They are easily identified by a path string, for example `/ceramic/mainnet` .
Networks are collections of Ceramic [nodes](../nodes/overview.md) that share specific configurations and communicate over dedicated [libp2p](https://libp2p.io/) pubsub topics. They are easily identified by a path string, for example `/ceramic/mainnet` .

### [Tip Gossip](tip-gossip.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/protocol/js-ceramic/networking/networks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Information about the default Ceramic networks
## Overview
---

Networks are collections of Ceramic [nodes](../nodes.md) that share specific configurations and communicate over dedicated [libp2p](https://libp2p.io/) pubsub topics. Networks are disjoint from one another; streamsthat exist on one network are **not** discoverable or usable on another.
Networks are collections of Ceramic [nodes](../nodes/overview.md) that share specific configurations and communicate over dedicated [libp2p](https://libp2p.io/) pubsub topics. Networks are disjoint from one another; streamsthat exist on one network are **not** discoverable or usable on another.

These pubsub topics are used to relay all messages for the defined networking sub protocols, including [Tip Gossip](tip-gossip.md) and [Tip Queries](tip-queries.md).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Nodes
# Nodes Overview
---
Two types of nodes currently work together to support the Ceramic network.

Expand Down
54 changes: 54 additions & 0 deletions docs/protocol/js-ceramic/nodes/running-a-node.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Running a Node
---
This will help explain how to run a Ceramic Node and some other specifics that are recommended to make sure your node is running smoothly.

## Installation
---

### Install and Run the Ceramic CLI

This can be installed from NPM and updated through NPM by using the following command:

```bash
npx @ceramicnetwork/cli daemon
```

This will install the CLI and start the daemon. This will allow all of the initial files to be created. This will successfully have a node running on the Clay TestNet.

## Operations Considerations
---

### Log Rotate

As a node runs for sometime if you enable the log to files you will want to enable `logrotate` to ensure that your node does not overfill the hard drive. This can be done by following the following steps:

1. Install `logrotate` using the following command:

```bash
sudo apt install logrotate
```

2. Create a file in `/etc/logrotate.d/ceramic` with the following contents:

```bash
/home/ubuntu/.ceramic/logs/*.log {
daily
missingok
rotate 7
compress
delaycompress
notifempty
create 0640 ubuntu ubuntu
sharedscripts
postrotate
systemctl restart ceramic
endscript
}
```

3. Enable and Start the `logrotate` service using the following commands:

```bash
sudo systemctl enable logrotate
sudo systemctl start logrotate
```
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"clsx": "^2.0.0",
"graphiql": "^3.0.9",
"graphql": "^16.8.1",
"graphql-ws": "^5.14.2",
"prism-react-renderer": "^2.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
29 changes: 21 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,17 @@ const sidebars: SidebarsConfig = {
],
},
{
type: 'doc',
id: 'protocol/js-ceramic/nodes',
type: 'category',
collapsed: false,
label: 'Nodes',
link: {
type: 'doc',
id: 'protocol/js-ceramic/nodes/overview',
},
items: [
{ type: 'doc', id: 'protocol/js-ceramic/nodes/overview', label: 'Overview' },
{ type: 'doc', id: 'protocol/js-ceramic/nodes/running-a-node', label: 'Running a Node' },
],
},
{
type: 'doc',
Expand Down

0 comments on commit 4a74796

Please sign in to comment.