Skip to content

Commit

Permalink
Merge branch 'feature/docs-hugo' of https://github.com/adrien-f/thanos
Browse files Browse the repository at this point in the history
…into adrien-f-feature/docs-hugo

# Conflicts:
#	docs/getting_started.md
#	docs/proposals/approved/201901-read-write-operations-bucket.md
  • Loading branch information
bwplotka committed Mar 30, 2019
2 parents 7a83cda + dae29eb commit 1d7766b
Show file tree
Hide file tree
Showing 41 changed files with 887 additions and 339 deletions.
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"
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

0 comments on commit 1d7766b

Please sign in to comment.