diff --git a/loki/2.9.5/22.03-lts-sp3/Dockerfile b/loki/2.9.5/22.03-lts-sp3/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..9f1230e81299b5a0b9bb70b59d1f08d7c2d3d56e --- /dev/null +++ b/loki/2.9.5/22.03-lts-sp3/Dockerfile @@ -0,0 +1,34 @@ +ARG BASE=openeuler/openeuler:22.03-lts-sp3 +FROM ${BASE} + +ARG TARGETARCH +ARG BUILDARCH +ARG VERSION=2.9.5 + +RUN yum -y update && \ + yum -y install wget && \ + yum clean all + +RUN if [ "$TARGETARCH" = "amd64" ]; then \ + BUILDARCH="x86_64"; \ + elif [ "$TARGETARCH" = "arm64" ]; then \ + BUILDARCH="aarch64"; \ + fi && \ + wget -O grafana-logcli.rpm https://github.com/grafana/loki/releases/download/v${VERSION}/logcli-${VERSION}.${BUILDARCH}.rpm && \ + wget -O grafana-loki.rpm https://github.com/grafana/loki/releases/download/v${VERSION}/loki-${VERSION}.${BUILDARCH}.rpm && \ + wget -O grafana-promtail.rpm https://github.com/grafana/loki/releases/download/v${VERSION}/promtail-${VERSION}.${BUILDARCH}.rpm && \ + yum -y install grafana-loki.rpm grafana-promtail.rpm grafana-logcli.rpm && \ + rm -rf grafana-loki.rpm grafana-promtail.rpm grafana-logcli.rpm + +COPY local-config.yaml /etc/loki/local-config.yaml + +RUN groupadd -g 10001 loki && \ + adduser -u 10001 -g loki loki && \ + mkdir -p /loki/rules && \ + mkdir -p /loki/rules-temp && \ + chown -R loki:loki /etc/loki /loki + +USER 10001 +EXPOSE 3100 +ENTRYPOINT [ "loki" ] +CMD ["-config.file=/etc/loki/local-config.yaml"] diff --git a/loki/2.9.5/22.03-lts-sp3/local-config.yaml b/loki/2.9.5/22.03-lts-sp3/local-config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..119b9395a8d7afd39016a1415c1d327165b0397a --- /dev/null +++ b/loki/2.9.5/22.03-lts-sp3/local-config.yaml @@ -0,0 +1,42 @@ +auth_enabled: false + +server: + http_listen_port: 3100 + +common: + instance_addr: 127.0.0.1 + path_prefix: /loki + storage: + filesystem: + chunks_directory: /loki/chunks + rules_directory: /loki/rules + replication_factor: 1 + ring: + kvstore: + store: inmemory + +schema_config: + configs: + - from: 2020-10-24 + store: tsdb + object_store: filesystem + schema: v12 + 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 \ No newline at end of file diff --git a/loki/README.md b/loki/README.md new file mode 100644 index 0000000000000000000000000000000000000000..8ab69503370e14368f3ee758175a9e664167a26f --- /dev/null +++ b/loki/README.md @@ -0,0 +1,30 @@ +# Loki + +# Quick reference + +- The official Loki docker image. + +- Maintained by: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative) + +- Where to get help: [openEuler CloudNative SIG](https://gitee.com/openeuler/cloudnative), [openEuler](https://gitee.com/openeuler/community) + +# Build reference + +1. Build images and push: +```shell +docker buildx build -t "openeuler/loki:$TAG" --platform linux/amd64,linux/arm64 . --push +``` + +We are using `buildx` in here to generate multi-arch images, see more in [Docker Buildx](https://docs.docker.com/buildx/working-with-buildx/) + +2. Run: +```shell +docker run -d -p 3100:3100 openeuler/loki:$TAG +``` + +# Supported tags and respective Dockerfile links + +- 2.9.5-oe2203sp3: loki v2.9.5, openEuler 22.03-LTS-SP3 + +## Operating System +Linux/Unix, ARM64 or x86-64 architecture. diff --git a/loki/doc/image-info.yml b/loki/doc/image-info.yml new file mode 100644 index 0000000000000000000000000000000000000000..75f939c543b9b20ba6bfc6f15d54a05b8a11848a --- /dev/null +++ b/loki/doc/image-info.yml @@ -0,0 +1,89 @@ +name: loki +category: cloud +description: Loki是一个受Prometheus启发的水平可扩展、高可用、多租户日志聚合系统。它的设计非常经济高效且易于操作。它不索引日志的内容,而是为每个日志流建立一组标签。 +environment: | + 本应用以容器镜像的方式供用户使用,运行于预置docker的Linux环境。Docker的推荐安装方式如下: + ## apt安装 + ### 1.更新系统软件包依赖 + ``` + sudo spt update + sudo apt install ca-certificates curl gnupg lsb-release + ``` + ### 2.添加Docker官方GPG密钥 + ``` + sudo mkdir -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg + sudo chmod a+r /etc/apt/keyrings/docker.gpg + ``` + ### 3.添加Docker官方APT源 + ``` + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + ``` + ### 4.再次更新软件包索引 + ``` + sudo apt update + ``` + ### 5.安装Docker + ``` + sudo apt install docker-ce docker-ce-cli containerd.io + ``` + + ## yum安装 + ### 1.安装yum-utils + ``` + sudo yum install -y yum-utils + ``` + ### 2.添加Docker源 + ``` + sudo yum-config-manager \ + > --add-repo \ + > https://download.docker.com/linux/centos/docker-ce.repo + ``` + ### 3.安装Docker + ``` + sudo yum install -y docker-ce docker-ce-cli containerd.io + ``` + + 注意,在openEuler环境安装docker时,可执行如下命令一键安装 + ``` + yum install -y docker + ``` + + ## 脚本安装 + ### 1.下载安装脚本 + ``` + curl -fsSL https://get.docker.com -o get-docker.sh + ``` + ### 2.使用root权限执行脚本 + ``` + sudo sh get-docker.sh + ``` + 使用脚本安装方式时,如果用户要指定安装的docker版本,需要自行修改`get-docker.sh`的源码内容。 + + ## 验证 + ``` + sudo docker run hello-world + ``` + +download: | + 获取容器镜像 + ``` + docker pull openeuler/loki:{TAG} + ``` + +install: | + 启动容器 + ``` + docker run --name loki -p 3100:3100 openeuler/loki:{TAG} + ``` + 用户可根据自身需求,自定义启动选项。 + +license: AGPL-3.0 license +similar_packages: + - Prometheus: Prometheus是一个开源的系统监控和警报工具。它最初由SoundCloud开发,现已成为CNCF(Cloud Native Computing Foundation)的毕业项目之一。Prometheus专门设计用于处理大规模分布式系统的监控数据,并提供了灵活的查询语言和强大的警报功能。 + - Logstash: Logstash是一个开源的数据收集、转换和传输工具,它可以用于收集各种来源的数据,包括日志数据,并将其发送到不同的目标。Logstash是ELK Stack中的一部分,与Elasticsearch和Kibana结合使用,构建一个完整的日志收集、存储和可视化解决方案。。 + - Fluentd: Fluentd是一个开源的数据收集和转发工具,用于收集、处理和传输各种类型的数据。它具有高度可定制和可扩展的特点,被广泛用于日志收集、流式处理和数据管道的构建。 + - Vector: Vector是一个开源的数据采集工具,旨在高效、可靠地收集、转换和传输日志和指标数据。它专注于提供简单、轻量级的解决方案,适用于各种规模的环境。 +dependency: + - Prometheus + - Grafana \ No newline at end of file diff --git a/loki/doc/picture/logo.png b/loki/doc/picture/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..071108a7bd99f5d1f6f6f7724e82cfc1dc15763a Binary files /dev/null and b/loki/doc/picture/logo.png differ diff --git a/loki/meta.yml b/loki/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..cc7160e033989bd51e797b26e54dc27c71d3a24f --- /dev/null +++ b/loki/meta.yml @@ -0,0 +1,2 @@ +2.9.5-oe2203sp3: + - loki/2.9.5/22.03-lts-sp3/Dockerfile \ No newline at end of file diff --git a/prometheus/README.md b/prometheus/README.md index e02293b91c43988747fd565ccd7d9e6c704269f3..684690d0f8511a33312220b72be9d8677e3ea4b2 100644 --- a/prometheus/README.md +++ b/prometheus/README.md @@ -25,6 +25,7 @@ docker run --name my_prometheus -d -p 9090:9090 openeuler/prometheus:$VERSION # Supported tags and respective Dockerfile links - 2.20.0-22.03-lts: prometheus v2.20.0, openEuler 22.03 LTS +- 2.50.1-oe2203sp3: prometheus v2.50.1, openEuler 22.03 LTS SP3 ## Operating System Linux/Unix, ARM64 or x86-64 architecture.