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
空前絶後のォォ!超絶怒濤のAnsible/fukuten-20170127
Search
Kunihiro Morita
January 27, 2017
Technology
0
850
空前絶後のォォ!超絶怒濤のAnsible/fukuten-20170127
Fukuoka.NET #5 2017/1/27 LT資料です。
Kunihiro Morita
January 27, 2017
Tweet
Share
More Decks by Kunihiro Morita
See All by Kunihiro Morita
絵で覚える AWS 全 (?) サービス入門 〜 できるAWSカルタ 〜/jawsug-20191019
morita92hiro
1
2.3k
決戦用MSセンチネル/alterbooth-20190606
morita92hiro
1
250
勝手にAlibaba Cloud White Beltシリーズ Elastic Compute Service(ECS)/alieaters-20190301
morita92hiro
0
400
夏休みで差がつく!Ansible/ansiblejp-20180803
morita92hiro
2
2.6k
希望のRancher〜コンテナをアウフヘーベン〜/ranchermeetup-20171006
morita92hiro
0
280
いまからDockerで始めるGitLab CE/gitlabjp-20170919
morita92hiro
1
1.4k
月額10円から作るServerless Website〜Azure編〜/serverlessfukuoka-20170825
morita92hiro
8
17k
コンテナ運用いきのこるには/ranchermeetup-20170807
morita92hiro
1
570
AWS Summit Tokyoをお探しですか?/jawsug-20170713
morita92hiro
0
170
Other Decks in Technology
See All in Technology
MLOps の現場から
asei
7
650
Qiita埋め込み用スライド
naoki_0531
0
5.1k
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
110
組織に自動テストを書く文化を根付かせる戦略(2024冬版) / Building Automated Test Culture 2024 Winter Edition
twada
PRO
17
4.7k
複雑性の高いオブジェクト編集に向き合う: プラガブルなReactフォーム設計
righttouch
PRO
0
120
あの日俺達が夢見たサーバレスアーキテクチャ/the-serverless-architecture-we-dreamed-of
tomoki10
0
460
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
270
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
110
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
ハイテク休憩
sat
PRO
2
160
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
180
多領域インシデントマネジメントへの挑戦:ハードウェアとソフトウェアの融合が生む課題/Challenge to multidisciplinary incident management: Issues created by the fusion of hardware and software
bitkey
PRO
2
110
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Being A Developer After 40
akosma
87
590k
A Tale of Four Properties
chriscoyier
157
23k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Mobile First: as difficult as doing things right
swwweet
222
9k
Building an army of robots
kneath
302
44k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.4k
Embracing the Ebb and Flow
colly
84
4.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
We Have a Design System, Now What?
morganepeng
51
7.3k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Transcript
ۭલઈޙͷΥΥʂ ઈౖᔶͷAnsible 2017/1/27 Fukuoka.NET (Fukuten) #5 1
Kunihiro Morita AlterBooth,inc. Solutions Architect @morita92hiro morita92hiro http://hawaku.hateblo.jp 2017/1/27 Fukuoka.NET
(Fukuten) #5 2
2017/1/27 Fukuoka.NET (Fukuten) #5 3
Ansible by Red Hat 2017/1/27 Fukuoka.NET (Fukuten) #5 4
Red Hat ❤ Microsoft 2017/1/27 Fukuoka.NET (Fukuten) #5 5
Ansibleͱ 4 PythonͰಈ͘ 4 ίʔυͰΠϯϑϥΛߏཧ͢Δπʔϧ 4 Infrastructure as code 2017/1/27
Fukuoka.NET (Fukuten) #5 6
ྨࣅπʔϧ 4 chef 4 puppet 2017/1/27 Fukuoka.NET (Fukuten) #5 7
ͳͥ͏ʁ 2017/1/27 Fukuoka.NET (Fukuten) #5 8
ߏཧπʔϧͳ͠ 4 खॱॻΛݩʹखಈͰઃఆ 4 खಈͳͷͰϛε͓͖Δ 4 खॱॻ࠷৽ͷঢ়ଶʁ 4 ൿͷλϨ 4
ࢼ͞ΕΔهԱྗ 2017/1/27 Fukuoka.NET (Fukuten) #5 9
ߏཧπʔϧ͋Γ 4 खॱΛίʔυͰهड़ 4 ίʔυΛ࣮ߦͯࣗ͠ಈͰઃఆ 4 ίʔυ͕࠷৽ͷঢ়ଶ 4 όʔδϣϯཧͯ͠ɺҎલͷঢ়ଶʹ͢ͷ؆୯ 4
Կ࣮ߦͯ͠ಉ͡ঢ়ଶʢႈੑʣ 2017/1/27 Fukuoka.NET (Fukuten) #5 10
AnsibleΠϯετʔϧ $ pip install ansible 2017/1/27 Fukuoka.NET (Fukuten) #5 11
Ansibleͷཁૉ 4 inventory 4 module 4 playbook 2017/1/27 Fukuoka.NET (Fukuten)
#5 12
inventory ࡞ۀରͱͳΔϗετΛهड़͢ΔϑΝΠϧ [web] 192.168.0.10 [db] 192.168.0.20 2017/1/27 Fukuoka.NET (Fukuten) #5
13
module ΠϯετʔϧαʔϏεىಈͳͲίϚϯυͷ෦ 4 yum 4 service $ ansible -i hosts
web -m ping 192.168.0.10 | success >> { "changed": false, "ping": "pong" } 2017/1/27 Fukuoka.NET (Fukuten) #5 14
playbook ϞδϡʔϧΛ࣮࣮ͯ͠ߦ͢Δ෦ - hosts: web sudo: yes tasks: - name:
be sure httpd is installed yum: name=httpd state=installed - name: be sure httpd is running and enabled service: name=httpd state=running enabled=yes 2017/1/27 Fukuoka.NET (Fukuten) #5 15
playbook࣮ߦ $ ansible-playbook -i hosts simple.yml PLAY [web] ************************************************************ GATHERING
FACTS *************************************************************** ok: [192.168.0.10] TASK: [be sure httpd is installed] ******************************************** changed: [192.168.0.10] TASK: [be sure httpd is running and enabled] ********************************** changed: [192.168.0.10] PLAY RECAP ******************************************************************** 192.168.0.10 : ok=3 changed=2 unreachable=0 failed=0 2017/1/27 Fukuoka.NET (Fukuten) #5 16
MacͰͬͯΈΔ 2017/1/27 Fukuoka.NET (Fukuten) #5 17
hosts localhost 2017/1/27 Fukuoka.NET (Fukuten) #5 18
playbook - hosts: localhost connection: local gather_facts: no tasks: -
name: tap homebrew cask homebrew_tap: tap=caskroom/cask state=present - name: install homebrew-cask homebrew: name=brew-cask state=latest - name: install dockertoolbox homebrew_cask: name=dockertoolbox state=present 2017/1/27 Fukuoka.NET (Fukuten) #5 19
playbook࣮ߦ $ ansible-playbook -i hosts localhost.yml -vv PLAY [localhost] **************************************************************
TASK: [tap homebrew cask] ***************************************************** <localhost> REMOTE_MODULE homebrew_tap tap=caskroom/cask state=present CHECKMODE=True ok: [localhost] => {"changed": false, "msg": "added: 0, unchanged: 1"} TASK: [install homebrew-cask] ************************************************* <localhost> REMOTE_MODULE homebrew name=brew-cask state=latest CHECKMODE=True ok: [localhost] => {"changed": false, "msg": "Package is already upgraded: brew-cask"} TASK: [install dockertoolbox] ************************************************ <localhost> REMOTE_MODULE homebrew_cask name=dockertoolbox state=present CHECKMODE=True changed: [localhost] => {"changed": true, "msg": "Cask would be installed: dockertoolbox"} PLAY RECAP ******************************************************************** localhost : ok=3 changed=1 unreachable=0 failed=0 2017/1/27 Fukuoka.NET (Fukuten) #5 20
WindowsͰͬͯΈΔ 2017/1/27 Fukuoka.NET (Fukuten) #5 21
೦ͳ͕ΒAnsibleΛ ಈ͔͢͜ͱग़དྷ·ͤΜ ! 2017/1/27 Fukuoka.NET (Fukuten) #5 22
ಈ͔͢ʹ! 4 Windows্ʹLinuxͷԾϚγϯΛ༻ҙ͢Δ 4 Cygwinʢαϙʔτ֎ʣ 4 Windows Subsystem for Linux
2017/1/27 Fukuoka.NET (Fukuten) #5 23
playbook - hosts: windows tasks: - name: Install git win_chocolatey:
name: git - name: Install SourceTree win_chocolatey: name: sourcetree - name: Install Notepad++ win_chocolatey: name: notepadplusplus.install 2017/1/27 Fukuoka.NET (Fukuten) #5 24
ଞʹ 4 VagrantϓϩϏδϣχϯά 4 DockerΠϝʔδϏϧυ 4 ֤छΫϥυͷૢ࡞ʢAzure/AWS/OpenStackͳͲʣ ͳͲͳͲ 2017/1/27 Fukuoka.NET
(Fukuten) #5 25
Ansible͍͍ͨʗڵຯ͕͋Δʁ 4 ͍ 4 ͍͍͑ 2017/1/27 Fukuoka.NET (Fukuten) #5 26
2/16ൃച✨ http://amzn.to/2jwgzVb 2017/1/27 Fukuoka.NET (Fukuten) #5 27
ߪೖ͢Δʁ 4 ͍ 4 ͍͑͢ http://amzn.to/2jwgzVb 2017/1/27 Fukuoka.NET (Fukuten) #5
28