Docker & Ansible

Demo Video

(click on Fullscreen to watch the video, needs WebM compatible browser: FF, Opera, Chrome.

What is Docker?

http://www.docker.io

What is Ansible?

http://www.ansibleworks.com

The Configuration file (inentory) from the Video:


[all:vars]
domains=example.com,demo.de,cpcloud.co.uk
password=demo
customer_name=demo
enc_password=498a6dc7f86ec0c1
nplex_locator=ds1.demo.cpaas.de
ups=ds1.demo.cpaas.de
ups_locator=ds1.demo.cpaas.de

[ldap-backend]
ds1.demo.cpaas.de

[mail-backend]
ems1.demo.cpaas.de
ems2.demo.cpaas.de
ems3.demo.cpaas.de
ems4.demo.cpaas.de


[cal-backend]
cal1.demo.cpaas.de
cal2.demo.cpaas.de


[pab-backend]
pab1.demo.cpaas.de
pab2.demo.cpaas.de
pab3.demo.cpaas.de


[fs-backend]
fs1.demo.cpaas.de

[richui-frontend]
ui1.demo.cpaas.de

Ansible Example

- name: Install Mysql package
  action: yum pkg={{ item }} state=installed
  with_items:
   - mysql-server
   - MySQL-python
   - libselinux-python
   - libsemanage-python

- name: Configure SELinux to start mysql on any port
  seboolean: name=mysql_connect_any state=true persistent=yes

- name: Create Mysql configuration file
  action: template src=my.cnf.j2 dest=/etc/my.cnf
  notify: 
  - restart mysql

- name: Start Mysql Service
  service: name=mysqld state=started enabled=true

- name: Create Application Database
  mysql_db: name={{ dbname }} state=present

/

#