From 27fe35a2d12cac63e922a28e2223f2ce5809315e Mon Sep 17 00:00:00 2001 From: Maria Shodunke Date: Tue, 20 Feb 2024 18:40:03 +0000 Subject: [PATCH] Cleanup location of docs and example files (#1195) --- CMake/install/install.cmake | 2 +- RELEASENOTES.md | 23 ------------------- docker/centos/Dockerfile | 4 ++-- docs/configure-clio.md | 2 +- .../examples/config/cloud-example-config.json | 0 .../examples/config/example-config.json | 0 .../examples}/infrastructure/README.md | 0 .../examples}/infrastructure/compose.yaml | 0 .../grafana/clio_dashboard.json | 0 .../grafana/dashboard_local.yaml | 0 .../infrastructure/grafana/datasources.yaml | 0 .../examples}/infrastructure/prometheus.yaml | 0 docs/logging.md | 2 +- docs/metrics-and-static-analysis.md | 2 +- docs/run-clio.md | 2 +- 15 files changed, 7 insertions(+), 30 deletions(-) delete mode 100644 RELEASENOTES.md rename cloud-example-config.json => docs/examples/config/cloud-example-config.json (100%) rename example-config.json => docs/examples/config/example-config.json (100%) rename {examples => docs/examples}/infrastructure/README.md (100%) rename {examples => docs/examples}/infrastructure/compose.yaml (100%) rename {examples => docs/examples}/infrastructure/grafana/clio_dashboard.json (100%) rename {examples => docs/examples}/infrastructure/grafana/dashboard_local.yaml (100%) rename {examples => docs/examples}/infrastructure/grafana/datasources.yaml (100%) rename {examples => docs/examples}/infrastructure/prometheus.yaml (100%) diff --git a/CMake/install/install.cmake b/CMake/install/install.cmake index 319fea89..23664b55 100644 --- a/CMake/install/install.cmake +++ b/CMake/install/install.cmake @@ -3,7 +3,7 @@ set (CMAKE_INSTALL_PREFIX ${CLIO_INSTALL_DIR}) install (TARGETS clio_server DESTINATION bin) -file (READ example-config.json config) +file (READ docs/examples/config/example-config.json config) string (REGEX REPLACE "./clio_log" "/var/log/clio/" config "${config}") file (WRITE ${CMAKE_BINARY_DIR}/install-config.json "${config}") install (FILES ${CMAKE_BINARY_DIR}/install-config.json DESTINATION etc RENAME config.json) diff --git a/RELEASENOTES.md b/RELEASENOTES.md deleted file mode 100644 index e2351932..00000000 --- a/RELEASENOTES.md +++ /dev/null @@ -1,23 +0,0 @@ -# Release Notes - -This document contains the release notes for `clio_server`, an XRP Ledger API Server. - -To build and run `clio_server`, follow the instructions in [README.md](https://github.com/XRPLF/clio). - -If you find issues or have a new idea, please open [an issue](https://github.com/XRPLF/clio/issues). - -# Releases - -## 0.1.0 - -Clio is an XRP Ledger API server. Clio is optimized for RPC calls, over websocket or JSON-RPC. Validated historical ledger and transaction data is stored in a more space efficient format, using up to 4 times less space than rippled. - -Clio uses Cassandra or ScyllaDB, allowing for scalable read throughput. Multiple clio nodes can share access to the same dataset, allowing for a highly available cluster of clio nodes, without the need for redundant data storage or computation. - -**0.1.0** is the first beta of Project Clio. It contains: -- `./src/backend` is the BackendInterface. This provides an abstraction for reading and writing information to a database. -- `./src/etl` is the ReportingETL. The classes in this folder are used to extract information from the P2P network and write it to a database, either locally or over the network. -- `./src/rpc` contains RPC handlers that are called by clients. These handlers should expose the same API as rippled. -- `./src/subscriptions` contains the SubscriptionManager. This manages publishing to clients subscribing to streams or accounts. -- `./src/webserver` contains a flex server that handles both http/s and ws/s traffic on a single port. -- `./unittests` simple unit tests that write to and read from a database to verify that the ETL works. diff --git a/docker/centos/Dockerfile b/docker/centos/Dockerfile index 763a336e..0c5dd28b 100644 --- a/docker/centos/Dockerfile +++ b/docker/centos/Dockerfile @@ -40,10 +40,10 @@ RUN source /opt/rh/devtoolset-11/enable && cd /tmp/clio && \ RUN mkdir output RUN strip clio/build/clio_server && strip clio/build/clio_tests RUN cp clio/build/clio_tests output/ && cp clio/build/clio_server output/ -RUN cp clio/example-config.json output/example-config.json +RUN cp clio/docs/examples/config/example-config.json output/example-config.json FROM centos:7 COPY --from=build /tmp/output /clio -RUN mkdir -p /opt/clio/etc && mv /clio/example-config.json /opt/clio/etc/config.json +RUN mkdir -p /opt/clio/etc && mv /clio/docs/examples/config/example-config.json /opt/clio/etc/config.json CMD ["/clio/clio_server", "/opt/clio/etc/config.json"] diff --git a/docs/configure-clio.md b/docs/configure-clio.md index e3c1a271..f8947d7e 100644 --- a/docs/configure-clio.md +++ b/docs/configure-clio.md @@ -18,7 +18,7 @@ Clio needs access to a `rippled` server in order to work. The following configur - A port to handle gRPC requests, with the IP(s) of Clio specified in the `secure_gateway` entry -The example configs of [rippled](https://github.com/XRPLF/rippled/blob/develop/cfg/rippled-example.cfg) and [Clio](../example-config.json) are set up in a way that minimal changes are required. +The example configs of [rippled](https://github.com/XRPLF/rippled/blob/develop/cfg/rippled-example.cfg) and [Clio](../docs/examples/config/example-config.json) are set up in a way that minimal changes are required. When running locally, the only change needed is to uncomment the `port_grpc` section of the `rippled` config. If you're running Clio and `rippled` on separate machines, in addition to uncommenting the `port_grpc` section, a few other steps must be taken: diff --git a/cloud-example-config.json b/docs/examples/config/cloud-example-config.json similarity index 100% rename from cloud-example-config.json rename to docs/examples/config/cloud-example-config.json diff --git a/example-config.json b/docs/examples/config/example-config.json similarity index 100% rename from example-config.json rename to docs/examples/config/example-config.json diff --git a/examples/infrastructure/README.md b/docs/examples/infrastructure/README.md similarity index 100% rename from examples/infrastructure/README.md rename to docs/examples/infrastructure/README.md diff --git a/examples/infrastructure/compose.yaml b/docs/examples/infrastructure/compose.yaml similarity index 100% rename from examples/infrastructure/compose.yaml rename to docs/examples/infrastructure/compose.yaml diff --git a/examples/infrastructure/grafana/clio_dashboard.json b/docs/examples/infrastructure/grafana/clio_dashboard.json similarity index 100% rename from examples/infrastructure/grafana/clio_dashboard.json rename to docs/examples/infrastructure/grafana/clio_dashboard.json diff --git a/examples/infrastructure/grafana/dashboard_local.yaml b/docs/examples/infrastructure/grafana/dashboard_local.yaml similarity index 100% rename from examples/infrastructure/grafana/dashboard_local.yaml rename to docs/examples/infrastructure/grafana/dashboard_local.yaml diff --git a/examples/infrastructure/grafana/datasources.yaml b/docs/examples/infrastructure/grafana/datasources.yaml similarity index 100% rename from examples/infrastructure/grafana/datasources.yaml rename to docs/examples/infrastructure/grafana/datasources.yaml diff --git a/examples/infrastructure/prometheus.yaml b/docs/examples/infrastructure/prometheus.yaml similarity index 100% rename from examples/infrastructure/prometheus.yaml rename to docs/examples/infrastructure/prometheus.yaml diff --git a/docs/logging.md b/docs/logging.md index f79b29da..9aa5094e 100644 --- a/docs/logging.md +++ b/docs/logging.md @@ -40,7 +40,7 @@ If no override is present for a given channel, that channel will log at the seve The log channels that can be overridden are: `Backend`, `WebServer`, `Subscriptions`, `RPC`, `ETL` and `Performance`. > [!NOTE] -> See [example-config.json](../example-config.json) for more details. +> See [example-config.json](../docs/examples/config/example-config.json) for more details. ## `log_to_console` diff --git a/docs/metrics-and-static-analysis.md b/docs/metrics-and-static-analysis.md index b950511f..b7111813 100644 --- a/docs/metrics-and-static-analysis.md +++ b/docs/metrics-and-static-analysis.md @@ -10,7 +10,7 @@ To completely disable Prometheus metrics add `"prometheus": { "enabled": false } It is important to know that Clio responds to Prometheus request only if they are admin requests. If you are using the admin password feature, the same password should be provided in the Authorization header of Prometheus requests. -You can find an example docker-compose file, with Prometheus and Grafana configs, in [examples/infrastructure](../examples/infrastructure/). +You can find an example docker-compose file, with Prometheus and Grafana configs, in [examples/infrastructure](../docs/examples/infrastructure/). ## Using `clang-tidy` for static analysis diff --git a/docs/run-clio.md b/docs/run-clio.md index 53ee2cb3..51c5a2ca 100644 --- a/docs/run-clio.md +++ b/docs/run-clio.md @@ -79,4 +79,4 @@ All of the above are optional. Clio will fallback to hardcoded defaults when these values are not specified in the config file, or if the configured values are outside of the minimum and maximum supported versions hardcoded in [src/rpc/common/APIVersion.h](../src/rpc/common/APIVersion.hpp). > [!TIP] -> See the [example-config.json](../example-config.json) for more details. +> See the [example-config.json](../docs/examples/config/example-config.json) for more details.