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
870
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.1k
Other Decks in Technology
See All in Technology
長期間TiDBを使ってきた話 @ 私たちはなぜNewSQLを使うのかTiDB選定5社が語る選定理由と活用LT / Experiences with TiDB Over Time
chibiegg
2
900
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
350
競技としてのKaggle、役に立つKaggle
yu4u
3
1.1k
Meta Quest 3 で動く桜マシマシ WebXR アプリを IBM Cloud Code Engine と Babylon.js で作った話
1ftseabass
PRO
0
120
Azure Container Apps + Bicep 〜 こんな感じで運用しています
kaz29
2
470
require(ESM)とECMAScript仕様
uhyo
3
630
Cloud Native Java with Spring Boot (CNCF Aarhus, April 2024)
thomasvitale
1
170
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
VS CodeでAWSを操作しよう
smt7174
8
1.6k
KubeCon EU 2024 Recap “Kubernetes Policy Time Machine: Where to Next?”
ryysud
0
220
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
4
390
Google Cloud の AI を支える裏側のインフラを垣間見る!
maroon1st
0
350
Featured
See All Featured
In The Pink: A Labor of Love
frogandcode
138
21k
The Mythical Team-Month
searls
216
42k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
9
8.3k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
Automating Front-end Workflow
addyosmani
1356
200k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Fashionably flexible responsive web design (full day workshop)
malarkey
398
65k
Bash Introduction
62gerente
604
210k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
125
32k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
121
39k
The MySQL Ecosystem @ GitHub 2015
samlambert
243
12k
Bootstrapping a Software Product
garrettdimon
PRO
302
110k
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 ▸ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠