Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
how-to-start-ansible-with-vmware
Search
hirofumihida
February 22, 2017
Technology
0
910
how-to-start-ansible-with-vmware
hirofumihida
February 22, 2017
Tweet
Share
More Decks by hirofumihida
See All by hirofumihida
Trouble with enabling TLS on Postfix
hirofumihida
1
3.2k
Other Decks in Technology
See All in Technology
やる気のない自分との向き合い方/How to Deal with Your Unmotivated Self
sanogemaru
0
460
SREとソフトウェア開発者の合同チームはどのようにS3のコストを削減したか?
muziyoshiz
1
220
Codexとも仲良く。CodeRabbit CLIの紹介
moongift
PRO
0
110
能登半島地震で見えた災害対応の課題と組織変革の重要性
ditccsugii
0
360
"プロポーザルってなんか怖そう"という境界を超えてみた@TSUDOI by giftee Tech #1
shilo113
0
170
Performance Insights 廃止から Database Insights 利用へ/transition-from-performance-insights-to-database-insights
emiki
0
170
LLMアプリの地上戦開発計画と運用実践 / 2025.10.15 GPU UNITE 2025
smiyawaki0820
1
320
職種別ミートアップで社内から盛り上げる アウトプット文化の醸成と関係強化/ #DevRelKaigi
nishiuma
2
160
許しとアジャイル
jnuank
1
140
『OCI で学ぶクラウドネイティブ 実践 × 理論ガイド』 書籍概要
oracle4engineer
PRO
3
190
社内報はAIにやらせよう / Let AI handle the company newsletter
saka2jp
8
1.3k
ユーザーの声とAI検証で進める、プロダクトディスカバリー
sansantech
PRO
1
120
Featured
See All Featured
Understanding Cognitive Biases in Performance Measurement
bluesmoon
30
2.7k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
Raft: Consensus for Rubyists
vanstee
139
7.1k
Optimising Largest Contentful Paint
csswizardry
37
3.4k
Building an army of robots
kneath
306
46k
The Illustrated Children's Guide to Kubernetes
chrisshort
49
51k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
Rails Girls Zürich Keynote
gr2m
95
14k
How to Think Like a Performance Engineer
csswizardry
27
2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
620
Automating Front-end Workflow
addyosmani
1371
200k
Transcript
&49Jͱ࢝ΊΔBOTJCMF ansible & vmware are 1 2017-02-23 Ansible Practice Meetup
@ Think IT
TEXT ࣗݾհ ▸ Name: Hirofumi Hida ▸ Job: Ops /
ΠϯϑϥΤϯδχΞ ▸ BackGround: ▸ Technical Support Engineer ▸ Si ▸ Lang: Python, Node.js etc ▸ Twitter: @gekko_qv ▸ Qiita: http://qiita.com/hirofumihida 2
Έͳ͞Μ&49Jͬͯ·͔͢ʁ ▸ ϓϩμΫγϣϯ? ▸ ݕূڥ? ▸ ࣗ? ▸ etc 3
Έͳ͞Μ&49Jͬͯ·͔͢ʁ ▸ ϓϩμΫγϣϯ? ▸ ݕূڥ? ▸ ࣗ? ▸ etc 4
ͬͪ͜ΑΓͷ͓
ΫϥΠΞϯτԿΛͬͯ·͔͢ʁ ▸ vSphere Client (.NET or WEB) ? ▸ PowerCLI
? ▸ API (python, ruby etc) ? ▸ etc 5
ΫϥΠΞϯτԿΛͬͯ·͔͢ʁ ▸ vSphere Client (.NET or WEB) ? ▸ PowerCLI
? ▸ API (python, ruby etc) ? ▸ etc 6 )BWF'VO
(6*ͰΆͪΆͪ͢Δͷ͖Ͱ͔͢ ▸ Φϖϛε ▸ εΫϦʔϯγϣοτ͖ͷखॱॻ࡞ ▸ ࡞ۀূऔಘ 7
(6*ͰΆͪΆͪ͢Δͷ͖Ͱ͔͢ ▸ Φϖϛε ▸ εΫϦʔϯγϣοτ͖ͷखॱॻ࡞ ▸ ࡞ۀূऔಘ 8
TEXT ΞδΣϯμ ▸ ֤छϞδϡʔϧ͋Γ·͢ ▸ (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ 4UBOEBMPOF&49J ݶఆత͚ͩͲʜ
ʹ͍͍ͨ ▸ ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J ▸ ·ͱΊ 9
TEXT ΞδΣϯμ ▸ ֤छϞδϡʔϧ͋Γ·͢ ▸ (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ 4UBOEBMPOF&49J ݶఆత͚ͩͲʜ
ʹ͍͍ͨ ▸ ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J ▸ ·ͱΊ 10
TEXT ֤छϞδϡʔϧ͋Γ·͢ ▸ http://docs.ansible.com/ansible/list_of_cloud_modules.html ▸ ※ ߋ৽͕සൟͰͳ͍ͷؚΉ Target Modules Amazon
98 Azure 18 Docker 7 Google 14 OpenStack 54 Virt(KVM) 3 Vmware 28 2017/02/22 ݱࡏ 11
TEXT ֤छϞδϡʔϧ͋Γ·͢ ▸ http://docs.ansible.com/ansible/list_of_cloud_modules.html 12
TEXT ΞδΣϯμ ▸ ֤छϞδϡʔϧ͋Γ·͢ ▸ (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ 4UBOEBMPOF&49J ݶఆత͚ͩͲʜ
ʹ͍͍ͨ ▸ ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J ▸ ·ͱΊ 13
TEXT (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ http://docs.ansible.com/ansible/vmware_guest_module.html ▸ http://docs.ansible.com/ansible/vsphere_guest_module.html module Requirement vmware_guest PyVmomi
vsphere_guest pysphere 14
TEXT (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ http://docs.ansible.com/ansible/vmware_guest_module.html ▸ http://docs.ansible.com/ansible/vsphere_guest_module.html module Requirement vmware_guest PyVmomi
Ͱ͖Δ͚ͩ ͬͪ͜Λ͏! vsphere_guest pysphere QZTQIFSF ϝϯςऴྃ 15
TEXT (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ https://github.com/argos83/pysphere ͨͩ͠ɺ͜ͷ͋ͱͰʹ͢Δ Standalone ESXi (ແঈ൛) Ͱ pysphere
Ͱͳ͍ͱಈ͔ͳ͍ػೳ͋ͬͨΓ͢Δ… 16
TEXT (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ https://www.ansible.com/blog/managing-vmware-guests 17
TEXT (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ https://www.ansible.com/blog/managing-vmware-guests 18
TEXT (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ https://github.com/vmware/pyvmomi ESXi όʔδϣϯͱ߹Θͤ·͠ΐ͏ 19
TEXT ΞδΣϯμ ▸ ֤छϞδϡʔϧ͋Γ·͢ ▸ (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ 4UBOEBMPOF&49J ݶఆత͚ͩͲʜ
ʹ͍͍ͨ ▸ ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J ▸ ·ͱΊ 20
TEXT 4UBOEBMPOF&49J ݶఆత͚ͩͲʜ ʹ͍͍ͨ ▸ vsphere_guest Ͱ͋Ε esxi ύϥϝʔλʔʹ "ha-datacenter
“ ͚Δͱ VM ࡞Մೳ ▸ vmware_guest ͩͱ Standalone ESXi ʹରͯ͠ͷ VM ࡞ ࠔͦ͏… ▸ sshpass ΛೖΕΕ vim-cmd ίϚϯυΛଧͭ͜ͱՄೳ 21
TEXT ΞδΣϯμ ▸ ֤छϞδϡʔϧ͋Γ·͢ ▸ (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ 4UBOEBMPOF&49J ݶఆత͚ͩͲʜ
ʹ͍͍ͨ ▸ ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J ▸ ·ͱΊ 22
TEXT ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J ▸ ESXi on VirtualBox ▸ ESXi on
KVM ▸ Installation How to: Nested ESXi on KVM ▸ http://qiita.com/hirofumihida/items/ 3bc59a3094efa33ac79c ▸ ※ VM ͷ CPU ੍ݶͷͨΊ 64 bit GuestOS ͕࡞Εͳ͍ͳͲͷ ੍ݶ͋ΓಘΔ 23
TEXT ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J ▸ https://github.com/hirofumihida/ansible-esxi-sample 24
TEXT ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J 25
TEXT ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J 26
TEXT ΞδΣϯμ ▸ ֤छϞδϡʔϧ͋Γ·͢ ▸ (VFTU༻ϞδϡʔϧΆ͍ͷ͕ͭ͋Δ͕ ▸ 4UBOEBMPOF&49J ݶఆత͚ͩͲʜ
ʹ͍͍ͨ ▸ ࠓ͙͢ʹͰ࢝ΊΒΕΔBOTJCMF &49J ▸ ·ͱΊ 27
TEXT ·ͱΊ ▸ .PEVMFʹ͍ͭͯ ▸ ։ൃ͕׆ൃͳͷόʔδϣϯ͕มΘΔͱػೳมΘͬͯ ಉ͡1MBZCPPL͕͍·Θͤͳ͍͜ͱ͕͋Δ /PO 3FRVJSF͔Β3FRVJSFύϥϝʔλʹͳͬͨΓ
▸ 3FRVJSFNFOUͷ1ZUIPO"1*ͷ։ൃঢ়گʹࠨӈ͞Ε ΔͷͰҙ͕ඞཁ 28
TEXT ·ͱΊ ▸ "OTJCMFͱ&49JϑϨϯζʹͳΕͦ͏͔ 29
TEXT ·ͱΊ ▸ "OTJCMFͱ&49JϑϨϯζʹͳΕͦ͏͔ ▸ ͨͿΜʜ 30 ▸ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠