diff --git a/README.md b/README.md new file mode 100644 index 0000000..19a9362 --- /dev/null +++ b/README.md @@ -0,0 +1,74 @@ +# Docker Sandboxes The Easy Way + + +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. + +# Things You Can Learn And Use From This + +* How to build a `docker` image from a "dockerfile" +* How to use `ansible` to create and destroy running `docker` servers +* How host and `ssh` keys are managed on a `docker` instance +* How to enable `ssh` access to a `docker` instance + +But 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. + + +# Prep Work: What You Need To Do First + +The content of this repo assumes you have done several things: + +* You've got `docker` already running on your machine +* You've made `docker` access available to your own login +* You've got `ansible` installed on your machine + + +# Quickstart For The Impatient + +Here's the 10,000 foot view of what you'll have to do once the +Prep Work above is done: + +* Configuring sandbox hostname resolution +* Build a `docker` image from a dockerfile +* Use `ansible` to configure and start a `docker` network +* Use `ansible` to start your sandboxes +* Login to your running sandboxes + + +# Configuring Sandbox Hostname Resolution + +Various parts of this repo assume that there are (up to) 10 running +sandboxes whose names are 'docksand1` through `docksand10`. 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. + + +# Building The `docker` Image + + +# Start The `docker` Network + + +# Create The `docker` Sandboxes + + +# Logging In + +These 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. diff --git a/dockerfiles/common/etc/dockersand.hosts b/dockerfiles/common/etc/dockersand.hosts new file mode 100644 index 0000000..afde96a --- /dev/null +++ b/dockerfiles/common/etc/dockersand.hosts @@ -0,0 +1,11 @@ + +192.168.11.2 docksand1 +192.168.11.3 docksand2 +192.168.11.4 docksand3 +192.168.11.5 docksand4 +192.168.11.6 docksand5 +192.168.11.7 docksand6 +192.168.11.8. docksand7 +192.168.11.9. docksand8 +192.168.11.10 docksand9 +192.168.11.11 docksand10