splunk / splunk/docker-splunk

Run ansible configuration during docker build process

Open
#533 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
549
Forks
277
Avg merge
3d 9h
Merged PRs (30d)
2

Description

Currently, ansible configuration is run in the Docker run phase. This has a couple of disadvantages:

  1. Startup time, see https://github.com/splunk/docker-splunk/issues/10
  2. Existing etc files need to be converted to YAML files, see Create Custom Configs
  3. Uncommon for Docker - build phase is usually used for configuration

My expectation would be that I could do the ansible configuration first during build time and then just run the splunk process with Docker run, e.g. like this:

FROM splunk/splunk:8.2.4

ENV SPLUNK_START_ARGS --accept-license
ENV SPLUNK_PASSWORD splunkdev

# Configure using ansible
USER ansible
COPY ./tmp /tmp
RUN /sbin/entrypoint.sh start-and-exit

USER splunk

# Do whatever post-configuration, change etc files, copy apps etc.

ENTRYPOINT ["/opt/splunk/bin/splunk"]
CMD ["start"]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with /sbin/entrypoint.sh and the Dockerfile flow shown in the issue, comparing how Ansible configuration currently runs during Docker startup. The work is done when configuration can be applied during the image build and the runtime entrypoint only starts Splunk, while the documented custom configuration workflow remains usable.

Written by the indexing model from the issue text.

Assessment

Tech stack
ansible, docker
Domain
devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.