Skip to content

Commit 8bd5218

Browse files
authored
docs: added information on deploying the indexer (#1037)
1 parent 0513f43 commit 8bd5218

File tree

4 files changed

+579
-8
lines changed

4 files changed

+579
-8
lines changed

docker/compose/movement-indexer/README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
### Run docker compose setup locally version `89586b190bfe88a3e9cd9d9d0e1025caa0185d94`
2+
23
1. Run the `movement-full-node` and `movement-indexer` locally
4+
35
```bash
46
rm -rf ~/.movement/* \
57
&& docker compose \
@@ -11,7 +13,8 @@ rm -rf ~/.movement/* \
1113
up
1214
```
1315

14-
2. in second terminal star the indexer
16+
1. in second terminal star the indexer
17+
1518
```bash
1619
docker compose \
1720
--env-file docker/compose/movement-indexer/.env \
@@ -22,9 +25,10 @@ docker compose \
2225
logs movement-indexer
2326
```
2427

25-
### Run docker compose setup locally version `247a02657800d56b36f3c49f8ab01b125e54163a`
28+
### Run docker compose setup locally version `247a02657800d56b36f3c49f8ab01b125e54163a`
2629

2730
Run the `movement-full-node`, `movement-indexer` and `movement-hasura` locally
31+
2832
```bash
2933
rm -rf ~/.movement/* \
3034
; docker volume rm $(docker volume ls -q) \
@@ -39,7 +43,8 @@ rm -rf ~/.movement/* \
3943

4044
### Connect an indexer running locally to a movement-node running in AWS
4145

42-
1. In one terminal start port forwarding from localhost to suzka-node running in aws
46+
1. In one terminal start port forwarding from localhost to movement-node running in aws
47+
4348
```bash
4449
INSTANCE_ID=i-0a617bd<snip>
4550
aws ssm start-session \
@@ -50,20 +55,23 @@ aws ssm start-session \
5055
```
5156

5257
test
58+
5359
```bash
5460
# brew install grpcurl
5561
grpcurl -plaintext localhost:30734 list aptos.indexer.v1.RawData
5662
```
5763

58-
2. Make sure that all other containers are stop
64+
2. Make sure that all other containers are stoped
65+
5966
```bash
6067
docker ps
6168
```
6269

63-
3. Clean previous runs and create required `config.json` by the indexer in the
70+
3. Clean previous runs and create required `config.json` by the indexer in the
6471
proper location.
6572

6673
In another terminal
74+
6775
```bash
6876

6977
GIT_ROOT=$(git rev-parse --show-toplevel)
@@ -81,6 +89,7 @@ docker rm -f $(docker ps -aq) \
8189
```
8290

8391
logs
92+
8493
```bash
8594
docker compose \
8695
--env-file docker/compose/movement-indexer/.remote-movement-node.env \
@@ -89,6 +98,7 @@ docker compose \
8998
```
9099

91100
attach to movement-indexer container
101+
92102
```bash
93103
docker compose \
94104
--env-file docker/compose/movement-indexer/.remote-movement-node.env \
@@ -97,6 +107,7 @@ docker compose \
97107
```
98108

99109
check if indexer can reach remote rpc
110+
100111
```bash
101112
docker compose \
102113
--env-file docker/compose/movement-indexer/.remote-movement-node.env \
@@ -105,24 +116,29 @@ docker compose \
105116
```
106117

107118
check size of local DB on disk
119+
108120
```bash
109121
docker run --rm -v movement-indexer_postgres_data:/volume alpine sh -c "du -sh /volume"
110122
```
111123

112124
### Connect to postgres db
113125

114126
Attach to the postgres container
127+
115128
```bash
116129
docker exec -it postgres bash
117130
```
118131

119132
Use `psql` to connect to the database. Password is `postgres`
133+
120134
```bash
121135
psql --username=postgres --dbname=postgres --host=127.0.0.1 --password
122136
```
123137

124138
### Hasura
139+
125140
Docs:
141+
126142
- https://hasura.io/docs/2.0/auth/quickstart/
127143
- https://hasura.io/docs/2.0/auth/quickstart/#step-2-create-a-user-role
128144
- https://hasura.io/docs/2.0/auth/authentication/unauthenticated-access/
@@ -144,9 +160,9 @@ A manual second step is needed to add a header `Authorization Bearer tokenValue`
144160
(stored in 1password)
145161

146162
#### Update hasura metadata
147-
To update the Hasura metadata use this command in the movement root folder:
148163

164+
To update the Hasura metadata use this command in the movement root folder:
149165

150166
```bash
151167
INDEXER_API_URL=https://indexer.testnet.porto.movementnetwork.xyz HASURA_ADMIN_AUTH_KEY=<auth key> POSTGRES_DB_URL=postgres://<login>:<password>@<host>:5432/postgres cargo run -p movement-indexer-service --bin load_metadata
152-
```
168+
```

docs/explorer/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Explorer Reference Implementation
2+
3+
Repository: https://github.com/movementlabsxyz/explorer/tree/suzuka
4+
5+
This implementation is a modified version of the Aptos explorer.
6+
7+
`AptosClient` and `Types` from the [Aptos TypeScript SDK](https://github.com/aptos-labs/aptos-ts-sdk) provide methods and types for interacting with Movement Network Testnet.

0 commit comments

Comments
 (0)