Skip to content
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

Website for Thanos' docs using Hugo. #807

Merged
merged 38 commits into from
Apr 15, 2019
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e27de62
docs: try hugo
adrien-f Feb 2, 2019
2732f36
fix: bad root url
adrien-f Feb 2, 2019
0b2fad8
fix: bad root url
adrien-f Feb 2, 2019
869aa6a
fix: bad root url
adrien-f Feb 2, 2019
e6d50e6
fix: bad root url
adrien-f Feb 2, 2019
23a956d
update subtitle
adrien-f Feb 3, 2019
8ae3ce1
update
adrien-f Mar 17, 2019
7c0af37
update
adrien-f Mar 17, 2019
8168bd7
update hugo
adrien-f Mar 20, 2019
13710d9
fix: menus
adrien-f Mar 21, 2019
309f9eb
update
adrien-f Mar 22, 2019
f46ed71
update
adrien-f Mar 22, 2019
a47827f
move config outside website folder and rewrite getting-started
adrien-f Mar 23, 2019
c2355b1
update
adrien-f Mar 23, 2019
dae29eb
update
adrien-f Mar 23, 2019
140d864
Merge branch 'master' into feature/docs-hugo
bwplotka Mar 30, 2019
1f043ec
Bartek's weekend hacking.
bwplotka Mar 30, 2019
14b2df0
Merge pull request #1 from improbable-eng/fixes-to-deployment
adrien-f Mar 30, 2019
1d30983
Sunday hacking.
bwplotka Mar 31, 2019
e3dd9e6
Merge pull request #2 from improbable-eng/feature/docs-hugo-impr
adrien-f Mar 31, 2019
59fadbe
cleanup blog and some links
adrien-f Mar 31, 2019
af05ec2
fix: add perl in circle ci website build
adrien-f Mar 31, 2019
836ecbb
Fixed homepage.
bwplotka Mar 31, 2019
7fe678f
Added more info to how-to-docs.
bwplotka Mar 31, 2019
af186ec
Improved build.
bwplotka Mar 31, 2019
768146f
Moved back to old function.
bwplotka Mar 31, 2019
e47eba1
Fake change to poke deploy.
bwplotka Apr 1, 2019
03a3209
Moved to Improbable.
bwplotka Apr 1, 2019
6ee6785
Fixes.
bwplotka Apr 1, 2019
1cb36be
fix: use GA template tag
adrien-f Apr 9, 2019
2a8a915
Small website fixes.
bwplotka Apr 13, 2019
6199ac1
Merge pull request #3 from improbable-eng/bwplotka-docs-hugo-changes
bwplotka Apr 13, 2019
ff55d5a
fix: update text-indent on sidebar
adrien-f Apr 14, 2019
5403918
Merge branch 'master' into adrien-f-feature/docs-hugo
bwplotka Apr 14, 2019
bd6ebdf
Moved domains.
bwplotka Apr 14, 2019
7faae79
Fixed link.
bwplotka Apr 14, 2019
7c2e817
Removed not needed CI changes.
bwplotka Apr 14, 2019
0377848
Added CNAME file.
bwplotka Apr 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,25 @@ jobs:
- run: docker login -u="${DOCKER_USERNAME}" -p="${DOCKER_PASSWORD}"
- run: make docker-push DOCKER_IMAGE_TAG=$CIRCLE_TAG

docs:
docker:
- image: cibuilds/hugo:latest
working_directory: ~/hugo
steps:
- run: apk update && apk add git
- checkout
- run:
name: Deploy to GitHub Pages
command: |
hugo --config hugo.toml
cd website/public
git init
git config --global user.email "adrien-f@users.noreply.github.com"
git config --global user.name "AdrienF"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to change those :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes yes, still in progress (: Thanks

git add .
git commit -m "Deploy from CI"
git push --force --quiet "https://${GITHUB_TOKEN}@github.com/adrien-f/thanos.git" master:gh-pages

workflows:
version: 2
thanos:
Expand Down Expand Up @@ -128,3 +147,7 @@ workflows:
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
branches:
ignore: /.*/
- docs:
filters:
branches:
only: feature/docs-hugo
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ data/

/.idea
/*.iml
website/public/
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,16 @@ PROMU ?= $(BIN_DIR)/promu-$(PROMU_VERSION)
PROMU_VERSION ?= 264dc36af9ea3103255063497636bd5713e3e9c1
PROTOC ?= $(BIN_DIR)/protoc-$(PROTOC_VERSION)
PROTOC_VERSION ?= 3.4.0
# v0.54.0
HUGO_VERSION ?= b1a82c61aba067952fdae2f73b826fe7d0f3fc2f
HUGO ?= $(BIN_DIR)/hugo-$(HUGO_VERSION)
GIT ?= $(shell which git)
BZR ?= $(shell which bzr)

# E2e test deps.
# Referenced by github.com/improbable-eng/thanos/blob/master/docs/getting_started.md#prometheus

# Limitied prom version, because testing was not possibe. This should fix it: https://github.com/improbable-eng/thanos/issues/758
# Limitied prom version, because testing was not possible. This should fix it: https://github.com/improbable-eng/thanos/issues/758
PROM_VERSIONS ?=v2.4.3 v2.5.0
ALERTMANAGER_VERSION ?=v0.15.2
MINIO_SERVER_VERSION ?=RELEASE.2018-10-06T00-15-16Z
Expand Down Expand Up @@ -114,6 +117,16 @@ docker-push:
docs: $(EMBEDMD) build
@EMBEDMD_BIN="$(EMBEDMD)" scripts/genflagdocs.sh

.PHONY: hugo-docs
hugo-docs: $(HUGO)
@echo ">> building documentation website"
@$(HUGO) --config hugo.toml

.PHONY: hugo-server
hugo-server: $(HUGO)
@echo ">> serving documentation website"
@$(HUGO) --config hugo.toml server

# check-docs checks if documentation have discrepancy with flags and if the links are valid.
.PHONY: check-docs
check-docs: $(EMBEDMD) $(LICHE) build
Expand Down Expand Up @@ -219,6 +232,9 @@ $(LICHE):
$(PROMU):
$(call fetch_go_bin_version,github.com/prometheus/promu,$(PROMU_VERSION))

$(HUGO):
$(call fetch_go_bin_version,github.com/gohugoio/hugo,$(HUGO_VERSION))

$(PROTOC):
@mkdir -p $(TMP_GOPATH)
@echo ">> fetching protoc@${PROTOC_VERSION}"
Expand Down
16 changes: 16 additions & 0 deletions docs/blog/2019-03-19-hello-world-bis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Hello World bis !
type: blog
date: 2019-03-19
author: "@adrien-f"
---

Post hoc impie perpetratum quod in aliis quoque iam timebatur, tamquam licentia crudelitati indulta per suspicionum nebulas aestimati quidam noxii damnabantur. quorum pars necati, alii puniti bonorum multatione actique laribus suis extorres nullo sibi relicto praeter querelas et lacrimas, stipe conlaticia victitabant, et civili iustoque imperio ad voluntatem converso cruentam, claudebantur opulentae domus et clarae.

Et hanc quidem praeter oppida multa duae civitates exornant Seleucia opus Seleuci regis, et Claudiopolis quam deduxit coloniam Claudius Caesar. Isaura enim antehac nimium potens, olim subversa ut rebellatrix interneciva aegre vestigia claritudinis pristinae monstrat admodum pauca.

Raptim igitur properantes ut motus sui rumores celeritate nimia praevenirent, vigore corporum ac levitate confisi per flexuosas semitas ad summitates collium tardius evadebant. et cum superatis difficultatibus arduis ad supercilia venissent fluvii Melanis alti et verticosi, qui pro muro tuetur accolas circumfusus, augente nocte adulta terrorem quievere paulisper lucem opperientes. arbitrabantur enim nullo inpediente transgressi inopino adcursu adposita quaeque vastare, sed in cassum labores pertulere gravissimos.

Nam sole orto magnitudine angusti gurgitis sed profundi a transitu arcebantur et dum piscatorios quaerunt lenunculos vel innare temere contextis cratibus parant, effusae legiones, quae hiemabant tunc apud Siden, isdem impetu occurrere veloci. et signis prope ripam locatis ad manus comminus conserendas denseta scutorum conpage semet scientissime praestruebant, ausos quoque aliquos fiducia nandi vel cavatis arborum truncis amnem permeare latenter facillime trucidarunt.

Ex turba vero imae sortis et paupertinae in tabernis aliqui pernoctant vinariis, non nulli velariis umbraculorum theatralium latent, quae Campanam imitatus lasciviam Catulus in aedilitate sua suspendit omnium primus; aut pugnaciter aleis certant turpi sono fragosis naribus introrsum reducto spiritu concrepantes; aut quod est studiorum omnium maximum ab ortu lucis ad vesperam sole fatiscunt vel pluviis, per minutias aurigarum equorumque praecipua vel delicta scrutantes.
16 changes: 16 additions & 0 deletions docs/blog/2019-03-20-hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Hello World !
type: blog
date: 2019-03-20
author: "@adrien-f"
---

Post hoc impie perpetratum quod in aliis quoque iam timebatur, tamquam licentia crudelitati indulta per suspicionum nebulas aestimati quidam noxii damnabantur. quorum pars necati, alii puniti bonorum multatione actique laribus suis extorres nullo sibi relicto praeter querelas et lacrimas, stipe conlaticia victitabant, et civili iustoque imperio ad voluntatem converso cruentam, claudebantur opulentae domus et clarae.

Et hanc quidem praeter oppida multa duae civitates exornant Seleucia opus Seleuci regis, et Claudiopolis quam deduxit coloniam Claudius Caesar. Isaura enim antehac nimium potens, olim subversa ut rebellatrix interneciva aegre vestigia claritudinis pristinae monstrat admodum pauca.

Raptim igitur properantes ut motus sui rumores celeritate nimia praevenirent, vigore corporum ac levitate confisi per flexuosas semitas ad summitates collium tardius evadebant. et cum superatis difficultatibus arduis ad supercilia venissent fluvii Melanis alti et verticosi, qui pro muro tuetur accolas circumfusus, augente nocte adulta terrorem quievere paulisper lucem opperientes. arbitrabantur enim nullo inpediente transgressi inopino adcursu adposita quaeque vastare, sed in cassum labores pertulere gravissimos.

Nam sole orto magnitudine angusti gurgitis sed profundi a transitu arcebantur et dum piscatorios quaerunt lenunculos vel innare temere contextis cratibus parant, effusae legiones, quae hiemabant tunc apud Siden, isdem impetu occurrere veloci. et signis prope ripam locatis ad manus comminus conserendas denseta scutorum conpage semet scientissime praestruebant, ausos quoque aliquos fiducia nandi vel cavatis arborum truncis amnem permeare latenter facillime trucidarunt.

Ex turba vero imae sortis et paupertinae in tabernis aliqui pernoctant vinariis, non nulli velariis umbraculorum theatralium latent, quae Campanam imitatus lasciviam Catulus in aedilitate sua suspendit omnium primus; aut pugnaciter aleis certant turpi sono fragosis naribus introrsum reducto spiritu concrepantes; aut quod est studiorum omnium maximum ab ortu lucis ad vesperam sole fatiscunt vel pluviis, per minutias aurigarum equorumque praecipua vel delicta scrutantes.
8 changes: 7 additions & 1 deletion docs/components/bucket.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
---
title: Bucket
type: docs
menu: "components"
---

# Bucket

The bucket component of Thanos is a set of commands to inspect data in object storage buckets.
It is normally run as a stand alone command to aid with troubleshooting.

Example:

```
```bash
$ thanos bucket verify --objstore.config-file=bucket.yml
```

Expand Down
8 changes: 7 additions & 1 deletion docs/components/compact.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
---
title: Compact
type: docs
menu: "components"
---

# Compact

The compactor component of Thanos applies the compaction procedure of the Prometheus 2.0 storage engine to block data stored in object storage.
It is generally not semantically concurrency safe and must be deployed as a singleton against a bucket.

Example:

```
```bash
$ thanos compact --data-dir /tmp/thanos-compact --objstore.config-file=bucket.yml
```

Expand Down
8 changes: 7 additions & 1 deletion docs/components/query.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Query
type: docs
menu: "components"
---

# Query

The query component implements the Prometheus HTTP v1 API to query data in a Thanos cluster via PromQL.
Expand All @@ -7,7 +13,7 @@ on how to connect querier with desired StoreAPIs.

Querier currently is fully stateless and horizontally scalable.

```
```bash
$ thanos query \
--http-address "0.0.0.0:9090" \
--store "<store-api>:<grpc-port>" \
Expand Down
8 changes: 7 additions & 1 deletion docs/components/rule.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Rule
type: docs
menu: "components"
---

# Rule

_**NOTE:** The rule component is experimental since it has conceptual tradeoffs that might not be favorable for most use cases. It is recommended to keep deploying rules to the relevant Prometheus servers._
Expand All @@ -8,7 +14,7 @@ The rule component evaluates Prometheus recording and alerting rules against ran

The data of each rule node can be labeled to satisfy the clusters labeling scheme. High-availability pairs can be run in parallel and should be distinguished by the designated replica label, just like regular Prometheus servers.

```
```bash
$ thanos rule \
--data-dir "/path/to/data" \
--eval-interval "30s" \
Expand Down
10 changes: 8 additions & 2 deletions docs/components/sidecar.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
title: Sidecar
type: docs
menu: "components"
---

# Sidecar

The sidecar component of Thanos gets deployed along with a Prometheus instance. It implements Thanos' Store API on top of Prometheus' remote-read API and advertises itself as a data source to the cluster. Thereby queriers in the cluster can treat Prometheus servers as yet another source of time series data without directly talking to its APIs.
Expand All @@ -13,14 +19,14 @@ Prometheus servers connected to the Thanos cluster via the sidecar are subject t
The retention is recommended to not be lower than three times the block duration. This achieves resilience in the face of connectivity issues
to the object storage since all local data will remain available within the Thanos cluster. If connectivity gets restored the backlog of blocks gets uploaded to the object storage.

```console
```bash
$ prometheus \
--storage.tsdb.max-block-duration=2h \
--storage.tsdb.min-block-duration=2h \
--web.enable-lifecycle
```

```console
```bash
$ thanos sidecar \
--tsdb.path "/path/to/prometheus/data/dir" \
--prometheus.url "http://localhost:9090" \
Expand Down
8 changes: 7 additions & 1 deletion docs/components/store.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
---
title: Store
type: docs
menu: "components"
---

# Store

The store component of Thanos implements the Store API on top of historical data in an object storage bucket. It acts primarily as an API gateway and therefore does not need significant amounts of local disk space. It joins a Thanos cluster on startup and advertises the data it can access.
It keeps a small amount of information about all remote blocks on local disk and keeps it in sync with the bucket. This data is generally safe to delete across restarts at the cost of increased startup times.

```
```bash
$ thanos store \
--data-dir "/local/state/data/dir" \
--cluster.peers "thanos-cluster.example.org" \
Expand Down
Loading