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

Add docker support for experimentation #81

Merged
merged 1 commit into from Mar 31, 2020
Merged

Conversation

logicminds
Copy link
Contributor

@logicminds logicminds commented Mar 27, 2020

This adds docker support to allow quick and dirty test environments when playing with the peadm module or PE HA commands. It will allow you to provision entire HA stacks as defined by the documentation without using vagrant or deploying to the cloud. The provision time varies from 10-20 minutes depending size and resources available.

Prior to this there was not a quick way of playing with HA on your laptop. Users will be able to spin up standard and large (with and without HA) on their laptops (when equipped with 16GB memory and linux). And if the user has 24GB+ they can spin up XL and XL-HA.

The goal of this feature is to allow users the ability to test out these tasks and plans before going to production. Additionally, peadm development can also be tested here since all code is mounted as a volume in the container.

In order for this PR to be merged it has a few dependent PRs #80 , #79 , #78. These PRs were opened after finding issues developing the docker support. Once the other PRs are merged I will rebase and bring the other newer commits into this branch. Until this please give this branch a try and let me know where more documentation is required or issues that you run into.

@logicminds logicminds force-pushed the docker branch 6 times, most recently from 00b2556 to 14425d1 Compare March 31, 2020 02:29
@logicminds logicminds changed the title WIP: Add docker support for experimentation Add docker support for experimentation Mar 31, 2020
@reidmv
Copy link
Contributor

reidmv commented Mar 31, 2020

This is awesome @logicminds!

I only have one comment here, around content organization. Currently, all of the new Docker content is located in architectures/. The placement in the repo root directory makes it very prominent, but it isn't immediately obvious from the folder name what this is.

My instinct is to put this content inside the spec folder, and give it a name that quickly communicates what it's for. Maybe spec/docker/?

What do you think?

@logicminds
Copy link
Contributor Author

I don't think the spec folder is the right place either. Most dockerfiles are in the root of the repo and nesting under spec would confuse people with tests. I thought about under documentation or maybe even a dockerfiles folder in the root of the repo.

@reidmv
Copy link
Contributor

reidmv commented Mar 31, 2020

Re: Dockerfiles in the root of the repo, is that consistent for all uses of Dockerfiles, including use cases where the purpose of the Dockerfile is to enable tests? Most uses of Dockerfiles I've seen are for actually containerizing an app of some kind, which we aren't doing. We're just using Docker to enable a testing use case. Right?

@reidmv
Copy link
Contributor

reidmv commented Mar 31, 2020

Maybe part of what I'm confused about is that even in the PR as-is, the Dockerfile isn't in the repo root. It's still under architectures/Dockerfile. Did you intend to put the Dockerfile in the root?

@logicminds
Copy link
Contributor Author

I don't intend to add the Dockerfile to the root because it does not represent the peadm. Instead it is just a systemd enabled image required in order to run PE in a container.

I am going to move this to the spec folder since the Bolt project does the same thing and it is better to be consistent.

  * Previously working on this module required a buildout
    of a puppet infrastructure with VMs or cloud providers.
    Which can sometimes be costly or take hours to deploy.

    This commit uses containers and docker-compose to produce
    sample environments for each architecuture in order to
    perform rapid prototyping or test the functionality of this module
    and the puppet infra command.

    The architectures supported in this command are:
      * standard, stadard-ha
      * large, large-ha
      * extra-large, extra-large-ha

    While there are many other possiblites and combinations of amount
    of servers and containers these are the current choices.

    For more information please see documention/docker_examples.md
@reidmv reidmv merged commit ccd5149 into puppetlabs:master Mar 31, 2020
@reidmv
Copy link
Contributor

reidmv commented Mar 31, 2020

Thanks @logicminds!!

@logicminds logicminds deleted the docker branch June 29, 2020 19:28
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.

None yet

2 participants