ansible | 4 years ago | ||
dockerfiles | 4 years ago | ||
README.md | 4 years ago |
This repo provides a fast track to spinning up docker containers as "servers". You can log into these and do most of the things you do an a "real" server or VM.
docker
image from a "dockerfile"ansible
to create and destroy a docker
networkansible
to create, restart, and destroy docker
serversssh
keys are managed on a docker
instancessh
access to a docker
instancedocker
containers or between the host and a containerBut this is not a "toy" system. What you see here is a public subset of what we use all the time here at the TundraWare Intergalactic HQ. We use this for software development, testing new distributed computing ideas, and doing custom builds in a sanitized environment.
The content of this repo assumes you have done several things:
docker
already running on your machinedocker
access available to your own loginansible
installed on your machine/shared
exists on your host machine with permissions 1777
Here's the 10,000 foot view of what you'll have to do once the Prep Work above is done:
docker
image from a dockerfileansible
to start a docker
network and the sandboxesVarious parts of this repo assume that there are (up to) 10 running sandboxes whose names are dockersand1
through dockersand10
. For this to work, you have to configure name resolution to properly associate these names with their equivant IP addresses.
Most likely, you don't have control of your DNS configuration. The easy way around this is to add the entries you find in dockerfiles/common/etc/dockersand.hosts
to your own /etc/hosts
file.
docker
Imagedocker
Network And SandboxesThese sandboxes are setup so you can login from your host machine into the running sandboxes using ssh
keys. You will find the keys under dockerfiles/common/.ssh/
. There is also an ssh
configuration stanza you can add to your own ~/.ssh/config
to get your client to use the proper key.
However, it is also possible to login using name (test
) and password (test
).
Once you are logged in, you can promote yourself to root
using the sudo
command without any further password required.
The sandboxes are created to share the /shared
directory with the host machine. Any file you put there is visible from any of the sandboxes and/or the host machine. This makes it easy to share or move data between the host and any of the sandboxes or between the sandboxes themselves.