For web developer, often times we need to prepare the development env and it is sometimes a pain and people just suffer from the same pain again and again, that's the reason why google/stackoverflow is popular. My idea about the project is:
- To put everything in an virtual box and developers can public/push box which development env has set up well.
- An web server/proxy like nginx/apache/varnish has been installed well in the box. The correspoding config can be pulled/updated from the certain repo, so that you can easily set up an prod like/ e2e env in the virtual box by utilizing the linux container tech.
- The services you need to talk to will be started in docker containers and behind the web service wrapper.
###Aim Share the similar philosophy with docker.
- use an base box and pull env set up script so it can run as development env.
- run nginx in the box so that services the project talk to can be hidden behind(with https support).
- services are pulled from docker registry and run as container in the vm.
###Requirements
- vagrant latest version
- VirtualBox latest version
###Start an Docker registry Run a new docker registry, before that, you need to have docker in the node.
./scripts/settingup/docker_registry.sh
In this example, we use the leviathan.example.com:5000
###Config Server
Create a new config server, and put sync every configs in the project to config server,basically start an python simple http server.
./scripts/settingup/config_server.sh
In this example we use the leviathan.example.com:8080
###Tasks in Vagrant
TASKS="dev" vagrant provision
: set up development env in the vmTASKS="docker" vagrant provision
: provision docker and pull services from registryTASKS="config" vagrant provision
: pull nginx config from config serverTASKS="update" vagrant provision
: update the apps/services in dockers