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
460
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
230
Callbacks are calling back
bltavares
2
490
Other Decks in Programming
See All in Programming
Realtime API 入門
riofujimon
0
150
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
WebフロントエンドにおけるGraphQL(あるいはバックエンドのAPI)との向き合い方 / #241106_plk_frontend
izumin5210
4
1.4k
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
EventSourcingの理想と現実
wenas
6
2.3k
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
250
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
110
CSC509 Lecture 12
javiergs
PRO
0
160
役立つログに取り組もう
irof
28
9.6k
色々なIaCツールを実際に触って比較してみる
iriikeita
0
330
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Adopting Sorbet at Scale
ufuk
73
9.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Building Applications with DynamoDB
mza
90
6.1k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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