Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ansible Meetup #12

Ansible Meetup #12

Pierre Padrixe

December 07, 2016
Tweet

Other Decks in Technology

Transcript

  1. Linkfluence • Social Media Intelligence SaaS software ◦ trendy topics

    ◦ track influencers ◦ eReputation measurement • Sources: web & social networks including CN (sinaweibo, wechat) • Data Enrichment: ◦ Machine Learning ◦ NLP Analysis
  2. Linkfluence ~50 billion docs ~150 elasticsearch nodes in total ~300

    million new docs every day Data Processing stack: Hadoop, Storm, Spark, Hbase Dev Stack: Clojure microservices, Scala backend
  3. AWS Launch Configuration • AMI • Instance Type • Storage

    (EBS) • Security Groups • Details: Role IAM
  4. Terraform • Simple template files - not verbose • Avoid

    redundant operations • Infrastructure as Code Keep track of resources states Git - Version Control Reviews
  5. • terraseed - in-house terraform wrapper deployed in a Docker

    Container • Remote State - S3 Backend • bulky templates => Use Module ! • No var interpolation :( • Keep your templates up to date Terraform
  6. “home made” cloud-init bootstrap scripts which will: • (init) set

    dns via route53, get AWS /tags and export them in env • (global) set monitoring agents cauchy/riemann (clojure) Get app-playbooks & vars by env from S3 • (app) Exec app-playbook ansible-playbook -i “127.0.0.1,” app-playbooks/[app].yml
  7. “In-house” Inventory • Cloud agnostic inventory dev in Clojure •

    Abstraction of Cloud instances, BareMetal servers, Containers • S3 Backend • REST API • CLI • Web UI available in our in-house superviz webapp
  8. Dynamic_Inventory • ansible -i inventory_cache.py -m ping tag_[key]_[value] -m ping

    tag_app_storm • Cached • Use _meta for your hostvars ! ◦ --host will be called *1 (vs *N hosts without _meta)
  9. • Builds AMI 1. Reads JSON template 2. spawn source_ami

    3. exec provisioners scripts 4. create new AMI = amazon-ebs builder ! Packer
  10. • Builders 1. amazon-ebs 2. amazon-instance (S3 backend) 3. amazon-chroot

    (Do not spawn a new VM for Image Creation, ebs+chroot) • Provisioners ◦ shell: exec seed script to install ansible (2.1) ◦ ansible-local: exec our ansible seed playbook locally Packer
  11. Wishes & WIP • Improve our CI ◦ Playbook func

    tests with serverspec? :) ◦ Test matrix by Ansible version • All resources managed as Code !
  12. Questions ? Thank you for your attention ! My Twitter:

    @undefd Linkfluence Lab Twitter: @linklabs