https://github.com/andreacrotti/python-infrastructure
https://github.com/andreacrotti/python-infrastructure
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/andreacrotti/python-infrastructure
- Owner: AndreaCrotti
- Created: 2016-10-08T15:11:58.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-28T10:53:15.000Z (about 9 years ago)
- Last Synced: 2025-07-30T15:00:58.866Z (6 months ago)
- Language: Python
- Size: 34.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
Awesome Lists containing this project
README
* Configuration for full dockerization
** TODO terraform?
** TODO Ansible and docker containers
** TODO ansible to set up the infrastructure
* Useful resources
- https://semaphoreci.com/community/tutorials/continuous-deployment-with-docker-aws-and-ansible
- http://txt.fliglio.com/2015/07/12-factor-infrastructure-with-consul-and-vault/
- https://www.terraform.io/intro/examples/aws.html
- http://www.slideshare.net/ServNet/cloudformation-vs-terraform-vs-ansible
- https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/
- https://docs.docker.com/registry/deploying/
- https://insights.ubuntu.com/2016/02/10/docker-alpine-ubuntu-and-you/
- https://forums.docker.com/t/best-practices-for-getting-code-into-a-container-git-clone-vs-copy-vs-data-container/4077/4
- https://pypi.python.org/pypi/pypiserver (to set up a local pypi server)
- https://docs.docker.com/compose/compose-file/#/build
- https://pypi.python.org/pypi/twine
- http://tox.readthedocs.io/en/latest/example/jenkins.html
however it might be better to just have different containers per version
so that we can generate them simply by country and other environment variables.
- https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
- https://github.com/ICTO/ansible-jenkins
- http://juristr.com/blog/2014/01/git-flow-jenkins-gitlab/
- https://aboutsimon.com/blog/2012/02/24/Create-a-local-PyPI-mirror.html
- https://hub.docker.com/r/sjourdan/vault/
- https://www.amon.cx/blog/building-your-infrastructure-with-terraform/
* Technologies
- consul
- vault
- docker
- terraform? (instead of every time you would use the AWS ui)
* Testing everything
- terraform kitchen: https://github.com/newcontext/kitchen-terraform
-
* Vagrant local set up
vagrant init bento/ubuntu-16.04; vagrant up --provider virtualbox
* Service discovery and co
Example of how to use registrator (sharing docker.sock) to make it
auto discover stuff from docker stats.
#+BEGIN_SRC sh
docker run -d --name registrator \
-v /var/run/docker.sock:/tmp/docker.sock \
-h serv-disc-01 \
gliderlabs/registrator \
-p 10.100.194.201 etcd://10.100.194.201:2379
#+END_SRC
* Questions
- [ ] should we add the other index as extra or make sure all
the packages we need are also on this new index?
* TODO add consul and registrator configuration
* TODO add vault configuration (storing in consul)
* Various useful information
** Consul template
CPU goes crazy sometimes, and since consul keeps one open connection
per key, it might kill the consul cluster.