Neon-readme-11.sh
· 1.5 KiB · Bash
Исходник
# Create repository in .neon with proper paths to binaries and data
# Later that would be responsibility of a package install script
> cargo neon init
Initializing pageserver node 1 at '127.0.0.1:64000' in ".neon"
# start pageserver, safekeeper, and broker for their intercommunication
> cargo neon start
Starting neon broker at 127.0.0.1:50051.
storage_broker started, pid: 2918372
Starting pageserver node 1 at '127.0.0.1:64000' in ".neon".
pageserver started, pid: 2918386
Starting safekeeper at '127.0.0.1:5454' in '.neon/safekeepers/sk1'.
safekeeper 1 started, pid: 2918437
# create initial tenant and use it as a default for every future neon_local invocation
> cargo neon tenant create --set-default
tenant 9ef87a5bf0d92544f6fafeeb3239695c successfully created on the pageserver
Created an initial timeline 'de200bd42b49cc1814412c7e592dd6e9' at Lsn 0/16B5A50 for tenant: 9ef87a5bf0d92544f6fafeeb3239695c
Setting tenant 9ef87a5bf0d92544f6fafeeb3239695c as a default one
# create postgres compute node
> cargo neon endpoint create main
# start postgres compute node
> cargo neon endpoint start main
Starting new endpoint main (PostgreSQL v14) on timeline de200bd42b49cc1814412c7e592dd6e9 ...
Starting postgres at 'postgresql://cloud_admin@127.0.0.1:55432/postgres'
# check list of running postgres instances
> cargo neon endpoint list
ENDPOINT ADDRESS TIMELINE BRANCH NAME LSN STATUS
main 127.0.0.1:55432 de200bd42b49cc1814412c7e592dd6e9 main 0/16B5BA8 running
1 | # Create repository in .neon with proper paths to binaries and data |
2 | # Later that would be responsibility of a package install script |
3 | > cargo neon init |
4 | Initializing pageserver node 1 at '127.0.0.1:64000' in ".neon" |
5 | |
6 | # start pageserver, safekeeper, and broker for their intercommunication |
7 | > cargo neon start |
8 | Starting neon broker at 127.0.0.1:50051. |
9 | storage_broker started, pid: 2918372 |
10 | Starting pageserver node 1 at '127.0.0.1:64000' in ".neon". |
11 | pageserver started, pid: 2918386 |
12 | Starting safekeeper at '127.0.0.1:5454' in '.neon/safekeepers/sk1'. |
13 | safekeeper 1 started, pid: 2918437 |
14 | |
15 | # create initial tenant and use it as a default for every future neon_local invocation |
16 | > cargo neon tenant create --set-default |
17 | tenant 9ef87a5bf0d92544f6fafeeb3239695c successfully created on the pageserver |
18 | Created an initial timeline 'de200bd42b49cc1814412c7e592dd6e9' at Lsn 0/16B5A50 for tenant: 9ef87a5bf0d92544f6fafeeb3239695c |
19 | Setting tenant 9ef87a5bf0d92544f6fafeeb3239695c as a default one |
20 | |
21 | # create postgres compute node |
22 | > cargo neon endpoint create main |
23 | |
24 | # start postgres compute node |
25 | > cargo neon endpoint start main |
26 | Starting new endpoint main (PostgreSQL v14) on timeline de200bd42b49cc1814412c7e592dd6e9 ... |
27 | Starting postgres at 'postgresql://cloud_admin@127.0.0.1:55432/postgres' |
28 | |
29 | # check list of running postgres instances |
30 | > cargo neon endpoint list |
31 | ENDPOINT ADDRESS TIMELINE BRANCH NAME LSN STATUS |
32 | main 127.0.0.1:55432 de200bd42b49cc1814412c7e592dd6e9 main 0/16B5BA8 running |