Skip to content

Commit 11f7aea

Browse files
authored
Merge pull request #1393 from cortexproject/docs
Update README with more description and links.
2 parents 975f5bb + dcce1ef commit 11f7aea

File tree

3 files changed

+145
-116
lines changed

3 files changed

+145
-116
lines changed

CONTRIBUTING.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,71 @@ git commit -s -m "Here is my signed commit"
1515
```
1616

1717
You can find further instructions [here](https://github.com/probot/dco#how-it-works).
18+
19+
## Building Cortex
20+
21+
To build:
22+
```
23+
make
24+
```
25+
26+
(By default, the build runs in a Docker container, using an image built
27+
with all the tools required. The source code is mounted from where you
28+
run `make` into the build container as a Docker volume.)
29+
30+
To run the test suite:
31+
```
32+
make test
33+
```
34+
35+
## Playing in `minikube`
36+
37+
First, start `minikube`.
38+
39+
You may need to load the Docker images into your minikube environment. There is
40+
a convenient rule in the Makefile to do this:
41+
42+
```
43+
make prime-minikube
44+
```
45+
46+
Then run Cortex in minikube:
47+
```
48+
kubectl apply -f ./k8s
49+
```
50+
51+
(these manifests use `latest` tags, i.e. this will work if you have
52+
just built the images and they are available on the node(s) in your
53+
Kubernetes cluster)
54+
55+
Cortex will sit behind an nginx instance exposed on port 30080. A job is deployed to scrape itself. Try it:
56+
57+
http://192.168.99.100:30080/api/prom/api/v1/query?query=up
58+
59+
If that doesn't work, your Minikube might be using a different ip address. Check with `minikube status`.
60+
61+
### Dependency management
62+
63+
We uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages.
64+
This requires a working Go environment with version 1.11 or greater, git and [bzr](http://wiki.bazaar.canonical.com/Download) installed.
65+
66+
To add or update a new dependency, use the `go get` command:
67+
68+
```bash
69+
# Pick the latest tagged release.
70+
go get example.com/some/module/pkg
71+
72+
# Pick a specific version.
73+
go get example.com/some/module/[email protected]
74+
```
75+
76+
Tidy up the `go.mod` and `go.sum` files:
77+
78+
```bash
79+
go mod tidy
80+
go mod vendor
81+
git add go.mod go.sum vendor
82+
git commit
83+
```
84+
85+
You have to commit the changes to `go.mod` and `go.sum` before submitting the pull request.

README.md

Lines changed: 76 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,85 @@
11
<p align="center"><img src="imgs/logo.png" alt="Cortex Logo"></p>
22

3-
# Open source, horizontally scalable, multi-tenant Prometheus as a service
4-
53
[![Circle CI](https://circleci.com/gh/cortexproject/cortex/tree/master.svg?style=shield)](https://circleci.com/gh/cortexproject/cortex/tree/master)
64
[![GoDoc](https://godoc.org/github.com/cortexproject/cortex?status.svg)](https://godoc.org/github.com/cortexproject/cortex)
5+
<a href="https://goreportcard.com/report/github.com/cortexproject/cortex"><img src="https://goreportcard.com/badge/github.com/cortexproject/cortex" alt="Go Report Card" /></a>
6+
<a href="https://cloud-native.slack.com/messages/cortex/"><img src="https://img.shields.io/badge/join%20slack-%23cortex-brightgreen.svg" alt="Slack" /></a>
77

8-
Cortex is a [CNCF](https://cncf.io) sandbox project used in several production
9-
systems including [Weave Cloud](https://cloud.weave.works), [GrafanaCloud](https://grafana.com/cloud)
10-
and [FreshTracks.io](https://www.freshtracks.io/).
8+
# Cortex: horizontally scalable, highly available, multi-tenant, long term storage for Prometheus.
119

12-
Cortex provides horizontally scalable, multi-tenant, long term storage for
13-
[Prometheus](https://prometheus.io) metrics when used as a [remote
14-
write](https://prometheus.io/docs/operating/configuration/#remote_write)
15-
destination, and a horizontally scalable, Prometheus-compatible query
16-
API.
10+
Cortex provides horizontally scalable, highly available, multi-tenant, long term storage for
11+
[Prometheus](https://prometheus.io).
1712

18-
Multi-tenant means it handles metrics from multiple independent
19-
Prometheus sources, keeping them separate.
13+
- **Horizontally scalable:** Cortex can run across multiple machines in a cluster, exceeding the throughput and storage of a single machine. This enables you to send the metrics from multiple Prometheus servers to a single Cortex cluster and run "globally aggregated" queries across all data in a single place.
14+
- **Highly available:** When run in a cluster, Cortex can replicate data between machines. This allows you to survive machine failure without gaps in your graphs.
15+
- **Multi-tenant:** Cortex can isolate data and queries from multiple different independent
16+
Prometheus sources in a single cluster, allowing untrusted parties to share the same cluster.
17+
- **Long term storage:** Cortex supports Amazon DynamoDB, Google Bigtable, Cassandra, S3 and GCS for long term storage of metric data. This allows you to durably store data for longer than the lifetime of any single machine, and use this data for long term capacity planning.
2018

21-
[Instrumenting Your App: Best Practices](https://www.weave.works/docs/cloud/latest/tasks/monitor/best-instrumenting/)
19+
Cortex is a [CNCF](https://cncf.io) sandbox project used in several production systems including [Weave Cloud](https://cloud.weave.works) and [GrafanaCloud](https://grafana.com/cloud).
20+
Cortex is a primarily used as a [remote write](https://prometheus.io/docs/operating/configuration/#remote_write) destination for Prometheus, with a Prometheus-compatible query API.
21+
22+
## Documentation
23+
24+
Read the [getting started guide](docs/getting_started.md) if you're new to the project.
25+
26+
For a guide to contributing to Cortex, see the [contributor guidelines](CONTRIBUTING.md).
27+
28+
You can also read [an overview of Cortex's architecture](docs/architecture.md) and [information about configuring Cortex](docs/arguments.md).
29+
30+
## Further reading
31+
32+
To learn more about Cortex, consult the following documents & talks:
33+
34+
- Feb 2019 blog post & podcast; "[Prometheus Scalability with Bryan Boreham][prometheus-scalability]" ([podcast][prometheus-scalability-podcast])
35+
- Feb 2019 blog post; "[How Aspen Mesh Runs Cortex in Production][aspen-mesh-2019]"
36+
- Dec 2018 KubeCon talk; "[Cortex: Infinitely Scalable Prometheus][kubecon-2018-talk]" ([video][kubecon-2018-video], [slides][kubecon-2018-slides])
37+
- Dec 2018 CNCF blog post; "[Cortex: a multi-tenant, horizontally scalable Prometheus-as-a-Service][cncf-2018-blog]"
38+
- Nov 2018 CloudNative London meetup talk; "Cortex: Horizontally Scalable, Highly Available Prometheus" ([slides][cloudnative-london-2018-slides])
39+
- Nov 2018 CNCF TOC Presentation; "Horizontally Scalable, Multi-tenant Prometheus" ([slides][cncf-toc-presentation])
40+
- Sept 2018 blog post; "[What is Cortex?][what-is-cortex]"
41+
- Aug 2018 PromCon panel; "[Prometheus Long-Term Storage Approaches][promcon-2018-panel]" ([video][promcon-2018-video])
42+
- Aug 2017 PromCon talk; "[Cortex: Prometheus as a Service, One Year On][promcon-2017-talk]" ([videos][promcon-2017-video], [slides][promcon-2017-slides], write up [part 1][promcon-2017-writeup-1], [part 2][promcon-2017-writeup-2], [part 3][promcon-2017-writeup-3])
43+
- Jul 2017 design doc; "[Cortex Query Optimisations][cortex-query-optimisation-2017]"
44+
- Jun 2017 Prometheus London meetup talk; "Cortex: open-source, horizontally-scalable, distributed Prometheus" ([video][prometheus-london-2017-video])
45+
- Dec 2016 KubeCon talk; "Weave Cortex: Multi-tenant, horizontally scalable Prometheus as a Service" ([video][kubecon-2016-video], [slides][kubecon-2016-slides])
46+
- Aug 2016 PromCon talk; "Project Frankenstein: Multitenant, Scale-Out Prometheus": ([video][promcon-2016-video], [slides][promcon-2016-slides])
47+
- Jun 2018 design document; "[Project Frankenstein: A Multi Tenant, Scale Out Prometheus](http://goo.gl/prdUYV)"
48+
49+
[prometheus-scalability]: https://www.weave.works/blog/prometheus-scalability-with-bryan-boreham
50+
[prometheus-scalability-podcast]: https://softwareengineeringdaily.com/2019/01/21/prometheus-scalability-with-bryan-boreham/
51+
[aspen-mesh-2019]: https://www.weave.works/blog/how-aspen-mesh-runs-cortex-in-production
52+
[kubecon-2018-talk]: https://kccna18.sched.com/event/GrXL/cortex-infinitely-scalable-prometheus-bryan-boreham-weaveworks
53+
[kubecon-2018-video]: https://www.youtube.com/watch?v=iyN40FsRQEo
54+
[kubecon-2018-slides]: https://static.sched.com/hosted_files/kccna18/9b/Cortex%20CloudNativeCon%202018.pdf
55+
[cloudnative-london-2018-slides]: https://www.slideshare.net/grafana/cortex-horizontally-scalable-highly-available-prometheus
56+
[cncf-2018-blog]: https://www.cncf.io/blog/2018/12/18/cortex-a-multi-tenant-horizontally-scalable-prometheus-as-a-service/
57+
[cncf-toc-presentation]: https://docs.google.com/presentation/d/190oIFgujktVYxWZLhLYN4q8p9dtQYoe4sxHgn4deBSI/edit#slide=id.g3b8e2d6f7e_0_6
58+
[what-is-cortex]: https://medium.com/weaveworks/what-is-cortex-2c30bcbd247d
59+
[promcon-2018-panel]: https://promcon.io/2018-munich/talks/panel-discussion-prometheus-long-term-storage-approaches/
60+
[promcon-2018-video]: https://www.youtube.com/watch?v=3pTG_N8yGSU
61+
[prometheus-london-2017-video]: https://www.youtube.com/watch?v=Xi4jq2IUbLs
62+
[promcon-2017-talk]: https://promcon.io/2017-munich/talks/cortex-prometheus-as-a-service-one-year-on/
63+
[promcon-2017-video]: https://www.youtube.com/watch?v=_8DmPW4iQBQ
64+
[promcon-2017-slides]: https://promcon.io/2017-munich/slides/cortex-prometheus-as-a-service-one-year-on.pdf
65+
[promcon-2017-writeup-1]: https://kausal.co/blog/cortex-prometheus-aas-promcon-1/
66+
[promcon-2017-writeup-2]: https://kausal.co/blog/cortex-prometheus-aas-promcon-2/
67+
[promcon-2017-writeup-3]: https://kausal.co/blog/cortex-prometheus-aas-promcon-3/
68+
[cortex-query-optimisation-2017]: https://docs.google.com/document/d/1lsvSkv0tiAMPQv-V8vI2LZ8f4i9JuTRsuPI_i-XcAqY
69+
[kubecon-2016-video]: https://www.youtube.com/watch?v=9Uctgnazfwk
70+
[kubecon-2016-slides]: http://www.slideshare.net/weaveworks/weave-cortex-multitenant-horizontally-scalable-prometheus-as-a-service
71+
[promcon-2016-video]: https://youtu.be/3Tb4Wc0kfCM
72+
[promcon-2016-slides]: http://www.slideshare.net/weaveworks/project-frankenstein-a-multitenant-horizontally-scalable-prometheus-as-a-service
73+
74+
## <a name="help"></a>Getting Help
75+
76+
If you have any questions about Cortex:
77+
78+
- Ask a question on the [Cortex Slack channel](https://cloud-native.slack.com/messages/cortex/). To invite yourself to the CNCF Slack, visit http://slack.cncf.io/.
79+
- <a href="https://github.com/cortexproject/cortex/issues/new">File an issue.</a>
80+
- Send an email to <a href="mailto:[email protected]">[email protected]</a>
81+
82+
Your feedback is always welcome.
2283

2384
## Hosted Cortex (Prometheus as a service)
2485

@@ -33,98 +94,10 @@ container-based applications. Sign up at https://cloud.weave.works
3394
and follow the instructions there. Additional help can also be found
3495
in the [Weave Cloud documentation](https://www.weave.works/docs/cloud/latest/overview/).
3596

97+
[Instrumenting Your App: Best Practices](https://www.weave.works/docs/cloud/latest/tasks/monitor/best-instrumenting/)
98+
3699
### GrafanaCloud
37100

38101
To use Cortex as part of Grafana Cloud, sign up for [GrafanaCloud](https://grafana.com/cloud)
39102
by clicking "Log In" in the top right and then "Sign Up Now". Cortex is included
40103
as part of the Starter and Basic Hosted Grafana plans.
41-
42-
## Contributing
43-
44-
For a guide to contributing to Cortex, see the [contributor guidelines](CONTRIBUTING.md).
45-
46-
## For Developers
47-
48-
To build:
49-
```
50-
make
51-
```
52-
53-
(By default, the build runs in a Docker container, using an image built
54-
with all the tools required. The source code is mounted from where you
55-
run `make` into the build container as a Docker volume.)
56-
57-
To run the test suite:
58-
```
59-
make test
60-
```
61-
62-
## Playing in `minikube`
63-
64-
First, start `minikube`.
65-
66-
You may need to load the Docker images into your minikube environment. There is
67-
a convenience rule in the Makefile to do this:
68-
69-
```
70-
make prime-minikube
71-
```
72-
73-
Then run Cortex in minikube:
74-
```
75-
kubectl apply -f ./k8s
76-
```
77-
78-
(these manifests use `latest` tags, i.e. this will work if you have
79-
just built the images and they are available on the node(s) in your
80-
Kubernetes cluster)
81-
82-
Cortex will sit behind an nginx instance exposed on port 30080. A job is deployed to scrape itself. Try it:
83-
84-
http://192.168.99.100:30080/api/prom/api/v1/query?query=up
85-
86-
If that doesn't work, your Minikube might be using a different ip address. Check with `minikube status`.
87-
88-
### Dependency management
89-
90-
We uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages.
91-
This requires a working Go environment with version 1.11 or greater, git and [bzr](http://wiki.bazaar.canonical.com/Download) installed.
92-
93-
To add or update a new dependency, use the `go get` command:
94-
95-
```bash
96-
# Pick the latest tagged release.
97-
go get example.com/some/module/pkg
98-
99-
# Pick a specific version.
100-
go get example.com/some/module/[email protected]
101-
```
102-
103-
Tidy up the `go.mod` and `go.sum` files:
104-
105-
```bash
106-
go mod tidy
107-
git add go.mod go.sum
108-
git commit
109-
```
110-
111-
You have to commit the changes to `go.mod` and `go.sum` before submitting the pull request.
112-
113-
## Further reading
114-
115-
To learn more about Cortex, consult the following documents/talks:
116-
117-
- [Original design document for Project Frankenstein](http://goo.gl/prdUYV)
118-
- PromCon 2016 Talk: "Project Frankenstein: Multitenant, Scale-Out Prometheus": [video](https://youtu.be/3Tb4Wc0kfCM), [slides](http://www.slideshare.net/weaveworks/project-frankenstein-a-multitenant-horizontally-scalable-prometheus-as-a-service)
119-
- KubeCon Prometheus Day talk "Weave Cortex: Multi-tenant, horizontally scalable Prometheus as a Service" [slides](http://www.slideshare.net/weaveworks/weave-cortex-multitenant-horizontally-scalable-prometheus-as-a-service)
120-
- CNCF TOC Presentation; "Horizontally Scalable, Multi-tenant Prometheus" [slides](https://docs.google.com/presentation/d/190oIFgujktVYxWZLhLYN4q8p9dtQYoe4sxHgn4deBSI/edit#slide=id.g3b8e2d6f7e_0_6)
121-
122-
## <a name="help"></a>Getting Help
123-
124-
If you have any questions about Cortex:
125-
126-
- Ask a question on the [Cortex Slack channel](https://cloud-native.slack.com/messages/cortex/). To invite yourself to the CNCF Slack, visit http://slack.cncf.io/.
127-
- <a href="https://github.com/cortexproject/cortex/issues/new">File an issue.</a>
128-
- Send an email to <a href="mailto:[email protected]">[email protected]</a>
129-
130-
Your feedback is always welcome.

docs/architecture.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,4 @@ The interface works somewhat differently across the supported databases:
128128

129129
A set of schemas are used to map the matchers and label sets used on reads and writes to the chunk store into appropriate operations on the index. Schemas have been added as Cortex has evolved, mainly in an attempt to better load balance writes and improve query performance.
130130

131-
> The current schema recommendation is the **v6 schema**.
132-
133-
## See also
134-
135-
For more details on Cortex's architecture, we recommend reading/watching:
136-
137-
- "[Project Frankenstein: A multi tenant, scale out Prometheus](https://docs.google.com/document/d/1C7yhMnb1x2sfeoe45f4mnnKConvroWhJ8KQZwIHJOuw/edit#heading=h.nimsq29kl184)" (the original design doc)
138-
- "[Multitenant, Scale-Out Prometheus](https://promcon.io/2016-berlin/talks/multitenant-scale-out-prometheus/)" (PromCon 2016 talk)
139-
- "Weave Cortex: Multi-tenant, horizontally scalable Prometheus as a Service" (KubeCon Prometheus Day talk) [slides](http://www.slideshare.net/weaveworks/weave-cortex-multitenant-horizontally-scalable-prometheus-as-a-service) [video](https://www.youtube.com/watch?v=9Uctgnazfwk)
140-
- "[Cortex: Prometheus as a Service, One Year On](https://promcon.io/2017-munich/talks/cortex-prometheus-as-a-service-one-year-on/)" (PromCon 2017 Talk)
141-
- "Horizontally Scalable, Multi-tenant Prometheus" [slides](https://docs.google.com/presentation/d/190oIFgujktVYxWZLhLYN4q8p9dtQYoe4sxHgn4deBSI/edit#slide=id.g3b8e2d6f7e_0_6) (CNCF TOC Presentation)
142-
- [Cortex Query Woes](https://docs.google.com/document/d/1lsvSkv0tiAMPQv-V8vI2LZ8f4i9JuTRsuPI_i-XcAqY) provides details on Cortex query optimizations.
143-
- [Cortex: Horizontally Scalable, Highly Available Prometheus Monitoring](https://speakerdeck.com/grafana/cortex-horizontally-scalable-highly-available-prometheus-monitoring) (Presentation at Cloud Native London Meetup, Nov 2018)
131+
> The current schema recommendation is the **v10 schema**.

0 commit comments

Comments
 (0)