renamed .zenith data-dir to .neon.

This commit is contained in:
chaitanya sharma
2022-06-01 19:30:47 +00:00
committed by Egor Suvorov
parent a4d8261390
commit e1336f451d
15 changed files with 31 additions and 31 deletions

View File

@@ -57,7 +57,7 @@
args: args:
creates: "/storage/pageserver/data/tenants" creates: "/storage/pageserver/data/tenants"
environment: environment:
ZENITH_REPO_DIR: "/storage/pageserver/data" NEON_REPO_DIR: "/storage/pageserver/data"
LD_LIBRARY_PATH: "/usr/local/lib" LD_LIBRARY_PATH: "/usr/local/lib"
become: true become: true
tags: tags:
@@ -131,7 +131,7 @@
args: args:
creates: "/storage/safekeeper/data/safekeeper.id" creates: "/storage/safekeeper/data/safekeeper.id"
environment: environment:
ZENITH_REPO_DIR: "/storage/safekeeper/data" NEON_REPO_DIR: "/storage/safekeeper/data"
LD_LIBRARY_PATH: "/usr/local/lib" LD_LIBRARY_PATH: "/usr/local/lib"
become: true become: true
tags: tags:

View File

@@ -5,7 +5,7 @@ After=network.target auditd.service
[Service] [Service]
Type=simple Type=simple
User=pageserver User=pageserver
Environment=RUST_BACKTRACE=1 ZENITH_REPO_DIR=/storage/pageserver LD_LIBRARY_PATH=/usr/local/lib Environment=RUST_BACKTRACE=1 NEON_REPO_DIR=/storage/pageserver LD_LIBRARY_PATH=/usr/local/lib
ExecStart=/usr/local/bin/pageserver -c "pg_distrib_dir='/usr/local'" -c "listen_pg_addr='0.0.0.0:6400'" -c "listen_http_addr='0.0.0.0:9898'" -c "broker_endpoints=['{{ etcd_endpoints }}']" -D /storage/pageserver/data ExecStart=/usr/local/bin/pageserver -c "pg_distrib_dir='/usr/local'" -c "listen_pg_addr='0.0.0.0:6400'" -c "listen_http_addr='0.0.0.0:9898'" -c "broker_endpoints=['{{ etcd_endpoints }}']" -D /storage/pageserver/data
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed KillMode=mixed

View File

@@ -5,7 +5,7 @@ After=network.target auditd.service
[Service] [Service]
Type=simple Type=simple
User=safekeeper User=safekeeper
Environment=RUST_BACKTRACE=1 ZENITH_REPO_DIR=/storage/safekeeper/data LD_LIBRARY_PATH=/usr/local/lib Environment=RUST_BACKTRACE=1 NEON_REPO_DIR=/storage/safekeeper/data LD_LIBRARY_PATH=/usr/local/lib
ExecStart=/usr/local/bin/safekeeper -l {{ inventory_hostname }}.local:6500 --listen-http {{ inventory_hostname }}.local:7676 -p {{ first_pageserver }}:6400 -D /storage/safekeeper/data --broker-endpoints={{ etcd_endpoints }} --remote-storage='{bucket_name="{{bucket_name}}", bucket_region="{{bucket_region}}", prefix_in_bucket="wal"}' ExecStart=/usr/local/bin/safekeeper -l {{ inventory_hostname }}.local:6500 --listen-http {{ inventory_hostname }}.local:7676 -p {{ first_pageserver }}:6400 -D /storage/safekeeper/data --broker-endpoints={{ etcd_endpoints }} --remote-storage='{bucket_name="{{bucket_name}}", bucket_region="{{bucket_region}}", prefix_in_bucket="wal"}'
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed KillMode=mixed

View File

@@ -9,8 +9,8 @@ tmp_install
tmp_check_cli tmp_check_cli
test_output test_output
.vscode .vscode
.zenith .neon
integration_tests/.zenith integration_tests/.neon
.mypy_cache .mypy_cache
Dockerfile Dockerfile

4
.gitignore vendored
View File

@@ -6,8 +6,8 @@ __pycache__/
test_output/ test_output/
.vscode .vscode
.idea .idea
/.zenith /.neon
/integration_tests/.zenith /integration_tests/.neon
# Coverage # Coverage
*.profraw *.profraw

View File

@@ -6,5 +6,5 @@ target/
tmp_install/ tmp_install/
__pycache__/ __pycache__/
test_output/ test_output/
.zenith/ .neon/
.git/ .git/

View File

@@ -93,7 +93,7 @@ Python (3.9 or higher), and install python3 packages using `./scripts/pysync` (r
#### running neon database #### running neon database
1. Start pageserver and postgres on top of it (should be called from repo root): 1. Start pageserver and postgres on top of it (should be called from repo root):
```sh ```sh
# Create repository in .zenith with proper paths to binaries and data # Create repository in .neon with proper paths to binaries and data
# Later that would be responsibility of a package install script # Later that would be responsibility of a package install script
> ./target/debug/neon_local init > ./target/debug/neon_local init
initializing tenantid 9ef87a5bf0d92544f6fafeeb3239695c initializing tenantid 9ef87a5bf0d92544f6fafeeb3239695c
@@ -103,16 +103,16 @@ pageserver init succeeded
# start pageserver and safekeeper # start pageserver and safekeeper
> ./target/debug/neon_local start > ./target/debug/neon_local start
Starting pageserver at '127.0.0.1:64000' in '.zenith' Starting pageserver at '127.0.0.1:64000' in '.neon'
Pageserver started Pageserver started
initializing for sk 1 for 7676 initializing for sk 1 for 7676
Starting safekeeper at '127.0.0.1:5454' in '.zenith/safekeepers/sk1' Starting safekeeper at '127.0.0.1:5454' in '.neon/safekeepers/sk1'
Safekeeper started Safekeeper started
# start postgres compute node # start postgres compute node
> ./target/debug/neon_local pg start main > ./target/debug/neon_local pg start main
Starting new postgres main on timeline de200bd42b49cc1814412c7e592dd6e9 ... Starting new postgres main on timeline de200bd42b49cc1814412c7e592dd6e9 ...
Extracting base backup to create postgres instance: path=.zenith/pgdatadirs/tenants/9ef87a5bf0d92544f6fafeeb3239695c/main port=55432 Extracting base backup to create postgres instance: path=.neon/pgdatadirs/tenants/9ef87a5bf0d92544f6fafeeb3239695c/main port=55432
Starting postgres node at 'host=127.0.0.1 port=55432 user=cloud_admin dbname=postgres' Starting postgres node at 'host=127.0.0.1 port=55432 user=cloud_admin dbname=postgres'
# check list of running postgres instances # check list of running postgres instances
@@ -149,7 +149,7 @@ Created timeline 'b3b863fa45fa9e57e615f9f2d944e601' at Lsn 0/16F9A00 for tenant:
# start postgres on that branch # start postgres on that branch
> ./target/debug/neon_local pg start migration_check --branch-name migration_check > ./target/debug/neon_local pg start migration_check --branch-name migration_check
Starting new postgres migration_check on timeline b3b863fa45fa9e57e615f9f2d944e601 ... Starting new postgres migration_check on timeline b3b863fa45fa9e57e615f9f2d944e601 ...
Extracting base backup to create postgres instance: path=.zenith/pgdatadirs/tenants/9ef87a5bf0d92544f6fafeeb3239695c/migration_check port=55433 Extracting base backup to create postgres instance: path=.neon/pgdatadirs/tenants/9ef87a5bf0d92544f6fafeeb3239695c/migration_check port=55433
Starting postgres node at 'host=127.0.0.1 port=55433 user=cloud_admin dbname=postgres' Starting postgres node at 'host=127.0.0.1 port=55433 user=cloud_admin dbname=postgres'
# check the new list of running postgres instances # check the new list of running postgres instances

View File

@@ -21,9 +21,9 @@ use utils::{
use crate::safekeeper::SafekeeperNode; use crate::safekeeper::SafekeeperNode;
// //
// This data structures represents zenith CLI config // This data structures represents neon_local CLI config
// //
// It is deserialized from the .zenith/config file, or the config file passed // It is deserialized from the .neon/config file, or the config file passed
// to 'zenith init --config=<path>' option. See control_plane/simple.conf for // to 'zenith init --config=<path>' option. See control_plane/simple.conf for
// an example. // an example.
// //
@@ -34,8 +34,8 @@ pub struct LocalEnv {
// compute nodes). // compute nodes).
// //
// This is not stored in the config file. Rather, this is the path where the // This is not stored in the config file. Rather, this is the path where the
// config file itself is. It is read from the ZENITH_REPO_DIR env variable or // config file itself is. It is read from the NEON_REPO_DIR env variable or
// '.zenith' if not given. // '.neon' if not given.
#[serde(skip)] #[serde(skip)]
pub base_data_dir: PathBuf, pub base_data_dir: PathBuf,
@@ -339,7 +339,7 @@ impl LocalEnv {
pub fn persist_config(&self, base_path: &Path) -> anyhow::Result<()> { pub fn persist_config(&self, base_path: &Path) -> anyhow::Result<()> {
// Currently, the user first passes a config file with 'zenith init --config=<path>' // Currently, the user first passes a config file with 'zenith init --config=<path>'
// We read that in, in `create_config`, and fill any missing defaults. Then it's saved // We read that in, in `create_config`, and fill any missing defaults. Then it's saved
// to .zenith/config. TODO: We lose any formatting and comments along the way, which is // to .neon/config. TODO: We lose any formatting and comments along the way, which is
// a bit sad. // a bit sad.
let mut conf_content = r#"# This file describes a locale deployment of the page server let mut conf_content = r#"# This file describes a locale deployment of the page server
# and safekeeeper node. It is read by the 'zenith' command-line # and safekeeeper node. It is read by the 'zenith' command-line
@@ -483,9 +483,9 @@ impl LocalEnv {
} }
fn base_path() -> PathBuf { fn base_path() -> PathBuf {
match std::env::var_os("ZENITH_REPO_DIR") { match std::env::var_os("NEON_REPO_DIR") {
Some(val) => PathBuf::from(val), Some(val) => PathBuf::from(val),
None => PathBuf::from(".zenith"), None => PathBuf::from(".neon"),
} }
} }

View File

@@ -154,7 +154,7 @@ The default distrib dir is `./tmp_install/`.
#### workdir (-D) #### workdir (-D)
A directory in the file system, where pageserver will store its files. A directory in the file system, where pageserver will store its files.
The default is `./.zenith/`. The default is `./.neon/`.
This parameter has a special CLI alias (`-D`) and can not be overridden with regular `-c` way. This parameter has a special CLI alias (`-D`) and can not be overridden with regular `-c` way.

View File

@@ -69,7 +69,7 @@ Repository
The repository stores all the page versions, or WAL records needed to The repository stores all the page versions, or WAL records needed to
reconstruct them. Each tenant has a separate Repository, which is reconstruct them. Each tenant has a separate Repository, which is
stored in the .zenith/tenants/<tenantid> directory. stored in the .neon/tenants/<tenantid> directory.
Repository is an abstract trait, defined in `repository.rs`. It is Repository is an abstract trait, defined in `repository.rs`. It is
implemented by the LayeredRepository object in implemented by the LayeredRepository object in
@@ -92,7 +92,7 @@ Each repository also has a WAL redo manager associated with it, see
records, whenever we need to reconstruct a page version from WAL to records, whenever we need to reconstruct a page version from WAL to
satisfy a GetPage@LSN request, or to avoid accumulating too much WAL satisfy a GetPage@LSN request, or to avoid accumulating too much WAL
for a page. The WAL redo manager uses a Postgres process running in for a page. The WAL redo manager uses a Postgres process running in
special zenith wal-redo mode to do the actual WAL redo, and special Neon wal-redo mode to do the actual WAL redo, and
communicates with the process using a pipe. communicates with the process using a pipe.

View File

@@ -104,7 +104,7 @@ fn main() -> anyhow::Result<()> {
return Ok(()); return Ok(());
} }
let workdir = Path::new(arg_matches.value_of("workdir").unwrap_or(".zenith")); let workdir = Path::new(arg_matches.value_of("workdir").unwrap_or(".neon"));
let workdir = workdir let workdir = workdir
.canonicalize() .canonicalize()
.with_context(|| format!("Error opening workdir '{}'", workdir.display()))?; .with_context(|| format!("Error opening workdir '{}'", workdir.display()))?;

View File

@@ -4,7 +4,7 @@
//! The functions here are responsible for locating the correct layer for the //! The functions here are responsible for locating the correct layer for the
//! get/put call, tracing timeline branching history as needed. //! get/put call, tracing timeline branching history as needed.
//! //!
//! The files are stored in the .zenith/tenants/<tenantid>/timelines/<timelineid> //! The files are stored in the .neon/tenants/<tenantid>/timelines/<timelineid>
//! directory. See layered_repository/README for how the files are managed. //! directory. See layered_repository/README for how the files are managed.
//! In addition to the layer files, there is a metadata file in the same //! In addition to the layer files, there is a metadata file in the same
//! directory that contains information about the timeline, in particular its //! directory that contains information about the timeline, in particular its
@@ -148,7 +148,7 @@ lazy_static! {
.expect("failed to define a metric"); .expect("failed to define a metric");
} }
/// Parts of the `.zenith/tenants/<tenantid>/timelines/<timelineid>` directory prefix. /// Parts of the `.neon/tenants/<tenantid>/timelines/<timelineid>` directory prefix.
pub const TIMELINES_SEGMENT_NAME: &str = "timelines"; pub const TIMELINES_SEGMENT_NAME: &str = "timelines";
/// ///

View File

@@ -123,7 +123,7 @@ The files are called "layer files". Each layer file covers a range of keys, and
a range of LSNs (or a single LSN, in case of image layers). You can think of it a range of LSNs (or a single LSN, in case of image layers). You can think of it
as a rectangle in the two-dimensional key-LSN space. The layer files for each as a rectangle in the two-dimensional key-LSN space. The layer files for each
timeline are stored in the timeline's subdirectory under timeline are stored in the timeline's subdirectory under
`.zenith/tenants/<tenantid>/timelines`. `.neon/tenants/<tenantid>/timelines`.
There are two kind of layer files: images, and delta layers. An image file There are two kind of layer files: images, and delta layers. An image file
contains a snapshot of all keys at a particular LSN, whereas a delta file contains a snapshot of all keys at a particular LSN, whereas a delta file
@@ -178,7 +178,7 @@ version, and how branching and GC works is still valid.
The full path of a delta file looks like this: The full path of a delta file looks like this:
``` ```
.zenith/tenants/941ddc8604413b88b3d208bddf90396c/timelines/4af489b06af8eed9e27a841775616962/rel_1663_13990_2609_0_10_000000000169C348_0000000001702000 .neon/tenants/941ddc8604413b88b3d208bddf90396c/timelines/4af489b06af8eed9e27a841775616962/rel_1663_13990_2609_0_10_000000000169C348_0000000001702000
``` ```
For simplicity, the examples below use a simplified notation for the For simplicity, the examples below use a simplified notation for the

View File

@@ -197,7 +197,7 @@ impl Display for TimelineSyncStatusUpdate {
} }
/// ///
/// A repository corresponds to one .zenith directory. One repository holds multiple /// A repository corresponds to one .neon directory. One repository holds multiple
/// timelines, forked off from the same initial call to 'initdb'. /// timelines, forked off from the same initial call to 'initdb'.
pub trait Repository: Send + Sync { pub trait Repository: Send + Sync {
type Timeline: Timeline; type Timeline: Timeline;

View File

@@ -1201,7 +1201,7 @@ class NeonCli:
log.info(f'Running in "{self.env.repo_dir}"') log.info(f'Running in "{self.env.repo_dir}"')
env_vars = os.environ.copy() env_vars = os.environ.copy()
env_vars['ZENITH_REPO_DIR'] = str(self.env.repo_dir) env_vars['NEON_REPO_DIR'] = str(self.env.repo_dir)
env_vars['POSTGRES_DISTRIB_DIR'] = str(pg_distrib_dir) env_vars['POSTGRES_DISTRIB_DIR'] = str(pg_distrib_dir)
if self.env.rust_log_override is not None: if self.env.rust_log_override is not None:
env_vars['RUST_LOG'] = self.env.rust_log_override env_vars['RUST_LOG'] = self.env.rust_log_override