-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add rock for loki v3.1.1 (#36)
Co-authored-by: Github Actions <[email protected]>
- Loading branch information
1 parent
449e756
commit c947208
Showing
2 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
auth_enabled: false | ||
|
||
server: | ||
http_listen_port: 3100 | ||
grpc_listen_port: 9096 | ||
|
||
common: | ||
path_prefix: /tmp/loki | ||
storage: | ||
filesystem: | ||
chunks_directory: /tmp/loki/chunks | ||
rules_directory: /tmp/loki/rules | ||
replication_factor: 1 | ||
ring: | ||
instance_addr: 127.0.0.1 | ||
kvstore: | ||
store: inmemory | ||
|
||
query_range: | ||
results_cache: | ||
cache: | ||
embedded_cache: | ||
enabled: true | ||
max_size_mb: 100 | ||
|
||
schema_config: | ||
configs: | ||
- from: 2020-10-24 | ||
store: boltdb-shipper | ||
object_store: filesystem | ||
schema: v11 | ||
index: | ||
prefix: index_ | ||
period: 24h | ||
|
||
ruler: | ||
alertmanager_url: http://localhost:9093 | ||
|
||
# By default, Loki will send anonymous, but uniquely-identifiable usage and configuration | ||
# analytics to Grafana Labs. These statistics are sent to https://stats.grafana.org/ | ||
# | ||
# Statistics help us better understand how Loki is used, and they show us performance | ||
# levels for most users. This helps us prioritize features and documentation. | ||
# For more information on what's sent, look at | ||
# https://github.com/grafana/loki/blob/main/pkg/usagestats/stats.go | ||
# Refer to the buildReport method to see what goes into a report. | ||
# | ||
# If you would like to disable reporting, uncomment the following lines: | ||
#analytics: | ||
# reporting_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: loki | ||
summary: Loki in a ROCK. | ||
description: "Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus." | ||
version: "3.1.1" | ||
base: ubuntu:22.04 | ||
license: AGPL-3.0 | ||
services: | ||
loki: | ||
command: /bin/loki --config.file=/etc/loki/loki-local-config.yaml | ||
override: replace | ||
startup: enabled | ||
platforms: | ||
amd64: | ||
parts: | ||
loki: | ||
plugin: go | ||
source: https://github.com/grafana/loki | ||
source-type: git | ||
source-tag: "v3.1.1" | ||
build-snaps: | ||
- go/1.21/stable | ||
build-environment: | ||
- BUILD_IN_CONTAINER: "false" | ||
build-packages: | ||
- libsystemd-dev | ||
override-build: | | ||
PROMTAIL_JOURNAL_ENABLED=1 make -j$(grep -c ^processor /proc/cpuinfo) all | ||
install -D -m755 ./cmd/loki/loki ${CRAFT_PART_INSTALL}/usr/bin/loki | ||
install -D -m755 ./cmd/loki-canary/loki-canary ${CRAFT_PART_INSTALL}/usr/bin/loki-canary | ||
install -D -m755 ./cmd/logcli/logcli ${CRAFT_PART_INSTALL}/usr/bin/logcli | ||
install -D -m755 ./clients/cmd/promtail/promtail ${CRAFT_PART_INSTALL}/usr/bin/promtail | ||
stage: | ||
- usr/bin/loki | ||
- usr/bin/loki-canary | ||
- usr/bin/logcli | ||
- usr/bin/promtail | ||
default-config: | ||
plugin: dump | ||
source: . | ||
organize: | ||
loki-local-config.yaml: etc/loki/loki-local-config.yaml | ||
stage: | ||
- etc/loki/loki-local-config.yaml | ||
ca-certs: | ||
plugin: nil | ||
overlay-packages: [ca-certificates] | ||
deb-security-manifest: | ||
plugin: nil | ||
after: | ||
- loki | ||
- ca-certs | ||
override-prime: | | ||
set -x | ||
mkdir -p $CRAFT_PRIME/usr/share/rocks/ | ||
(echo "# os-release" && cat /etc/os-release && echo "# dpkg-query" && dpkg-query --admindir=$CRAFT_PRIME/var/lib/dpkg/ -f '${db:Status-Abbrev},${binary:Package},${Version},${source:Package},${Source:Version}\n' -W) > $CRAFT_PRIME/usr/share/rocks/dpkg.query |