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

Docker tests #133

Merged
merged 7 commits into from
Sep 26, 2018
Merged

Docker tests #133

merged 7 commits into from
Sep 26, 2018

Conversation

mbologna
Copy link
Member

@mbologna mbologna commented Nov 2, 2015

Inspired by issue #108, I pushed two Docker container images:

  1. salt-master and salt-api
  2. salt-minion

Every container accepts a volume in which you specify the configuration along with certs and keys.
In this way, the container image is general and you launch it just by specifying a different configuration.
Everything is put under docker/ directory.

I also changed travis build to use launch these containers during tests, and I added a small JUnit test to make sure that this is all working correctly.

external_auth:
pam:
saltdev:
- .*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be possible to minimize this configuration to a file containing just the effective configuration (uncommented lines) and put it into /etc/salt/master.d/, right?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right on both the optimizations!

# Set the location of the salt master server. If the master server cannot be
# resolved, then the minion will fail to start.
#master: salt
master: saltmaster
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above: can we minimize this and put it into /etc/salt/minion.d?

@renner renner changed the title Docker tests [WIP] Docker tests Oct 21, 2016
@mbologna
Copy link
Member Author

Some refactoring has been done and now containers does not need any further configuration passed when launched.

This PR also contains a modified Travis build file to launch JUnit tests against these containers running salt-master and salt-api updated to the latest version of Salt shipped in the standard repository of the containers image (currently: OpenSUSE 42.2 with Salt 2016.3.4)

@mbologna mbologna changed the title [WIP] Docker tests Docker tests Apr 26, 2017
@lucidd
Copy link
Member

lucidd commented Apr 27, 2017

@mbologna but what about tumbleweed? 😛

@mbologna
Copy link
Member Author

@lucidd do you think it would be worth to rebase the Docker container using Tumbleweed or to create another one? ;)

@lucidd
Copy link
Member

lucidd commented Apr 28, 2017

@mbologna haha no i was just kidding leap is fine 😄

@mbologna
Copy link
Member Author

@lucidd any chance we can merge this?

@lucidd
Copy link
Member

lucidd commented Sep 17, 2018

@mbologna if the PR is updated to work with the current state state of the library sure.

- Copy Docker image containers to launch 
SaltStack master (+ net-api) and minion from
https://github.com/mbologna/salt-docker-demo

- Put everything under docker/ directory (perhaps 
this should be a git-subtree? from the above 
repo?)

- Everything (especially etc_* directories are
needed for travis container launching because
they contain configurations and keys/certs).

- Dockerfile(s) are NOT needed but I added them
for clarification (just to show how the 
container recipe).
Inspired by issue SUSE#108, I changed Travis config
to launch a salt-master (+ salt-api) 
container and two salt-minion(s).

Salt-api is available at localhost:8000 during 
tests phase.

For more informations about the containers,
see docker/README.md
I added a small unit of JUnit tests against
a local Dockerized salt-master/salt-api enabled
with two minions.

You should have a local container running,
for more info read docker/README.md
@mbologna
Copy link
Member Author

@lucidd PR updated and tests green!

@lucidd lucidd merged commit a5c97b0 into SUSE:master Sep 26, 2018
@mbologna mbologna deleted the docker_tests branch September 26, 2018 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants