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
890
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
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
Amazon SageMaker Unified Studio(Preview)、Lakehouse と Amazon S3 Tables
ishikawa_satoru
0
150
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
260
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
270
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
160
KubeCon NA 2024 Recap: How to Move from Ingress to Gateway API with Minimal Hassle
ysakotch
0
200
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
110
GitHub Copilot のテクニック集/GitHub Copilot Techniques
rayuron
23
11k
Password-less Journey - パスキーへの移行を見据えたユーザーの準備 @ AXIES 2024
ritou
3
1.4k
レンジャーシステムズ | 会社紹介(採用ピッチ)
rssytems
0
150
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
110
バクラクのドキュメント解析技術と実データにおける課題 / layerx-ccc-winter-2024
shimacos
2
1k
Featured
See All Featured
Designing for humans not robots
tammielis
250
25k
Practical Orchestrator
shlominoach
186
10k
Six Lessons from altMBA
skipperchong
27
3.5k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
A Tale of Four Properties
chriscoyier
157
23k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Thoughts on Productivity
jonyablonski
67
4.4k
Keith and Marios Guide to Fast Websites
keithpitt
410
22k
Optimizing for Happiness
mojombo
376
70k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
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 ▸ ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠