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
500
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
280
Callbacks are calling back
bltavares
2
540
Other Decks in Programming
See All in Programming
Hack Claude Code with Claude Code
choplin
8
2.8k
Streamlitで実現できるようになったこと、実現してくれたこと
ayumu_yamaguchi
2
220
チームで開発し事業を加速するための"良い"設計の考え方 @ サポーターズCoLab 2025-07-08
agatan
1
490
商品比較サービス「マイベスト」における パーソナライズレコメンドの第一歩
ucchiii43
0
190
構文解析器入門
ydah
7
1.8k
AIコーディングエージェント全社導入とセキュリティ対策
hikaruegashira
11
7.1k
型で語るカタ
irof
0
800
MDN Web Docs に日本語翻訳でコントリビュートしたくなる
ohmori_yusuke
1
130
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
180
Jakarta EE Meets AI
ivargrimstad
0
260
20250708_JAWS_opscdk
takuyay0ne
2
150
The Modern View Layer Rails Deserves: A Vision For 2025 And Beyond @ RailsConf 2025, Philadelphia, PA
marcoroth
2
780
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Statistics for Hackers
jakevdp
799
220k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Site-Speed That Sticks
csswizardry
10
720
A designer walks into a library…
pauljervisheath
207
24k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
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! contato@bltavares.com 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