Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Devops Exercises | 41,762 | 5 days ago | 14 | other | Python | |||||
Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions | ||||||||||
Kubeasz | 8,989 | a day ago | 11 | April 25, 2021 | 48 | apache-2.0 | Jinja | |||
使用Ansible脚本安装K8S集群,介绍组件交互原理,方便直接,不受国内网络环境影响 | ||||||||||
Ansible For Devops | 6,699 | a month ago | 90 | mit | Python | |||||
Ansible for DevOps examples. | ||||||||||
Homelab | 6,649 | a month ago | 17 | gpl-3.0 | Go | |||||
Modern self-hosting framework, fully automated from empty disk to operating services with a single command. | ||||||||||
Devops Guide | 6,318 | a month ago | 5 | mit | HTML | |||||
DevOps Guide - Development to Production all configurations with basic notes to debug efficiently. | ||||||||||
Kubeoperator | 4,627 | 17 days ago | 33 | apache-2.0 | Go | |||||
KubeOperator 是一个开源的轻量级 Kubernetes 发行版,专注于帮助企业规划、部署和运营生产级别的 K8s 集群。 | ||||||||||
Netboot.xyz | 3,967 | 5 days ago | 38 | apache-2.0 | Jinja | |||||
Your favorite operating systems in one place. A network-based bootable operating system installer based on iPXE. | ||||||||||
Opendevops | 3,367 | 25 days ago | 67 | gpl-3.0 | Python | |||||
CODO是一款为用户提供企业多混合云、一站式DevOps、自动化运维、完全开源的云管理平台、自动化运维平台 | ||||||||||
Ansible Nas | 2,378 | 3 days ago | 119 | mit | Jinja | |||||
Build a full-featured home server or NAS replacement with an Ubuntu box and this playbook. | ||||||||||
Ansible Container | 2,268 | 10 | 1 | 4 years ago | 8 | September 12, 2017 | 200 | lgpl-3.0 | Python | |
DEPRECATED -- Ansible Container was a tool to build Docker images and orchestrate containers using only Ansible playbooks. |
Ansible no longer maintains images in Dockerhub directly. There are several Ansible images on Dockerhub that are maintained by members of the Ansible community, which you can find with the following search
These are base docker images that include Ansible.
Ansible, Inc maintains these images so that people can easily build docker images from ansible playbooks.
While Ansible modules can help you deploy container images (and also prepare host dependencies to be able to run containers), this document is about how to use ansible to efficiently describe and build them as well.
Ansible, Inc content on DockerHub lives at https://registry.hub.docker.com/u/ansible/
There are base images available currently for CentOS 7 and Ubuntu 14.04 LTS, using both the latest stable version of Ansible as well as development branch snapshots.
By specifying a Dockerfile, it is easy to describe a container image primarily defined by an ansible-playbook, using a very minimal Dockerfile.
Take a look at this Dockerfile for a sample of what one looks like.
To build this image, simply cd into the directory that contains the Dockerfile and run:
docker build -t webserver_simple .
This will produce an image tagged "webserver_simple" based on the Ansible playbook run. Here's the playbook that defines the configuration.
Your own content will probably be kept in it's own git repos. You may wish to connect your repositories containing Ansible+Docker playbooks to DockerHub, to trigger automatic rebuilds of your container images when your underlying ansible playbooks, or the applications they might embed, change.
The DockerFile shown above selected the latest CentOS tag of Ansible's Docker images. The first line of the DockerFile can be changed to select another base operating system or Ansible version should you wish to use a different OS or different Ansible version.
The following options are available:
FROM ansible/centos7-ansible:stable
FROM ansible/centos7-ansible:devel
FROM ansible/ubuntu14.04-ansible:stable
FROM ansible/ubuntu14.04-ansible:devel
Ansible images on DockerHub will be updated periodically.
While Ansible provides 240+ modules for managing various aspects of IT components and is a great starting point for describing your applications, Ansible Galaxy provides complete automation for deploying a very large number of popular apps and takes this to the next level.
To use existing ansible-role content within Docker, simply switch into a playbook directory and download the roles. For example, to configure the ELK stack:
mkdir roles/
cd roles/
ansible-galaxy install bakhti.elk
And then leverage the role content in the playbook:
- hosts: localhost
roles:
- bakhti.elk
So, a 3 line playbook then brings up an entire ELK stack in a container image :)
Once available on a registry, images can be deployed using the Ansible Docker Module. This can be a lightweight way to specify what containers should run on which hosts.
Here's a minimal example of running a Tomcat container on all of your hosts:
- hosts: web
sudo: yes
tasks:
- name: run tomcat servers
docker: image=my-tomcat command="service tomcat6 start" ports=8080
Replace the "image" parameter with the name of the image above in your registry.
For more information, consult the Ansible Docker module documentation
As your needs grow more detailed and you wish to specify different containers for different hosts, you might have a list called "run_containers" defined per Ansible host group, saying which containers to run on each host. This can allow ansible to be used as a lightweight cloud, all without any additional moving parts.
If you are using a Docker Hub automated build to build your images you can set your image to rebuild whenever the base ansible image (hosted by Ansible, Inc) is updated:
If you'd like to talk about Ansible+Docker, stop by the ansible-project mailing list or #ansible on irc.freenode.net for IRC.