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
Brincando com Puppet e Bots
Search
Bruno Lara Tavares
April 21, 2013
Programming
3
470
Brincando com Puppet e Bots
Apresentação utilizada no workshop de Puppet no @ideiasemprod
Bruno Lara Tavares
April 21, 2013
Tweet
Share
More Decks by Bruno Lara Tavares
See All by Bruno Lara Tavares
Javascript Toolkit 2.0
bltavares
0
250
Callbacks are calling back
bltavares
2
510
Other Decks in Programming
See All in Programming
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.7k
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
300
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
Domain-Driven Transformation
hschwentner
2
1.9k
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
360
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
45
16k
Introduction to kotlinx.rpc
arawn
0
670
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
410
CloudNativePGがCNCF Sandboxプロジェクトになったぞ! 〜CloudNativePGの仕組みの紹介〜
nnaka2992
0
220
社内フレームワークとその依存性解決 / in-house framework and its dependency management
vvakame
1
550
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
120
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Navigating Team Friction
lara
183
15k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.4k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.8k
Code Reviewing Like a Champion
maltzj
521
39k
A Tale of Four Properties
chriscoyier
158
23k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Transcript
Brincando Puppet com
Brincando Puppet com e BOTS!
Puppet é… Declarativo Open Source Cross platform
A documentação é sua amiga Referencias de tipos – http://docs.puppetlabs.com/references/latest/type.html
Principais tipos que vamos usar: Exec, File, Service e User
Exemplo file { ‘/etc/motd’:! content => ‘Welcome!’,! ;! }! !
Vagrant Possibilita criar máquinas virtuais com base em uma imagem
Diversas opções para configurar a máquina recem criada Inicialmente baseado no Virtualbox
Vagrantfile
Baseline Sandbox para máquinas virtuais https://github.com/bltavares/vagrant-baseline Facilita criação de ambientes
pré-configurados Possibilita testar manifestos Puppet Mix and match!
Ambientes atuais
Mão na massa!
Plano do dia • Criar um servidor de IRC com
o Puppet • Configurar o ambiente pra rodar o Hubot apontando pro servidor • Profit!
1. Clonar o baseline $ git clone https://github.com/bltavares/ vagrant-baseline.git
! ! $ cd vagrant-baseline! !
2. Configurar o servidor IRC package { 'ircd-ircu':! ensure
=> 'latest',! ;! }! ! service { 'ircd-ircu':! enable => true,! require => Package['ircd-ircu'],! ;! }! puppet/custom/irc.pp!
3. Subir a vm $ DEBUG=1 host_name=nodots-nodejs-redis vagrant up!
! $ vagrant ssh!
4. Começar a instalar o Hubot $ sudo npm
install –g hubot coffee-script! ! $ hubot --create <path>! ! $ cd <path>! ! $ sudo npm install!
5. Integrar o Hubot com o IRC https://github.com/github/hubot/wiki/Adapter:-IRC! !
$ sudo npm install --save hubot-irc! ! $ chmod +x bin/hubot! ! $ export HUBOT_IRC_SERVER=“localhost”! ! $ export HUBOT_IRC_ROOMS=“#hubot”! ! $ export HUBOT_IRC_UNFLOOD=“false”! ! $ bin/hubot –a irc!
Pronto! Seu servidor irc e seu bot estam te
esperando IP: 192.168.33.10
Próximos passos para você tentar As linhas que você
escreveu de Puppet deram certo? -> Extrair um modulo para ser usado em outros projetos O Bot está legal? -> Escrever puppet pra baixar ele do github e iniciar no boot
Obrigado!
[email protected]
Twitter Github
Imagens • hFps://placester.com/wp-‐content/uploads/ 2012/09/sock-‐puppet.jpg • hFp://www.hashicorp.com/images/blog/a-‐ new-‐look-‐for-‐vagrant/logo-‐8b7a4912.png
• hFps://github-‐images.s3.amazonaws.com/ blog/2011/hubot.png