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

salt: Add debian 11 support #1546

Merged
merged 1 commit into from
May 12, 2022
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
8 changes: 5 additions & 3 deletions deployments/salt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Currently, the following Linux distributions and versions are supported:

- Amazon Linux: 2
- CentOS / Red Hat / Oracle: 7, 8
- Debian: 9, 10
- Debian: 9, 10, 11
- SUSE: 12, 15 (**Note:** Only for collector versions v0.34.0 or higher. Log collection with fluentd not currently supported.)
- Ubuntu: 16.04, 18.04, 20.04

Expand Down Expand Up @@ -106,8 +106,10 @@ splunk-otel-collector:
journal log collection, and the required libraries/development tools.
(**default:** `True`)

- `td_agent_version`: Version of td-agent (fluentd package) that will be
installed (**default:** `3.7.1-0` for Stretch, `4.1.1-1` for other Debian, and `4.1.1` for other distros)
- `td_agent_version`: Version of [td-agent](
https://td-agent-package-browser.herokuapp.com/) (fluentd package) that will
be installed (**default:** `3.7.1-0` for Debian 9, and `4.3.0` for other
distros)

- `splunk_fluentd_config`: Path to the fluentd config file on the remote host.
(**default:** `/etc/otel/collector/fluentd/fluent.conf`)
Expand Down
4 changes: 2 additions & 2 deletions deployments/salt/splunk-otel-collector/fluentd.sls
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
{%- elif grains['oscodename'] == 'stretch' %}
{% set td_agent_version = '3.7.1-0' %}
{%- elif grains['os_family'] == 'Debian' %}
{% set td_agent_version = '4.1.1-1' %}
{% set td_agent_version = '4.3.0-1' %}
{%- else %}
{% set td_agent_version = '4.1.1' %}
{% set td_agent_version = '4.3.0' %}
{%- endif %}

{% set td_agent_major_version = td_agent_version.split('.')[0] %}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM debian:bullseye

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get upgrade -y -o DPkg::Options::=--force-confold
RUN apt-get install -y software-properties-common ca-certificates wget curl apt-transport-https python3-pip vim systemd procps

RUN curl -L https://repo.saltproject.io/py3/debian/11/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
RUN echo 'deb http://repo.saltproject.io/py3/debian/11/amd64/latest/ bullseye main' > /etc/apt/sources.list.d/saltstack.list && \
apt-get update && \
apt-get install -y salt-minion

ENV container docker

RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i = \
"systemd-tmpfiles-setup.service" ] || rm -f $i; done); \
rm -f /lib/systemd/system/multi-user.target.wants/*;\
rm -f /lib/systemd/system/local-fs.target.wants/*; \
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
rm -f /lib/systemd/system/anaconda.target.wants/*;

RUN systemctl set-default multi-user.target
ENV init /lib/systemd/systemd

COPY internal/buildscripts/packaging/tests/deployments/salt/minion /etc/salt/minion
COPY deployments/salt/splunk-otel-collector /srv/salt/splunk-otel-collector
COPY deployments/salt/templates /srv/salt/templates
COPY internal/buildscripts/packaging/tests/deployments/salt/top.sls /srv/pillar/top.sls
COPY internal/buildscripts/packaging/tests/deployments/salt/top.sls /srv/salt/top.sls

VOLUME [ "/sys/fs/cgroup" ]

ENTRYPOINT ["/lib/systemd/systemd"]