Run ansible configuration during docker build process
Open
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:
- Startup time, see https://github.com/splunk/docker-splunk/issues/10
- Existing
etcfiles need to be converted to YAML files, see Create Custom Configs - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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