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
5min GuardDuty Extended Threat Detection EKS
takakuni
0
140
変化する開発、進化する体系時代に適応するソフトウェアエンジニアの知識と考え方(JaSST'25 Kansai)
mizunori
1
210
mrubyと micro-ROSが繋ぐロボットの世界
kishima
2
260
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
260
Snowflake Summit 2025 データエンジニアリング関連新機能紹介 / Snowflake Summit 2025 What's New about Data Engineering
tiltmax3
0
310
Agentic Workflowという選択肢を考える
tkikuchi1002
1
500
AWS テクニカルサポートとエンドカスタマーの中間地点から見えるより良いサポートの活用方法
kazzpapa3
2
540
本が全く読めなかった過去の自分へ
genshun9
0
300
Welcome to the LLM Club
koic
0
170
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
630
~宇宙最速~2025年AWS Summit レポート
satodesu
1
1.8k
Node-REDのFunctionノードでMCPサーバーの実装を試してみた / Node-RED × MCP 勉強会 vol.1
you
PRO
0
110
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
93
6.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Producing Creativity
orderedlist
PRO
346
40k
We Have a Design System, Now What?
morganepeng
53
7.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
The Invisible Side of Design
smashingmag
299
51k
Why You Should Never Use an ORM
jnunemaker
PRO
57
9.4k
Being A Developer After 40
akosma
90
590k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
4 Signs Your Business is Dying
shpigford
184
22k
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 ▸ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠