5years-history-of-heteml

 5years-history-of-heteml

運用しているヘテムルでのサービス改善の歴史

D7df6557c6b98f29ac546911e2b1a4d4?s=128

Shinya Tsunematsu

November 12, 2013
Tweet

Transcript

  1. 5.
  2. 20.

    Archerظ ✤ Pluggable! ✤ Archer::Plugin::RoleLoader! ✤ roles.yaml! ✤ ࢦఆͨ͠ϩʔϧʹ! ✤

    ίϚϯυ࣮ߦ! ✤ ϑΝΠϧσϓϩΠ …! ! web:! - web001.heteml.lan! - web002.heteml.lan! mail:! - mail001.heteml.lan! - mail002.heteml.lan! - mail003.heteml.lan! ! …
  3. 23.

    ࣗ࡞πʔϧheteloyظ ✤ /var/lib/puppet/data/ ͕ PuppetϦϙδτϦͱͯ͋͠Δ! ✤ /var/lib/puppet/data/modules/web/files/etc/httpd/httpd.conf Λ! ✤ webϩʔϧʢલड़ͷroles.yaml)

    ͷϗετʹ഑෍͠! ✤ Apache ͷ configtest ͯ͠ OK ͳ৔߹͚ͩ restart ɺNG ͳ৔߹͸ϑΝΠϧϩʔϧόο Ϋ sudo heteloy.pl --role web \! --dist /etc/httpd/httpd.conf \! --mode 644 \! --exec ‘service httpd configtest’ \! --exec ‘service httpd restart’!
  4. 24.

    ࣗ࡞πʔϧheteloyظ ✤ Α࣮͘ߦ͢ΔλεΫ͸λεΫΛyamlܗࣜʹdump! ✤ Ҏ߱͸ͦͷyamlΛࢦఆͯ͠ಉ͡ॲཧΛ࣮ߦՄೳ sudo heteloy.pl --role web \!

    ! --dist /etc/httpd/httpd.conf \! --mode 644 \! --exec ‘service httpd configtest’ \! --exec ‘service httpd restart’ \! --configdump > httpd_task.yaml! sudo heteloy.pl --configloada httpd_task.yaml!
  5. 32.

    Cobbler ✤ ϗετ௥Ճ࣌͸ɺ͜ͷॲཧޙαʔόΛىಈ͢ΔͱOS ͕Πϯετʔϧ͞ΕΔ ʢωοτϫʔΫ෦෼ׂѪʣ cobbler system add \! --name

    web001.heteml.lan \! --hostname web001.heteml.lan \! --profile CentOS6.4-x86_64 \! --kopts “ksdevide=XX:XX:XX:XX:XX syslog=192.168.X.X” \! --kickstart /var/lib/cobbler/kickstarts/CentOS6-base.ks! ! cobbler sync
  6. 43.

    ؂ࢹઃఆͷࣗಈੜ੒ ✤ Nagios! ✤ munin! ✤ roles.yaml Λ΋ͱʹ conf Λࣗಈੜ੒͢Δ!

    ✤ શαʔόڞ௨ͷ؂ࢹ (σΟεΫI/O, L/A)! ✤ ϩʔϧݻ༗ͷ؂ࢹ (webͩͬͨΒHTTPૄ௨౳)! ✤ ϗετݻ༗ͷઃఆ (ಛఆαʔό͸αʔό্Ͱύϥϝʔλ্ॻ͖ʣ
  7. 49.

    खॱΛςϯϓϨʔτԽ export OLDHOST=<%= @config['src1_hostname'] %>! export NEWHOST=<%= @config['dst_lan_ip'] %>! rsync

    -rlptDv /data/backup/heteml/$OLDHOST/path/from/ $NEWHOST::data_to/ src1_hostname : web001! src1_lan_ip : 192.168.1.10! ! dst_hostname : web002! dst_lan_ip : 192.168.1.11!
  8. 50.

    खॱΛςϯϓϨʔτԽ genecon -t README.md -c config.yaml > web001maintenance.md export OLDHOST=web001!

    export NEWHOST=192.168.1.11! rsync -rlptDv /data/backup/heteml/$OLDHOST/path/from/ $NEWHOST::data_to/ ✤ genecon https://github.com/glidenote/genecon