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

2.0 update docs + examples #541

Merged
merged 24 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 4 additions & 6 deletions deploy/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
# This docker file is for local dev, the official Dockerfile is at
# https://github.com/tricksterproxy/trickster-docker-images/
ARG IMAGE_ARCH=amd64

FROM golang:1.15 as builder
FROM golang:1.16 as builder
COPY . /go/src/github.com/tricksterproxy/trickster
WORKDIR /go/src/github.com/tricksterproxy/trickster

ARG GOARCH=amd64
RUN GOOS=linux GOARCH=${GOARCH} CGO_ENABLED=0 make build
RUN GOOS=linux CGO_ENABLED=0 make build

FROM ${IMAGE_ARCH}/alpine:3.12
FROM alpine:3
LABEL maintainer "The Trickster Authors <[email protected]>"

COPY --from=builder /go/src/github.com/tricksterproxy/trickster/OPATH/trickster /usr/local/bin/trickster
COPY cmd/trickster/conf/example.conf /etc/trickster/trickster.conf
COPY examples/conf/example.full.yaml /etc/trickster/trickster.yaml
RUN chown nobody /usr/local/bin/trickster
RUN chmod +x /usr/local/bin/trickster

Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ build: go-mod-tidy go-mod-vendor
rpm: build
mkdir -p ./$(BUILD_SUBDIR)/SOURCES
cp -p ./$(BUILD_SUBDIR)/trickster ./$(BUILD_SUBDIR)/SOURCES/
cp $(TRICKSTER_MAIN)/conf/trickster.service ./$(BUILD_SUBDIR)/SOURCES/
sed -e 's%^# log_file =.*$$%log_file = "/var/log/trickster/trickster.log"%' \
cp deploy/systemd/trickster.service ./$(BUILD_SUBDIR)/SOURCES/
sed -e 's%^# log_file:.*$$%log_file: /var/log/trickster/trickster.log%' \
-e 's%prometheus:9090%localhost:9090%' \
< $(TRICKSTER_MAIN)/conf/example.conf > ./$(BUILD_SUBDIR)/SOURCES/trickster.conf
< examples/conf/example.full.yaml > ./$(BUILD_SUBDIR)/SOURCES/trickster.yaml
rpmbuild --define "_topdir $(CURDIR)/$(BUILD_SUBDIR)" \
--define "_version $(PROGVER)" \
--define "_release 1" \
Expand All @@ -87,7 +87,7 @@ release-artifacts: clean
cp ./README.md $(PACKAGE_DIR)
cp ./CONTRIBUTING.md $(PACKAGE_DIR)
cp ./LICENSE $(PACKAGE_DIR)
cp ./cmd/trickster/conf/*.conf $(CONF_DIR)
cp ./examples/conf/*.yaml $(CONF_DIR)

GOOS=darwin GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(LDFLAGS) -o $(BIN_DIR)/trickster-$(PROGVER).darwin-amd64 -a -v $(TRICKSTER_MAIN)/*.go
GOOS=linux GOARCH=amd64 CGO_ENABLED=$(CGO_ENABLED) $(GO) build $(LDFLAGS) -o $(BIN_DIR)/trickster-$(PROGVER).linux-amd64 -a -v $(TRICKSTER_MAIN)/*.go
Expand Down Expand Up @@ -123,9 +123,9 @@ docker:
.PHONY: docker-release
docker-release:
# linux x86 image
docker build --build-arg IMAGE_ARCH=amd64 --build-arg GOARCH=amd64 -f ./deploy/Dockerfile -t tricksterio/trickster:$(IMAGE_TAG) .
docker build --build-arg IMAGE_ARCH=amd64 --build-arg GOARCH=amd64 -f ./deploy/Dockerfile -t tricksterproxy/trickster:$(IMAGE_TAG) .
# linux arm image
docker build --build-arg IMAGE_ARCH=arm64v8 --build-arg GOARCH=arm64 -f ./deploy/Dockerfile -t tricksterio/trickster:arm64v8-$(IMAGE_TAG) .
docker build --build-arg IMAGE_ARCH=arm64v8 --build-arg GOARCH=arm64 -f ./deploy/Dockerfile -t tricksterproxy/trickster:arm64v8-$(IMAGE_TAG) .

.PHONY: style
style:
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Trickster is an HTTP reverse proxy/cache for http applications and a dashboard query accelerator for time series databases.

<img src="./docs/images/high-level-1.png" width=512/>
<img src="./docs/images/high-level.png" width=512/>

Learn more below, and check out our [roadmap](./docs/roadmap.md) to find out what else is in the works.

Expand All @@ -22,9 +22,10 @@ Trickster is a fully-featured HTTP Reverse Proxy Cache for HTTP applications lik

### Proxy Feature Highlights

* A unique and powerful [Application Load Balancer](./docs/alb.md) for Time Series and generic HTTP endoints
* [Supports TLS](./docs/tls.md) and HTTP/2 for frontend termination and backend origination
* Offers several options for a [caching layer](./docs/caches.md), including in-memory, filesystem, Redis and bbolt
* [Highly customizable](./docs/configuring.md), using simple configuration settings, [down to the HTTP Path](./docs/paths.md)
* [Highly customizable](./docs/configuring.md), using simple yaml configuration settings, [down to the HTTP Path](./docs/paths.md)
* Built-in Prometheus [metrics](./docs/metrics.md) and customizable [Health Check](./docs/health.md) Endpoints for end-to-end monitoring
* [Negative Caching](./docs/negative-caching.md) to prevent domino effect outages
* High-performance [Collapsed Forwarding](./docs/collapsed-forwarding.md)
Expand All @@ -48,7 +49,7 @@ Trickster works with virtually any Dashboard application that makes queries to a

<img src="./docs/images/external/irondb_logo_60.png" width=16 /> Circonus IRONdb

See the [Supported Origin Types](./docs/supported-origin-types.md) document for full details
See the [Supported TSDB Providers](./docs/supported-origin-types.md) document for full details

### How Trickster Accelerates Time Series

Expand All @@ -72,15 +73,15 @@ Trickster's Fast Forward feature ensures that even with step boundary normalizat

## Trying Out Trickster

Check out our end-to-end [Docker Compose demo composition](./deploy/trickster-demo) for a zero-configuration running environment.
Check out our end-to-end [Docker Compose demo composition](./examples/docker-compose) for a zero-configuration running environment.

## Installing

### Docker

Docker images are available on Docker Hub:

$ docker run --name trickster -d -v /path/to/trickster.conf:/etc/trickster/trickster.conf -p 0.0.0.0:8480:8480 tricksterproxy/trickster
$ docker run --name trickster -d -v /path/to/trickster.yaml:/etc/trickster/trickster.yaml -p 0.0.0.0:8480:8480 tricksterproxy/trickster

See the 'deploy' Directory for more information about using or creating Trickster docker images.

Expand All @@ -100,17 +101,22 @@ Go environment with [version 1.9 or greater installed](http://golang.org/doc/ins
You can directly use the `go` tool to download and install the `trickster`
binary into your `GOPATH`:

$ go get github.com/tricksterproxy/trickster
$ trickster -origin-url http://prometheus.example.com:9090 -origin-type prometheus
```bash
$ go get github.com/tricksterproxy/trickster/cmd/trickster
# this starts a prometheus accelerator proxy for the provided endpoint
$ trickster -origin-url http://prometheus.example.com:9090 -provider prometheus
```

You can also clone the repository yourself and build using `make`:

```bash
$ mkdir -p $GOPATH/src/github.com/tricksterproxy
$ cd $GOPATH/src/github.com/tricksterproxy
$ git clone https://github.com/tricksterproxy/trickster.git
$ cd trickster
$ make build
$ ./OPATH/trickster -origin-url http://prometheus.example.com:9090 -origin-type prometheus
$ ./OPATH/trickster -origin-url http://prometheus.example.com:9090 -provider prometheus
```

The Makefile provides several targets, including:

Expand Down
Loading