-
Notifications
You must be signed in to change notification settings - Fork 1
Getting started
Here you'll find information about how to get involved and get your hands dirty. It all comes to five concepts or services which form the ground for development:
- Docker
- Vagrant
- Ansible
- Github
- Jenkins
Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications. Consisting of Docker Engine, a portable, lightweight runtime and packaging tool, and Docker Hub, a cloud service for sharing applications and automating workflows, Docker enables apps to be quickly assembled from components and eliminates the friction between development, QA, and production environments. As a result, IT can ship faster and run the same app, unchanged, on laptops, data center VMs, and any cloud.
Vagrant is a tool for building complete development environments. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases development/production parity, and makes the "works on my machine" excuse a relic of the past.
Ansible is an open-source software platform for configuring and managing computers. It combines multi-node software deployment, ad hoc task execution, and configuration management. Additionally, Ansible prefers to be categorized as an orchestration engine. It manages nodes over SSH and does not require any additional remote software (except Python 2.4 or later) to be installed on them. Modules work over JSON and standard output and can be written in any programming language. The system uses YAML to express reusable descriptions of systems.
Ansible is primarily an orchestration tool that also happens to be able to do configuration management. That means you can use Ansible for all the necessary steps to provision your host servers, deploy and manage Docker containers, and manage the networking, etc.
So, if you decide you want to use Docker in production, the prerequisite is to learn a tool like Ansible. There are many other orchestration tools (some even specifically for Docker), but none of them come close to Ansible's simplicity, low learning curve, and power. It's better to just learn one orchestration tool well than to pick a less powerful tool that won't do everything you need it to (then you'd end up having to learn more tools to cover the shortfalls).
We use Vagrant and Ansible for setting up development environments for all services separately.
- Each of the service uses APIs for communication.
- Each service and API for it are in the same server, normally "domain.xx/api/" and
- APIs are build on top of Django REST framework
- API documentation and sandbox implemented via Swagger
- We use shared database server.
- Versions: Vagrant x.x,
- Vagrant + ansible tested on Ubuntu 12.04
How to use Vagrant script here...
Logic something like:
- Should get the code from Github [repo path here]
- Check if database server is up already, if not start mysql and other servers needed
- Create databases and fill with sample data, database dump in Github
How to use Vagrant script here...
Logic something like:
- Should get the code from Github [repo path here]
- Check if database server is up already, if not, suspend this process, download the database script first and run it, then continue with this one.
- Service available from http://localhost/basaar
- API available from http://localhost/api
- API docs available from http://localhost/basaar/docs
How to use Vagrant script here...
- Should get the code from Github [repo path here]
- Check if database server is up already, if not, suspend this process, download the database script first and run it, then continue with this one.
- Service available from http://localhost/kysy
- API available from http://localhost/api
- API docs available from http://localhost/basaar/docs
After you have fooled around with the services and begin to implement new features in it, it's probably a good idea to get familiar with the contribution process. Read more about the process from here.
- use Docker http://tonyhb.com/unsuck-your-vagrant-developing-in-one-vm-with-vagrant-and-docker
- One VM, all services inside it still isolated in own containers
- We will go to Jenkins, http://blog.buddycloud.com/post/80771409167/using-docker-with-github-and-jenkins-for-repeatable, see also https://www.digitalocean.com/community/tutorials/how-to-install-and-use-jenkins-on-ubuntu-12-04