-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stellar developer docs for Galexie #1072
Merged
Merged
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
62e93e5
Stellar developer docs for Galexie
urvisavla e957a05
Update docs/data/galexie/README.mdx
urvisavla 16bafa3
Update docs/data/galexie/README.mdx
urvisavla 8a88555
Refine CLI section based on review feedback. Add monitoring section.
urvisavla 58222e2
Fix order of services in Data section
urvisavla 61ac1ef
Update docs/data/galexie/admin_guide/monitoring.mdx
urvisavla 44563f7
Add hardware requirements section
urvisavla 8c4c8c0
Addressing review comments
urvisavla eb82cd8
minor update
urvisavla ee93491
Remove reference to Grafana Dashboard.
urvisavla 6cf2b70
Minor update
urvisavla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
title: Galaxie Introduction | ||
sidebar_position: 0 | ||
--- | ||
|
||
## What is Galexie? | ||
|
||
Galexie is a tool for extracting, processing, exporting Stellar ledger metadata to external storage, and creating a data lake of pre-processed ledger metadata. Galexie is the foundation of the Composable Data Pipeline (CDP) and serves as the first step in extracting raw Stellar ledger metadata and making it accessible. Learn more about CDP’s benefits and applications in this [blog post](https://stellar.org/blog/developers/composable-data-platform). | ||
|
||
## What Are the Key Features of Galexie? | ||
|
||
Galexie is designed to make streamlined and efficient export of ledger metadata via a simple user-friendly interface. Its key features include: | ||
|
||
- Exporting Stellar ledger metadata to cloud storage | ||
- Configurable to export a specified range of ledgers or continuously stream new ledgers as they are created on the Stellar network | ||
- Exporting ledger metadata in XDR which is Stellar Core’s native format. | ||
- Compressing data before export to optimize storage efficiency in the data lake. | ||
|
||
**Galexie Architecture** | ||
|
||
![](/assets/galexie-architecture.png) | ||
|
||
## Why XDR Format? | ||
|
||
Exporting data in XDR—the native Stellar Core format—enables Galexie to preserve full transaction metadata, ensuring data integrity while keeping storage efficient. The XDR format maintains compatibility with all Stellar components, providing a solid foundation for applications that require consistent access to historical data. Refer to the [XDR](/docs/learn/encyclopedia/data-format/xdr) documentation for more information on this format. | ||
|
||
## Why Run Galexie? | ||
|
||
Galexie enables you to make a copy of Stellar ledger metadata over which you have complete control. Galexie can continuously sync your data lake with the latest ledger data freeing you up from tedious data ingestion and allowing you to focus on building customized applications that consume and analyze exported data. | ||
|
||
## What Can You Do with the Data Lake Created by Galexie? | ||
|
||
Once data is stored in the cloud, it becomes easily accessible for integration with modern data processing and analytics tools, enabling various workflows and insights. | ||
|
||
The pre-processed ledger data exported by Galexie can be utilized across various applications, such as: | ||
|
||
- Analytics Tools: Analyze trends over time. | ||
- Audit Applications: Retrieve historical transaction data for auditing and compliance. | ||
- Monitoring Systems: Create tools to track network metrics. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Admin Guide | ||
sidebar_position: 15 | ||
--- | ||
|
||
This guide provides step-by-step instructions on installing and running the Galexie. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
title: Configuring | ||
sidebar_position: 20 | ||
--- | ||
|
||
# Configuring | ||
|
||
## Steps to Configure Galexie | ||
|
||
1. **Copy the Sample Configuration** | ||
|
||
Start with the provided sample file, [`config.example.toml`](https://github.com/stellar/go/blob/master/services/galexie/config.example.toml). | ||
|
||
2. **Rename and Update the Configuration** | ||
|
||
Rename the file to `config.toml` and adjust settings as needed. | ||
|
||
- **Key Settings Include:** | ||
|
||
- **Google Cloud Storage (GCS) Bucket** | ||
|
||
Specify the GCS bucket where Galexie will export Stellar ledger data. Update `destination_bucket_path` to the complete path of your GCS bucket, including subpaths if applicable. | ||
|
||
```toml | ||
destination_bucket_path = "stellar-network-data/testnet" | ||
``` | ||
|
||
- **Stellar Network** | ||
|
||
Set the Stellar network to be used in creating the data lake. | ||
|
||
```toml | ||
network = "testnet" | ||
``` | ||
|
||
- **Data Organization (Optional)** | ||
|
||
Configure how the exported data is organized in the GCS bucket. The example below adds 64 ledgers per file and organizes them in a directory of 1000 files. | ||
|
||
```toml | ||
# Number of ledgers stored in each file | ||
ledgers_per_file = 1 | ||
|
||
# Number of files per partition/directory | ||
files_per_partition = 64000 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: Installing | ||
sidebar_position: 30 | ||
--- | ||
|
||
# Installing | ||
|
||
To install Galexie, retrieve the Docker image from the [Stellar Docker Hub registry](https://hub.docker.com/r/stellar/stellar-galexie) using the following command: | ||
|
||
```shell | ||
docker pull stellar/stellar-galexie | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: Monitoring | ||
sidebar_position: 50 | ||
--- | ||
|
||
# Monitoring | ||
|
||
### Metrics | ||
|
||
Galexie publishes metrics through an HTTP-based admin endpoint, which makes it easier to monitor its performance. This endpoint is configurable in the `config.toml` file, where you can specify the port on which metrics are made available. The data is exposed in Prometheus format, enabling easy integration with existing monitoring and alerting systems. | ||
|
||
The admin port can be configured in the `config.toml` file by setting the `admin_port` variable. By default, the `admin_port` is set to `6061` | ||
|
||
```toml | ||
# Admin port configuration | ||
# Specifies the port for hosting the HTTP service that publishes metrics. | ||
admin_port = 6061 | ||
``` | ||
|
||
With this configuration, the URL to access the metrics endpoint will be: | ||
|
||
``` | ||
http://<host>:6061/metrics | ||
``` | ||
|
||
Galexie emits several application-specific metrics to help track the export process: | ||
|
||
- `galexie_last_exported_ledger`: The sequence number of the most recently exported ledger. | ||
- `galexie_uploader_put_duration_seconds`: The time taken to upload objects to the data lake. | ||
- `galexie_uploader_object_size_bytes`: Compressed and uncompressed sizes of the objects being uploaded. | ||
- `galexie_upload_queue_length`: Number of objects currently queued and waiting to be uploaded. | ||
|
||
In addition to these application-specific metrics, Galexie also exports system metrics (e.g., CPU, memory, open file descriptors) and Stellar Core ingestion metrics such as `galexie_ingest_ledger_fetch_duration_seconds` | ||
|
||
Use these metrics to build queries that monitor Galexie’s performance and export process. Here are a few examples of useful queries: | ||
|
||
- Export Times: Query `galexie_uploader_put_duration_seconds` to monitor average upload times. | ||
- Queue Length: Use `galexie_upload_queue_length` to view the number of objects waiting to be uploaded. | ||
- Latest Exported Ledger: Track `galexie_last_exported_ledger` to ensure that ledger exports are up-to-date. | ||
|
||
For a quick start, download our pre-built Grafana dashboard for Galexie. This dashboard provides pre-configured queries and visualizations to help you monitor Galexie's health. You can customize it to fit your specific needs. | ||
urvisavla marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Logging | ||
|
||
Galexie emits logs to stdout and generates a log line for every object being exported to help monitor progress. | ||
|
||
Example logs: | ||
|
||
``` | ||
INFO[2024-11-07T17:40:37.795-08:00] Uploading: FFFFFF37--200-299/FFFFFF37--200.xdr.zstd pid=98734 service=galexie | ||
INFO[2024-11-07T17:40:37.892-08:00] Uploaded FFFFFF37--200-299/FFFFFF37--200.xdr.zstd successfully pid=98734 service=galexie | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: Prerequisites | ||
sidebar_position: 10 | ||
--- | ||
|
||
# Prerequisites | ||
|
||
### 1. Google Cloud Platform (GCP) Account | ||
|
||
Galexie exports Stellar ledger metadata to Google Cloud Storage (GCS), so you need a GCP account with: | ||
|
||
- Permissions to create a new GCS bucket, or | ||
- Access to an existing bucket with read/write permissions. | ||
|
||
### 2. Docker (Recommended) | ||
|
||
> **_NOTE:_** While it is possible to natively install Galexie (without Docker), this requires manual dependency management and is recommended only for advanced users.] | ||
|
||
Galexie is available as a Docker image, which simplifies installation and setup. Ensure you have Docker Engine installed on your system ([Docker installation guide](https://docs.docker.com/engine/install/)). | ||
|
||
## Hardware Requirements | ||
urvisavla marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
The minimum hardware requirements for running Galexie are:\ | ||
**RAM**: 8 GB\ | ||
**CPU**: 2 vCPUs\ | ||
**Disk**: 100 GB with at least 5K IOPS | ||
|
||
### Full History Export | ||
|
||
Exporting the full history (as of November 2024): | ||
|
||
- Takes an estimated 150 days using a single instance of Galexie | ||
- Creates a data lake of approximately 3 TB | ||
- To speed up the export, multiple instances of Galexie can be executed in parallel, each working on a different range | ||
- For example, creating the full history for Hubble data lake using about 40 parallel instances (each exporting approximately 1.25 million ledgers) on _e2-standard-2_ (Google Cloud Platform) takes about 5 days |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add a link to the github readme instructions for installing/building locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I don't think we currently have instructions for building it locally but it might be worth adding them.