Skip to content

Commit

Permalink
refactor: use hugo to build website (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 authored Aug 21, 2024
1 parent 8368f0d commit 36785ca
Show file tree
Hide file tree
Showing 165 changed files with 999 additions and 992 deletions.
22 changes: 17 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
push:
branches:
- main
pull_request:

# Allow one concurrent deployment
concurrency:
Expand All @@ -19,13 +18,26 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: make install
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
npm i -D postcss postcss-cli autoprefixer
hugo mod get
hugo --minify
- run: make build
# copy .asf.yaml to docs/book/html which asf site needs
- run: cp .asf.yaml docs/book/html
# copy .asf.yaml to ./public, asf site needs it.
- run: cp .asf.yaml ./public
- uses: peaceiris/actions-gh-pages@v3
if: github.event_name != 'pull_request'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book/html
publish_dir: ./public
publish_branch: asf-site
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@

# vscode files
.vscode

/resources
*lock
/public
/node_modules
package.json
package-lock.json
8 changes: 2 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
install:
cargo install [email protected]
cargo install mdbook-i18n --git https://github.com/chunshao90/mdbook-i18n.git --rev ca497cff369e0a5cedcd4024af6e1f05cc5050c5
brew install hugo

serve:
cd docs && mdbook serve

build:
cd docs && mdbook build
hugo serve

lint:
find . -name '*.md' | xargs npx [email protected] --write
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,25 @@
>
> Please read the [DISCLAIMER](DISCLAIMER) and a full explanation of ["incubating"](https://incubator.apache.org/policy/incubation.html).
This repository stores all the source files of [HoraeDB docs website](https://apache.github.io/incubator-horaedb-docs/), the website is generated with [mdbook](https://rust-lang.github.io/mdBook/).
This repository stores all the source files of [HoraeDB docs website](https://apache.github.io/horaedb-docs/), the website is generated with [hugo](https://gohugo.io/) and [docsy](https://www.docsy.dev/).

**All files are written in standard markdown.**

## How to run

```bash
# Download dependencies
hugo mod get

# Start a local server for preview
hugo serve
```

By default hugo will listen on http://localhost:1313

## Contributing

Welcome any contributions from the community. You can

- Open an [issue](https://github.com/apache/incubator-horaedb-docs/issues) with any suggestions, or
- Submit a [pull request](https://github.com/apache/incubator-horaedb-docs/pulls) to improve the website (trivial fixes are welcome).
- Open an [issue](https://github.com/apache/horaedb-docs/issues) with any suggestions, or
- Submit a [pull request](https://github.com/apache/horaedb-docs/pulls) to improve the website (trivial fixes are welcome).
5 changes: 5 additions & 0 deletions archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
+++
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
date = {{ .Date }}
draft = true
+++
35 changes: 35 additions & 0 deletions content/cn/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: "Horaedb"
---

{{% blocks/cover color="primary" title="Apache HoraeDB™ (incubating)" height="full" %}}
{{% param description %}}

{.display-6}

<a class="btn btn-lg btn-secondary" href="https://github.com/apache/horaedb">GitHub<i class="fab fa-github ms-2 "></i></a>
<a class="btn btn-lg btn-secondary" href="docs/getting-started/">
快速开始<i class="fas fa-arrow-alt-circle-right ms-2"></i>
</a>
{.p-initial .my-5}

{{% blocks/section type="row" %}}

{{% blocks/feature icon="fa-lightbulb" title="特性" %}}
高性能低成本、简单易用、社区驱动

{{% /blocks/feature %}}

{{% blocks/feature icon="fa fa-code" title="生态" url="docs/user-guide/ecosystem/" %}}

积极拥抱开源生态,同时能够无缝对接各种开源组件。
{{% /blocks/feature %}}

{{% blocks/feature icon="fa-brands fa-github" title="100% 开源" url="/docs/contribution-guidelines/" %}}

所有代码均在 GitHub 上开源,欢迎新用户的加入!
{{% /blocks/feature %}}

{{% /blocks/section %}}

{{% /blocks/cover %}}
23 changes: 16 additions & 7 deletions docs/src/cn/about.md → content/cn/docs/_index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
![HoraeDB](https://github.com/apache/incubator-horaedb/raw/main/docs/logo/horaedb-banner-white-small.jpg)
---
title: "文档"
weight: 1
menu:
main:
weight: 20
pre: <i class='fa-solid fa-book'></i>
---

![HoraeDB](/images/horaedb-banner-white-small.jpg)

![License](https://img.shields.io/badge/license-Apache--2.0-green.svg)
[![CI](https://github.com/apache/incubator-horaedb/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/incubator-horaedb/actions/workflows/ci.yml)
[![OpenIssue](https://img.shields.io/github/issues/apachge/incubator-horaedb)](https://github.com/apache/incubator-horaedb/issues)
[![CI](https://github.com/apache/horaedb/actions/workflows/ci.yml/badge.svg)](https://github.com/apache/horaedb/actions/workflows/ci.yml)
[![OpenIssue](https://img.shields.io/github/issues/apache/horaedb)](https://github.com/apache/horaedb/issues)

Apache HoraeDB™ (incubating) 是一款高性能、分布式的云原生时序数据库。

Expand All @@ -16,7 +25,7 @@ HoraeDB 的基础设计思想是采用混合存储格式和相应的查询方法

# 如何使用 HoraeDB?

- 查看 [快速开始](quick_start.md) 掌握快速使用 HoraeDB 的方式
- HoraeDB 支持的数据模型请查看 [Data Model](sql/model/README.md)
- SQL 使用相关请查看 [SQL](sql/README.md)
- HoraeDB 支持的相关 SDK 请查看 [SDK](sdk/README.md)
- 查看 [快速开始]({{< ref "getting-started.md" >}}) 掌握快速使用 HoraeDB 的方式
- HoraeDB 支持的数据模型请查看 [Data Model]({{< ref "user-guide/sql/model/_index.md" >}})
- SQL 使用相关请查看[这里]({{< ref "user-guide/sql/_index.md" >}})
- SDK 使用请查看[这里]({{< ref "user-guide/sdk/_index.md" >}})
4 changes: 4 additions & 0 deletions content/cn/docs/design/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "设计文档"
weight: 40
---
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# HoraeDB 架构介绍
---
title: "HoraeDB 架构介绍"
weight: 10
---

## 本文目标

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
注意:文章中提到的部分特性暂时还未实现。
---
title: "集群模式"
weight: 20
---

# HoraeDB 集群
注意:文章中提到的部分特性暂时还未实现。

## 整体架构

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Shared Nothing 架构
---
title: "Shared Nothing 架构"
---

## 背景

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 存储引擎
---
title: "存储引擎"
weight: 30
---

存储引擎主要提供以下两个功能:

Expand All @@ -11,7 +14,7 @@

HoraeDB 是一种基于 share-nothing 架构的分布式存储系统,不同服务器之间的数据相互隔离,互不影响。每一个单机中的存储引擎是 LSM(Log-structured merge-tree)的一个变种,针对时序场景做了优化,下图展示了其主要组件的运作方式:

![](../../resources/images/storage-overview.svg)
![](/images/storage-overview.svg)

## Write Ahead Log (WAL)

Expand All @@ -24,9 +27,9 @@ HoraeDB 是一种基于 share-nothing 架构的分布式存储系统,不同服

另一方面,由于[分布式架构](cluster.md)的设计,要求 WAL 本身是高可用的,现在 HoraeDB 中,主要有以下几种实现:

- [本地磁盘](wal_on_rocksdb.md)(基于 [RocksDB](http://rocksdb.org/),无分布式高可用)
- [本地磁盘]({{< ref "wal_on_rocksdb.md" >}})(基于 [RocksDB](http://rocksdb.org/),无分布式高可用)
- [Oceanbase](https://www.oceanbase.com)
- [Kafka](wal_on_kafka.md)
- [Kafka]({{< ref "wal_on_kafka.md" >}})

## Memtable

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
**注意:此功能仍在开发中,API 将来可能会发生变化。**
---
title: "分区表"
---

# 分区表
**注意:此功能仍在开发中,API 将来可能会发生变化。**

本章讨论 `PartitionTable`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# 基于 Kafka 的 WAL
---
title: "基于 Kafka 的 WAL"
---

## 架构

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# 基于 RocksDB 的 WAL
---
title: "基于 RocksDB 的 WAL"
---

## 架构

Expand Down
4 changes: 4 additions & 0 deletions content/cn/docs/dev/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "开发手册"
weight: 20
---
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: "编译"
weight: 10
---

为了编译 HoraeDB, 首先需要安装相关的依赖(包括 `Rust` 的工具链)。

# 依赖(Ubuntu20.04)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: "支持平台"
weight: 10
---

作为一个开源的数据库,HoraeDB 可以部署在基于英特尔 /ARM 架构的服务器,以及常见的虚拟环境。

| OS | status |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## 剖析
---
title: "性能诊断"
weight: 20
---

### CPU 剖析

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## RoadMap
---
title: "RoadMap"
weight: 30
---

### v0.1.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 快速开始
---
title: "快速开始"
weight: 1
---

本章介绍如何快速启动 HoraeDB。在这里你将会学到启动一个单机模式的 HoraeDB,然后使用 SQL 写入一些数据并查询结果。

Expand Down
4 changes: 4 additions & 0 deletions content/cn/docs/user-guide/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
title: "用户指南"
weight: 10
---
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 集群部署
---
title: "集群部署"
weight: 20
---

[快速开始](../quick_start.md)部分我们已经介绍过单机版本 HoraeDB 的部署。

除此之外,HoraeDB 作为一个分布式时序数据库,多个 HoraeDB 实例能够以集群的方式提供可伸缩和高可用的数据服务。

由于目前 HoraeDB 对于 Kubernetes 的支持还在开发之中,目前 HoraeDB 集群部署只能通过手动完成,集群部署的模式主要有两种,两者的区别在于是否需要部署 HoraeMeta,对于 `NoMeta` 的模式,我们仅建议在测试场景下使用。

- [NoMeta 模式(仅供测试使用)](no_meta.md)
- [WithMeta 模式](with_meta.md)
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
**注意:此功能仅供测试使用,不推荐生产使用,相关功能将来可能会发生变化。**
---
title: "NoMeta 模式"
---

# NoMeta 模式
**注意:此功能仅供测试使用,不推荐生产使用,相关功能将来可能会发生变化。**

本章介绍如何部署一个静态(无 HoraeMeta)的 HoraeDB 集群。

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# WithMeta 模式
---
title: "WithMeta 模式"
---

本文展示如何部署一个由 HoraeMeta 控制的 HoraeDB 集群,有了 HoraeMeta 提供的服务,如果 HoraeDB 使用存储不在本地的话,就可以实现很多分布式特性,比如水平扩容、负载均衡、服务高可用等。

Expand Down Expand Up @@ -42,19 +44,19 @@ docker run -d --name horaemeta-server \
- 多节点

```bash
wget https://raw.githubusercontent.com/apache/incubator-horaedb-docs/main/docs/src/resources/config-horaemeta-cluster0.toml
wget https://horaedb.apache.org/config-horaemeta-cluster0.toml

docker run -d --network=host --name horaemeta-server0 \
-v $(pwd)/config-horaemeta-cluster0.toml:/etc/horaemeta/horaemeta.toml \
ghcr.io/apache/horaemeta-server:nightly-20231225-ab067bf0

wget https://raw.githubusercontent.com/apache/incubator-horaedb-docs/main/docs/src/resources/config-horaemeta-cluster1.toml
wget https://horaedb.apache.org/config-horaemeta-cluster1.toml

docker run -d --network=host --name horaemeta-server1 \
-v $(pwd)/config-horaemeta-cluster1.toml:/etc/horaemeta/horaemeta.toml \
ghcr.io/apache/horaemeta-server:nightly-20231225-ab067bf0

wget https://raw.githubusercontent.com/apache/incubator-horaedb-docs/main/docs/src/resources/config-horaemeta-cluster2.toml
wget https://horaedb.apache.org/config-horaemeta-cluster2.toml

docker run -d --network=host --name horaemeta-server2 \
-v $(pwd)/config-horaemeta-cluster2.toml:/etc/horaemeta/horaemeta.toml \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# 周边生态
---
title: "周边生态"
weight: 50
---

HoraeDB 是一个开放的系统,鼓励合作和创新,允许开发者使用最适合其自身需求的系统。目前 HoraeDB 支持以下系统:

- [Prometheus](prometheus.md)
- [InfluxDB](influxdb.md)
- [OpenTSDB](opentsdb.md)
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# InfluxDB
---
title: "InfluxDB"
---

[InfluxDB](https://www.influxdata.com/products/influxdb-overview/) 是一个时间序列数据库,旨在处理高写入和查询负载。它是 TICK 堆栈的一个组成部分。InfluxDB 旨在用作涉及大量时间戳数据的任何用例的后备存储,包括 DevOps 监控、应用程序指标、物联网传感器数据和实时分析。

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# OpenTSDB
---
title: "OpenTSDB"
---

[OpenTSDB](http://opentsdb.net/) 是基于 HBase 的分布式、可伸缩的时间序列数据库。

Expand Down
Loading

0 comments on commit 36785ca

Please sign in to comment.