Skip to content

Commit

Permalink
chore: add rock for loki v3.1.1 (#36)
Browse files Browse the repository at this point in the history
Co-authored-by: Github Actions <[email protected]>
  • Loading branch information
github-actions[bot] and Github Actions authored Aug 23, 2024
1 parent 449e756 commit c947208
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 0 deletions.
50 changes: 50 additions & 0 deletions 3.1.1/loki-local-config.yaml
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
55 changes: 55 additions & 0 deletions 3.1.1/rockcraft.yaml
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

0 comments on commit c947208

Please sign in to comment.