Configurando o Foreman para Provisionamento com a Libvirt

Introdução

O objetivo desse artigo é fornecer um guia rápido de como configurar o Foreman para que ele possa provisionar máquinas virtuais usando as funcionalidades fornecidas pela libvirt. Ele fornece um material adicional de apoio à excelente documentação fornecida pelo projeto. Esse guia foi feito levando em conta um ambiente com Red Hat Enterprise Linux 6.7 ou 7.2, devendo funcionar sem maiores problemas em ambientes baseados em CentOS 6 ou 7.

Sobre o Foreman

O Foreman é uma ferramenta que permite gerenciar o ciclo de vida de servidores físicos ou virtuais, facilitando o provisionamento de sistemas e aplicações, automação de tarefas e, de modo geral, facilitando o gerenciamento de servidores. Entre outras coisas, ele permite a instalação desassistida de máquinas virtuais e o seu provisionamento em “Compute Resources” como OpenStack, Amazon EC2 e libvirt. Para ter uma ideia de como ele funciona, recomendo esse vídeo:

Continue reading “Configurando o Foreman para Provisionamento com a Libvirt”

Ebook: Integração de Sistemas com Apache Camel

Eu escrevi um mini-livro que descreve os conceitos básicos do Apache Camel e padrões de integração. Dois exemplos de integração de sistemas acompanha o conteúdo do livro: o primeiro deles contém uma implementação básica de um sistema back-end usando Active MQ e Apache Camel e o segundo contém uma implementação simples de um broker usando Apache Camel.

O livro pode ser baixado, em PDF, aqui. Os exemplos estão disponíveis no meu GitHub ou aqui.

The Rime of The Acient Programmer

Uma paródia da The Rime Of the Ancient Mariner que eu escrevi:


Hear the rime of the Ancient Programmer
See his eye as he compiles one of three
Mesmerises one of the testing guys
Stay here and listen to the nightmares
of the IT

And the test goes on, as the manager passes by
Caught by his spell and
the Programmer tells his tale.

Driven south to the land of the comments and code
To a place where programmer’s been
Through the code flies on the albatross
Hailed in Murphys’s name,
hoping good luck it brings.

And the test goes on, back to the North
Through the requirements and comments and
the albatross follows on

The Programmer kills the bird of good omen
His teammates cry against what he’s done
But when code compiles, they justify him
And make themselves a part of the crime.

Coding on and on and North across IT
Coding on and on and North ‘till all is done

The albatross begins with its vengeance
A terrible curse a crash has begun
His teammates blame bad luck on the Programmer
On his back, the manager stands

And the bugs goes on and on and on at IT
And the crash goes on and on for the users and for me

“Day after day, day after day,
we stuck nor fix nor promotion
As idle as a painted ship upon a painted ocean
Bugs, bugs everywhere
more than debugger can find
crashes, chrashes everywhere and no dump to find”

There, calls the programmer
there comes a strange message in the logs
But how can he debug with no memory dump
in the core and no files?

See… onward she comes
Onwards she nears, out of the SUN
See… she has no team
He has no life, wait but there’s two

Analyst and she the Analyst
she designed a new classes for the team
She shows the Programmer and he coded it now.
Then … the team one by one
They starting fixing, two hundred men
She… She, the IT Analyst
She shows them the bugs, design ones

“One after one by the star dogged moon,
too quick for groan or sigh
The manager turned his face with a ghastly pang
and cursed me with his eye
Four times fifty living men
(they had no life nor weekend),
had to code the fixes for a SUN,
and they fixed the bugs one by one.”

The bugs it lives on in their eyes
The Programmer he wished he’d die
Along with the application bugs
But they lived on, so did he.

And by the light of the moon
He prays for his code not doom
With comments he blesses them
Murphy’s creatures all of them too.

Then the app starts to run
The manager gets out from his back
Thanks for effort and goes back to IT
Then down in falls comes the release.

Hear the groans of the lifeless team men
See them stir and they start to rise
Bodies lifted with lots of coffee
None of them speak
and they’re lifeless in their eyes

And revenge is still sought, penance starts again
Crashes in the users face and the nightmare carries on.

Now the curse is finally lifted
And the Programmer drives home
Spirits go from the long dead bugs
Form their own failures and
the Programmer’s left alone

And then a support guy came running towards him
It was a joy he could not believe
The support guy, the client and the team lead
Penance of life will fall onto Him.

And the code it ships like product from the IT
And the Manager forgives the Programmer of his sins

The Programmer’s bound to tell of his story
To tell his tale wherever he works
To teach Murphys’s word by his own example
That we must code all requirements she had made.

And the release fest’s a sad and wiser man
And the tale goes on and on and on.

Benchmarks do Firefox

Com toda essa discussão sobre benchmarks do Firefox, GCC, ICC, etc. Hoje resolvi fazer uns testes de desempenho do Firefox no Arch Linux versus Firefox no Windows.  No Arch, por não saber ao certo qual seria mais adequado, escolhi dois pacotes da AUR: firefox-optimized e firefox-pgo. Ambos foram compilados com -march=x86_64 -mtune=generic -O2 -fomit-frame-pointer -pipe (todas essas flags estavam por PADRÃO no arquivo makepkg.conf do Arch).

Continue reading “Benchmarks do Firefox”

Frase do mês

Hoje, lendo o Code Complete 2 topei com essa frase do Dijkstra:

“The competent programmer is fully aware of the limited size of his own skull. He therefore approaches his task with full humility, and avoids clever tricks like the plague.”

Traduzindo:

“O programador compentente está ciente do tamanho limitado do seu próprio crânio. Ele, então, aborda sua tarefa com total humildade e evita truques espertos como (evita) a peste”

Sobre benchmarks de linguagens

Hoje, não sei como, topei com mais uma comparação de desempenho entre Java em e C++ que, como de costume, gerou uma discussão sem fim. Não que eu ache essas discussões totalmente inúteis: na verdade, você sempre acaba aprendendo/conhecendo alguma coisa nova. O ponto principal e que todo mundo ignora – para meu espanto – é que, quando um programa qualquer em Java é mais rápido que o seu equivalente em C/C++ isso só prova uma coisa: que um programa C/C++ bem escrito consegue processar qualquer coisa bem rápido, inclusive os bytecodes do Java 😉

Em tempo, dêem uma olhada nesse interessantíssimo conjunto de benchmarks.