Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Instant DevOps

1,509 views

Published on

Instant DevOps talk at Free Software Conference of Szeged, 2013-11-29

Published in: Software, Technology
  • Be the first to comment

Instant DevOps

  1. 1. Instant DevOps
  2. 2. advancing technology
  3. 3. growing business challenges
  4. 4. agile development model
  5. 5. source code + application data + bare metal —————————————————————— infrastructure as code
  6. 6. We need new tools!
  7. 7. $ curl -L get.rexify.org | perl - --sudo -n Rex $ cpanm Rex
  8. 8. Hardware File Package Template FS SCM Transaction Cron Service Cache Host User Reports LVM Virtualization Inventory kmod Box Partition Network Cloud
  9. 9. make -> Makefile rex -> Rexfile
  10. 10. user "ubuntu"; password "ubuntu"; pass_auth;
  11. 11. user "ubuntu"; private_key "~/.ssh/id_rsa"; public_key "~/.ssh/id_rsa.pub"; key_auth;
  12. 12. user "ubuntu"; password "ubuntu"; pass_auth; sudo -on; sudo_password "ubuntu";
  13. 13. user "ubuntu"; password "ubuntu"; pass_auth; sudo -on; sudo_password "ubuntu"; group servers => "web1", "web2", "web3";
  14. 14. user "ubuntu"; password "ubuntu"; pass_auth; sudo -on; sudo_password "ubuntu"; group servers => "web[1..3]";
  15. 15. user "ubuntu"; password "ubuntu"; pass_auth; sudo -on; sudo_password "ubuntu"; group servers => "web[1..3]", "lb[1..2]", "db[01..02]", "mail";
  16. 16. user "ubuntu"; password "ubuntu"; pass_auth; sudo -on; sudo_password "ubuntu"; group servers => "web[1..3]", "lb[1..2]", "db[01..02]", "mail"; task "uptime", group => "servers", sub { say run "uptime"; };
  17. 17. task "upgrade", group => "servers", sub { update_package_db; update_system; };
  18. 18. task "setup_ntp", group => "servers", sub { install "ntp"; };
  19. 19. task "setup_ntp", group => "servers", sub { install "ntp"; service ntp => ensure => "started"; };
  20. 20. task "setup_ntp", group => "servers", sub { install "ntp"; file "/etc/ntp.conf", source => "files/etc/ntp.conf"; service ntp => ensure => "started"; };
  21. 21. task "setup_ntp", group => "servers", sub { install "ntp"; file "/etc/ntp.conf", source => "files/etc/ntp.conf", owner => "root", group => "root", mode => 644; service ntp => ensure => "started"; };
  22. 22. task "setup_ntp", group => "servers", sub { install "ntp"; file "/etc/ntp.conf", source => "files/etc/ntp.conf", owner => "root", group => "root", mode => 644, on_change => sub { service ntp => "restart" }; service ntp => ensure => "started"; };

×