More Related Content
PPTX
ネットワークエンジニアのための Puppet / Chef
PDF
PPTX
PDF
PDF
PDF
2014/11/04 第2回 一撃サーバー構築シェルスクリプト勉強会(さっぽろ!) 発表資料
PDF
KEY
What's hot
PDF
PDF
PDF
2014/11/08 第3回 一撃サーバー構築シェルスクリプト勉強会(懇親会もあるよ!) 発表資料
PDF
2日間Fabricを触った俺が
色々解説してみる
PPTX
PDF
PDF
PDF
PDF
PDF
Okinawa Open Days 2015 Handson - Ansible
PDF
PDF
PDF
PPTX
Ansibleで始めるサーバ管理勉強会(2014年10月1日)
PPTX
Chef の気まぐれ環境構築 〜季節の Capistrano を添えて〜 #jawsug
PDF
PDF
PDF
PDF
PPTX
Pythonユーザのための構成管理入門 #pyconapac
Viewers also liked
PDF
Introduction to Cross Site Scripting ( XSS )
PPT
100 Text Loans, Text Loans
PDF
د. فوزية اخضر - تطبيق تجربة مدرسة المستقبل الشاملة - المعرض والمنتدى الدولي ل...
PDF
NVM Lensink Gussinklo Makelaardij Presentatie
PDF
World Economic Forum, la grande sciocchezza
PPTX
Social by Design REMIXED by Geoff Colon
PDF
Lawyer in Vietnam Oliver Massmann Trans Pacific Partnership Agreement - Ratif...
PDF
Plan Social Media Wawawiwa Design
PPS
Buddhist Temple Dhammakaya Thai
PDF
PDF
Policy Paper ESCENARIOS PROSPECTIVOS DE LA SEGURIDAD EN COLOMBIA FRENTE AL PR...
PDF
Páginas Israelíticas – 3 – Amar las almas y no llorar
PPTX
Jill Watson Instructional Approaches that Set SLIFE up to succeed (and are go...
PDF
PDF
Non-technical risks and their impact on mining - Trench, Sykes & Packey - Oct...
PDF
Tackling complexity in giant systems: approaches from several cloud providers
PDF
DOCX
MUDE SUA VIDA! COMO ESTÁ A SUA SAÚDE?
PPTX
Encuesta Bogotá Cómo Vamos - Fragmento Canal Capital y Sec. Cultura
Similar to Puppetのススメ
PPT
Puppet Best Practices? at COOKPAD
PDF
PPT
Chef Casual Talk Vol.1 最近、日本でPuppetの影が薄くなって悲しいので、 ここであえてPuppetの話をする
PPTX
PDF
PDF
OpenStackクラウド基盤構築ハンズオンセミナー 第1日:講義No2
PPTX
PPT
関西オープンソース 2008 30days Albumの裏側
PDF
配布用Supervisordによるnode.jsの運用
PDF
PDF
PDF
商用ミドルウェアのPuppet化で気を付けたい5つのこと
ZIP
PDF
PPTX
今からはじめるPuppet 2016 ~ インフラエンジニアのたしなみ ~
PDF
OpenStackクラウド基盤構築ハンズオンセミナー 第1日:ハンズオンNo2
PPTX
PFIセミナーH271022 ~コマンドを叩いて遊ぶ コンテナ仮想、その裏側~
PDF
Personal Cloud Automation
PDF
はてなにおける継続的デプロイメントの現状と Docker の導入
PDF
【第26回Elasticsearch勉強会】Logstashとともに振り返る、やっちまった事例ごった煮
More from Gosuke Miyashita
PDF
Walter ファミリーの紹介 at Shibuya.go#1
PDF
Serverspec at Testing Framework Meeting
PPTX
Serverspec at July Tech Festa 2013
PPTX
Serverspec at hbstudy #45
PPTX
PPTX
PPTX
Maglica - A Simple Internal Cloud Tool at #techkayac
PPTX
PPTX
Inside Sqale's Backend at RubyConf Taiwan 2012
PPTX
PPTX
PPTX
Inside Sqale's Backend at YAPC::Asia Tokyo 2012
PPTX
Inside Sqale's Backend at Sapporo Ruby Kaigi 2012
PPT
Assurer - a pluggable server testing/monitoring framework
PPTX
Open Source System Administration Framework - Func
PPTX
PPTX
PPT
How Danga::Socket handles asynchronous processing and how to write asynchrono...
PPT
Danga::Socketの非同期処理の仕組みとPerlbalで非同期処理するプラグインを書く方法
PPT
Xen Summit 2008 Tokyo - Operating Xen domains through LL(Perl/Python) with li...
Puppetのススメ 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 16. 17. 18. 19. 20. 21. 22. 23. クラスでリソースをまとめる「sudo」クラスを定義class sudo{package { ‘sudo’: ensure => latest, alias => sudo } file { ‘/etc/sudoers’: source => 'puppet://server/module/sudoers', mode => 440, owner => $default_owner, group => $default_group, alias => sudoers }}node ‘mail.hoge.com’ { include sudo }package リソースfile リソースクラスをノードに適用 24. クラスを継承するbase クラスを定義class base { file { "/my/file": content => template("base.erb") }}class sub inherits base { # override the content File["/my/file"] {content => template("other.erb") }} base クラスを継承した sub クラスを定義base クラスの /my/file リソースの属性を上書き 25. リソースの依存関係file { '/etc/ssh': source => puppet://server/module/ssh,recurse => true,notify => Service[ssh]}service { 'ssh': name => sshd, ensure => running,subscribe => File[‘/etc/ssh’]}/etc/ssh以下のファイルに変更があれば、sshサービスリソースに再起動を促す/etc/sshリソースに変更があれば、サービスを再起動するnotifyかsubscribeのどちらか一方だけ定義すればOK 26. 27. 28. 29. 30. 31. 32. 33. マニフェストを適用(クライアント/サーバ版)クライアントで適用# /usr/sbin/puppetd --server puppet.hoge.com \--no-daemonize --verbose --onetimeinfo: No classes to storeinfo: Caching catalog at /var/puppet/state/localconfig.yamlnotice: Starting catalog runnotice: //File[/etc/passwd]/mode: mode changed '777' to '644'notice: Finished catalog run in 0.03 seconds 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. Apacheマニフェスト(つづき)file { ‘/etc/httpd/conf.d/hoge.conf’: source => “puppet://$server/hoge.conf”, notify => Service[‘httpd’];‘/etc/httpd/conf.d/fuga.conf’: source => “puppet://$server/fuga.conf”, notify => Service[‘httpd’];} 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. execを濫用したマニフェストexec { 'sysctl add':command => 'echo "net.ipv4.netfilter.ip_conntrack_max = 131072" >> /etc/sysctl.conf \ && /sbin/sysctl -p',onlyif => "test -f /etc/sysctl.conf",unless => "grep 'net.ipv4.netfilter.ip_conntrack_max' /etc/sysctl.conf 2>/dev/null"} 66. 67. 68. Facter変数$ facterarchitecture => x86_64domain => hoge.comfacterversion => 1.5.7fqdn => puppet.hoge.comhardwareisa => x86_64hardwaremodel => x86_64hostname => h026id => miyainterfaces => eth0,eth1,sit0ipaddress => 192.168.10.26ipaddress_eth0 => 192.168.10.26ipaddress_eth1 => 192.168.122.106is_virtual => false... 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. ShadowPuppetclass ManifestExample< ShadowShadow::Manifest recipe :sample recipe :mysql, {:root_password=> 'OMGSEKRET'}defsample exec :foo, :command => '/bin/echo "foo" > /tmp/foo.txt' package :foo, :ensure => :installed file '/tmp/example.txt', :ensure => :present, :contents => Facter.to_hash_inspectenddef mysql(options) ...endend 88. 89. 90. 91. 92. 93. リソースタイプに微妙なものがリソースタイプには、file, user, group, package, service, cron といったものがある上の例は、割りとOSに普遍的なものだけど、中にはnagios_command, nagios_contact, nagios_hostといった、Nagios固有のものがある。(Nagios固有のタイプで14もあり、リファレンスの中でも目立ってる)アプリケーション固有のものは、コアに入れないでモジュールにした方がいいのでは? 94. 95. 96. 97. 98. 99. 100.