|
| 1 | +FROM ghcr.io/saltstack/salt-ci-containers/centos-stream:9 as base |
| 2 | + |
| 3 | +ENV LANG=C.UTF-8 |
| 4 | +ENV LANGUAGE=C.UTF-8 |
| 5 | +RUN ln -sf /etc/localtime /usr/share/zoneinfo/America/Denver |
| 6 | + |
| 7 | +RUN dnf update -y \ |
| 8 | + && dnf upgrade -y \ |
| 9 | + && dnf install -y sed vim tmux sudo tree net-tools bind-utils lsof nmap which binutils iputils epel-release procps \ |
| 10 | + && dnf install -y --allowerasing curl \ |
| 11 | + && dnf install -y multitail supervisor |
| 12 | + |
| 13 | +RUN mkdir -p /etc/supervisor/conf.d/ |
| 14 | +ADD docker/elastic/conf/supervisord.conf /etc/supervisor/supervisord.conf |
| 15 | + |
| 16 | +RUN rpm --import https://repo.saltproject.io/salt/py3/redhat/9/x86_64/SALT-PROJECT-GPG-PUBKEY-2023.pub \ |
| 17 | + && curl -fsSL https://repo.saltproject.io/salt/py3/redhat/9/x86_64/3006.repo | tee /etc/yum.repos.d/salt.repo \ |
| 18 | + && dnf install -y salt |
| 19 | + |
| 20 | +COPY ../../dist/salt*.whl /src/ |
| 21 | +RUN ls -lah /src \ |
| 22 | + && /opt/saltstack/salt/salt-pip install /src/salt_analytics_framework*.whl \ |
| 23 | + && rm -f /src/*.whl |
| 24 | + |
| 25 | +COPY ../../examples/dist/salt*.whl /src/ |
| 26 | +RUN ls -lah /src \ |
| 27 | + && /opt/saltstack/salt/salt-pip install --find-links /src/ salt-analytics.examples[elasticsearch] \ |
| 28 | + && rm -f /src/*.whl |
| 29 | + |
| 30 | + |
| 31 | +FROM base as master-1 |
| 32 | + |
| 33 | +ADD docker/elastic/conf/supervisord.master.conf /etc/supervisor/conf.d/master.conf |
| 34 | +ADD docker/elastic/conf/beacons.conf /etc/salt/master.d/beacons.conf |
| 35 | +ADD docker/elastic/conf/salt-analytics.conf /etc/salt/master.d/salt-analytics.conf |
| 36 | +RUN mkdir -p /etc/salt/master.d \ |
| 37 | + && echo 'id: master-1' > /etc/salt/master.d/id.conf \ |
| 38 | + && echo 'open_mode: true' > /etc/salt/master.d/open-mode.conf \ |
| 39 | + && dnf install -y salt-master |
| 40 | + |
| 41 | +CMD ["/usr/bin/supervisord","-c","/etc/supervisor/supervisord.conf"] |
| 42 | + |
| 43 | + |
| 44 | +FROM base as minion-1 |
| 45 | + |
| 46 | +ADD docker/elastic/conf/supervisord.minion.conf /etc/supervisor/conf.d/minion.conf |
| 47 | +ADD docker/elastic/conf/beacons.conf /etc/salt/minion.d/beacons.conf |
| 48 | +ADD docker/elastic/conf/salt-analytics.conf /etc/salt/minion.d/salt-analytics.conf |
| 49 | +RUN mkdir -p /etc/salt/minion.d \ |
| 50 | + && echo 'id: minion-1' > /etc/salt/minion.d/id.conf \ |
| 51 | + && echo 'master: master-1' > /etc/salt/minion.d/master.conf \ |
| 52 | + && dnf install -y salt-minion |
| 53 | + |
| 54 | +CMD ["/usr/bin/supervisord","-c","/etc/supervisor/supervisord.conf"] |
0 commit comments