mirror of
https://github.com/logos-storage/logos-storage-docs.git
synced 2026-01-02 21:33:07 +00:00
Add Quick start guide (#3)
* Add links to the existing guides on Run Codex page * Add Codex/Geth bootstrap nodes and endpoints to the Testnet page * Initial version of the Quick start page * Fix bad links on Quick start page * Install dependencies in Quick start guide * minor language upgrades * Copies over disclaimer from testnet-starter repo * octet-stream type for upload * Add Disclaimer Codex page to the sidebar * Adjust Quick start guide to auto-detect platform and architecture --------- Co-authored-by: Ben <thatbenbierens@gmail.com>
This commit is contained in:
parent
f06e3bae3d
commit
b405bd1973
@ -74,6 +74,7 @@ export default defineConfig({
|
||||
collapsed: false,
|
||||
items: [
|
||||
{ text: 'What is Codex?', link: '/learn/what-is-codex' },
|
||||
{ text: 'Disclaimer Codex', link: '/codex/disclaimer' },
|
||||
{ text: 'Quick start', link: '/learn/quick-start' },
|
||||
{ text: 'Architecture', link: '/learn/architecture' },
|
||||
{ text: 'Marketplace', link: '/learn/marketplace' },
|
||||
|
||||
5
codex/disclaimer.md
Normal file
5
codex/disclaimer.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Disclaimer Codex
|
||||
|
||||
The code and instructions provided within this repository and related repositories are provided “as-is”, without warranty of any kind, express or implied, including but not limited to the safety or correctness, or performance of the code or instructions provided. We make no assurance that the code will work as intended, and users may experience delays, failures, errors, omissions or loss of transmitted information whilst using or running Codex.
|
||||
|
||||
Running Codex is done at your own risk. As such, we are not responsible nor liable for any damage that may occur to your hardware, software, data, or network, or for any loss, claim, damage of whatever nature, or other liability arising from or in connection with the use of the provided code and instructions.
|
||||
@ -1,7 +1,143 @@
|
||||
# Quick start
|
||||
|
||||
Work in progress :construction:
|
||||
To start using Codex we would need to perform the following steps:
|
||||
- [Review the disclaimer](/codex/disclaimer)
|
||||
- [Get Codex binary](#get-codex-binary)
|
||||
- [Run Codex](#run-codex)
|
||||
- [Interact with Codex](#interact-with-codex)
|
||||
|
||||
Please read
|
||||
- [Codex Two-Client Test](https://github.com/codex-storage/nim-codex/blob/master/docs/TwoClientTest.md)
|
||||
- [Running a Local Codex Network with Marketplace Support](https://github.com/codex-storage/nim-codex/blob/master/docs/Marketplace.md)
|
||||
### Get Codex binary
|
||||
|
||||
For quick start we will use precompiled binaries from [GitHub release page](https://github.com/codex-storage/nim-codex/releases). If you prefer to compile from the sources, please check [Build Codex](/learn/build).
|
||||
|
||||
1. Download binary and checksum for your platform/architecture
|
||||
|
||||
**Linux/macOS**
|
||||
```shell
|
||||
version=v0.1.3
|
||||
platform=$(echo `uname -s` | awk '{print tolower($0)}')
|
||||
architecture=$([[ `uname -m` == 'x86_64' ]] && echo amd64 || echo arm64)
|
||||
|
||||
# Binary
|
||||
curl -LO https://github.com/codex-storage/nim-codex/releases/download/${version}/codex-${version}-${platform}-${architecture}.tar.gz
|
||||
|
||||
# Checksum
|
||||
curl -LO https://github.com/codex-storage/nim-codex/releases/download/${version}/codex-${version}-${platform}-${architecture}.tar.gz.sha256
|
||||
```
|
||||
|
||||
2. Verify checksum
|
||||
```shell
|
||||
# Linux
|
||||
sha256sum -c codex-${version}-${platform}-${architecture}.tar.gz.sha256
|
||||
|
||||
# macOS
|
||||
shasum -a 256 -c codex-${version}-${platform}-${architecture}.tar.gz.sha256
|
||||
```
|
||||
Make sure you get `OK` in the result
|
||||
```
|
||||
codex-v0.1.3-linux-amd64.tar.gz: OK
|
||||
```
|
||||
|
||||
3. Extract binary
|
||||
```shell
|
||||
tar -zxvf codex-${version}-${platform}-${architecture}.tar.gz
|
||||
```
|
||||
|
||||
4. Copy binary to the appropriate folder
|
||||
```shell
|
||||
sudo install codex-${version}-${platform}-${architecture} /usr/local/bin/codex
|
||||
```
|
||||
|
||||
5. Install dependencies
|
||||
```shell
|
||||
# Debian-based Linux
|
||||
sudo apt update && sudo apt install libgomp1
|
||||
```
|
||||
|
||||
6. Check the result
|
||||
```shell
|
||||
codex --version
|
||||
```
|
||||
```shell
|
||||
Codex version: v0.1.3
|
||||
Codex revision: 89917d4
|
||||
Nim Compiler Version 1.6.14 [Linux: amd64]
|
||||
```
|
||||
|
||||
7. Cleanup
|
||||
```shell
|
||||
rm -f \
|
||||
codex-${version}-${platform}-${architecture} \
|
||||
codex-${version}-${platform}-${architecture}.tar.gz \
|
||||
codex-${version}-${platform}-${architecture}.tar.gz.sha256
|
||||
```
|
||||
|
||||
|
||||
### Run Codex
|
||||
|
||||
Currently, we can run Codex in two modes:
|
||||
- **Client node** - you can upload/download files and purchase storage
|
||||
- **Storage node** - you can sell your local storage
|
||||
|
||||
For quick start we will run a Codex client node as an easy way to get started. If you would like to run a storage node please follow [Run Codex](/learn/run) and [Codex Testnet](/networks/testnet) guides.
|
||||
|
||||
1. Run Codex client node
|
||||
```shell
|
||||
codex \
|
||||
--data-dir=./data \
|
||||
--api-cors-origin="*" \
|
||||
--nat=`curl -s https://ip.codex.storage` \
|
||||
--disc-port=8090 \
|
||||
--listen-addrs=/ip4/0.0.0.0/tcp/8070 \
|
||||
--bootstrap-node=spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O2s8Mxp8l9c8EW0CIC-h-H-jBVSgFjg3Eny2u33qF7BDnWFzo7fGfZ7_qc9P
|
||||
```
|
||||
::: tip
|
||||
In the example above we use [Codex Testnet](/networks/testnet#bootstrap-nodes) bootstrap nodes and thus we join Testnet. If you would like to join a different network, please use [appropriate value](/networks/networks).
|
||||
:::
|
||||
|
||||
2. Configure port-forwarding for the TCP/UDP ports on your Internet router
|
||||
| Protocol | Service | Port |
|
||||
| -------- | --------- | ------ |
|
||||
| UDP | Discovery | `8090` |
|
||||
| TCP | Transport | `8070` |
|
||||
|
||||
### Interact with Codex
|
||||
|
||||
After we performed the steps above, we have a Codex client node up and running and can interact with it using [Codex API](/developers/api).
|
||||
|
||||
We can perform basic tasks:
|
||||
|
||||
**Check node information**
|
||||
```shell
|
||||
curl http://localhost:8080/api/codex/v1/debug/info \
|
||||
--write-out '\n'
|
||||
```
|
||||
|
||||
**Upload file**
|
||||
::: warning
|
||||
Once you upload a file to Codex, other nodes in the network can download it.
|
||||
:::
|
||||
```shell
|
||||
curl --request POST \
|
||||
http://localhost:8080/api/codex/v1/data \
|
||||
--header 'Content-Type: application/octet-stream' \
|
||||
--write-out '\n' \
|
||||
-T <FILE>
|
||||
```
|
||||
You will get CID when upload will be finished.
|
||||
|
||||
**Download file**
|
||||
```shell
|
||||
CID="..." # paste your CID from the previous step here between the quotes.
|
||||
```
|
||||
```shell
|
||||
curl http://localhost:8080/api/codex/v1/data/${CID}/network -o ${CID}
|
||||
```
|
||||
|
||||
### Next steps
|
||||
|
||||
Now we have a Codex node up and running and know how to interact with it.
|
||||
|
||||
For more advanced use cases, please check the following guides:
|
||||
- [Run Codex](/learn/run)
|
||||
- [Codex Testnet](/networks/testnet)
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
# Run Codex
|
||||
|
||||
Work in progress :construction:
|
||||
|
||||
Please read
|
||||
- [Codex Two-Client Test](https://github.com/codex-storage/nim-codex/blob/master/docs/TwoClientTest.md)
|
||||
- [Running a Local Codex Network with Marketplace Support](https://github.com/codex-storage/nim-codex/blob/master/docs/Marketplace.md)
|
||||
|
||||
@ -3,3 +3,39 @@
|
||||
Work in progress :construction:
|
||||
|
||||
Please follow [Codex Testnet Starter](https://testnet.codex.storage).
|
||||
|
||||
|
||||
### Testnet data
|
||||
|
||||
#### Bootstrap nodes
|
||||
**Codex**
|
||||
```shell
|
||||
spr:CiUIAhIhAiJvIcA_ZwPZ9ugVKDbmqwhJZaig5zKyLiuaicRcCGqLEgIDARo8CicAJQgCEiECIm8hwD9nA9n26BUoNuarCEllqKDnMrIuK5qJxFwIaosQ3d6esAYaCwoJBJ_f8zKRAnU6KkYwRAIgM0MvWNJL296kJ9gWvfatfmVvT-A7O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jeZrzh43sn5mp8jt6ENIb08tLn4x01EgIDARo8CicAJQgCEiECDJuZHBuioN1QmN5mvOHjeyfmanyO3oQ0hvTy0ufjHTUQh4ifsAYaCwoJBI_0zSiRAnVsKkcwRQIhAJCb_z0E3RsnQrEePdJzMSQrmn_ooHv6mbw1DOh5IbVNAiBbBJrWR8eBV6ftzMd6ofa5khNA2h88OBhMqHCIzSjCeA
|
||||
spr:CiUIAhIhAntGLadpfuBCD9XXfiN_43-V3L5VWgFCXxg4a8uhDdnYEgIDARo8CicAJQgCEiECe0Ytp2l-4EIP1dd-I3_jf5XcvlVaAUJfGDhry6EN2dgQsIufsAYaCwoJBNEmoCiRAnV2KkYwRAIgXO3bzd5VF8jLZG8r7dcLJ_FnQBYp1BcxrOvovEa40acCIDhQ14eJRoPwJ6GKgqOkXdaFAsoszl-HIRzYcXKeb7D9
|
||||
```
|
||||
|
||||
**Geth**
|
||||
```shell
|
||||
enode://cff0c44c62ecd6e00d72131f336bb4e4968f2c1c1abeca7d4be2d35f818608b6d8688b6b65a18f1d57796eaca32fd9d08f15908a88afe18c1748997235ea6fe7@159.223.243.50:40010
|
||||
enode://ea331eaa8c5150a45b793b3d7c17db138b09f7c9dd7d881a1e2e17a053e0d2600e0a8419899188a87e6b91928d14267949a7e6ec18bfe972f3a14c5c2fe9aecb@68.183.245.13:40030
|
||||
enode://4a7303b8a72db91c7c80c8fb69df0ffb06370d7f5fe951bcdc19107a686ba61432dc5397d073571433e8fc1f8295127cabbcbfd9d8464b242b7ad0dcd35e67fc@174.138.127.95:40020
|
||||
enode://36f25e91385206300d04b95a2f8df7d7a792db0a76bd68f897ec7749241b5fdb549a4eecfab4a03c36955d1242b0316b47548b87ad8291794ab6d3fecda3e85b@64.225.89.147:40040
|
||||
enode://2e14e4a8092b67db76c90b0a02d97d88fc2bb9df0e85df1e0a96472cdfa06b83d970ea503a9bc569c4112c4c447dbd1e1f03cf68471668ba31920ac1d05f85e3@170.64.249.54:40050
|
||||
enode://6eeb3b3af8bef5634b47b573a17477ea2c4129ab3964210afe3b93774ce57da832eb110f90fbfcfa5f7adf18e55faaf2393d2e94710882d09d0204a9d7bc6dd2@143.244.205.40:40060
|
||||
enode://6ba0e8b5d968ca8eb2650dd984cdcf50acc01e4ea182350e990191aadd79897801b79455a1186060aa3818a6bc4496af07f0912f7af53995a5ddb1e53d6f31b5@209.38.160.40:40070
|
||||
```
|
||||
|
||||
#### Endpoints
|
||||
|
||||
| # | Service | URL |
|
||||
| - | --------------- | ---------------------------------------------------------------------------- |
|
||||
| 1 | Geth Public RPC | [rpc.testnet.codex.storage](https://rpc.testnet.codex.storage) |
|
||||
| 2 | Block explorer | [explorer.testnet.codex.storage](https://explorer.testnet.codex.storage) |
|
||||
| 3 | Faucet ETH | [faucet-eth.testnet.codex.storage](https://faucet-eth.testnet.codex.storage) |
|
||||
| 4 | Faucet TST | [faucet-tst.testnet.codex.storage](https://faucet-tst.testnet.codex.storage) |
|
||||
| 5 | Status page | [status.testnet.codex.storage](https://status.testnet.codex.storage) |
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user