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
270
Callbacks are calling back
bltavares
2
530
Other Decks in Programming
See All in Programming
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
260
VS Code Update for GitHub Copilot
74th
1
210
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
780
Cline指示通りに動かない? AI小説エージェントで学ぶ指示書の書き方と自動アップデートの仕組み
kamomeashizawa
1
570
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
14
2.9k
関数型まつりレポート for JuliaTokai #22
antimon2
0
140
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
240
「Cursor/Devin全社導入の理想と現実」のその後
saitoryc
0
120
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
Create a website using Spatial Web
akkeylab
0
300
型付きアクターモデルがもたらす分散シミュレーションの未来
piyo7
0
800
A comprehensive view of refactoring
marabesi
0
970
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
700
The Cost Of JavaScript in 2023
addyosmani
51
8.4k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
A designer walks into a library…
pauljervisheath
206
24k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
137
34k
For a Future-Friendly Web
brad_frost
179
9.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Scaling GitHub
holman
459
140k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
Visualization
eitanlees
146
16k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2.1k
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