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
400
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
220
Callbacks are calling back
bltavares
2
410
Other Decks in Programming
See All in Programming
Milestoner
bkuhlmann
1
410
雑に思考を整理する技術と効能
konifar
58
29k
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
Tailwind CSSを本気でカスタマイズする方法
fsubal
13
5.2k
Azure OpenAI Serviceのプロンプトエンジニアリング入門
tomokusaba
3
670
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
110
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
940
Random\Randomizer クラスで日常のあれこれを解決しよう! / Random\Randomizer class solves familiar trouble
cocoeyes02
0
210
SIMD Parallel Programming with the Vector API
josepaumard
0
110
ScalarDBを用いたマイクロサービスにおけるデータ管理 (Database Engineering Meetup #2)
scalar
0
110
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
230
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
44
9.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
187
16k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Happy Clients
brianwarren
92
6.4k
In The Pink: A Labor of Love
frogandcode
138
21k
Faster Mobile Websites
deanohume
299
30k
It's Worth the Effort
3n
180
27k
Infographics Made Easy
chrislema
238
18k
10 Git Anti Patterns You Should be Aware of
lemiorhan
648
58k
How to train your dragon (web standard)
notwaldorf
73
5.2k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
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