tag:blogger.com,1999:blog-75062914268287553392024-03-20T04:02:21.406-03:00Vida de DBAGabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.comBlogger91125tag:blogger.com,1999:blog-7506291426828755339.post-20838615540273002292021-05-26T19:57:00.003-03:002021-05-26T19:58:20.344-03:00ThreadCast SouthSystem - DevOps - Quando as coisas não acontecem<h1 style="text-align: left;"><b>Participação no ThreadCast em Maio</b></h1>
<h2 style="text-align: left;"><br />
Falamos sobre os posts:</h2><div>
<br /><a href="https://helkmut.blogspot.com/2021/03/buscando-e-retendo-talentos-sem-o-hype.html">https://helkmut.blogspot.com/2021/03/buscando-e-retendo-talentos-sem-o-hype.html
</a><br /><a href="https://helkmut.blogspot.com/2020/04/devops-quando-as-coisas-nao-acontecem.html">
https://helkmut.blogspot.com/2020/04/devops-quando-as-coisas-nao-acontecem.html</a></div><div><br /></div><div>
<br />
<br />
<iframe allowfullscreen="" class="BLOG_video_class" height="498" src="https://www.youtube.com/embed/pTRSV1NXshQ" width="600" youtube-src-id="pTRSV1NXshQ"></iframe></div>Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-80499033496114479432021-03-12T14:01:00.003-03:002021-03-15T12:06:58.370-03:00Buscando e retendo talentos sem o hype da tecnologia <p style="text-align: justify;"><br /></p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Como engajar novos e atuais colaboradores da área de tecnologia se o negócio não requer tecnologias de ponta (Hype)? Esse é um dos grandes desafios de muitas empresas e vamos falar mais sobre ele.</p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"><u>Aquecimento do mercado de trabalho de TI</u></p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Com as mudanças geradas nos modelos de negócio do mundo todo, em quase todos os segmentos, muitas empresas voltaram seus olhos para a TI. Sejam lojas que precisaram voltar a sua estratégia para o e-commerce (uma vez que os negócios físicos ficaram impedidos de abrir) ou mesmo indústrias que, em tempos de contenção, precisaram reduzir seus custos operacionais.</p><p style="text-align: justify;">Este tipo de movimento do mercado em busca de tecnologias também gera outro efeito colateral: o aquecimento de oportunidades e posições de profissionais de diversas áreas da Tecnologia da Informação (TI), às vezes os mesmos profissionais que foram dispensados na primeira semana de pandemia, onde não se sabia muito bem qual estratégia traçar. </p><p style="text-align: justify;">Brotam de um lado recrutadores com vagas cheias de desafios e, do outro lado, crescem DevOps Engineers, Site Reliability Engineering (SRE) e muitas outras nomenclaturas que pouco se sabe na prática quando “a mão vai para a graxa”. </p><p style="text-align: justify;">Mas qual a origem destas nomenclaturas? Por que todos os dias temos um novo nome para atuar em uma nova tecnologia? Sim, além da necessidade de agilidade do mercado temos também a ansiedade pelo uso do que está em evidência. </p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"><u>Ligação entre mercado e plataformas self-service está na formação de novos recursos</u></p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Este anseio pelo novo, em nosso entendimento, é também obra de um processo sistêmico das empresas de consultoria e startups onde, seja por programa de formação ou requisito no programa de recrutamento, essas tecnologias são apresentadas como o melhor, e qualquer coisa mais antiga “é ruim”, “é legado”, ou seja, não presta. </p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Veja a referência do Gartner sobre as 10 (dez) principais tendências (<a href="https://www.gartner.com/pt-br/conferences/la/infrastructure-operations-cloud-brazil/gartner-insights/top-10-trends-impacting-io-2020">https://www.gartner.com/pt-br/conferences/la/infrastructure-operations-cloud-brazil/gartner-insights/top-10-trends-impacting-io-2020</a>), onde há exatamente um direcionamento para plataformas self-service. </p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"><b>plataformas self-service</b> : Do ponto de vista prático é a composição de diversas stacks, sejam open source ou enterprise, nos modelos IaaS (Infrastructure as a Service) ou SaaS (Software as a Service). Tais stacks são coordenadas para proporcionar um ciclo completo, desde a esteira de publicação até o delivery em um ambiente estável, confiável e escalável. </p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Em organizações que não estão abertas a mudança cultural, para que seus produtos sejam desenvolvidos e ocorra uma tentativa de redução de rotatividade (seja de consultoria de terceiros ou mão de obra própria), requisitam a construção de ambientes mais complexos, com tecnologias mais atuais, sem que de fato gere vantagem para o negócio. </p><p style="text-align: justify;">Criam-se plataformas e times focados em tecnologias sem uma necessidade, estes times ao longo do tempo se desmotivam pela frustração de falta de propósito. </p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"><u>Plataforma Self-Service : Quais as vantagens e desvantagens de negócio</u></p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Mas qual necessidade? A necessidade de atender o “time to market” de inovações para fazer frente a ambientes cada vez mais concorridos de mercado, gerando agilidade, qualidade nas aplicações, disponibilidade e confiabilidade do ambiente ao ciclo de rollout. </p><p style="text-align: justify;">Mas o que envolve este ciclo? É o ciclo de construção, testes, publicação e sustentação de serviços, pois estamos inseridos em ambientes que dependem da TI para que sejam competitivos em um momento tão dinâmico como este. Veja, estes são ambientes em que precisam se reinventar comercialmente ou aprimorar a velocidade e qualidade dos serviços e produtos oferecidos. </p><p style="text-align: justify;">Se a organização está inserida em um mercado não-volátil, seguindo estável mesmo em períodos turbulentos, antes de montar uma plataforma e decidir usar determinadas tecnologias ou metodologias, é primordial avaliar se todo este investimento faz sentido.</p><p style="text-align: justify;">A ausência de demanda ou necessidade geram reflexos como o método “go horse”, retornando velhos hábitos, como forma de exceção. Neste caso começam as intervenções manuais, promoção de novas releases que não seguem completamente o fluxo de publicação e, no pior dos casos, estas exceções se tornam o padrão, pois ao longo do tempo para a camada estratégica da empresa perde-se o sentido de custo de operação, solicitando “skips” no processo, geralmente burlando ou negligenciando os testes automatizados ou provisionamentos de infraestrutura controlados. </p><p style="text-align: justify;">O time e gestão precisam ver valor no fluxo (valor para o negócio) e, caso pensem em abrir mão de algum ponto, precisam estar cientes de qual valor também estarão abrindo mão, este processo é chamado de Gestão de Risco. </p><p style="text-align: justify;">Veja que até aqui não citamos um tipo específico de solução, pois isto varia de acordo com a realidade e complexidade do ambiente alvo. Lembramos da máxima de que nem sempre precisamos de um Kubernetes para termos um ambiente saudável, mas algo a nós não é discutível, processos como garantia de estado, fluxo de versionamento, testes automatizados, rastreabilidade e observabilidade.</p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"><u>Mas como gerar engajamento retendo e obtendo novos talentos para seu time se não pode oferecer estes desafios e tecnologias? </u></p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Primeiro precisamos identificar em qual cenário a organização alvo faz parte: ou o mercado onde está inserida não é tão dinâmico, ou a organização está tão distante de inovações tecnológicas e atuais de engenharia de software que opera com sistemas ainda criados antes de 2010 (os famosos “legados”), com processo de publicação manual, etc. Para cada um destes cenários, precisamos descobrir a resposta da pergunta: ‘o que gera engajamento para novos talentos, ou retêm os existentes se a organização não possui tais desafios?’, mas as mudanças serão obtidas em momentos diferentes, pois serão mudanças culturais muito grandes e isto leva tempo, mais tempo do que sua carreira possa esperar. </p><p style="text-align: justify;"><br /></p><p style="text-align: justify;">Um ponto importante em nosso ponto de vista é que em ambos os cenários não podemos e nem devemos vislumbrar um cenário saindo de um datacenter on-premise e indo dentro de 1 ano para uma cloud híbrida com plataforma self-service, onde todos processos de testes e rollout de ambientes sejam automatizados. Isto demanda esforço, tempo, disciplina e, principalmente, a priorização do time estratégico da empresa. Sem isso, talentos procurarão outros desafios, e cada vez mais o time A virará o time C em vários aspectos, mantendo velhos hábitos. </p><p style="text-align: justify;">Observe que estamos olhando do ponto de vista ainda de carreira e do colaborador, todas as práticas necessárias não partem da camada operacional e tática, por mais dinheiro e recursos que sua organização possua, nem sempre é de dinheiro que estamos falando, mas de outros valores e requisitos. Vejam alguns fatores comuns que mapeamos:</p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"><b>Fatores que geram engajamento</b></p><p style="text-align: justify;"><b><br /></b></p><p style="text-align: justify;"></p><ul><li>Perspectiva de evolução (profissional, pessoal e financeira)</li><li>Desafios técnicos alinhados com a carreira</li><li>Autonomia para fazer mudanças</li><li>Flexibilidade de horário de trabalho</li><li>Possibilidade de trabalho remoto</li><li>Conciliação com a vida pessoal, qualidade de vida</li><li>Trabalhar com pessoas qualificadas</li><li>Liderança servidora que escuta atentamente</li><li>Coach Sessions e 101s</li><li>Guilds, Hackathons, Dojos, sessions de LTs </li><li>Cultura de inovação e de Deep Dive</li><li>PTO (Paid Time Off)</li><li>Hosting de meetups</li><li>Suporte a participação de projetos Open source</li><li>Pub Crawls com o time </li><li>Acreditar na iniciativa que se está trabalhando, e não só o faz por motivos meramente financeiros ou de tendência</li></ul><p></p><p style="text-align: justify;"><br /></p><p style="text-align: justify;"><b>Fatores que podem desmotivar</b></p><p style="text-align: justify;"><b><br /></b></p><p style="text-align: justify;"></p><ul><li>Falsas promessas de crescimento</li><li>Inflexibilidade</li><li>Problemas de ordem Política / Segurança psicológica</li><li>Não propiciar mudanças</li><li>Falta de propósito</li><li>Escritórios, cubículos ou ambientes no-open-space</li><li>Muitas reuniões, lidar com questões administrativas e comerciais</li><li>Forçar um modelo de contratação (CLT, PJ, etc.)</li></ul><p></p><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><div>Aqui não elencamos quais fatores são mais ou menos importantes, o fato de serem citados quando questionados ‘Quais os fatores que lhe geram engajamento em projetos em que atuou/atua? Quais fatores já os fizeram sair de algum projeto?’ nos mostram que, se estão presentes, em algum momento foram relevantes em uma tomada de decisão do colaborador, seja para ingressar em um projeto ou para deixá-lo. </div><div><br /></div><div><span style="white-space: pre;"> </span>Ainda não respondemos a pergunta inicial: <u>“O que gera engajamento para novos talentos, ou retêm os existentes se a organização não possui tais desafios?”</u></div><div><br /></div><div><span style="white-space: pre;"> </span>O primordial é não apresentar falsas promessas ou falsos desafios, isso frustra mais do que a sinceridade. Só diga que está com o desafio de transformação digital e a implantação de novas tecnologias se de fato tem uma movimentação clara da direção para isto. Caso não tenha, seja verdadeiro, não dê falsas esperanças, pois este novo recurso ou quem está pensando em sair não permanecerá muito tempo. </div><div>Se a organização não tem o apoio estratégico, seja honesto e mude o discurso. Diga que o desafio, seja com o conhecimento do time ou de quem se quer contratar, é experimentar novas práticas de engenharia de software (e esteja aberto a isto), utilizá-la em projetos pilotos para mostrar aos diretores resultados com essa nova abordagem. Que isto demandará tempo, que muitas vezes não terão apoio e o risco deve ser compartilhado, mas nunca omitido. Estará dando a oportunidade de ambos os lados entrarem em acordo sabendo o jogo que está sendo jogado. </div><div>Tudo isto pode mostrar alternativas e modificações de planos, sem frustrações, de maneira flexível, sem sonhos, com decisões mais reais, baseadas em vantagens para o negócio, e não baseadas em tendências. O time pode decidir em conjunto que, a curto prazo, talvez não seja um Kubernetes que se precisa, e nem o uso de microsserviços se o monolito ou a estrutura modular atende bem.</div><div><br /></div><div>Concluímos que as organizações que estão inseridas nestes cenários, ou ainda empresas de outsourcing e consultoria, que cometem equívocos ao usar alguma destas práticas dificilmente obterão êxito no preenchimento de todas as suas posições em aberto. Entretanto, aumentará a imagem de transparência e, por consequência, a retenção de talentos. </div><div>Também é necessário lembrar que qualquer tecnologia ou metodologia nova deve ser considerada se houver uma clara vantagem de retorno para o negócio. Não fazer o uso sem sentido ou por tendência. Procurar fazer estudos sobre as vantagens e desvantagens de cada implantação, uma vez que escolhas ruins sempre levarão ao prejuízo.</div><div>Busque consultorias, parceiros que estão dispostos a crescer com o seu negócio e apresentar soluções alinhadas com suas estratégias: que nem sempre lhe digam o que estás esperando ouvir, não lhe digam sim somente para alocar mais recursos e ter mais lucros, mas buscar o lucro em conjunto com o resultado da sua organização.</div><div>As pessoas, em sua maioria, se motivam e se engajam mais pelo resultado (de negócio) do seu trabalho, não apenas por usar uma tecnologia que, ao final, gerará caos tecnológico pela complexidade sem efetividade ou retorno ao negócio. </div><div><br /></div><div><br /></div><div><div><b><br /></b></div><div><b>Indicações de leitura</b></div><div><br /></div><div><a href="https://ilegra.com/blog/infografico-saiba-quais-os-ganhos-de-se-priorizar-as-tendencias-certas-em-2021/">https://ilegra.com/blog/infografico-saiba-quais-os-ganhos-de-se-priorizar-as-tendencias-certas-em-2021/</a></div><div><a href="https://ilegra.com/blog/quais-tendencias-de-tecnologia-e-de-consumo-devem-ser-consideradas-em-2021/">https://ilegra.com/blog/quais-tendencias-de-tecnologia-e-de-consumo-devem-ser-consideradas-em-2021/</a></div><div><a href="https://inacioklassmann.medium.com/technical-leader-vs-effective-leader-5996a7ea7514">https://inacioklassmann.medium.com/technical-leader-vs-effective-leader-5996a7ea7514</a></div><div><a href="http://diego-pacheco.blogspot.com/2021/02/nine-lies-about-work.html">http://diego-pacheco.blogspot.com/2021/02/nine-lies-about-work.html</a></div><div><a href="http://diego-pacheco.blogspot.com/2021/02/attention-economy.html">http://diego-pacheco.blogspot.com/2021/02/attention-economy.html</a></div><div><br /></div><div><div><b>Fontes</b></div><div><br /></div><div><a href="https://www.gartner.com/pt-br/conferences/la/infrastructure-operations-cloud-brazil/gartner-insights/top-10-trends-impacting-io-2020">https://www.gartner.com/pt-br/conferences/la/infrastructure-operations-cloud-brazil/gartner-insights/top-10-trends-impacting-io-2020</a></div><div><a href="https://dictionary.cambridge.org/pt/dicionario/ingles/time-to-market">https://dictionary.cambridge.org/pt/dicionario/ingles/time-to-market</a></div><div><br /></div><div><br /></div><div>Sobre os autores</div><div><br /></div><div>* <b>Gabriel Prestes</b>, formado em Gestão da Tecnologia da Informação, DevOps Engineer da ilegra, entusiasta de carros antigos e apaixonado por VW Santana, vulgo “lasanheiro”.</div><div><br /></div><div>* <b>Tales Viegas</b>, formado em Ciência da Computação, Arquiteto de Software na ilegra, tem mais anos trabalhando com informática do que muitos dos seus colegas tem de vida, viciado em Marvel, viagens e sofrimentos futebolísticos.</div></div></div><div><br /></div><div>Conteúdo também disponível em : https://ilegra.com/blog/buscando-e-retendo-talentos-sem-o-hype-da-tecnologia/</div><div><br /></div><div><div>Agradecimentos : Inácio Klassmann, Jackson Oliveira, Diego Pacheco, Isaías Prestes, Gediel Luchetta e César Mesquita.</div></div><div><br /></div></div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><br /></div>Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-38166785634741320962020-04-26T09:49:00.000-03:002020-04-26T09:49:22.510-03:00DevOps, quando as coisas não acontecem<span id="docs-internal-guid-1dbca227-7fff-325b-b2dd-471375d6f9e7"></span><br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt;">
<div dir="ltr" style="line-height: 2.88; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>'DevOps - quando as coisas não acontecem’ conta em forma de narrativa como é difícil mudar a cultura de organizações, lições aprendidas e quando deves seguir adiante pelo bem maior, sua carreira.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="white-space: pre;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> </span></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Aos que leem a publicação, não é uma publicação de caso de sucesso. Estamos em tempos onde todos querem contar uma história de sucesso, onde tudo dá certo e afeta positivamente a todos com valor para o negócio. Bacana! Mas não podemos esquecer que o PPT aceita tudo quando vira uma apresentação bonita. Demonstrações onde tudo é preparado e maquiado para não apresentar débitos técnicos e códigos chumbados. </span><br />
<span style="white-space: pre;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"> </span></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="text-indent: 36pt; white-space: pre;"> </span><span style="text-indent: 36pt;">Meio pessimista, não? A publicação não é técnica, ainda que o técnico e a cultura tenham sido os fatores que nos levaram ao abandono no final. </span></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Começando com a história do Gabriel (isso, estamos nos citando em terceira pessoa), não mencionando aqui todo histórico desde que nasceu da barriga da sua mãe, mas sim, o que o motivou a ingressar na empresa do caso em questão. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Já viram aquelas vagas que utilizam palavras chamativas como ‘desafio’, ‘squads’, ‘métodos ágeis’ e ‘ambiente dinâmico’? Elas são ótimas e uma delas chamou a atenção dele.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Gabriel já tinha uma carreira sólida, estabilidade financeira, trabalhava em projetos de bons clientes em uma empresa de consultoria, tinha contas a pagar por gastar demais, logo tornava-se mercenário e sedento por qualquer cinco pratas a mais no valor hora. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>A vaga em questão pagava melhor e como atrativo tinha palavras no anúncio como as citadas no parágrafo anterior. Ele contatou o recrutador que marcou uma entrevista com o cliente, o arquiteto principal do projeto. Entusiasmado, mas com medo de julgamentos, foi a tal entrevista temeroso por perguntas técnicas profundas. As abordagens foram vagas, nada técnico, o que deixou o Gabriel apreensivo. A empresa era do ramo financeiro, de grande porte e isso não causou receio. Ao perguntar sobre o projeto recebeu como resposta a palavra “plataforma”. Palavra que foi sondada com: “uma plataforma de um time SRE (<a href="https://landing.google.com/sre/">https://landing.google.com/sre/</a>)?” E obteve resposta incerta “É, isso aí!”. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Aqui vai a <b><u>primeira lição aprendida</u></b>: Para qualquer projeto com palavras de impacto, sonde os seus publicadores para saber se de fato as entendem, isso lhe mostrará com um perfil interessado e pode lhe livrar de projetos sem dados, sem objetivos e repleto de palavras bonitas que na prática não se aplicam. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Deixamos sugestões para mitigar essas “armadilhas”: </span><br />
<br />
<ul>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">O que vocês entendem por time de SRE?</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Quais são as práticas de engenharia que já estão disseminadas nos times de desenvolvimento?</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">O que já existe na plataforma atual e qual é o roadmap de curto, médio e longo prazo?</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Quantas pessoas fazem parte do time SRE e quais são os perfis delas?</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">A empresa tem uma visão de produto para tratar a plataforma?</span></li>
</ul>
<br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Muitas empresas brasileiras tentam aplicar conceitos e inovações de TI (tecnologia da informação) sem saber muito bem o que estão fazendo e o que aqueles conceitos realmente significam. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Começa aí então a frustração generalizada dos profissionais em cascata que acreditaram que aquilo - agora - seria “diferente”.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span><b>Segunda lição aprendida</b>: Normalmente recrutadores desconhecem a realidade do projeto e farão a vaga parecer ser mais desafiadora do que na verdade é, afinal, o trabalho deles é recrutar pessoas. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Ao Ingressar no projeto, Gabriel entendeu que a vaga era para atuar dando play em job de Jenkins (<a href="https://jenkins.io/">https://jenkins.io/</a>), e a plataforma ao que o arquiteto se referia era o nome do projeto em si e não o conceito de plataforma em SRE. </span><br />
<div>
<br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>O cenário visualmente era agradável, um prédio parecido com garagem, puffs bacanas, mas todo e qualquer processo técnico era feito por GMUD, engessado. Um servidor novo e uma tecnologia nova eram coisas de meses de espera. Distante do conceito de plataforma self-service que um time de SRE deve buscar e implementar.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Em menos de um mês Gabriel queria retornar ao seu emprego antigo, tentou outras oportunidades, enfim, bateu o desespero. Foi quando conheceu Inácio, que já estava há mais tempo na empresa. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Vamos fazer uma pausa e contar a história do Inácio, da sua chegada a empresa ao momento dos acontecimentos desta publicação. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Este projeto de transformação digital necessitava de alguém que pudesse contribuir com experiência em soluções de software, estruturação de times e também ter experiência com tecnologias mais atuais. Então o Inácio foi chamado para atuar nesta transformação. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Inicialmente foi muito produtivo, os times de desenvolvimento foram reestruturados, a arquitetura e algumas tecnologias foram definidas.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>A primeira release foi projetada e o software começou a ser desenvolvido. Estava tudo indo muito bem, Inácio tinha alinhamento com o time do cliente. Ambos com a mesma expectativa. Tinham o aval e a abertura da empresa para implementar as mudanças e realizar a construção de um software com escalabilidade, observabilidade e sustentabilidade.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Até que chegou o momento de construir a arquitetura e implementar as tecnologias. Então foi onde Inácio e o time foram surpreendidos, pois esbarraram na dificuldade de que aquela liberdade era ilusória. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Existiam setores dentro da empresa que não estavam efetivamente trabalhando para fazer a transformação digital (sendo um dos aspectos colocar o cliente no centro). O que realmente faziam era trabalharem para manterem os seus empregos. Usavam seus cargos importantes para garantir que não mudassem as tecnologias, mantendo-se como tutores e influenciadores dos seus silos.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Gabriel conhecia Inácio de vista, de um grupo de arquitetos os quais mantinham uma comunidade chamada ArqTI (<a href="http://arqti.org/">http://arqti.org/</a>). Ambos estreitaram contatos quando o arquiteto principal pediu para que ele, Gabriel, fizesse a análise de um problema que se passava em um projeto de outra unidade da organização, no caso, a unidade em que Inácio trabalhava. Eram somente algumas horas e tinha que ser superficial e objetivo na tal análise. Gabriel viu no momento, ao conhecer o PO (product owner) a oportunidade de mudar o cenário em que se encontrava, pois este PO era alguém que tinha sangue nos olhos e dedicação pelo que fazia, ainda que as coisas não acontecessem na velocidade e qualidade que ele (product owner) desejava. Então resta citar a terceira lição. </span><br />
<br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span><b>Terceira lição aprendida</b>: Fique próximo de pessoas que fazem a diferença, e dadas as oportunidades, faça o seu melhor sempre, independente da motivação atual. Nos inspiramos no dia a dia em uma entrevista do Waldez Ludwig (<a href="http://www.ludwig.com.br/">http://www.ludwig.com.br/</a>), a qual menciona um jogador de futebol em começo de carreira: ele não faz gol contra quando as coisas não estão bem, é aí que ele marca mais gols e joga melhor - com o objetivo claro de que um clube grande o encontre.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Gabriel fez o seu melhor no relatório, e o tempo que passou nesta unidade (02 dias) usou para estreitar seus laços interpessoais e levantar dores e demandas que ninguém queria ouvir. As colocou em uma lista de demandas.</span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span><b>Quarta lição aprendida</b>: Seja gentil e educado com todos. Criar boas relações aumentam suas possibilidades futuras. E veja: deves ser justo, sendo educado e gentil do porteiro que lhe atende sorrindo até o diretor da empresa. Isto lhe permitirá encontrar possibilidades e demandas que algumas pessoas não compartilharão com o comercial da empresa, mas com o técnico que entende o problema. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Neste ponto entra o Inácio novamente, o Gabriel sempre fala que esse cara é 10!!! Inácio ajudou na montagem da lista de demandas e como já estava há mais tempo na organização tinha maior influência para que estes pontos, que eram deveras relevantes, chegassem a quem realmente precisava, e chegou! Chegou a uma gerente que entendia do negócio como poucos ali. Sua postura? Ímpar. Ela priorizou as demandas e os alocou focados para esta unidade. De largados e players de Jenkins passaram a recursos vitais para que o lançamento do novo produto do cliente fosse realidade, Inácio e Gabriel, o time de DevOps, como falavam. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Agora a situação dava uma reviravolta para Gabriel na empresa: eles podiam implementar tecnologias inovadoras. A experiência do Inácio na arquitetura de software e a bagagem que Gabriel trazia da área de operação não tinha como dar errado. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>No meio do percurso constataram que as demandas aumentavam, e somente dois não seriam suficientes para atender o prazo desejado. Então lhes possibilitaram a alocação de mais um recurso e assim o fizeram, eles chamaram um colega, em especial amigo, para trabalharem juntos no projeto. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>A entrega foi feita de exatamente todos os itens e, uma migração feita completamente dentro da expectativa do cliente. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Então o leitor deve se perguntar: mas não é uma história de DevOps que não aconteceu? Sim, e foi depois da entrega que as coisas começaram a dar errado. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>A sustentação do ambiente deve ser do time do produto, certo? Mas esse não é um conto de fadas. Muitas organizações que dizem estar em processo, ou já fizeram a transformação digital, mantém times de NOC que são responsáveis em sustentar e serem plantões de produtos e tecnologias que desconhecem. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Foi aí que começam a ligar para o Gabriel, para o Inácio, pedindo que atendesse e resolvessem "a arte" instaurada por amor a camisa. Começaram também a pressionar eles por usarem tecnologias que não eram homologadas pela organização. Uma lista foi criada de tecnologias suportadas por profissionais que desconheciam tools de DevOps. Veja, isso não limita o conceito de inovação?! </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Inácio e Gabriel colocaram-se à disposição de sustentar o produto, a opção foi desconsiderada pela gestão e somente um repasse foi feito aos sysadmins da empresa (NOC) que estavam operando ainda monólitos. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Vários fatores os levaram a desistir de uma luta cultural: </span><br />
<br />
<ul>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Assédio por ter que responder por escolhas tecnológicas inovadoras;</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Responsabilidade por soluções que não eram enterprise;</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Por ter que seguir políticas de segurança de 1990;</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Por entrar em um processo de GMUDs;</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">A obrigação de manter um modelo on-premises onde servidores demoravam 01 mês para ficarem prontos;</span></li>
<li><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Medo de retornar ao projeto e dar play em Jenkins.</span></li>
</ul>
<br />
<br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>E aí vai a quinta e última lição! </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span><b>Quinta lição aprendida</b>: Aceite desafios e lutas que pode vencer enquanto elas não lhe fazem menor, enquanto elas não lhe trancam a processos legados. Seja o dono da sua carreira e faça dela o ponto mais importante. Busque objetivos que te façam sentido e principalmente aprenda a ver o momento de seguir em diante, ou seja, pular fora. Muitas vezes nos deparamos em situações onde algumas pessoas da organização possuem interesses diferentes, ou seja, metas distintas que não contribuem para o objetivo em comum da empresa. Empresa que deveria, a seu turno, ser focada em seu consumidor final. Infelizmente existem coisas que não podem ser mudadas de baixo para cima. É necessário que exista uma força de cima para baixo também para fazer a transformação acontecer. </span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span>Quando identificaram a ausência deste cenário, foi quando Inácio e Gabriel perceberam que estavam perdendo tempo naquele lugar, foi então que optaram por procurar algo que agregasse mais valor em suas carreiras. Tudo então virou passado. Estava aberto o horizonte para novos e positivos desafios profissionais.</span><br />
<br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="white-space: pre;"> </span><b>Fontes e Citações</b></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">SRE - <a href="https://landing.google.com/sre/">https://landing.google.com/sre/</a></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">CICD Jenkins - <a href="https://jenkins.io/">https://jenkins.io/</a></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">ArqTI - <a href="http://arqti.org/">http://arqti.org/</a></span><br />
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Waldez Ludwig - <a href="http://www.ludwig.com.br/">http://www.ludwig.com.br/</a></span><br />
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Agradecimentos </span></span></div>
<b id="docs-internal-guid-e5bcd24f-7fff-3526-eb26-6ea3c5f83b25" style="font-weight: normal;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><a href="https://www.linkedin.com/in/felipe-santos-arquiteto-devops/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Felipe Santos</span></a><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, nosso amigo, e ainda que hoje ele more distante faremos um bom churrasco juntos. </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><a href="https://www.linkedin.com/in/gediel-luchetta-33547914/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Gediel Luchetta</span></a><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, pela disponibilidade, sugestões e revisão da publicação.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><a href="https://www.linkedin.com/in/sara-gabriela-dhein-153335101/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Sara Gabriela Dhein</span></a><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, pela disponibilidade e revisão da publicação.</span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><a href="https://www.linkedin.com/in/isa%C3%ADas-prestes-815191a/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Isaías Prestes</span></a><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, pela disponibilidade, sugestões e revisão da publicação. </span></span></div>
<b style="font-weight: normal;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;">Sobre os autores</span></span></div>
<b style="font-weight: normal;"><span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span></b>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">* </span><a href="https://www.linkedin.com/in/helkmut/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Gabriel Prestes</span></a><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, formado em Gestão da Tecnologia da Informação, DevOps Engineer da ilegra, é um entusiasta de carros antigos que cultiva em sua garagem um Gurgel Supermini funcionando.</span></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><br /></span>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">* </span><a href="https://www.linkedin.com/in/inacioklassmann/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration-skip-ink: none; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Inácio Klassmann</span></a><span style="background-color: transparent; color: black; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">, Head of strategy and innovation na South System, homem de 2 paixões, sua moto e sua família. </span></span></div>
<span style="font-family: Helvetica Neue, Arial, Helvetica, sans-serif;"></span><br />
<br /></div>
</div>
</div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-24575506953152627872020-01-07T16:01:00.000-03:002020-01-08T10:32:46.457-03:00SpringBoot - Métricas customizadas com Micrometer<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b id="docs-internal-guid-a9c07c5b-7fff-9c25-88c4-f7d7b61885a9" style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: #434343; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<div style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: #434343; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">A história</span><span style="background-color: transparent; color: #434343; font-size: 14pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">:</span></span></div>
<div style="line-height: 1.38; margin-bottom: 4pt; margin-top: 16pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: #434343; font-size: 14pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Com o uso mais frequente de microsserviços, e a arquitetura baseada em eventos (mensageria), métricas de aplicações são importantes para que saibamos status básico dos componentes. Tais componentes, por vezes, encontram-se distribuídos em vários clusters, orquestrados em contêineres, que dificultam e alteram o modelo tradicional de monitoramento de indicadores operacionais das aplicações. </span></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Assim, perguntamos a seguir : Métricas básicas de aplicações, tais como threads, requests, tempo de resposta, são suficiente para atender a necessidade de negócio? Esse é o tema que vamos aprofundar, mostrando como gerar métricas customizadas em uma aplicação SpringBoot 2.x. </span></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial" , "helvetica" , sans-serif;"><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">O monitoramento básico de componentes computacionais e de aplicação não são suficientes, e não será o nosso alvo, reconhecemos que alguns indicadores ainda são relevantes ao time de infraestrutura, mas apresentar ao </span><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">business owner</span><span style="background-color: transparent; color: #434343; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> (BO) tais indicadores não agregam valor e são tratados como comodity.</span></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">Necessidade</span><span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">:</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Fazemos parte de um time </span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">site reliability engineer</span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"> (SRE), o qual orienta soluções aderentes aos times de desenvolvimento, e a demanda por nós recebida foi de apresentarmos dashboards de negócio com o ciclo do pedido, um monitoramento capaz de produzir alertas quando um determinado pedido não evoluísse de estado em um determinado intervalo de tempo. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Não podemos considerar sempre a criação de novos modelos, ou como se diz reinventar a roda, até mesmo pela importância de estabelecermos e após mantermos um padrão independente da stack de telemetria/monitoramento em uso. Com isto, ao decorrer do tempo observamos que em um módulo de negócio dos quais atendemos, com diversos microsserviços, uma stack de telemetria se destacava, pelo uso de um padrão como procurávamos, sua estabilidade e simplicidade de implementação. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Deixamos aqui os méritos ao Marco Pokorski Stefani (</span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><a href="https://www.linkedin.com/in/marcops">https://www.linkedin.com/in/marcops</a></span><span id="goog_1989088498"></span><a href="https://www.blogger.com/"></a><span id="goog_1989088499"></span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">) que implantou o padrão, ao Douglas Rossi (</span><a href="https://www.linkedin.com/in/douglasrossi/"><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">https://www.linkedin.com/in/douglasrossi</span></a><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">) o qual estendeu em métricas customizadas de negócio, e ao César Mesquita (</span><a href="https://www.linkedin.com/in/cmesquita00/"><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">https://www.linkedin.com/in/cmesquita00</span></a><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">) responsável pela concepção de arquitetura de telemetria do módulo.</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">Stack</span><span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">: </span></div>
<div>
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> Componentes: </span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none;"><colgroup><col width="154"></col><col width="446"></col></colgroup><tbody>
<tr style="height: 21pt;"><td rowspan="4" style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Infraestrutura</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Kubernetes (</span><a href="https://cloud.google.com/kubernetes/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://cloud.google.com/kubernetes/</span></a><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span></div>
</td></tr>
<tr style="height: 21pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Docker (</span><a href="https://www.docker.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://www.docker.com/</span></a><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span></div>
</td></tr>
<tr style="height: 21pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">InfluxDB (</span><a href="https://www.influxdata.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://www.influxdata.com/</span></a><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span></div>
</td></tr>
<tr style="height: 21pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Grafana (</span><a href="https://grafana.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://grafana.com/</span></a><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span></div>
</td></tr>
<tr style="height: 21pt;"><td rowspan="2" style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Aplicação</span></div>
</td><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">SpringBoot (</span><a href="https://spring.io/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://spring.io/</span></a><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span></div>
</td></tr>
<tr style="height: 21pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Micrometer (</span><a href="https://micrometer.io/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">https://micrometer.io/</span></a><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">)</span></div>
</td></tr>
</tbody></table>
<span style="text-indent: 36pt;"><br /></span></div>
<div align="left" dir="ltr" style="margin-left: 0pt; text-indent: 0px;">
<span style="text-indent: 36pt;"><br /></span></div>
<div align="left" dir="ltr" style="margin-left: 0pt; text-indent: 0px;">
<span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-align: justify; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">Fluxo de funcionamento</span><span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-align: justify; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;">: </span></div>
<div align="left" dir="ltr" style="margin-left: 0pt; text-indent: 0px;">
<span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-align: justify; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div align="left" dir="ltr" style="margin-left: 0pt; text-indent: 0px;">
<span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; text-align: justify; text-indent: 36pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Utilizamos soluções de </span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">continuous integration</span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"> (CI), </span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">continuous deployment </span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">(CD) do cloud provider[1], onde durante o processo de publicação descritores, testes e dependências são satisfeitas em uma esteira[2]. Veja que em um ambiente distribuído não podemos concentrar o monitoramento no modelo tradicional, pois hora estaremos com 1 réplica da aplicação ativa, e outrora com mais, valores que são controlados pelo </span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">horizontal pod autoscaler</span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"> (HPA)[3]. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<br /></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Dessa forma, cada réplica enviará suas métricas ao InfluxDB[4], e por fim estes dados serão consolidados com o uso do Grafana[5], este responsável pela apresentação, agregação e produção de alertas para os times.</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="border: none; clear: left; display: inline-block; float: left; height: 444px; margin-bottom: 1em; margin-right: 1em; overflow: hidden; width: 775px;"><img height="364" src="https://lh4.googleusercontent.com/lySpf3KVvp2nJPsQXX1ZvAedmtgsLf1nTjgkCyKN6rWHReycD4xrdr6_57cOnVyeLgKA8tILIoP1wePwBs-38flp_ivwMsVJEHLXh0enBqu0LFT5bfZg6a0l_4482ya5vXwtHQmV" style="margin-left: 0px; margin-top: 0px;" width="640" /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Atualmente para envio de algumas métricas ainda não customizadas diretamente na aplicação utilizamos coletores externos que coletam os dados de origens distintas, tais como message broker, data lakes. Tais coletores implementam a mesma stack citada: Segue exemplo de funcionamento do e gatilhos para os alertas:</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">O coletor analisa um grupo de dados, em que para cada evento há uma atualização de compra. Para cada compra será incrementado o contador do estado atual correspondente. Quando o coletor analisar todas as atualizações de compras, fará o download de mais X atualizações de compras.</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span id="docs-internal-guid-7c85dc3f-7fff-816a-75ba-75f46d364c2a"><span style="border: none; display: inline-block; height: 737px; overflow: hidden; width: 602px;"><img height="640" src="https://lh3.googleusercontent.com/SItTkUBF3DlCk8EDga8JF0libhy_ukgajAhUs16H4fPWCHHMilwvf05AWluqWE6C9PfSma2UTPQVLXjE8Diuc2r9lzAPnmAl3tSEOSJH2m7_DUdxyHyEvW6WHbC_goa8fbrsjI9f" style="margin-left: 0px; margin-top: 0px;" width="521" /></span></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">No Grafana alertas são gerados quando:</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<ul>
<li><span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; text-align: justify; white-space: pre-wrap;">O número de pedidos que estão ou já estiveram no estado “solicitado” for menor do que o número de pedidos que estão ou já estiveram no estado “computado”;</span></li>
<li><span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; text-align: justify; white-space: pre-wrap;">O número de pedidos que estão ou já estiveram no estado “embrulhado” for menor do que o número de pedidos que estão ou já estiveram no estado “pago”;</span></li>
<li><span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; text-align: justify; white-space: pre-wrap;">A somatória de pedidos que estão ou já estiveram no estado “pago” e “embrulhado” for menor que o número de pedidos que estão ou já estiveram no estado “disponível”;</span></li>
<li><span style="color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; text-align: justify; white-space: pre-wrap;">O número de pedidos que estão ou já estiveram no estado “disponível” for menor que o número de pedidos que estão ou já estiveram no estado “entregue”.</span></li>
</ul>
<div style="text-align: justify;">
<span style="color: #434343; font-family: "montserrat" , sans-serif;"><span style="font-size: 14.6667px; white-space: pre-wrap;"><br /></span></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;"><span style="display: inline-block; position: relative; width: 100px;"></span></span><span style="border: none; display: inline-block; height: 111px; overflow: hidden; width: 672px;"><img height="111" src="https://lh6.googleusercontent.com/BXZ8xBMWewbDo7HeIVw1P9R-VDY26-ZH5fM4mPnywlNv1qzvkMw-Tpro20zXcP8A3IbrJszh9CS0eVVHl4Y8ux55fDoR-vesiNS_kBu1gvHPdgKlRIwXD3F0DbfM8pPSSB9BShqR" style="margin-left: 0px; margin-top: 0px;" width="672" /></span></div>
<h3 dir="ltr" style="line-height: 2.4; margin-bottom: 4pt; margin-top: 16pt; text-align: justify; text-indent: 36pt;">
</h3>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-decoration-line: underline; text-decoration-skip-ink: none; text-indent: 36pt; vertical-align: baseline;">Implementação</span><span style="font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-indent: 36pt; vertical-align: baseline;">: </span></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Iniciamos pela descrição breve do Actuator, uma simples que satisfaz o que precisamos aqui é de uma publicação no Medium (</span><a href="https://medium.com/projuristech/monitorando-uma-aplica%C3%A7%C3%A3o-spring-boot-2-x-cef826ae793c"><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">https://medium.com/projuristech/monitorando-uma-aplica%C3%A7%C3%A3o-spring-boot-2-x-cef826ae793c</span></a><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">) que segue: </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><u>“É uma biblioteca do próprio Spring para coletar métricas, entender o tráfego e o estado da aplicação.”</u></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Assim como o Actuator, o envio de métricas utilizando o Micrometer é gerenciado pelo SpringBoot, logo não precisamos nos preocupar com dependências para métricas padrões do Actuator. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Para implantarmos o Actuator devemos adicionar a dependência ‘spring-boot-starter-actuator’ ao projeto. Seja ele Maven ou Grandle. Após isto inclua no bootstrap, config-server o seguinte em seu YAML:</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Properties config-server ou bootstrap:</span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; table-layout: fixed; width: 451.27559055118115pt;"><colgroup><col></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><br />
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">management:</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> metrics:</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> export:</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> influx:</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> db: db_dev (aqui é a database onde serão persistidas as métricas do Actuator)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> uri: </span><a href="http://127.0.0.1:8086/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre;">http://127.0.0.1:8086</span></a><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> (coloque aqui a URL do InfluxDB do seu ambiente)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> step: 1m (intervalo de envio)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> enabled: true</span></div>
</td></tr>
</tbody></table>
</div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Classe de exemplo de métrica customizada:</span></div>
<div align="left" dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; table-layout: fixed; width: 451.27559055118115pt;"><colgroup><col></col></colgroup><tbody>
<tr style="height: 0pt;"><td style="border-bottom: solid #000000 1pt; border-left: solid #000000 1pt; border-right: solid #000000 1pt; border-top: solid #000000 1pt; overflow-wrap: break-word; overflow: hidden; padding: 5pt 5pt 5pt 5pt; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">package org.athome.example.metrics;</span></div>
<br />
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import org.springframework.beans.factory.annotation.Autowired;</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import org.springframework.stereotype.Component;</span></div>
<br />
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import org.athome.example.model.Order;</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import io.micrometer.core.instrument.Counter;</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">import io.micrometer.core.instrument.MeterRegistry;</span></div>
<br />
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">@Component</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">public class OrdersCustomMetrics {</span></div>
<br />
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">@Autowired</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">private MeterRegistry registry;</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">public void CounterOrder(Order order, String reason) {</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">Counter.builder("Orders")</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> .description("counter of orders")</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> .tag("orderType", order.getOrder.Type())</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> .tag("reason", reason)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> .tag("Id", order.getOrderId())</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> .register(registry)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"> .increment(1);</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;">}</span></div>
</td></tr>
</tbody></table>
</div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">O uso da classe deve ser realizado por interação na implementação dos estados do pedido. Com isto, poderemos gerar alertas de total de pedidos e pedidos inválidos por razões de negócio - quanto se alguma ordem não mudar de estado em X tempo. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">O framework também permite o uso de outros tipos de métricas, tais como gauge, histogram, entre outros. Permite também enviar métricas para outras soluções como Elastic, Datadog, Dynatrace. O importante para métricas customizadas é saber o tipo de dado e tipo de métrica que irá expor. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Para maiores detalhes acesse: </span><a href="https://micrometer.io/docs/concepts#_meters"><span style="background-color: transparent; color: #1155cc; font-family: "montserrat" , sans-serif; font-size: 11pt; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">https://micrometer.io/docs/concepts#_meters</span></a></div>
<h3 dir="ltr" style="line-height: 2.4; margin-bottom: 4pt; margin-top: 16pt; text-align: justify; text-indent: 36pt;">
</h3>
<div>
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-align: justify; text-decoration-line: underline; text-decoration-skip-ink: none; text-indent: 36pt; vertical-align: baseline;">Conclusão e atualidade</span><span style="font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-align: justify; text-indent: 36pt; vertical-align: baseline;">:</span></span></div>
<div>
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-align: justify; text-indent: 36pt; vertical-align: baseline;"> </span></span></div>
<div>
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="font-size: 12pt; font-variant-east-asian: normal; font-variant-numeric: normal; text-align: justify; text-indent: 36pt; vertical-align: baseline;"><br /></span></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Conforme citado anteriormente, nem todas as aplicações geram métricas customizadas em tempo de execução. Por isto, ainda não conseguimos receber as alterações de estados no tempo em que ocorrem, precisando assim fazer uso de outros coletores com certo delay (atraso), consultando também dados analíticos, e observando a interação de eventos em um message broker. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">Ainda assim o </span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: italic; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">product owner</span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"> (PO) responsável pelos módulos está vinculando às novas entregas do produto stories que incluem a implementação de métricas customizadas como critério de aceitação para que não sejam necessários futuramente os coletores. </span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre;"><span style="display: inline-block; position: relative; width: 100px;"></span></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<h2 dir="ltr" style="line-height: 2.4; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></h2>
<h2 dir="ltr" style="line-height: 2.4; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Fontes</span></h2>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<a href="https://medium.com/projuristech/monitorando-uma-aplica%C3%A7%C3%A3o-spring-boot-2-x-cef826ae793c" style="font-family: Montserrat, sans-serif; font-size: 11pt; text-decoration-line: none; white-space: pre;"></a><br />
<ul><a href="https://medium.com/projuristech/monitorando-uma-aplica%C3%A7%C3%A3o-spring-boot-2-x-cef826ae793c" style="font-family: Montserrat, sans-serif; font-size: 11pt; text-decoration-line: none; white-space: pre;"></a>
<li><a href="https://medium.com/projuristech/monitorando-uma-aplica%C3%A7%C3%A3o-spring-boot-2-x-cef826ae793c" style="font-family: Montserrat, sans-serif; font-size: 11pt; text-decoration-line: none; white-space: pre;"></a><a href="https://medium.com/projuristech/monitorando-uma-aplica%C3%A7%C3%A3o-spring-boot-2-x-cef826ae793c" style="font-family: Montserrat, sans-serif; font-size: 11pt; text-decoration-line: none; white-space: pre;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">https://medium.com/projuristech/monitorando-uma-aplicação-spring-boot-2-x-cef826ae793c</span></a></li>
<li><a href="https://medium.com/projuristech/monitorando-uma-aplica%C3%A7%C3%A3o-spring-boot-2-x-fc939257db8e?" style="font-family: Montserrat, sans-serif; font-size: 11pt; text-decoration-line: none; white-space: pre;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">https://medium.com/projuristech/monitorando-uma-aplica%C3%A7%C3%A3o-spring-boot-2-x-fc939257db8e?</span></a></li>
<li><a href="https://www.baeldung.com/micrometer" style="font-family: Montserrat, sans-serif; font-size: 11pt; text-decoration-line: none; white-space: pre;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">https://www.baeldung.com/micrometer</span></a></li>
<li><a href="https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/" style="font-family: Montserrat, sans-serif; font-size: 11pt; text-decoration-line: none; white-space: pre;"><span style="color: #1155cc; font-size: 11pt; vertical-align: baseline; white-space: pre-wrap;">https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/</span></a></li>
</ul>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></h2>
<h2 dir="ltr" style="line-height: 1.38; margin-bottom: 6pt; margin-top: 18pt;">
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;">Sobre os autores</span></h2>
<div>
<span style="background-color: transparent; color: black; font-family: "montserrat" , sans-serif; font-size: 12pt; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre;"><br /></span></div>
<div style="height: 0px;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">* </span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Gabriel Prestes</span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">, formado em Gestão da Tecnologia da Informação, DevOps Engineer da ilegra, é um entusiasta de carros antigos que cultiva em sua garagem um Gurgel Supermini funcionando.</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div style="height: 0px; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">* </span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Thamires Tissot</span><span style="background-color: transparent; color: #434343; font-family: "montserrat" , sans-serif; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">, estudante de Analise e Desenvolvimento de Sistemas, Desenvolvedora na ilegra e ceramista nas horas vagas.</span></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-20246963588320173222019-06-18T19:54:00.001-03:002019-06-18T20:02:22.016-03:00Elastic Stack + Beats e como tudo isso funciona no Kubernetes<div style="text-align: justify;">
<span style="white-space: pre;"> </span>Começo explicando o que é o Elastic Stack e o que são os Beats, parece falar sobre mais do mesmo, mas algumas pessoas não sabem seu funcionamento real e arquitetura, e ainda que deem esse questionamento como respondido, erram principalmente na aplicação dos Beats Packages, disponibilizando-os neste mundo com IaC (InfraasCode) na mesma role e aplicando ao mesmo server de destino, o que não é conveniente, uma vez que faz mais sentido aplicar os Beats nos servers que enviarão informações ao ElasticSearch/LogStash. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="white-space: pre;"> </span>Elastic Stack se entende aqui por ELK ou EFK + Beats packages. Tais nomenclaturas significam: </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
ELK: ElasticSearch + LogStash + Kibana</div>
<div style="text-align: justify;">
EFK: ElasticSearch + Fluentd + Kibana</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<span style="white-space: pre;"> </span>Beats Packages:</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUjU9uw8aHPobPJxJ0KuzYq2mSc8I7_JqECzA0mJPDbGX_ZwdbGqhwBLKQQvzscO0nSDnSuRzCy-8EzambcTW0e0mGgsCi5D3UfpOWTd7XENZtj9lDyEpSiMlGVyHQAf9jgRiKX4TfGYM/s1600/Captura+de+tela+de+2019-06-18+19-13-41.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="403" data-original-width="1045" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUjU9uw8aHPobPJxJ0KuzYq2mSc8I7_JqECzA0mJPDbGX_ZwdbGqhwBLKQQvzscO0nSDnSuRzCy-8EzambcTW0e0mGgsCi5D3UfpOWTd7XENZtj9lDyEpSiMlGVyHQAf9jgRiKX4TfGYM/s320/Captura+de+tela+de+2019-06-18+19-13-41.png" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<div>
<span style="white-space: pre;"> </span>Até o momento e já exposto aqui, uma das motivações da publicação é a correta aplicação da stack + beats, ou seja, os componentes dos beats precisamos instalar no servidor ou serviço que queremos monitorar, cujo destino das métricas, logs, eventos e etc é o ELK ou EFK. </div>
<div>
<br /></div>
<div>
<span style="white-space: pre;"> </span>A segunda motivação é a implantação do Filebeat no Kubernetes, o material disponível que atende em grande parte a configuração de um cluster baremetal e com a imagem da versão 6.x do Filebeat orienta a configuração de coleta por daemonset por type : log e para coletar os STDOUT e STDERR dos contêineres/pods monitoram logs dos nodos, exemplo ‘/var/lib/containers…’. O problema que me ocorreu aqui foi que o AKS (Managed Service Kubernetes da Azure) não se comportou muito bem com isso, não obtendo alguns logs de outros namespaces. </div>
<div>
<br /></div>
<div>
Confesso que não fui afundo nesse evento para descobrir uma alternativa, então foquei na versão 8.x da imagem do Filebeat e uma feature de ‘hints’ baseados em autodiscovery para o Kubernetes. </div>
<div>
<br /></div>
<div>
A partir dessa feature criei uma configuração válida que atende o AKS, assim como permite através dos annotations do Kubernetes fazer o multiline por aplicação, ou até mesmo deixar uma configuração comum entre os pods caso não exista uma definida no annotations. </div>
<div>
<span style="white-space: pre;"> </span></div>
<div>
<span style="white-space: pre;"> </span>Como ficou o yaml a ser aplicado via helm ou kubectl: </div>
<div>
_______</div>
<div>
<div>
<span style="font-size: x-small;">---</span></div>
<div>
<span style="font-size: x-small;">apiVersion: v1</span></div>
<div>
<span style="font-size: x-small;">kind: ConfigMap</span></div>
<div>
<span style="font-size: x-small;">metadata:</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat-config</span></div>
<div>
<span style="font-size: x-small;"> namespace: kube-system</span></div>
<div>
<span style="font-size: x-small;"> labels:</span></div>
<div>
<span style="font-size: x-small;"> k8s-app: filebeat</span></div>
<div>
<span style="font-size: x-small;">data:</span></div>
<div>
<span style="font-size: x-small;"> filebeat.yml: |-</span></div>
<div>
<span style="font-size: x-small;"> filebeat.config:</span></div>
<div>
<span style="font-size: x-small;"> inputs:</span></div>
<div>
<span style="font-size: x-small;"> # Mounted `filebeat-inputs` configmap:</span></div>
<div>
<span style="font-size: x-small;"> path: ${path.config}/inputs.d/*.yml</span></div>
<div>
<span style="font-size: x-small;"> # Reload inputs configs as they change:</span></div>
<div>
<span style="font-size: x-small;"> reload.enabled: false</span></div>
<div>
<span style="font-size: x-small;"> modules:</span></div>
<div>
<span style="font-size: x-small;"> path: ${path.config}/modules.d/*.yml</span></div>
<div>
<span style="font-size: x-small;"> # Reload module configs as they change:</span></div>
<div>
<span style="font-size: x-small;"> reload.enabled: false</span></div>
<div>
<span style="font-size: x-small;"><br /></span></div>
<div>
<span style="font-size: x-small;"> filebeat.autodiscover:</span></div>
<div>
<span style="font-size: x-small;"><br /></span></div>
<div>
<span style="font-size: x-small;"> providers:</span></div>
<div>
<span style="font-size: x-small;"><br /></span></div>
<div>
<span style="font-size: x-small;"> - type: kubernetes</span></div>
<div>
<span style="font-size: x-small;"> hints.enabled: true</span></div>
<div>
<span style="font-size: x-small;"> include_annotations: '*'</span></div>
<div>
<span style="font-size: x-small;"> templates:</span></div>
<div>
<span style="font-size: x-small;"> config:</span></div>
<div>
<span style="font-size: x-small;"> - type: docker</span></div>
<div>
<span style="font-size: x-small;"> containers.ids:</span></div>
<div>
<span style="font-size: x-small;"> - "${data.kubernetes.container.id}"</span></div>
<div>
<span style="font-size: x-small;"><br /></span></div>
<div>
<span style="font-size: x-small;"> processors:</span></div>
<div>
<span style="font-size: x-small;"> - add_cloud_metadata:</span></div>
<div>
<span style="font-size: x-small;"><br /></span></div>
<div>
<span style="font-size: x-small;"> cloud.id: ${ELASTIC_CLOUD_ID}</span></div>
<div>
<span style="font-size: x-small;"> cloud.auth: ${ELASTIC_CLOUD_AUTH}</span></div>
<div>
<span style="font-size: x-small;"><br /></span></div>
<div>
<span style="font-size: x-small;"> output.elasticsearch:</span></div>
<div>
<span style="font-size: x-small;"> hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']</span></div>
<div>
<span style="font-size: x-small;"><br /></span></div>
<div>
<span style="font-size: x-small;">---</span></div>
<div>
<span style="font-size: x-small;">apiVersion: v1</span></div>
<div>
<span style="font-size: x-small;">kind: ConfigMap</span></div>
<div>
<span style="font-size: x-small;">metadata:</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat-inputs</span></div>
<div>
<span style="font-size: x-small;"> namespace: kube-system</span></div>
<div>
<span style="font-size: x-small;"> labels:</span></div>
<div>
<span style="font-size: x-small;"> k8s-app: filebeat</span></div>
<div>
<span style="font-size: x-small;">data:</span></div>
<div>
<span style="font-size: x-small;"> kubernetes.yml: ""</span></div>
<div>
<span style="font-size: x-small;">---</span></div>
<div>
<span style="font-size: x-small;">apiVersion: extensions/v1beta1</span></div>
<div>
<span style="font-size: x-small;">kind: DaemonSet</span></div>
<div>
<span style="font-size: x-small;">metadata:</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat</span></div>
<div>
<span style="font-size: x-small;"> namespace: kube-system</span></div>
<div>
<span style="font-size: x-small;"> labels:</span></div>
<div>
<span style="font-size: x-small;"> k8s-app: filebeat</span></div>
<div>
<span style="font-size: x-small;">spec:</span></div>
<div>
<span style="font-size: x-small;"> template:</span></div>
<div>
<span style="font-size: x-small;"> metadata:</span></div>
<div>
<span style="font-size: x-small;"> labels:</span></div>
<div>
<span style="font-size: x-small;"> k8s-app: filebeat</span></div>
<div>
<span style="font-size: x-small;"> spec:</span></div>
<div>
<span style="font-size: x-small;"> serviceAccountName: filebeat</span></div>
<div>
<span style="font-size: x-small;"> terminationGracePeriodSeconds: 30</span></div>
<div>
<span style="font-size: x-small;"> containers:</span></div>
<div>
<span style="font-size: x-small;"> - name: filebeat</span></div>
<div>
<span style="font-size: x-small;"> image: docker.elastic.co/beats/filebeat:8.0.0</span></div>
<div>
<span style="font-size: x-small;"> args: [</span></div>
<div>
<span style="font-size: x-small;"> "-c", "/etc/filebeat.yml",</span></div>
<div>
<span style="font-size: x-small;"> "-e",</span></div>
<div>
<span style="font-size: x-small;"> ]</span></div>
<div>
<span style="font-size: x-small;"> env:</span></div>
<div>
<span style="font-size: x-small;"> - name: ELASTICSEARCH_HOST</span></div>
<div>
<span style="font-size: x-small;"> value: meuelastic.athome.org</span></div>
<div>
<span style="font-size: x-small;"> - name: ELASTICSEARCH_PORT</span></div>
<div>
<span style="font-size: x-small;"> value: "9200"</span></div>
<div>
<span style="font-size: x-small;"> - name: ELASTIC_CLOUD_ID</span></div>
<div>
<span style="font-size: x-small;"> value:</span></div>
<div>
<span style="font-size: x-small;"> - name: ELASTIC_CLOUD_AUTH</span></div>
<div>
<span style="font-size: x-small;"> value:</span></div>
<div>
<span style="font-size: x-small;"> securityContext:</span></div>
<div>
<span style="font-size: x-small;"> runAsUser: 0</span></div>
<div>
<span style="font-size: x-small;"> resources:</span></div>
<div>
<span style="font-size: x-small;"> limits:</span></div>
<div>
<span style="font-size: x-small;"> memory: 400Mi</span></div>
<div>
<span style="font-size: x-small;"> requests:</span></div>
<div>
<span style="font-size: x-small;"> cpu: 200m</span></div>
<div>
<span style="font-size: x-small;"> memory: 200Mi</span></div>
<div>
<span style="font-size: x-small;"> volumeMounts:</span></div>
<div>
<span style="font-size: x-small;"> - name: config</span></div>
<div>
<span style="font-size: x-small;"> mountPath: /etc/filebeat.yml</span></div>
<div>
<span style="font-size: x-small;"> readOnly: true</span></div>
<div>
<span style="font-size: x-small;"> subPath: filebeat.yml</span></div>
<div>
<span style="font-size: x-small;"> - name: inputs</span></div>
<div>
<span style="font-size: x-small;"> mountPath: /usr/share/filebeat/inputs.d</span></div>
<div>
<span style="font-size: x-small;"> readOnly: true</span></div>
<div>
<span style="font-size: x-small;"> - name: data</span></div>
<div>
<span style="font-size: x-small;"> mountPath: /usr/share/filebeat/data</span></div>
<div>
<span style="font-size: x-small;"> - name: varlibdockercontainers</span></div>
<div>
<span style="font-size: x-small;"> mountPath: /var/lib/docker/containers</span></div>
<div>
<span style="font-size: x-small;"> readOnly: true</span></div>
<div>
<span style="font-size: x-small;"> volumes:</span></div>
<div>
<span style="font-size: x-small;"> - name: config</span></div>
<div>
<span style="font-size: x-small;"> configMap:</span></div>
<div>
<span style="font-size: x-small;"> defaultMode: 0600</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat-config</span></div>
<div>
<span style="font-size: x-small;"> - name: varlibdockercontainers</span></div>
<div>
<span style="font-size: x-small;"> hostPath:</span></div>
<div>
<span style="font-size: x-small;"> path: /var/lib/docker/containers</span></div>
<div>
<span style="font-size: x-small;"> - name: inputs</span></div>
<div>
<span style="font-size: x-small;"> configMap:</span></div>
<div>
<span style="font-size: x-small;"> defaultMode: 0600</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat-inputs</span></div>
<div>
<span style="font-size: x-small;"> - name: data</span></div>
<div>
<span style="font-size: x-small;"> hostPath:</span></div>
<div>
<span style="font-size: x-small;"> path: /var/lib/filebeat-data</span></div>
<div>
<span style="font-size: x-small;"> type: DirectoryOrCreate</span></div>
<div>
<span style="font-size: x-small;">---</span></div>
<div>
<span style="font-size: x-small;">apiVersion: rbac.authorization.k8s.io/v1beta1</span></div>
<div>
<span style="font-size: x-small;">kind: ClusterRoleBinding</span></div>
<div>
<span style="font-size: x-small;">metadata:</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat</span></div>
<div>
<span style="font-size: x-small;">subjects:</span></div>
<div>
<span style="font-size: x-small;">- kind: ServiceAccount</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat</span></div>
<div>
<span style="font-size: x-small;"> namespace: kube-system</span></div>
<div>
<span style="font-size: x-small;">roleRef:</span></div>
<div>
<span style="font-size: x-small;"> kind: ClusterRole</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat</span></div>
<div>
<span style="font-size: x-small;"> apiGroup: rbac.authorization.k8s.io</span></div>
<div>
<span style="font-size: x-small;">---</span></div>
<div>
<span style="font-size: x-small;">apiVersion: rbac.authorization.k8s.io/v1beta1</span></div>
<div>
<span style="font-size: x-small;">kind: ClusterRole</span></div>
<div>
<span style="font-size: x-small;">metadata:</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat</span></div>
<div>
<span style="font-size: x-small;"> labels:</span></div>
<div>
<span style="font-size: x-small;"> k8s-app: filebeat</span></div>
<div>
<span style="font-size: x-small;">rules:</span></div>
<div>
<span style="font-size: x-small;">- apiGroups: [""]</span></div>
<div>
<span style="font-size: x-small;"> resources:</span></div>
<div>
<span style="font-size: x-small;"> - namespaces</span></div>
<div>
<span style="font-size: x-small;"> - pods</span></div>
<div>
<span style="font-size: x-small;"> verbs:</span></div>
<div>
<span style="font-size: x-small;"> - get</span></div>
<div>
<span style="font-size: x-small;"> - watch</span></div>
<div>
<span style="font-size: x-small;"> - list</span></div>
<div>
<span style="font-size: x-small;">---</span></div>
<div>
<span style="font-size: x-small;">apiVersion: v1</span></div>
<div>
<span style="font-size: x-small;">kind: ServiceAccount</span></div>
<div>
<span style="font-size: x-small;">metadata:</span></div>
<div>
<span style="font-size: x-small;"> name: filebeat</span></div>
<div>
<span style="font-size: x-small;"> namespace: kube-system</span></div>
<div>
<span style="font-size: x-small;"> labels:</span></div>
<div>
<span style="font-size: x-small;"> k8s-app: filebeat</span></div>
<div>
<span style="font-size: x-small;">---</span></div>
</div>
<div>
_______</div>
<div>
<br /></div>
<div>
<div>
<span style="white-space: pre;"> </span>Para a parte de deploy dos PODs basta incluir as annotations conforme o multiline desejado: </div>
</div>
<div>
<br /></div>
<div>
_______</div>
<div>
<br /></div>
<div>
<span id="docs-internal-guid-6f742d52-7fff-92b4-010d-63ab4e0d5ae8"></span><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-6f742d52-7fff-92b4-010d-63ab4e0d5ae8"><span style="font-family: "arial"; font-size: 8pt; vertical-align: baseline; white-space: pre-wrap;">apiVersion: v1</span></span></div>
<span id="docs-internal-guid-6f742d52-7fff-92b4-010d-63ab4e0d5ae8">
</span>
<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-6f742d52-7fff-92b4-010d-63ab4e0d5ae8"><span style="font-family: "arial"; font-size: 8pt; vertical-align: baseline; white-space: pre-wrap;">kind: Pod</span></span></div>
<span id="docs-internal-guid-6f742d52-7fff-92b4-010d-63ab4e0d5ae8">
</span>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span id="docs-internal-guid-6f742d52-7fff-92b4-010d-63ab4e0d5ae8"><span style="font-family: "arial"; font-size: 8pt; vertical-align: baseline; white-space: pre-wrap;">metadata:</span></span></div>
<span id="docs-internal-guid-6f742d52-7fff-92b4-010d-63ab4e0d5ae8">
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 8pt; vertical-align: baseline; white-space: pre-wrap;"> name: order-commerce-service</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 8pt; vertical-align: baseline; white-space: pre-wrap;"> annotations:</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 8pt; vertical-align: baseline; white-space: pre-wrap;"> co.elastic.logs/multiline.pattern: '^\['</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 8pt; vertical-align: baseline; white-space: pre-wrap;"> co.elastic.logs/multiline.negate: true</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 8pt; vertical-align: baseline; white-space: pre-wrap;"> co.elastic.logs/multiline.match: after</span></div>
<div>
_______</div>
</span></div>
<div>
<br /></div>
<div>
<div>
<span style="white-space: pre;"> </span>É comum não saber qual o multiline se aplica por aplicação, para isto a Elastic disponibiliza um simulador e patterns e uma documentação bem completa, explicando comportamento de negate e match. Abaixo compartilho estes links que apoiarão o time de desenvolvimento nesse processo, ou até mesmo se quiser definir um template de config no hint do Kubernetes: </div>
<div>
<br /></div>
<div>
Simulador: </div>
<div>
<br /></div>
<div>
<a href="https://play.golang.org/p/uAd5XHxscu">https://play.golang.org/p/uAd5XHxscu</a></div>
<div>
<br /></div>
<div>
Documentação do multiline: </div>
<div>
<br /></div>
<div>
<a href="https://www.elastic.co/guide/en/beats/filebeat/master/configuration-autodiscover-hints.html#configuration-autodiscover-hints">https://www.elastic.co/guide/en/beats/filebeat/master/configuration-autodiscover-hints.html#configuration-autodiscover-hints</a></div>
<div>
<a href="https://www.elastic.co/guide/en/beats/filebeat/master/multiline-examples.html">https://www.elastic.co/guide/en/beats/filebeat/master/multiline-examples.html</a></div>
<div>
<br /></div>
<div>
Exemplos de multiline: </div>
<div>
<br /></div>
<div>
<a href="https://www.elastic.co/guide/en/beats/filebeat/master/_examples_of_multiline_configuration.html">https://www.elastic.co/guide/en/beats/filebeat/master/_examples_of_multiline_configuration.html</a><br />
<br />
Caso queira utilizar PacketBeat, AuditBeat, MetricBeat, ou outros no Kubernetes o processo em vias práticas é bem semelhante, com ressalva ao conteúdo e ajustes dos configmaps, daemonset e imagem utilizados. Mas não muda o cenário e nem mesmo o fluxo. </div>
<div>
<br /></div>
</div>
</div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-84483221692415420542017-12-08T00:34:00.000-02:002017-12-08T00:38:58.808-02:00Orquestradores - Aplicações e preocupações<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;">
<div style="text-align: left;">
Presumo nesta publicação que já entendas de contêineres, caso precise temos um bom material para apresentar este conceito e passos iniciais, é a publicação do colega Maicon Baum que constará nas referências deste artigo.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Independente do orquestrador que estejas utilizando, sendo os mais comuns Kubernetes ou Docker Swarm, os maiores problemas das plataformas são como dimensionar recursos para que atendam aos contratos com módulos ou microsserviços das aplicações que hospedam. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Não tenhas a ambição que os orquestradores resolverão automaticamente, ou por padrão de instalação, dimensionamento de aplicações, e ainda que o façam, este ponto envolve uma análise de regras operacionais das aplicações, viabilidade de escalonamento e expansão da própria plataforma, ou até mesmo a relação de custo e retorno das aplicações envolvidas. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
É por essa razão que devemos nos atentarmos para limites e políticas sejam elas por contêiner, ou de forma mais inteligente por service (Docker Swarm) ou NameSpace (K8s). </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Com relação a política, seja namespace ou stack, deves considerar condições que satisfaçam o bom uso da plataforma quando relacionada às limitações de seu código. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
De nada adianta liberar diversos processadores para uso de uma aplicação NodeJS se a mesma não foi desenvolvida para trabalhar multithread. Logo, isso força a mesma medida que permite a integração cada dia maior do desenvolvedor com o analista de infraestrutura da plataforma. Cito permite, pois proporciona a ambos um ganho de conhecimento. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Mencionaremos aqui como aplicar estes limites na prática nos orquestradores citados: Docker Swarm e Kubernetes. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<b>IMPORTANTE</b>: Em ambos é possível realizar a limitação por contêiner no Dockerfile, entretanto este não é o modelo mais eficiente quando estamos trabalhando com orquestradores e suas réplicas. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<u> Docker Swarm</u></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Método(s) disponível(is) : Por serviço</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Aplicação: Na publicação do stack ou na criação, ou atualização individual dos serviços poderás utilizar restrições ou limitações de recursos.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
No site de documentação do produto existem exemplos de aplicação, seja criando um serviço ou atualizando um. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
https://docs.docker.com/engine/reference/commandline/service_create</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<u>Kubernetes</u> </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Método(s) disponível(is) : </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Resource Quotas</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Quality of Service</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Aplicação: O Kubernetes dispõe de um modelo mais eficiente e granular de administração de recursos, então temos dois modelos, um de QoS(quality of service) e outro de Resource Quota. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Documentação para aplicação dos métodos: </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
https://kubernetes.io/docs/tasks/configure-pod-container/quality-service-pod</div>
<div style="text-align: left;">
https://kubernetes.io/docs/concepts/policy/resource-quotas</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Um item não menos relevante é o gerenciamento de logs de sua aplicação, ainda que o limite de armazenamento de log possa ser administrado pelo orquestrador, isso demanda IO (entrada e saída) e por consequência deixar aplicações gravando informações desnecessárias e/ou com baixa criticidade afeta a performance da plataforma como um todo, lembre-se, seja na cloud pública, privada ou híbrida, IO é performance, e se tens bastante performance é porque também custa dinheiro. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Referências: </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
http://ilegra.com/beyonddata/2017/07/docker-for-beginners/</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Palavras chave de busca: </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
docker swarm k8s kubernetes container contêiner limites restrições constraints limits devops</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Agradecimentos:</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Agradeço ao engenheiro de infraestrutura, arquiteto de software e amigo Lincolm Aguiar (https://www.linkedin.com/in/lincolmaguiar) que foi parceiro de apresentação do talkabout que foi o conteúdo norteador e originou essa publicação. </div>
</div>
</div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-63467393006124988932017-05-16T20:37:00.000-03:002017-05-16T20:37:28.477-03:00Apache - KeepAlive problem<br />
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Dias atrás fomos desafiados por um evento intermitente e até então desconhecido. O time de desenvolvedores em questão, alegava que utilizando um sistema web via navegador, ao realizar um refresh (F5) a requisição para uma API que possuía o webserver Apache como frontend pendurava e não mais respondia. Entretanto se apontavam a API para um managedserver* do WebLogic respondia corretamente. Isso impactava diretamente no sistema, degradando a imagem que o usuário tem deste sistema. </span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Com integração entre os times, conhecimento específico e experiência dos envolvidos a causa foi identificada, nosso vilão ‘KeepAlive’ desativado, e mais um problema resolvido. </span></div>
<span id="docs-internal-guid-22d1d5e7-139b-6327-0f12-0eaf20f58950"><br /></span>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Inúmeros eventos nos levaram a estressar e aplicarmos testes com a finalidade de isolarmos o que era causa e o que era sintoma.</span></div>
<br /><br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">"Mas claro o KeepAlive...", devem estar pensando, até que pudéssemos chegar ao vilão, dezenas de análises, isolamentos e mudanças foram testadas, tais como atualizar versão do Apache, recompilar outros módulos do MPM (worker, prefork e event), e até outro módulo como ModProxy, por fim outro WebServer Nginx. </span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: red; font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Este é o tipo de problema que adoramos ter todos os dias, desafios com alto grau de complexidade, para que possamos aprimorar e executar métodos de gestão de incidentes.</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Uma pausa para refletir…</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">A carreira do profissional de middleware, vale a pena? Ainda existe demanda?</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Enquanto a tendência dos entusiastas da tecnologia da informação é explorar e falar cada vez mais de soluções e métodos intangíveis, focando-se em discursos elegantes com palavras atuais como cloud*, Big Data*, machine learning*, entre outras tecnologias e métodos que em muitos casos ainda não são uma realidade dentro de sua organização, de nada adiantará saber escalar, balancear recursos, ou trabalhar com soluções inovadoras em cliques do mouse, ou classes requisitando SDKs se o ambiente que sustentas e atua não está pronto para este tipo de uso, é instável e preso a um presente regulado por ausência de investimento em inovação.</span></div>
<br />
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Quando atuamos em um cenário deste, o generalista, profissional desejado por diversas organizações, não fará diferença. Pois serão erros, alertas e incidentes de tecnologias específicas, para estes casos somente o especialista será valioso e poderá dar uma resposta imediata. </span></div>
<br />
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Nos preocupa quando nos deparamos com profissionais focados em inovação, por exemplo, que sequer tem uma boa base de rede e sistema operacional. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">E o profissional de middleware? Bem, este com uma base boa, conforme mencionado acima, sempre terá lugar quando todos fogem, quando escalar não resolve o problema, é quando resolve utiliza-se a um alto custo por aplicações e configurações má dimensionadas, sejam em uma infraestrutura pública ou privada. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">O mercado exigirá do profissional de middleware uma boa adaptação às novas tecnologias e linguagens emergentes, mas assim como o administrador de banco de dados, não será nestes 10 ou 20 anos que ele verá o seu fim. Pois onde houver um servidor de aplicação como backend, um webserver como frontend, um cache ou balanceador de carga, existirá a necessidade de um profissional de middleware. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Entenda que ser um especialista em middleware, não faz de vocês ignorantes em outras áreas, mas especialistas atentos às inovações e que tem ciência das novas funcionalidades disponíveis no mercado.</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Vamos então ao detalhamento técnico do problema com o KeepAlive? </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Unindo os relatos dos usuários e desenvolvedores que mencionaram que após clicar duas vezes no mesmo item do sistema o mesmo pendurava, avaliamos quais logs poderiam nos apoiar no Apache e não identificamos informações relevantes, ainda que tenhamos passado a severidade do log dos módulos e core do Apache para debug. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">O sintoma observado neste momento eram as conexões presas gerando WAIT nos servers do Apache, até o momento na versão 2.2 utilizando como MPM o Worker. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Após nós analisamos os logs dos containers Java, que processavam as requisições vindas do webserver tanto pelo sistema quanto para a API, começamos a evoluir, pois os managedservers* nos davam mais informações:</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;"><20 17h57min17s="" brt=""> <error> <http> <bea-101017> <[ServletContext@448764570[app:app module:app path:null spec-version:3.0]] Root cause of ServletException.</bea-101017></http></error></20></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 10pt; vertical-align: baseline; white-space: pre-wrap;">org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://192.168.1.245:85/api/rest/publico/usuarioCliente/findUsuarioById":Response had end of stream after 0 bytes; nested exception is java.io.EOFException: Response had end of stream after 0 bytes</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Diante do cenário presente, buscamos após a análise o isolamento de componentes afetados, iniciando o isolamento por arquitetura, após soluções tecnológicas e por fim seus módulos. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Iniciamos os trabalhos em um ambiente controlado e sem concorrência onde a simulação foi viável, com backups realizados para que pudéssemos voltar ao marco 0. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Primeiramente eliminamos possíveis causas como rede, ajustes de sistema operacional e parametrização de Sysctl e Limits. Outro item isolado foi a criação de novos VirtualHosts, com novas portas, porque os atuais estavam usando outro modulo que gostariamos de isolar do problema que era o </span><span style="font-family: Arial; font-size: 14pt; font-style: italic; vertical-align: baseline; white-space: pre-wrap;">rewrite_module</span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">*. Após atualizamos a versão do Apache 2.2 para 2.4, sem sucesso na operação alternamos entre módulos MPM disponíveis, atualização do módulo de integração com o Weblogic, por fim substituição pelo ModProxy. Como tentativa de eliminação substituímos o Apache por Nginx. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Nenhuma alteração surtiu efeito a ponto de eliminar os sintomas.</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Trabalhar em equipe não é apenas trabalhar em conjunto é preciso compartilhamento. Os resultados nunca são alcançados apenas por uma pessoa, é preciso compartilhar com o outro para chegar ao objetivo final.</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Quando um colega não consegue avançar, o mesmo pede apoio a outro não por ter menos conhecimento, mas para que ganhe com isso uma nova percepção de atuação sobre o evento. </span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Então realizamos uma comparação de ambientes e análise de boas práticas. Com isso e em função do comportamento do ambiente analisado que culminou com este diagnóstico, desativamos o KeepAlive do ambiente isolado, testamos e juntamente com o time de desenvolvimento e analista de testes estressamos o sistema para garantir que não fosse um falso-positivo. </span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">O KeepAlive do Apache permite o reuso das conexões com o webserver, aumenta a performance e reduz o consumo de recursos. Entretanto o sistema não trabalha com um conteúdo estático volumoso, logo, por serem conexões dinâmicas o seu efeito era prejudicial e gerava por vezes erros HTTP 408 e CLOSE_WAIT na camada TCP do sistema operacional do webserver. </span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Logo, tenha em mente que o KeepAlive é uma configuração do Apache que torna reutilizáveis as requisições, entretanto existem relatos de que quando ativado pode prejudicar requisições com o método POST, que se aplica ao nosso caso. </span></div>
<br /><br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Legendas:</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">* managedserver : Instância do Weblogic gerenciadas por um Domain</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">* cloud : Cloud computing ou computação em nuvem é a entrega da computação como um serviço ao invés de um produto</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">* Big Data : Big data é o termo que descreve o imenso volume de dados – estruturados e não estruturados.</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">* machine leaning : A aprendizagem automática ou aprendizado de máquina (em inglês: "machine learning") é um sub-campo da ciência da computação que evoluiu do estudo de reconhecimento de padrões e da teoria da aprendizagem computacional em inteligência artificial.</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">* rewrite_module : Módulo do Apache que utiliza um mecanismo baseado em regras de reescrita (baseadas em um parser de expressões regulares). </span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Basicamente o módulo permite a reescrita de URL's _on the fly.</span></div>
<br /><br /><br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Referências:</span></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="https://httpd.apache.org/docs/2.4/" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 14pt; text-decoration-line: underline; vertical-align: baseline; white-space: pre-wrap;">https://httpd.apache.org/docs/2.4/</span></a></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="http://www.administradores.com.br/noticias/carreira/5-habilidades-fundamentais-para-se-trabalhar-em-equipe/77273/" style="text-decoration-line: none;"><span style="color: #1155cc; font-family: Arial; font-size: 14pt; text-decoration-line: underline; vertical-align: baseline; white-space: pre-wrap;">http://www.administradores.com.br/noticias/carreira/5-habilidades-fundamentais-para-se-trabalhar-em-equipe/77273/</span></a></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="color: #1155cc; font-family: Arial; font-size: 14pt; text-decoration-line: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="https://abdussamad.com/archives/169-Apache-optimization:-KeepAlive-On-or-Off.html" style="text-decoration-line: none;">https://abdussamad.com/archives/169-Apache-optimization:-KeepAlive-On-or-Off.html</a></span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span id="docs-internal-guid-22d1d5e7-139c-139c-b829-e275b5bb45d9"><div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">Apresentação dos autores:</span></div>
<br /><div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">*</span><span style="font-family: Arial; font-size: 14pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">Gabriel Prestes, </span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;">formado em Gestão da Tecnologia da Informação, arquiteto de middleware da ilegra com experiência de mais de 8 anos em suítes de middleware Oracle e RedHat. É um entusiasta de carros antigos.</span></div>
<br /><div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: Arial; font-size: 14pt; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">*Junior Amaral,</span><span style="font-family: Arial; font-size: 14pt; vertical-align: baseline; white-space: pre-wrap;"> formado em Tecnologia da Informação, Database Administrator (Oracle) e middleware da ilegra com experiência de mais de 15 anos em banco Oracle e 5 anos em suítes de middleware Oracle e RedHat. É um apaixonado por aviação.</span></div>
</span></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-84876227762675833652016-12-06T14:31:00.000-02:002016-12-06T14:31:04.993-02:00Java - Gerando threaddump e heapdump em um esgotamento de memória heap da JVM<br />
<br />
<div style="color: #222222; font-family: arial, sans-serif; font-size: small; text-align: justify;">
Quando forem provisionar algum ambiente de middleware, ou até mesmo para ambiente que apresenta esgotamento de memória heap, apliquem essa configuração abaixo na JVM para que ao ocorrer outofmemory na heap um threaddump e heapdump serão gerados: </div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
-XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -verbose:gc -XX:+PrintGCDetails -Xloggc:/tmp/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=12 -XX:GCLogFileSize=100M -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/tmp/jvmheap-`date +%Y%m%d%H%M%S`.hprof -XX:OnOutOfMemoryError="$JAVA_HOME/bin/jstack -F pid > /tmp/jvmthread-`date +%Y%m%d%H%M%S`.dmp"</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
IMPORTANTE: </div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
1 - O usuário que executará a JVM deve ser root(não faça isso), ou um usuário que não tenha determinadas limitações, exemplos de ajustes no limits.conf e su do pam.d: </div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
jboss soft nofile 131072</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
jboss hard nofile 131072</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
jboss soft nproc 131072</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
jboss hard nproc 131072</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
jboss soft core unlimited</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
jboss hard core unlimited</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
jboss soft memlock 50000000</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
jboss hard memlock 50000000</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
session required pam_limits.so</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
2 - O usuário de execução deve ter permissão de escrita nas pastas em que o heap e thread dump serão gerados; </div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
3 - A variável $JAVA_HOME deve existir ou ser instanciada antes da chamada da JAVA_OPTS.</div>
<div style="color: #222222; font-family: arial, sans-serif; font-size: small;">
<br /></div>
</div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-11293357492443926212016-11-09T08:12:00.001-02:002016-11-09T08:12:14.838-02:00Tomcat | TomEE - Utilizando APR em API e WS para aumentar performance<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="font-size: 18.6667px; white-space: pre;"> </span>Quando provisionamos infraestrutura para uma API ou WebServices de integração sabemos que performance é um dos, senão o principal, fator a ser considerado, pois estamos trabalhando com um alto fluxo de requisições. A degradação de performance para este tipo de aplicação significa ao longo de um período sua indisponibilidade, pois ao não atender a carga eficientemente acumulam-se mais requisições de origem criando uma retenção que gerará aumento do tempo de resposta. </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Quando um WebService, ou API, é desenvolvido em Java temos algumas alternativas para fazer sua exposição web. Criá-lo autocontido em um JAR com Jetty, publicar em um servidor de aplicação são algumas das diversas opções disponíveis. Neste texto, consideramos que a publicação foi feita em um Tomcat ou TomEE, ou até mesmo em um servidor de aplicação que utiliza o Tomcat como contêiner Web, exemplo JBoss, que tem até a versão 6 o JBoss Web. </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">A Apache Foundation disponibiliza para o Tomcat como biblioteca de suporte a alta performance, escalabilidade e integração o Apache Portable Runtime, suporte que só estará ativo quando três componentes forem identificados na inicialização da JVM do Tomcat: </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">1 - APR - Apache Portable Runtime; </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">2 - JNI wrappers para o APR -> (libtcnative);</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">3 - OpenSSL.</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Mas qual o ganho real com isso? </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">HTTP</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Ganho de 11% em requisições HTTP quando utilizado</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">o APR ao invés do connector BIO (padrão) e somente</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> 7% a menos que um Apache 2.x. </span></div>
</td></tr>
</tbody></table>
</div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">HTTPS</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Ganho de mais de 100% em requisições HTTPS quando</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">se substitui o connector padrão do Tomcat pelo APR,</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: Arial; font-size: 18.6667px; white-space: pre-wrap;"> </span><span style="font-family: Arial; font-size: 18.6667px; white-space: pre-wrap;">performando inclusive melhor a um WebServer Apache 2.x.</span></div>
</td></tr>
</tbody></table>
</div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Benchmark mais detalhado em : </span><a href="https://blog.eveoh.nl/2012/04/some-notes-on-tomcat-connector-performance/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://blog.eveoh.nl/2012/04/some-notes-on-tomcat-connector-performance/</span></a></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Fique ligado:</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> ter tais componentes instalados no sistema operacional nem sempre indica que o APR está sendo carregado corretamente no Tomcat. No CentOS ou RHEL (RedHat Enterprise Linux) 6 ou 7, por exemplo, o APR instalado não é identificado pela libtcnative, o que por consequência inviabiliza o uso do APR no Tomcat. </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Forma de identificar que o Tomcat não está utilizando o APR é avaliar o log do Catalina quando em </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">severidade INFO ou menor: </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.8; margin-bottom: 0pt; margin-top: 0pt; text-align: left;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.6667px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; vertical-align: baseline; white-space: pre-wrap;">org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Algumas abordagens mais atuais de arquitetura reduzem o impacto de baixa performance escalando horizontalmente a infraestrutura, ainda assim, quanto menor a capacidade de processamento, maior a quantidade de servidores que precisará escalar para ter vazão. </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Dependendo do tipo de negócio que é aplicado, uma API ou WebService não ser utilizado por questão de ineficiência de tempo de resposta é fadar a aplicação ao fracasso. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Referências:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="https://tomcat.apache.org/tomcat-8.0-doc/apr.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://tomcat.apache.org/tomcat-8.0-doc/apr.html</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="https://blog.eveoh.nl/2012/04/some-notes-on-tomcat-connector-performance/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://blog.eveoh.nl/2012/04/some-notes-on-tomcat-connector-performance/</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<span id="docs-internal-guid-26e54b1e-488f-d2dc-6752-bb6cfeb697fd"></span><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<br />
<br />
<br />
<span style="background-color: white; color: #333333; font-family: arial; font-size: 14.85px; text-align: justify; white-space: pre-wrap;">Publicação também disponível em: http://ilegra.com/beyonddata/</span>Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-88980668006237469342016-10-26T16:01:00.002-02:002016-10-26T16:01:50.895-02:00Java - Snapshot JVM<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
O conteúdo do script é muito útil para quem sabe o que fazer com ele e como analisar as saídas. </div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
Cuidado ao utilizá-lo livremente em função do heapdump que é gerado a cada execução então precisam avaliar espaço em disco e impacto antes disto. </div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
Ele serve para coletar diversas informações sem que seja necessário algo mais que o JDK instalado no servidor alvo que vão avaliar. </div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
Exemplo de saída: </div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<div>
$ ./snapshot-jvm.sh</div>
<div>
PID JVM -> 18854</div>
<div>
Date execution -> Wed Oct 26 15:47:27 BRST 2016</div>
<div>
<br /></div>
<div>
Take thread dump...</div>
<div>
Take memory snapshot...</div>
<div>
Attaching to process ID 18854, please wait...</div>
<div>
Debugger attached successfully.</div>
<div>
Server compiler detected.</div>
<div>
JVM version is 24.79-b02</div>
<div>
Attaching to process ID 18854, please wait...</div>
<div>
Debugger attached successfully.</div>
<div>
Server compiler detected.</div>
<div>
JVM version is 24.79-b02</div>
<div>
finding class loader instances ..done.</div>
<div>
computing per loader stat ..done.</div>
<div>
please wait.. computing liveness..............liveness analysis may be inaccurate ...</div>
<div>
Take memory dump...</div>
<div>
Dumping heap to /opt/resources/temp/heapdump-<wbr></wbr>18854-15-2016-10-26.hprof ...</div>
<div>
File exists</div>
<div>
Snapshot resources in use</div>
<div>
Check threads in use...</div>
<div>
Finish.</div>
</div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
Repositório para download : <a data-saferedirecturl="https://www.google.com/url?hl=pt-BR&q=https://github.com/helkmut/snapshot-jvm&source=gmail&ust=1477591140620000&usg=AFQjCNEi41LSZ6n3qKVqQ1UKd0qZjv34Nw" href="https://github.com/helkmut/snapshot-jvm" style="color: #1155cc;" target="_blank">https://github.com/helkmut/<wbr></wbr>snapshot-jvm</a></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
Em resumo, após sua execução poderá avaliar threads ativas nos connectors, thread dump, heap dump e suas estatísticas, assim como estatísticas do uso dos recursos do servidor. Com essa informação conseguimos identificar uma contenção de recursos seguramente. </div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 12.8px;">
Espero ter ajudado de alguma forma, ao menos poupando o trabalho de fazer um script igual.</div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-47217215557904987172016-08-23T13:09:00.002-03:002016-08-23T13:09:55.769-03:00FlywayDB - Automação e versionamento de dados<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Paradigmas caem dia após dia na tecnologia da informação. Tal dinâmica é conhecida por desenvolvedores atentos as mudanças de metodologia de desenvolvimento de software, linguagens e ao próprio modelo e ciclo de implantação de suas aplicações.</span></div>
<b id="docs-internal-guid-06936ba2-b827-f959-34f5-dbe9eb61cb34" style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Essa dinâmica gerada pela demanda de inovação em razão do empreendedorismo de diferenciação, com a necessidade de entregar mais e melhor em menor tempo a menor custo revolucionou camadas de frontend, backend, integrações e interações com objetos que tornaram-se cache e responsabilidade de CDNs (Content Delivery Network). Mas pouco falava-se na camada de dados.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Um exemplo prático do método utilizado em grandes organizações para o gerenciamento da estrutura de dados geralmente segue o seguinte modelo: O desenvolvedor cria seus SQLs necessários para atender uma demanda de negócio(ou correção de erro) com scripts de install e rollback e em algumas circunstâncias “perfumados” com um gerenciador de publicação de estrutura de dados: O qual recebe o script, ordena, valida sintaxe ou algo neste sentido.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Em conjunto com processos delineados de gestão de mudanças, entra em cena o nosso amado DBA(administrador de banco de dados), o qual tem o papel de avaliar o conteúdo e seu impacto na performance, também a integridade da base de dados, e quando passar nestes quesitos aplicar tais scripts, ocasionalmente em horário comercial quando temos um nível de amadurecimento alto, ou em função da criticidade e risco nas madrugadas frias de sábado para domingo. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Enquanto isto, do lado do código da aplicação o desenvolvedor com sua veia inovadora utiliza-se de novas soluções e metodologias para que a atualização de sua aplicação seja feita da maneira mais ágil possível, resguardado por seus testes de performance, funcionalidade, cobertura de código e outros que lhe permitem a realização cada vez mais eficaz de entrega e integração. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Pois bem, mas chegada a hora do desenvolvedor atualizar informações na base e toda inovação fica fadada a execução de um processo lento e dependente, passível de erros e falhas humanas durante um rollback ou install. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Finalizada a apresentação de fluxos e cenários que ainda existem, e são comuns em organizações, vamos ao que o FlywayDB, uma das soluções disponíveis de versionamento de estrutura de dados, pode fazer e como ele pode fazer. </span></div>
<b style="font-weight: normal;"><br /><br /><br /><img alt="flywaydb.png" height="296" src="https://lh3.googleusercontent.com/y2JTFpvE4s87VsRfXhrR_0Se94jEc0DHA21tOLfw9Iz3ae-TiZpLHsIKNd6Sgs2zI22d7uzwC9F8OrwU-70Bs_3_-g3GCLrbcnP4QNzHEApKes8mWkNENZ8lpUFryhORNip75I_l" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="602" /></b><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">O FlywayDB (https://flywaydb.org) em comparação com o Liquibase (http://www.liquibase.org/) parece-me mais flexível e simples em sua implantação cujo cenário descrito acima nesta publicação seja o vigente. Dai a opção de uso desta solução, mas vale fazer uma comparação das duas. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Em que versionar as alterações de estruturas de dados e dados pode beneficiar? Primeiramente em mapear alterações, ou seja, saber o que e quando causou impacto, também acompanhar o ciclo de evolução da base de dados. Veja um exemplo da tabela de ‘migrations’ do FlywayDB: </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><img alt="schema.png" height="136" src="https://lh5.googleusercontent.com/4J4KdUEiQmlnByPrBJ50qoX7t6q-bwPQUfWzrfHzkXO-P2V_jmV9ulJZnDg5mHWr6NXkVjcvGwQiH5JfYLkPK9YoowzHnZumglQOwrSY-ddrkDtKhYSSeK575dnTDhVKO4C7ACql" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="693" /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Com essa informação é possível saber do que se trata a migration, qual versão a base está e quais foram bem sucedidas das ‘migrations’ e quando. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Abordaremos então os métodos de integração com o seu projeto Maven e repositório de versionamento GIT. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">No exemplo utilizado para integrar a um projeto Maven os scripts SQL precisarão estar situados no diretório, ou alterar no pom.xml o location: $projeto/src/main/resources/db/migration de seu repositório GIT. Precisarás incluir também as dependências de plugins e jdbcs, tais como: </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">JDBC</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><!-- mysql jdbc driver --></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><dependency></dependency></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><groupid>mysql</groupid></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><artifactid>mysql-connector-java</artifactid></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><version>5.1.21</version></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Plugin FlywayDB</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> <!-- Fly way --></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><dependency></dependency></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><groupid>com.googlecode.flyway</groupid></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><artifactid>flyway-core</artifactid></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><version>1.7</version></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
</td></tr>
</tbody></table>
</div>
<br /><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><plugins></plugins></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><plugin></plugin></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><groupid>com.googlecode.flyway</groupid></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><artifactid>flyway-maven-plugin</artifactid></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><version>1.7</version></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><configuration></configuration></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><user>$user</user></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><password>$passwd</password></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><driver>com.mysql.jdbc.Driver</driver></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><url>$string_de_conexão</url></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> <locations></locations></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><location>src/main/resources/db/migration</location></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><location>org.flywaydb.sample.migration</location></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Não esqueça que precisará de um primeiro scripts de install na database alvo, um exemplo abaixo:</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">V0001__Install.sql</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">CREATE TABLE t (c CHAR(20) CHARACTER SET utf8 COLLATE utf8_bin);</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Após para futuras migrations utilize: ‘V0002__Migration.sql’.</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Estrutura de POM e aplicação de teste disponível em: </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="https://github.com/helkmut/treina-auto_avanc/blob/master/app/pom.xml" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://github.com/helkmut/treina-auto_avanc</span></a></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Exemplo de saída de um Job de criação de artefato do CI (Continuous Integration) Jenkins de um projeto Maven usando FlywayDB:</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Started by user anonymous</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Building in workspace /var/lib/jenkins/jobs/BUILD-treina-auto_avanc/workspace</span></div>
<br /><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Deleting project workspace... done</span></div>
<br /><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Cloning the remote Git repository</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Cloning repository https://github.com/helkmut/treina-auto_avanc</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git init /var/lib/jenkins/jobs/BUILD-treina-auto_avanc/workspace # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Fetching upstream changes from https://github.com/helkmut/treina-auto_avanc</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git --version # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">using .gitcredentials to set credentials</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git config --local credential.helper store --file=/tmp/git1715435271723825466.credentials # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git -c core.askpass=true fetch --tags --progress https://github.com/helkmut/treina-auto_avanc+refs/heads/*:refs/remotes/origin/*</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git config --local --remove-section credential # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git config remote.origin.url https://github.com/helkmut/treina-auto_avanc# timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git config remote.origin.url https://github.com/helkmut/treina-auto_avanc# timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Fetching upstream changes from https://github.com/helkmut/treina-auto_avanc</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">using .gitcredentials to set credentials</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git config --local credential.helper store --file=/tmp/git1240117904577578786.credentials # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git -c core.askpass=true fetch --tags --progress https://github.com/helkmut/treina-auto_avanc</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git config --local --remove-section credential # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git rev-parse refs/remotes/origin/master^{commit} # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Checking out Revision e5d07b7b9898c931fef6397d060e911e3535828c (refs/remotes/origin/master)</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git config core.sparsecheckout # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git checkout -f e5d07b7b9898c931fef6397d060e911e3535828c</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> >git rev-list e5d07b7b9898c931fef6397d060e911e3535828c # timeout=10</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[workspace] $ /bin/sh -xe /tmp/hudson7642003292037004876.sh</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">+ git checkout</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Parsing POMs</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[app] $ /var/lib/jenkins/tools/hudson.model.JDK/Java8/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.5.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/3.2.2/boot/plexus-classworlds-2.5.1.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/3.2.2/conf/logging jenkins.maven3.agent.Maven31Main /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/3.2.2 /var/cache/jenkins/war/WEB-INF/lib/remoting-2.51.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.5.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.5.jar 41028</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><===[JENKINS REMOTING CAPACITY]===>channel started</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Executing Maven: -B -f /var/lib/jenkins/jobs/BUILD-treina-auto_avanc/workspace/app/pom.xml -PDev compile flyway:status</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] Scanning for projects...</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] ------------------------------------------------------------------------</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] Building app 1</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] ------------------------------------------------------------------------</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO]</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ app ---</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] Copying 1 resource</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO]</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ app ---</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] No sources to compile</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO]</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] --- flyway-maven-plugin:1.7:status (default-cli) @ app ---</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] +-------------+------------------------+---------------------+---------+</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] | Version </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">| Description </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">| Installed on </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">| State |</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] +-------------+------------------------+---------------------+---------+</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] | 0001 </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">| Install </span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">| 2015-06-15 17:22:49 | SUCCESS |</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] +-------------+------------------------+---------------------+---------+</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] ------------------------------------------------------------------------</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] BUILD SUCCESS</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] ------------------------------------------------------------------------</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] Total time: 2.933 s</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] Finished at: 2015-06-15T18:59:09+00:00</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] Final Memory: 11M/31M</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[INFO] ------------------------------------------------------------------------</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[JENKINS] Archiving /var/lib/jenkins/jobs/BUILD-treina-auto_avanc/workspace/app/pom.xml to com.mycompany.app/app/1/app-1.pom</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">[workspace] $ /bin/sh -xe /tmp/hudson4990860526944688595.sh</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">channel stopped</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">+ tar cvf app.tar app README.md</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/src/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/src/main/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/src/main/resources/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/src/main/resources/db/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/src/main/resources/db/migration/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/src/main/resources/db/migration/V0001__Install.sql</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/index.html</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/MySqlDataGrid.aspx.resx</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/pom.xml</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/target/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/target/classes/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/target/classes/db/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/target/classes/db/migration/</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/target/classes/db/migration/V0001__Install.sql</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/1web.config</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/MySqlDataGrid.aspx</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/1.html</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">app/MySqlDataGrid.aspx.cs</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">README.md</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Triggering projects: DEV-treina-auto_avanc</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Archiving artifacts</span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Finished: SUCCESS</span></div>
</td></tr>
</tbody></table>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Com relação às melhores práticas de vinculação com o CI (Continuous Integration) Jenkins em seu projeto, pipelines e demais plugins deixaremos para uma próxima publicação, pois seria aqui uma abordagem superficial. O importante é que essa publicação abra seus olhos para facilitar interações com a base de dados e a aplicação, proporcionando um ciclo ágil em ambas as camadas. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Referências:</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="https://flywaydb.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://flywaydb.org</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="https://github.com/helkmut/treina-auto_avanc/blob/master/app/pom.xml" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://github.com/helkmut/treina-auto_avanc</span></a></div>
<br />
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.6667px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="https://www.maxcdn.com/blog/cdn-framework-step-2" style="text-decoration: none;">https://www.maxcdn.com/blog/cdn-framework-step-2</a></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Autores:</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<b id="docs-internal-guid-06936ba2-b829-18fb-c498-0b0a335ff3d8" style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">*</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Gabriel Prestes</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> é formando em Gestão da Tecnologia da Informação, arquiteto de middleware da ilegra com experiência de mais de 5 anos em suítes de middleware Oracle e RedHat. É um entusiasta de carros antigos.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<b style="font-weight: normal;"><br /></b></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">DevOps Engineer com ampla experiência como agile coach e arquiteto de infraestrutura em clouds publicas e privadas. *</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Cesar Mesquita</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> possui mais de 13 anos atuando na operação de infraestruturas de TI. Entusiasta da cultura DEVOPS, contribuindo com diversas empresas a disseminar práticas ágeis entre os times de desenvolvimento e infraestrutura .</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
</div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Trabalha atualmente na Ilegra como arquiteto de soluções em cloud. Fã incondicional de The Walking Dead, Breaking Bad e Band of Brothers.</span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Contato: https://br.linkedin.com/in/cmesquita00</span></div>
<div>
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<br /></div>
<div dir="ltr" style="line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: white; color: #333333; font-family: arial; font-size: 14.85px; line-height: 25.76px; white-space: pre-wrap;">Publicação também disponível em: http://ilegra.com/beyonddata/</span></div>
<div>
<br /></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-32254858070341447622016-06-24T08:16:00.002-03:002016-06-24T08:20:57.439-03:00Entrega contínua com PaaS (Plataform as a Service) - Continuação<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Relacionadas a publicação anterior ainda precisamos responder duas questões relevantes: </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: italic; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Quais soluções utilizar?</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: italic; font-variant: normal; font-weight: 700; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Quais as vantagens obtidas?</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Caso não tenha lido a publicação inicial, que gerou a necessidade de responder tais questionamentos, confira o post anterior - </span><span style="background-color: white; color: black; font-family: "arial"; font-size: 14.6667px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://helkmut.blogspot.com.br/2016/06/entrega-continua-com-paas-plataform-as.html" target="_blank">Entrega contínua com PaaS (Plataform as a Service)</a></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial"; font-size: 14.6667px; line-height: 1.8; text-indent: 36pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial"; font-size: 14.6667px; line-height: 1.8; text-indent: 36pt; white-space: pre-wrap;">O ponto é que dependerá das soluções utilizadas, bem como do tipo de demanda da organização em que você aplicará tal solução. Veja que os fatores para que ocorra tal variação serão o tamanho da organização, o orçamento disponível para a implantação, a estrutura a ser orquestrada, a cultura e a maturidade do ciclo de desenvolvimento.</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial"; font-size: 14.6667px; line-height: 1.8; text-indent: 36pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial"; font-size: 14.6667px; line-height: 1.8; text-indent: 36pt; white-space: pre-wrap;">Aqui utilizaremos algumas soluções que são bem aceitas pelo mercado, onde você poderá substituir de acordo com seu cenário. Não estamos tratando de configuração e uso de solução, mas sim propondo um modelo de ciclo e exemplificando com ferramentas disponíveis e de fácil acesso, ou seja, sem nos preocuparmos com licenciamento e custos de sustentação. </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial"; font-size: 14.6667px; line-height: 1.8; text-indent: 36pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial"; font-size: 14.6667px; line-height: 1.8; text-indent: 36pt; white-space: pre-wrap;">Considerando que na primeira publicação implantamos a ideia de entrega contínua e uso do PaaS, agora mostraremos as soluções em um cenário de exemplo.</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial"; font-size: 14.6667px; line-height: 1.8; text-indent: 36pt; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial"; font-size: 14.6667px; line-height: 1.8; text-indent: 36pt; white-space: pre-wrap;">Premissas e pré-requisitos para o ambiente proposto:</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Pré-requisitos</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Ao menos duas máquinas virtuais para simular o ambiente; </span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<br />
<ol start="2" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Recursos físicos disponíveis para que o fluxo publicado no post inicial seja efetivado: </span></div>
</li>
</ol>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: center;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><img alt="paas" height="354" src="https://lh4.googleusercontent.com/MEMAzVaNuxH7IpazBet7BK9gACBwr1ZyaXX2XX3eyszhULaGDV5Td3iy5hBirlZg7uh4suZVYy5Obe-mw8NXCF9L2BKdM_GweF-l0Dh4tZBiBTNT52moIZStvBIu-hJEFhCj-WUc" style="-webkit-transform: rotate(0.00rad); border: none; transform: rotate(0.00rad);" width="378" /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Premissas</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Uso dos seguintes componentes: </span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<br />
<ul style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">IDE (Integrated development environment): Será utilizada para o desenvolvimento do código.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Repositório de versões: Controlador de versões, gerenciar alterações e mesclagens.</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Ferramenta de integração contínua (CI - Continuous Integration): Fará a integração entre o ambiente do desenvolvimento e os ambientes disponíveis de evolução da aplicação, originalmente publicando alterações no ambiente de desenvolvimento, testes, homologação e produção. </span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: disc; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">PaaS (Plataform as a Service): Plataforma que em nosso cenário fictício será o hospedeiro da aplicação nos ambientes mencionados acima. </span></div>
</li>
</ul>
<b style="font-weight: normal;"><br /></b>
<br />
<ol start="2" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Como falamos acima, as soluções utilizadas foram definidas por padrão de mercado ou melhor adaptação e conhecimento, o leitor pode adaptar as soluções desde que saiba trabalhar com as mesmas;</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<br />
<ol start="3" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Licenciamento não serão abordados;</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<br />
<ol start="4" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Desconsideraremos que não é interessante termos os ambientes (desenvolvimento, etc…) em um mesmo servidor físico, sem isolamento de rede, geográfico, e demais recomendações que a ISO 27001 julga relevante.</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b><br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Quais soluções utilizar?</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Na camada de PaaS como solução para uma infraestrutura (datacenter) local ou híbrida, o projeto mais maduro é o </span><a href="http://www.openshift.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">OpenShift</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. Para realizar a integração uma boa indicação é o </span><a href="https://jenkins-ci.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Jenkins</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> , devido ao número relevante de plugins disponíveis. Com estes plugins o ciclo é facilitado, pois podemos integrar com repositórios GIT/GITHUB, projetos </span><a href="https://maven.apache.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Maven</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> para geração do artefato e não esquecendo da camada de dados plugins para o </span><a href="http://www.flywaydb.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">FlywayDB</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> ou </span><a href="http://www.liquibase.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">Liquibase</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Quanto a qualidade de código, testes de performance e etc, o Jenkins tem plugins de uso simplificado para utilização do Sonar, jMeter e demais soluções. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Por ser um integrador, não poderia faltar um plugin para realizar a publicação da aplicação no PaaS, o que justifica ainda mais as escolhas mencionadas acima. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Quais as vantagens obtidas?</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Poderia citar inúmeras vantagens adquiridas pelo uso do CD, CI, mas focaremos em uma em específico, que é gerada pela composição de soluções mostradas na publicação, independente do valor investido ou do tamanho da organização, e de extrema importância para o desenvolvedor: o ganho de agilidade e preocupar-se com o que importa - a qualidade do desenvolvimento, reduzindo a complexidade de infraestrutura para publicação de aplicações. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Legendas</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">PaaS: Plataform as a Service</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">CD: continuous delivery</span></div>
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">CI: Continuous Integration </span></div>
<br />
<div dir="ltr" style="line-height: 1.7999999999999998; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">IDE: Integrated development environment]]</span><br />
<br />
<span style="background-color: white; color: #333333; font-family: arial; font-size: 14.85px; line-height: 25.76px; text-indent: 0px; white-space: pre-wrap;">Publicação também disponível em: http://ilegra.com/beyonddata/</span></div>
<div>
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-39305586800271297332016-06-24T08:14:00.002-03:002016-06-24T08:20:11.564-03:00Entrega contínua com PaaS (Plataform as a Service)<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Ao escrevermos sobre PaaS devemos ter o conceito que estamos trabalhando com um modelo de plataforma direcionado à aplicações e alguns de seus objetivos específicos – razões de sua existência – são a simplificação, flexibilização, em função da utilização de estrutura como serviço, que proporcionarão maior agilidade do processo de provisionamento de aplicações.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Quando mencionamos PaaS, desprenda-se da ideia de que seu negócio será deslocado para o <i>datacenter</i>de um fornecedor externo, nem pense em uma caixa preta, pois é possível trabalhamos com PaaS em seu <i>datacenter </i>local, de forma híbrida com integração externa ou somente em um fornecedor externo.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Devemos estar atentos às demandas da organização, identificar necessidades de acordo com critérios claros de aplicabilidade de uma solução e urgência da mesma. A soma da consistência e acerto de seus critérios resultará na aderência e sucesso do projeto.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Existe razão de utilizarmos como modelo de plataforma o PaaS em busca de flexibilização e agilidade se o processo de desenvolvimento das aplicações na organização alvo utiliza métodos que não demandam tal agilidade? Respondendo a este questionamento, podemos relacionar a aplicabilidade do PaaS com a Entrega Contínua (CD – <i>Continuous Delivery</i>)?</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Antes de responder a questão, resumiremos aqui Entrega Contínua. Entrega Contínua consiste em uma abordagem de desenvolvimento, gestão, e ou automação que permita entregar valores de forma ágil ainda que trabalhe com ciclos que garantam a confiabilidade do valor entregue.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Não esqueçamos de responder a pergunta anterior. Na humilde opinião de quem vos escreve, sim, grande parte da justificativa do uso do PaaS se aplica a Entrega Contínua como abordagem de desenvolvimento de aplicação. Não desacreditando que Entrega Contínua não possa ser feita em outros modelos tal qual o IaaS (<i>Infrastructure as a Service</i>), mas como o fator observado é o motivo e valia, sim, o uso do PaaS agrega muito na agilidade do processo de entrega da aplicação.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Para esta publicação nos propusemos apenas que idealize uma solução simples de entrega contínua, ou seja, absorva o conceito do ciclo que envolve, desde um ambiente integrado para desenvolvimento de software (IDE) até a publicação no ambiente de desenvolvimento da plataforma apresentada, PaaS.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Você é o desenvolvedor, que em conjunto com uma equipe, trabalhou dias no desenvolvimento de um micro serviço que tem como função integrar, consumindo informações de um sistema legado e que disponibilizará para um novo módulo de uma aplicação web que está em desenvolvimento por outra equipe da sua organização. Tal integrador foi desenvolvido na linguagem Python, e utiliza recursos auxiliares, peculiares e conflitantes com aplicações existentes.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Veja que ao utilizarmos o PaaS como modelo de plataforma este não seria um evento impactante no projeto, uma vez que pode-se entregar como serviço uma plataforma exclusiva que atende os requisitos da aplicação alvo sem que reflita ou conflite com as demais aplicações ou ativos da organização.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Uma vez criada a plataforma para a aplicação em questão chega a hora de dar agilidade no processo de publicação da aplicação, não esquecendo o ciclo de promoção dos ambientes.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Em um início de tarde, você utilizando sua IDE, realiza o *<i>commit</i> em seu repositório local de GIT. Avalia então necessidades de *<i>merge. </i>Passados os procedimentos de controle de versão seu trabalho, assim como os de outros, estão na *<i>branch master</i> do repositório GIT da equipe. Através de um *<i>hook</i>configurado que dispara um job em uma ferramenta de automação para geração do artefato.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Com o artefato gerado após passar por testes de cobertura, unitários, funcionais e de performance integrados na ferramenta de automação. Tal artefato é publicado no ambiente de desenvolvimento do PaaS sem interação humana. E quando o <i>build </i>for finalizado com sucesso, você, assim como sua equipe, poderá comemorar o resultado de dias de trabalho.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGfCx2NE17xZRo4Gl5XmcGqBOSrjRo5ITPWNz6OSvFlcsXoErJpcpGj4LPOKqT9epOTrJ93Z35X0fIttO1OSWHnfVr_lkrxq_XCuBAlFOhrkZP4pYBuy8MKgmC2xCn41tz5cTTGm3bNTE/s1600/paas.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="301" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGfCx2NE17xZRo4Gl5XmcGqBOSrjRo5ITPWNz6OSvFlcsXoErJpcpGj4LPOKqT9epOTrJ93Z35X0fIttO1OSWHnfVr_lkrxq_XCuBAlFOhrkZP4pYBuy8MKgmC2xCn41tz5cTTGm3bNTE/s320/paas.png" width="320" /></a></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Agora restará avaliar a janela de publicação, aprovação e demais processos que sua organização realiza para promover o <i>build </i>para os ambientes de teste, homologação e produção.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Surgirão questionamentos tais como:</div>
<ul style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 20px; list-style: square; margin: 0px 0px 30px; outline: 0px; padding: 0px 0px 0px 35px; text-align: justify; vertical-align: baseline;">
<li style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Quais soluções utilizar?</li>
<li style="border: 0px; font-family: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">Quais as vantagens obtidas?</li>
</ul>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Continua!</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<pre style="background-color: white; border: 1px solid rgb(234, 234, 234); color: #666666; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 14px; font-stretch: inherit; line-height: 19px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">commit: confirmar alterações/adições em um repositório</pre>
<pre style="background-color: white; border: 1px solid rgb(234, 234, 234); color: #666666; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 14px; font-stretch: inherit; line-height: 19px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">merge: mesclar alterações/adições em um repositório</pre>
<pre style="background-color: white; border: 1px solid rgb(234, 234, 234); color: #666666; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 14px; font-stretch: inherit; line-height: 19px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">branch master: nome do branch padrão no Git</pre>
<pre style="background-color: white; border: 1px solid rgb(234, 234, 234); color: #666666; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 14px; font-stretch: inherit; line-height: 19px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">hook: disparar scripts quando certas ações ocorrerem</pre>
<pre style="background-color: white; border: 1px solid rgb(234, 234, 234); color: #666666; font-family: "Courier 10 Pitch", Courier, monospace; font-size: 14px; font-stretch: inherit; line-height: 19px; margin-bottom: 20px; outline: 0px; overflow: auto; padding: 20px; text-align: justify; vertical-align: baseline; white-space: pre-wrap;">build: versão "compilada" de um software ou parte dele
</pre>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
Agradecimentos aos amigos e colegas César Mesquita, Lincolm Aguiar e Milton Duarte, pela paciência, orientação е incentivo qυе tornaram possível а conclusão desta postagem.</div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-size: 14px; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<br /></div>
<div style="background-color: white; border: 0px; color: #666666; font-family: Lato, sans-serif; font-stretch: inherit; line-height: 24px; margin-bottom: 15px; outline: 0px; padding: 0px; text-align: justify; vertical-align: baseline;">
<span style="color: #333333; font-family: "arial"; line-height: 25.76px; white-space: pre-wrap;">Publicação também disponível em: http://ilegra.com/beyonddata/</span></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-3496431515885879252016-06-23T21:38:00.001-03:002016-06-23T21:39:32.645-03:00JBoss/Wildfly - Um cluster sem multicast, mod_cluster ou mod_jk<b id="docs-internal-guid-649f8c03-7fd3-ac26-ee57-f2efe20675ea" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 14.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Diversas publicações na Internet apresentam uma forma de realizar a configuração no Wildfly de um cluster com replicação de sessão e com balanceamento de carga quando temos no ambiente a composição de Wildfly(infinispan, jgroups), Apache e mod_cluster ou mod_jk. Também outro cenário comum nas publicações é que é permitido o multicast, ou seja, a propagação de informações para diversos destinatários usando UDP. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Em datacenters privados é possível tal configuração, mas vamos levar para a realidade do VPC da Amazon, onde temos o Overlay Multicast como opção para fazer Multicast que para a habilitação deve ser seguido um roteiro de ajustes, instalações de pacotes e etc, que não julguei interessante uma vez que podemos utilizar um meio mais simples de configurar o reconhecimento de host-controller do cluster. </span><br />
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-indent: 36pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-indent: 36pt; white-space: pre-wrap;">Caso sua necessidade seja trabalhar com AutoScale, então o Overlay se justifica principalmente por não fixar configurações no domain.xml, deixando mais dinâmica sua configuração, entretanto se este não é sua necessidade, vamos simplificar e transformar o multicast em uma lista de hosts de host-controllers. </span><br />
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-indent: 36pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-indent: 36pt; white-space: pre-wrap;">Mais um item interessante de mencionar, citando replicação de sessão, é alterarmos a comunicação dos objetos de sessão de UDP para TCP, pois isso transformará a replicação em algo mais confiável.</span><br />
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-indent: 36pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-indent: 36pt; white-space: pre-wrap;">Mas quais ajustes são necessários e em quais arquivos? </span><br />
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-indent: 36pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-indent: 36pt; white-space: pre-wrap;">Na minha publicação não tratarei de como configurar um cluster, pois isto podes achar em diversos sites com a correta orientação, mas vou citar especificamente as configurações que citei acima do initial_hosts do jgroups e também do método TCP com TCPPING. Para realizar estes ajustes segue um exemplo de configuração do domain.xml que podes adaptar a tua realidade de ambiente: </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3aJjSGjwfnJSLM3DzU26f2uaU-IggAPPgXN5fSAjUqsr-nOxM7z1nEeTdWZrJWY1oVtG8zCZpxUh9VYrgggmrP-1B3NF8TloWfNxhdiffcfNljAaFBmUjw2WHh5e9O3dj7rRJKul8HcA/s1600/img.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3aJjSGjwfnJSLM3DzU26f2uaU-IggAPPgXN5fSAjUqsr-nOxM7z1nEeTdWZrJWY1oVtG8zCZpxUh9VYrgggmrP-1B3NF8TloWfNxhdiffcfNljAaFBmUjw2WHh5e9O3dj7rRJKul8HcA/s1600/img.png" /></a></div>
<div dir="ltr" style="margin-left: 0pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
</td></tr>
</tbody></table>
</div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="color: red; font-family: "arial"; font-size: 18.6667px; font-weight: 700; vertical-align: baseline; white-space: pre-wrap;">IMPORTANTE:</span><span style="font-family: "arial"; font-size: 18.6667px; vertical-align: baseline; white-space: pre-wrap;"> Aplique as configurações abaixo no profile utilizado, no HA ou Full-HA, onde o que está em negrito são os ajustes realizados.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="font-family: "arial"; font-size: 18.6667px; vertical-align: baseline; white-space: pre-wrap;"><br style="font-family: "Times New Roman"; font-size: medium; line-height: normal; text-align: start; text-indent: 0px; white-space: normal;" /></span></div>
<div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="font-family: "arial"; font-size: 18.6667px; vertical-align: baseline; white-space: pre-wrap;">Observe que o nome ‘master’ e ‘slave1’ são os node identifier no host.xml. Também libere a porta 7600 nos SecurityGroups.</span><br />
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-align: justify; text-indent: 36pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-align: justify; text-indent: 36pt; white-space: pre-wrap;">Mas por que não utilizar o mod_cluster ou mod_jk? Quando estamos um ambiente AWS* podemos utilizar o próprio LoadBalancer(ELB) como balanceador e health-check* das instâncias, semelhante a funcionalidade do mod_cluster, e que também é baseado em loadfactor para distribuir as conexões. Ao fazemos isto precisamos necessariamente não expor a interface de gerenciamento(bmanagement) deixando-a apenas como loopback ainda que possas contar com as regras de SecurityGroups, também precisaremos uma página simples de teste dentro do WAR/EAR para o ELB, uma que pode retornar ‘OK’ após fazer alguns testes funcionais na aplicação para termos a certeza de funcionamento de DataSource e demais componentes relacionados a aplicação. </span><br />
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-align: justify; text-indent: 36pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-align: justify; text-indent: 36pt; white-space: pre-wrap;">Certificados SSL também podem ser instalados no ELB, assim como a camada de cache pode ser CloudFront, mas se precisar envolver redirecionamentos para atender o negócio da aplicação então não tem como fugir de um webserver, então poderá utilizar o Apache com mod_cluster ou mod_jk como frontend para o ELB. Sugiro o uso do mod_cluster como balanceador em função do loadfactor mais eficiente com relação ao mod_j.</span><br />
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-align: justify; text-indent: 36pt; white-space: pre-wrap;"><br /></span>
<span style="font-family: arial; font-size: 18.6667px; line-height: 1.38; text-align: justify; text-indent: 36pt; white-space: pre-wrap;">Qualquer outra dúvida pertinente ao Wildfly também podes recorrer à documentação do produto que é bem rica em detalhes, seja para o analista de infraestrutura como para o desenvolvedor. O link está disponível nas referências da publicação. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">* Wildfly - chamarei nesta publicação somente assim e não mais de JBoss apesar de eu particularmente não gostar do novo nome</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">* AWS - Amazon Web Services</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">* health-check - modelo que checagem para saber se o serviço da instance está ativo e funcional, respondendo as condições que especificaste no ELB</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Referências:</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="https://aws.amazon.com/articles/6234671078671125" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://aws.amazon.com/articles/6234671078671125</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<a href="https://docs.jboss.org/author/display/WFLY10/Documentation" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://docs.jboss.org/author/display/WFLY10/Documentation</span></a></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="font-family: "arial";"><span style="font-size: 18.6667px; line-height: 25.76px; white-space: pre-wrap;">Publicação também disponível em: http://ilegra.com/beyonddata/</span></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<br /></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-35761702527698848022016-06-21T15:43:00.003-03:002016-06-21T15:43:54.972-03:00Glassfish - Importar um certificado válido e existente<br />
<br />
<b id="docs-internal-guid-9e333375-7445-a796-0bb6-ebb61afed65a" style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Quando você precisar migrar um ambiente ou uma aplicação para o Glassfish, você encontrará algumas adversidades. São elas: </span></div>
<b style="font-weight: normal;"><br /></b>
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Migrar os certificados de um Oracle Wallet(p12) para um Java Keystore/Truststore; (imaginando que o ambiente legado é um OHS (Oracle HTTP Server));</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Importar certificado de outro ApplicationServer com o keystore já configurado.</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Não incluo aqui a criação de um novo certificado SSL, certificado auto assinado, ou renovações, pois a “privatekey” pode ser recriada sem problemas. Já a publicação se aplica quando a chave privada não pode ser recriada por alguma razão, seja pelo uso de um outro sistema ou impacto de negócio. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Privatekey: Chave privada usada no sistema de criptografia baseado em chaves. </span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Mas qual o grande problema? Bem, o Glassfish suporta apenas um keystore e um truststore que vem previamente setado para uso do alias ‘s1as’. Quando configurado o ‘http-listener-2’, atendendo a porta 28181, este certificado não é reconhecido como válido, pois é para fins administrativos. Portanto, é necessário substituí-lo, o que é mais comum, ou incluir um novo alias no keystore localizado no diretório ‘config’ do domain. </span></div>
<b style="font-weight: normal;"><br /></b><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: red; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">IMPORTANTE</span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">: Sete a variável $JAVA_HOME para o mesmo JDK do oracle_commons dentro do $MIDDLEWARE_HOME. Os comandos abaixo incluem o JDK/bin no PATH, então não precisei passar o PATH completo do orakpi e keytool.</span></div>
<b style="font-weight: normal;"><br /><br /></b><br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Migrar os certificados de um Oracle Wallet(p12) para um Java Keystore:</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b><br />
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">orapki wallet pkcs12_to_jks -wallet ewallet.p12 -pwd coloque_a_senha_do_wallet_aqui -jksKeyStoreLoc keystore.jks-conv -jksKeyStorepwd changeit -jksTrustStoreLoc cacerts.jks-conv -jksTrustStorepwd changeit</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<ol start="2" style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Importar certificado de outro ApplicationServer com o keystore já configurado; </span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Como mencionado, o Glassfish suporta apenas um keystore. Logo precisará fazer o merge do keystore e do truststore: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">keytool -v -importkeystore -srckeystore cacerts.jks-conv -srcstoretype JKS -destkeystore cacerts.jks -deststoretype JKS</span></div>
</td></tr>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">keytool -v -importkeystore -srckeystore keystore.jks-conv -srcstoretype JKS -destkeystore keystore.jks -deststoretype JKS</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Neste ponto precisará saber as senhas de todos os JKSs, pois serão solicitadas as senhas dos keystores de origem e destino. Caso as mesmas não estejam, utilize o comando abaixo para ajustá-las:</span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">keytool -keypasswd -new changeit -keystore keystore.jks -storepass "senha do keystore" -alias orakey1 -keypass "senha antiga" </span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /><br /><br /><br /></b><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Possíveis problemas durante o processo serão relacionados ao keystore de origem ser 32 bits e o de destino 64 bits.Então sugiro manter como o de destino o que atenda o hardware de seu ambiente de Glassfish, assim como a senha do certificado alias que deseja utilizar tem que ser igual. Logo, utilize todas as senhas iguais a senha do master-password do Glassfish. </span></div>
<b style="font-weight: normal;"><br /></b>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Não esqueça de após o merge dos keystore alterar o alias do certificado SSL do ‘http-listener-2’ para o alias desejado. Para visualizar o alias utilize o comando abaixo: </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">keytool -list -v -keystore keystore.jks</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b><br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Referências:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<br /></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://en.wikipedia.org/wiki/Public-key_cryptography" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://en.wikipedia.org/wiki/Public-key_cryptography</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://docs.oracle.com/cd/E19798-01/821-1751/6nmnci6aa/index.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://docs.oracle.com/cd/E19798-01/821-1751/6nmnci6aa/index.html</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.webfarmr.eu/2010/04/import-pkcs12-private-keys-into-jks-keystores-using-java-keytool/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://www.webfarmr.eu/2010/04/import-pkcs12-private-keys-into-jks-keystores-using-java-keytool/</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: Arial; font-size: 18.666666666666664px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html</span></a></div>
<br /><br /><span style="background-color: white; font-family: arial; font-size: 16px; line-height: 22.08px; text-indent: 48px; white-space: pre-wrap;">Publicação também disponível em: <a href="http://ilegra.com/beyonddata/">http://ilegra.com/beyonddata/</a></span>Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com1tag:blogger.com,1999:blog-7506291426828755339.post-39051059317456160462016-06-21T15:35:00.002-03:002016-06-21T15:44:04.172-03:00WLS - Weblogic, um motivo para migrar seu OAS<b id="docs-internal-guid-15a768c1-743b-89bb-ddf0-51b34c8701ff" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Um dia o gerente de desenvolvimento chega a sua mesa e reporta que a era do seu Oracle Application Server (OAS) 10g chegou ao fim. Ele valoriza um relatório objetivo e visualmente agradável com análise de impacto de negócio bem enumerada e suficiente para que a renovação ou atualização de licenciamento seja uma necessidade imediata.</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">E se é você que precisa entregar este relatório bem fundamentado, quais os pontos para chegar a tal conclusão? Além disso, como através de diferenças técnicas você poderá apoiar o relatório para que sejam correlacionadas ao negócio? Essa publicação citará algumas diferenças e evoluções técnicas entre o OCJ4 e o Weblogic, de forma a gerar insumos que lhe darão motivações técnicas para impactar o negócio.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Resumidamente a história é a seguinte, a Oracle, até a versão 10gR3 de sua suíte de middleware, tinha, dentre os componentes que formam o OAS como contêiner JavaEE, o OCJ4. Com a aquisição da BEA em 2008, o contêiner foi substituído pelo Weblogic na versão 11g. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Isto pode parecer uma alteração simples, mas não é, e por se tratar de outro contêiner JavaEE, mudam, além de a atualização de versão dos componentes, o que já é algo preocupante, também a administração e interação das aplicações com o servidor de aplicação. Para o time de desenvolvimento, isso significa mais do que atualizar seu projeto dos frameworks utilizados, mas também identificar e estudar os métodos com que este novo contêiner irá interagir, seu plano e funcionamento de publicação e a estruturação diferenciada do processo. Em uma organização que utiliza as demais soluções da suíte, tais como, Forms & Reports, BI ou SOA a complexidade aumenta exponencialmente. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Em um comparativo técnico simples, o principal valor agregado na migração e que por si só já a justifica, ainda que não demonstre a relação de urgência, somente de importância, é a atualização da especificação JavaEE suportada, a última versão do OC4J tem compatibilidade completa com as especificações do JavaEE 1.4, enquanto o Weblogic12cR2 tem compatibilidade com as especificações JavaEE 7. Ou seja, isto permite ao desenvolvedor trabalhar com novas abordagens da linguagem, em uma versão com o Java mais recente e com novas features e correções de bugs que darão maior agilidade ao time e um aumento de performance significativo com relação as versões anteriores. Assim, ao não proceder com a migração, suas aplicações estão fadadas a descontinuidade ou legado. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Demais recursos do Weblogic com relação ao OC4J podem ser evidenciados na arquitetura, administração e configuração de recursos, managedservers e planos de implantação, ou seja, uma lista que pode ser obtida de acordo com o negócio da sua organização. Para tal, sugerimos realizar um comparativo baseado nas documentações dos produtos, pois as features que poderão ser relevantes a sua organização serão indiferentes a outras, cabe ao gestor responsável pelo processo de avaliação da migração julgar o que será aderente a seu time de desenvolvimento e operação. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Para motivações de negócios, consideramos s razões técnicas que consistem no uso de uma especificação atual que entrega performance, gestão e desenvolvimento de aplicações em um menor tempo, tais razões são de forma geral:</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Uma maior capacidade da equipe em desenvolvimento de novos recursos ou versões da sua aplicação;</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Possibilitar com o ganho de performance inclusive a revisão de recursos físicos ocupados pela sua camada de middleware de sua organização;</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sem adicionarmos as relevantes alterações que a atualização traz ao seu negócio em específico.</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Custo e método de migração</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Vamos ao que viabiliza ou não uma migração: o custo. Apesar de os resultados positivos de uma atualização serem facilmente percebidos , o método de migração e a importância ao processo dado pela organização darão a variação do retorno sobre investimento (ROI), valor presente líquido (VPL), ou payback. Por este motivo, um plano de migração adequado, bem estruturado e planejado afetará os resultados diretamente.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">A escolha do método...</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">A organização, ao contratar o Sustaining Support do Lifetime Support da Oracle, terá direito a atualização dos produtos de middleware sem custo adicional. Caso o mesmo não possua o Lifetime, terá duas opções: </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<ol style="margin-bottom: 0pt; margin-top: 0pt;">
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Pagar o retroativo do serviço de suporte/atualização e realizar a migração;</span></div>
</li>
<li dir="ltr" style="background-color: transparent; color: black; font-family: Arial; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; margin-left: 48px; text-decoration: none; vertical-align: baseline;"><div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Comprar uma nova licença.</span></div>
</li>
</ol>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Com um processo de migração orientado corretamente, com ferramentas do de apoio do fabricante e foco bem dimensionado do time de desenvolvimento e operação, reduzimos os riscos do projeto, mas também contribuímos para ele ser percebido positivamente na cultura da organização. </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Referências:</span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://blogs.oracle.com/java-platform-group/entry/upgrading_major_java_versions" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://blogs.oracle.com/java-platform-group/entry/upgrading_major_java_versions</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="https://en.wikipedia.org/wiki/Oracle_WebLogic_Server#cite_note-1" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://en.wikipedia.org/wiki/Oracle_WebLogic_Server#cite_note-1</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.otmfaq.com/forums/blogs/chrisplough/2-bea-weblogic-vs-oracle-oas-otm-g-log.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://www.otmfaq.com/forums/blogs/chrisplough/2-bea-weblogic-vs-oracle-oas-otm-g-log.html</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://docs.oracle.com/middleware/1221/wls/INTRO/intro.htm#INTRO123" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://docs.oracle.com/middleware/1221/wls/INTRO/intro.htm#INTRO123</span></a></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;">
<a href="http://www.oracle.com/br/support/lifetime-support/index.html" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://www.oracle.com/br/support/lifetime-support/index.html</span></a></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Como última consideração ficam meus agradecimentos ao colega Joel Corrêa (joel.correa@ilegra.com), arquiteto de software na ilegra, que apoiou-me nas dúvidas relacionadas ao desenvolvimento. Ao colega Felipe Lindenmeyer (</span><a href="mailto:felipe.lindenmeyer@ilegra.com" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">felipe.lindenmeyer@ilegra.com</span></a><span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">), executivo de contas na ilegra, que me amparou nas questões de licenciamento e custos. </span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Publicação também disponível em: <a href="http://ilegra.com/beyonddata/">http://ilegra.com/beyonddata/</a></span><br />
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "arial"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<br />Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-37194540596491249312016-06-21T14:03:00.002-03:002016-06-21T15:44:11.180-03:00CDN - CDN é só o que eu preciso para camada de cache?<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Primeiro vamos explicar de maneira resumida o que é CDN. CDN, que é a sigla abreviada de Content Delivery Network, provê uma entrega mais eficiente do conteúdo estático do seu site, isto porque possui uma melhor distribuição geográfica para o usuário que requisita tal conteúdo e faz a entrega baseada na geo-localização do requisitante. Isto praticamente elimina o "delay" geográfico para acesso aos dados. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<b id="docs-internal-guid-f3bbdf96-73e8-e4dc-4d4f-29712e98e78f" style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Sua primeira pergunta deve ser: mas eu preciso disto? Isto variará com o público alvo, se o público que queres atingir é concentrado em uma só região, exemplo, tens uma empresa que atende somente o mercado do Rio Grande do Sul e não tem uma prospecção de crescimento geográfica, CDN não será efetiva em sua plenitude, pois agregará somente como uma camada de cache, e mantê-la para essa finalidade exclusiva torna-se caro e pode ser realizado com outras técnicas que mencionaremos abaixo. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">A próxima pergunta será: a CDN resolve meu problema geográfico? Sim em termos de cache de conteúdo. Somente a CDN resolve meu problema de performance quando tenho um fluxo grande de requisições? Não. Para tal existem técnicas de crescimento de frontend, backend para ganho de vazão, mas o que abordaremos aqui é a técnica de cache, que permite atender uma demanda maior sem a necessidade de aumento proporcional do backend e frontend.</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Quando cito frontend, compreende-se a camada de middleware e não meio-físico, roteadores, balanceadores de carga e etc, mas sim webservers, portais modulares que são os primeiros a receber a demanda, às vezes devolvendo a resposta, outrora distribuindo para servidores de aplicação, integradores e webservices, que aqui são tratados de backends. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Independente do uso de CDN, quando a proporção de acesso aumenta faz-se cada vez mais necessário o uso de cache local, ou seja, a implementação de uma camada antes dos webservers que receberão as requisições, repassarão as mesmas para os webservers, mas já entregarão ao usuário objetos, imagens e outros que constam em sua memória, dando ao usuário a percepção de agilidade no acesso. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Tal camada será efetiva quando o índice de acertos (hitratio) do cache for elevado, para tal, deve ficar claro que temos dois métodos de uso: </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> 1 - regras locais: onde a administração da configuração do que será armazenado, ou não, no cache e por quanto tempo é responsabilidade da solução de cache ou webserver. Então regras, ainda que constem no cabeçalho (header) do objeto serão sobrescritas.</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">if(req.url ~ "^/search/forum_search_results") {</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> set beresp.http.Cache-Control = "max-age=15";</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> set beresp.ttl = 15s;</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> set beresp.grace = 15s;</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> }</span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> 2 - regras do objeto (HTML, JSP e etc): as configurações de persistência, e do que será armazenado em cache, será realizado no próprio objeto. Um exemplo: </span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">//set headers to NOT cache a page</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">header("Cache-Control: no-cache, must-revalidate"); //HTTP 1.1</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">header("Pragma: no-cache"); //HTTP 1.0</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past</span></div>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">//or, if you DO want a file to cache, use:</span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">header("Cache-Control: max-age=2592000"); //30days (60sec * 60min * 24hours * 30days)</span></div>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 10.666666666666666px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">?></span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Quais os headers de cache comuns? </span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">cache-control</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Este é o header que faz o controle de cache, para obter informações de controle de um objeto procure por essa palavra-chave. </span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">private ou public</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Este parâmetro do header ‘cache-control’ permite aos caches intermediários saberem se devem ou não realizar cache de um objeto, não está relacionado à segurança ou a algum conteúdo que não pode ser visto. </span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">no-cache</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Esse parâmetro faz com que o objeto alvo sempre seja revalidado, na prática essa tag diz: não faz cache de mim. </span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">no-store</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">O parâmetro normalmente é seguido do ‘no-cache’, ele informa a sua solução de cache ou navegador que não se deve armazenar parte dele, no caso, o objeto. </span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">max-age</span></div>
<div dir="ltr" style="margin-left: 0pt;">
<table style="border-collapse: collapse; border: none; width: 602px;"><colgroup><col width="*"></col></colgroup><tbody>
<tr style="height: 0px;"><td style="border-bottom: solid #000000 1px; border-left: solid #000000 1px; border-right: solid #000000 1px; border-top: solid #000000 1px; padding: 7px 7px 7px 7px; vertical-align: top;"><div dir="ltr" style="line-height: 1.2; margin-bottom: 0pt; margin-top: 0pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Ai está a configuração de idade do cache, ou seja, quanto tempo ele deverá expirar. Este valor varia de acordo com o tipo de conteúdo. </span></div>
</td></tr>
</tbody></table>
</div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Aos mais usados... </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Com relação a CDNs temos alguns fornecedores importantes como Amazon, Microsoft e Akamai. Cada fornecedor possui seus pontos fortes e fracos, entretanto a Amazon é superior no quesito de maturidade e quantidade de oferta de produtos para nuvem. O site dos comparativos podem ser acessados nas referências desta publicação. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Já quanto ao cache local podemos citar Varnish, Nginx e Traffic Server. O Varnish apesar de ser uma solução de cache com possibilidade extensa de configurações, o que é importante para ajustes específicos em determinados ambientes, perde muito com a falta de suporte ao SSL, e abre caminho ao Nginx em função de sua agilidade em respostas com baixo consumo de recursos.</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-left: 36pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Vamos aos erros... </span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Erros comuns relacionados a cache são falhas de expressões regulares, a não inclusão de controle de cache em objetos estáticos, ou a inclusão de controle incorreto de cache em conteúdo dinâmico, o que gera problema para os usuários de renovação de objetos e por consequência falha no acesso da página. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"> </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">O tema é complexo e certamente podemos estendê-lo mais, entretanto por hora cabe-nos mencionar que a junção das duas camadas de cache mencionada nesta publicação pode ser interessante e performática, por outro lado, devemos estar atentos à complexidade da junção delas para não transformar algo benéfico em um pesadelo técnico e de gestão de configuração. </span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><br /></span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify;">
<span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;"><span class="Apple-tab-span" style="white-space: pre;"> </span></span><span style="background-color: transparent; color: black; font-family: "times new roman"; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;">Referências</span></div>
<b style="font-weight: normal;"><br /></b>
<br />
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="https://www.varnish-cache.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.varnish-cache.org</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="https://www.nginx.com/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.nginx.com</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="http://trafficserver.apache.org/" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://trafficserver.apache.org</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="https://www.akamai.com/us/en/solutions/products/network-operator" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.akamai.com/us/en/solutions/products/network-operator</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="https://aws.amazon.com/pt/cloudfront" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://aws.amazon.com/pt/cloudfront</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="https://azure.microsoft.com/pt-br/services/cdn" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://azure.microsoft.com/pt-br/services/cdn</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="https://www.bizety.com/2016/01/07/nginx-vs-varnish-vs-apache-traffic-server-high-level-comparison" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.bizety.com/2016/01/07/nginx-vs-varnish-vs-apache-traffic-server-high-level-comparison</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="http://www.computerworlduk.com/it-vendors/microsoft-azure-vs-amazon-aws-public-cloud-comparison-which-cloud-is-best-for-enterprise-3624848" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">http://www.computerworlduk.com/it-vendors/microsoft-azure-vs-amazon-aws-public-cloud-comparison-which-cloud-is-best-for-enterprise-3624848</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<a href="https://www.maxcdn.com/blog/cdn-framework-step-2" style="text-decoration: none;"><span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.333333333333332px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;">https://www.maxcdn.com/blog/cdn-framework-step-2</span></a></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<span style="background-color: transparent; color: #1155cc; font-family: "times new roman"; font-size: 13.3333px; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: underline; vertical-align: baseline; white-space: pre-wrap;"><a href="http://dev.mobify.com/blog/beginners-guide-to-http-cache-headers" style="text-decoration: none;">http://dev.mobify.com/blog/beginners-guide-to-http-cache-headers</a></span></div>
<div dir="ltr" style="line-height: 2.4; margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<b><br /></b></div>
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-align: justify; text-indent: 36pt;">
<div dir="ltr" style="margin-bottom: 0pt; margin-top: 0pt; text-indent: 0px;">
<span style="font-family: "times new roman";"><span style="line-height: 38.4px; white-space: pre;"><b>Versão também publicada em : </b></span></span><a href="http://dev.mobify.com/blog/beginners-guide-to-http-cache-headers" style="font-family: "times new roman"; font-size: 13.3333px; line-height: 31.9999px; text-decoration: none; text-indent: 36pt; white-space: pre-wrap;">http://ilegra.com/beyonddata/</a></div>
</div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com1tag:blogger.com,1999:blog-7506291426828755339.post-22364434205117664602016-04-01T11:28:00.004-03:002016-04-01T11:28:40.285-03:00OWM ou Java Keystore - Renovando certificado SSL<div style="text-align: justify;">
<b><span style="font-family: Arial, Helvetica, sans-serif;">SINTOMA</span></b></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>O certificado está próximo de expirar e é necessário enviar uma nova requisição(CSR) para o órgão responsável pela confiabilidade do mesmo.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<b><span style="font-family: Arial, Helvetica, sans-serif;">PROBLEMA</span></b></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>As soluções abaixo abordam duas formas de gestão de certificado, sendo uma a padrão do Java(JKS), um keystore para armazenamento das primary keys e trustedcas, e outra a gestão pelo OWM(Oracle Wallet Manager). </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<b><span style="font-family: Arial, Helvetica, sans-serif;">SOLUÇÃO</span></b></div>
<div style="text-align: justify;">
<span class="Apple-tab-span" style="white-space: pre;"><span style="font-family: Arial, Helvetica, sans-serif;"> </span></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span><u><b>Gerando um novo CSR</b></u></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>OWM: Abra o OWM, após abra o wallet alvo da aplicação que o utiliza(Apache, IIS, OHS, JEEcontaires) e vá na guia de operação e lá clique em 'Request CSR'. Feito isto preencha os dados pertinentes para entidade e finalize o processo. Aparecerá um novo certificado em sua relação com a informação de 'certified requested'. Então é a hora de pegar o conteúdo apresentado ao clicar neste novo certificado e enviar o conteúdo para o órgão ou cliente enviar o nova public key, um exemplo de CSR abaixo: </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">-----BEGIN CERTIFICATE REQUEST-----</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">MIIDUDCCAjgCAQAwgcsxCzAJBgNVBAYTAkJSMRowGAYDVQQIDBFSaW8gR3JhbmRl</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">IGRvIFN1bDEPMA0GA1UEBwwGQ2Fub2FzMTIwMAYDVQQKDClVbmlmZXJ0aWwgVW5p</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">dmVyc2FsIGRlIEZlcnRpbGl6YW50ZXMgTFREQTELMAkGA1UECwwCVEkxIDAeBgNV</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">BAMMF3BvcnRhbC51bmlmZXJ0aWwuY29tLmJyMSwwKgYJKoZIhvcNAQkBFh1tYXJp</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">c2EuY29zdGFAdW5pqwZmVydGlsLmNvbS5icjCCASIwDQYJKoZIhvcNAQEBBQADggEP</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">ADCCAQoCggEBALVjtxq/9YfEHkoE5QsmWtvwP+19g07cFji+UXO7wy5qwpfr2SGe</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">XdjiTdDigwBzmsVzCM+B/kB00VqQkeey1xeveNIkZ2RbjkgQRHTVrcbDn+M/3WPN</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">nyotfr0yFBYxswvewqeycxfasz745Zbr8TM8GOKaUGgjzu7hjBhnB8p2jDjEQ4aBuEE</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">cHzFS2eo/AtlXVoasdsa dasd asd qCDvXV7KUosmOs/2VnJeThe46cp31NANRI/</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">d0I8n5nNnRVmOnlg2DgmEnswijTtQPKTkEFJgC8gZ+qyFRDrP5KTDi/FR8LyWLrp</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">CXT1nxphPs/dpCQeqweqwcoEHD54mkSsaExY38D7kCAwEAAaA/MBgGCSqGSIb3DQ</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">wq CVqrqr</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">FrjUh/QDrS+GWTNY91xG4BPE/GwOJt6KwkCVjsGs9xebuqI1M5dVaOSTGW0fdmvy</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">F66EryVSckRuni5H7ec17VjwQCdrEoVu5zm6NiHduRZYKL5CioITeJ/p6+IfpnpR</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">eqwewqe/Hh2MjW0o+4ekunY3juQpaem8cqsnOK4YQeC3S1Kl9R</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">1VLM5/6sPn3OHhzaskj2Yi0+8efdsadas 6GHAmBlvmDqfL+/pmk6P91olmwL722</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">TTPRCyV27/s/sf0MqKdq7BTxAzCYJrjDZFpDkmd76MZPyGL1</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">-----END CERTIFICATE REQUEST-----</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="color: red; font-family: Arial, Helvetica, sans-serif;">IMPORTANTE: Salve o wallet após geração do CSR. </span></b></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>JKS: keytool -certreq -alias mydomain -keystore keystore.jks -file mydomain.csr</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">--</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Neste ponto deves fornecer/enviar o CSR para o orgão que reconhecerá como válido o domínio. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">--</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">sleep 86400</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">--</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Receberás do cliente/órgão emissor algo como um arquivo '.crt' ou '.cer' ou simplesmente um código como o abaixo:</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">-----BEGIN CERTIFICATE-----</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">MIIGIjCCBQqgAwIBAgIQeK9MIpw02HcKrZZosnv5NTANBgkqhkiG9w0BAQsFADB+</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQdsadsSAtIEc0MB4XDTE2MDMzMTAwMDA</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">DTE3MDQyMDIzNTk1OVowgaQxCzAJBgNVBAYTAkJSMRowGAYDVQQIExFSaW8gR3Jh</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">bmRlIGRvIFN1bDEPMA0GA1UEBxQGQ0FOT0FTMTIwMAYDVQQKFClVTklGRVJUSUwg</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">VU5JVkVSU0FMIERFIEZFUlRJTElaQU5URVMgTFREQTESMBAGA1UECxQJVW5pZmVy</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">dGlsMSAwHgYDVQQDFBdwb3J0YWwudW5pZmVydGlsdsadLmNvbS5icjCCASIwDQYJ</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">hvcNAQEBBQADggEPADCC+wW9EM4v1O5+oWSD/9nomr3dasJ+nk49SdkxDhp/vqok</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">Z5+GI+eeoPUInkdRKiXXOZ+MBodsaw/3hWnTcbKOmPPn0hRJ/EAWakCAwEAAaOCA</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">ggJvMCIGA1UdEQQbMBmCF3BvcnRhbC51bmlmZXJ0aWwuY29tLmJyMAkGA1UdEwQC</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">AaNBLv1VkpnI2SLe5tFXJfriZsOX5CMrEvdvlbSLd1VTSme+WTjhu8NtE22AEhRQ</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">qaZCqnUZ29E7FXxpKKVit70SqUGZfIYAPNm4Ml0pyrAz8WyAjSemJtY0khxM0MiK</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">DHimjPgwCV4wFZTeB3dKaw9TJmoOJw0MUXIy6D+1QitVk4+MIYcCy3xm7U5GER0m</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">+wW9EM4v1O5+oWSD/9nomr3dasJ+nk49SdkxDhp/vqok6/Xf7O5j20pRhlXQSw9u</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">Z5+GI+eeoPUInkdRKiXXOZ+MBodsaw/3hWnTcbKOmPPn0hRJ/EAWakCAwEAAaOCA</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">ggJvMCIGA1UdEQQbMBmCF3BvcnRhbC51bmlmZXJ0aWwuY29tLmJyMAkGA1UdEwQC</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">MAAwDgYDVR0PAQH/BAasdasJsMGEGA1UdIARaMFgwVgYGZ4EMAQICMEwwIwYIKwY</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">AgEWF2h0dHBzOi8vZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBkMF2h0dHBz</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">Oi8vZC5zeW1jYiasdasda5jb20vcnBhMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrB</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">AjAfBgNVHSMEGDAWgBRfYM9hkFXfhEMUimAqsvV69EMY7zBXBggrBgEFBQcBAQRL</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">MEkwHwYIKwYBBQUHMAGGE2h0dHA6Ly9zcy5zeW1jZC5jb20wJgYIKwYBBQUHMAKG</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">Gmh0dHA6Ly9zcy5zeW1jYi5jb20vc3MuY3J0MIIBAwYKKwYBBAHWeQIEAgSB9ASB</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">8QDvAHUA3esdK3oNT6Ygi4GtgWhwfi6OnQHVXIiNPRHEzbbsvswAAAFTzjm5uQAA</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">BAMARjBEAiBw13s1hnQfKonABcDaZfJ0qST4ImqCf7U69Vo4rQ+zOwIgcYtcXJtw</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">Ei/7WhgSI/TGNsmMeUeGkFsVN3eGx8L64DYAdgCkuQmQtBhYFIe7E6LMZ3AKPDWY</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">BPkb37jjd80OyA3cEAAAAVPOObn3AAAEAwBHMEUCIQDEWv/npRY4UMb0K9f5zinR</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">mVK8smCIL+iHC391/0H4rQIgerQEcEzzhCOKinU5TvEcbubxCdFQwdvddCdNWAAL</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">yM8wDQYJKoZIhvcNAQELBQADggEBAEnAk1TQJR2i51KZkpno43SG0HN9te7djqAt</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">X/Jm6/VjIRSqE6or57/ou5tsIDI4IMmRYdAcHifBeVUFdG69ds5D+yzhTTNMZkKD</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">30FZtgxbp0tWP8wbfq3ZnrMHY7VmVOp/efv3MuhKqH2LPI8SIvHjoKkvDP7MJPbv</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">tZb/b6ssaTgx+GAcNmP3vSwq8CfO8rn6ohHrS8fOXwzmfHQ926owdbPJcRejuRSr</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">VHSBue/RkgaE+mEeb2XBlVjYqxoirNeOiRVsQKUjw7IQs9Op/ipjXsxFeY/g0nTL</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">JuN+sfGVSTPZ0Q4KSEFsUEEAOVk/sypMPvSnt2+23Ct9IB4Tktg=</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">-----END CERTIFICATE-----</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">--</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><u>Importando o novo certificado</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>OWM: Clique com o o botão direito sobre o certificado que está como requested e após clique em 'Import certificate', se arquivo envie o arquivo ao wallet, se em plaintext cole o conteúdo enviado pelo cliente/órgão emissor. Feito isto importe o mesmo certificado como trustedCA abaixo. Remova os certificados antigos e que expiraram ou vão. Reinicie seu webserver/servidor de aplicação.</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>JKS: Se for o caso, transforme o texto recebido em um arquivo .crt;</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">keytool -import -trustcacerts -alias mydomain -file mydomain.crt -keystore keystore.jks</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">keytool -import -trustcacerts -alias root -file Thawte.crt -keystore keystore.jks</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><u>Ajustando o alias ou recriando um JKS utilizando um wallet</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span>Para alguns servidores de aplicação é necessário informar o nome do alias, no caso do wallet isto é obtido automaticamente, logo não se preocupe. Mas para o JKS tenha a atenção de remover os alias do certificado anterior e depois importar os novos. Use a mesma referência ou se tiveres um wallet disponível, use o comando abaixo:</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: left;">
<span style="font-family: Arial, Helvetica, sans-serif;">orapki wallet pkcs12_to_jks -wallet mywallet.p12 -pwd mypwd -jksKeyStoreLoc myidentity.jks -jksKeyStorepwd mypwd -jksTrustStoreLoc mytrust.jks -jksTrustStorepwd mypwd</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Onde temos 3 tipos de senha, do Wallet, do identity do JKS e do trust. Com isso converterá seu wallet em JKS</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">Exclusão de alias no JKS: keytool -delete -alias mydomain -keystore keystore.jks</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span class="Apple-tab-span" style="white-space: pre;"> </span><b><u>Links de apoio</u></b></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">https://www.sslshopper.com/article-most-common-java-keytool-keystore-commands.html</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;">https://docs.oracle.com/cd/E29542_01/core.1111/e10105/wallets.htm</span></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-36582227518929255512015-11-10T12:04:00.000-02:002015-11-10T12:06:21.656-02:00Weblogic - Configurando ORDS para uso do APEX<br />
Bueno, em minhas atividades atuais com Weblogic precisei migrar o uso do APEX de um OHS para o Weblogic.<br />
<br />
______________________________________________________________<br />
<span style="font-size: x-small;">APEX: https://apex.oracle.com/en/</span><br />
<span style="font-size: x-small;">OHS: https://docs.oracle.com/cd/E28280_01/web.1111/e10144/intro_ohs.htm#HSADM101</span><br />
<span style="font-size: x-small;">Weblogic: http://www.oracle.com/br/products/middleware/cloud-app-foundation/weblogic/overview/index.html</span><br />
______________________________________________________________<br />
<br />
<br />
Para tal, é necessário usar o ORDS, que pode ser executado em standalone, Glassfish ou Weblogic, para a postagem corrente falaremos de seu uso no Weblogic.<br />
<br />
<b>Pré-requisitos</b><br />
______________________________________________________________<br />
<span style="font-size: x-small;">- WLS instalado</span><br />
<span style="font-size: x-small;">- JDK instalado e JAVA_HOME configurado</span><br />
______________________________________________________________<br />
<div>
<br /></div>
<div>
<b>Premissas</b><br />
______________________________________________________________<br />
<span style="font-size: x-small;">- HTTPS não será abordado;</span><br />
<span style="font-size: x-small;">- Instalação do APEX na database Oracle não será abordada;</span><br />
<span style="font-size: x-small;">- Comandos de configuração do WLST não serão foco do post.</span><br />
______________________________________________________________</div>
<br />
<br />
Primeiramente baixe o ORDS no site da Oracle:<br />
______________________________________________________________<br />
<span style="font-size: x-small;">http://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/index.html</span><br />
______________________________________________________________<br />
<div>
<br /></div>
Após o download extraia o pacote e visualizará um pacote 'ords.war', é esse pacote que utilizarás no Weblogic.<br />
<br />
Antes de nos preocuparmos com este WAR precisaremos criar um novo war com o conteúdo estático de imagens para o APEX, eles podem ser localizados no OHS, possívelmente em '/apex/images'.<br />
<br />
Faça a cópia de todo o conteúdo dessa pasta, pois precisaremos compactá-las em um WAR e implantar no Weblogic, utilize para tal o seguinte comando:<br />
______________________________________________________________<br />
<span style="font-size: x-small;">java -jar ords.war static <apex directory="">\images</apex></span><br />
______________________________________________________________<br />
<br />
Esse comando gerará o arquivo 'i.war', o qual tu farás a implantação no Weblogic com custom security roles(Custom Roles: Use roles that are defined in the Administration Console; use policies that are defined in the deployment descriptor).<br />
<br />
Bem, já temos as imagens, nos falta configurar no ORDS a database que tem o APEX instalado(a instalação do APEX na database Oracle não é o objetivo desta postagem), bem como criar um cluster no Weblogic que serão os alvos da aplicação do ORDS.<br />
<br />
Realize a criação de um cluster, pode ser via WLST ou Admin-Server do DAS, e garanta que exista ao menos um managed-server neste cluster, pode ser localizado no nodemanager do mesmo servidor que possui o DAS, sem problemas.<br />
<br />
Feito isto vamos configurar o ORDS, então para tal utilize o comando abaixo:<br />
<br />
______________________________________________________________<br />
<span style="font-size: x-small;">java -jar ords.war install simple</span><br />
______________________________________________________________<br />
<br />
Aqui precisará das seguintes informações:<br />
<br />
Host da database onde o APEX foi instalado;<br />
Porta da database onde o APEX foi instalado;<br />
Usuário e senha de um usuário com grant de sysdba para instalação do usuário do ORDS;<br />
Usuário e senha do usuário do APEX_PUBLIC_USER e demais usuários relacionados ao APEX;<br />
Especificar um caminho de configuração dos parâmetros de configuração do ORDS, aqui é ideal utilizar uma pasta dentro do $MIDDLEWARE_HOME;<br />
<br />
Caso ocorra um erro de sintaxe na instalação do ORDS, usando um WinRAR ou extrair o 'ords.war' e edite o arquivo 'ords_create_rest_users.sql' e altere deixando como abaixo:<br />
______________________________________________________________<br />
<span style="font-size: x-small;">create user ORDS_PUBLIC_USER identified by $minhasenha account unlock default tablespace ^PUB_DATATBS temporary tablespace ^PUB_TEMPTBS;</span><br />
______________________________________________________________<br />
<br />
Onde $minhasenha é a senha que definiu na instalação.<br />
<br />
Feito isto, execute a desinstalação do ORDS e execute a instalação novamente.<br />
______________________________________________________________<br />
<span style="font-size: x-small;">java -jar ords.war uninstall</span><br />
<span style="font-size: x-small;">java -jar ords.war install simple</span><br />
______________________________________________________________<br />
<br />
Bueno, estamos pendente apenas com o deploy(implantação) pendente no WLS. Execute deixando como target(alvo) o cluster que criaste. Utilize também custom rules para security no processo de deploy. E se fez tudo corretamente o APEX estará disponível no endereço abaixo:<br />
<br />
______________________________________________________________<br />
<span style="font-size: x-small;">http://localhost:9003/ords </span><br />
<span style="font-size: x-small;"><br /></span>
<span style="font-size: x-small;">Onde localhost é o IP do(s) managedserver(s) que configuraste no cluster, e 9003 é a porta que o managedserver escuta. </span><br />
______________________________________________________________<br />
<br />
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-44223811208225680012015-08-26T10:02:00.001-03:002015-09-03T13:31:39.733-03:00MySQL - Backup full e incremental com innobackupex<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Em um dos últimos projetos em que atuei precisei configurar uma rotina de backup no MySQL. Com isto veio a necessidade do uso do 'innobackupex', pois o mesmo me possibilitaria gerar backups completos e incrementais, sejam eles compactados ou não, sem downtime da instância de 1TB.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Depois de ler diversos materiais relacionados a execução de backup remoto ou local, cheguei aos comandos abaixo, bem como as conclusões que seguem: </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
</div>
<ol>
<li>O backup incremental não foi de fato efetivo, pois a redução de armazenamento foi de 50% por backup com relação ao backup completo;</li>
<li>A compactação durante a execução mostrou-se eficaz no sentido de espaço em disco, entretanto péssima para o tempo de execução do backup, pois o uso do 'gzip' fez com que a opção de multi-thread parasse e a compressão ficasse em um só core do processador;</li>
<li>O comando de extração xbstream, quando utilizada a compressão de stream não funcionou, precisando do outro lado no servidor de destino utilizar ele diretório por diretório;</li>
<li>Tar sem compressão foi a solução mais aderente. </li>
</ol>
<br />
<div style="text-align: justify;">
Comandos utilizados:<br />
<br />
Backup FULL:<br />
<br />
<span style="font-family: Arial; font-size: 14.6666666666667px; white-space: pre-wrap;">innobackupex --stream=tar /tmp | cat - > </span><span style="font-family: Arial; font-size: 14.6666669845581px; white-space: pre-wrap;">/disk2/backup-dir/full-base-backup/</span><span style="font-family: Arial; font-size: 14.6666666666667px; white-space: pre-wrap;">backup.tar</span><br />
<span style="font-family: Arial; font-size: 14.6666666666667px; white-space: pre-wrap;"><br /></span>
<span style="font-family: Arial; font-size: 14.6666666666667px; white-space: pre-wrap;">Aplicando os binlogs em caso de restore(para abrir a instância): </span><br />
<span style="font-family: Arial; font-size: 14.6666666666667px; white-space: pre-wrap;"><br /></span>
<span id="docs-internal-guid-72ca3a42-6a11-1bb1-3fbe-1ba79e9d4b09"><span style="font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;"> cd /data/mysql ; tar xvfi /mnt/backup.tar ; innobackupex --apply-log /data/mysql</span></span><br />
<span style="font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;">Script de backup: </span><br />
<span style="font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">#!/bin/bash</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"># Full backup mysql percona</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"># Developped by:</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"># Gabriel Prestes - helkmut@gmail.com</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"># Last update:</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"># 2015-08-21</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">#</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">## DEFAULT SETTINGS ###########################################</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">BACKUP_DESTINATION='/disk2/backup-dir/full-base-backup'</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">HOST_NAME="teste.athore.org"</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">DAYS=3</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">source /etc/profile</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">## STOP EDITING HERE ###########################################</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">function remove() {</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> log_this "Removing older than ${DAYS_TO_KEEP}"</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> find ${BACKUP_DESTINATION}/* -type f -name "${HOST_NAME}*" -mtime +${DAYS_TO_KEEP} | xargs ls -lha
find ${BACKUP_DESTINATION}/* -type f -name "${HOST_NAME}*" -mtime +${DAYS_TO_KEEP} | xargs rm -fv</span></span><br />
<div>
<br /></div>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">}</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">function log() {</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> echo $(date "+[ %d-%m-%Y %H:%M:%S ]:") "${1}"</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">}</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">function start() {</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> log "Starting backup job..."</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> innobackupex --stream=tar /tmp | cat - > ${BACKUP_DESTINATION}/${HOST_NAME}-$(date "+%d-%m-%Y_%H-%M-%S").tar</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> flag=$?</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> if [ ${flag} -eq 0 ]; then</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> echo "0" > /opt/resources/backup/percona-mysql-backup-agent.mon</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> else</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> echo "1" > /opt/resources/backup/percona-mysql-backup-agent.mon</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> fi</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> remove</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"> log "Job fished."</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">}</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;"><br /></span></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">start</span></span><br />
<span style="font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;">Crontab:</span><br />
<span style="font-family: Arial; font-size: 14.6666666666667px; vertical-align: baseline; white-space: pre-wrap;"><br /></span>
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">## Backup full daily Percona - MySQL</span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; vertical-align: baseline; white-space: pre-wrap;"></span></span><br />
<span style="font-family: Arial;"><span style="font-size: 14.6666669845581px; white-space: pre-wrap;">00 12 * /opt/resources/backup/percona-mysql-backup-agent.sh > /opt/resources/backup/percona-mysql-backup-agent.out 2>&1</span></span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
</div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-37425373446282339522015-05-27T12:27:00.000-03:002015-05-27T12:27:03.196-03:00Puppet - Exportando site.pp para CouchDB<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> Quando estamos no caminho da automação de processos e garantia de estado uma das ferramentas poderosas e nossa aliada é o Puppet. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> Quanto mais se conhece de Puppet, mais quer integrá-lo ao CouchDB para que o mesmo responda de forma inteligente consultas no formato JSON via Hiera. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> O que essa publicação de propõe é a facilitar, apoiando-o na migração do site.pp dos seus ambientes, hoje com todas informações de classes, includes e tasks carregadas dos agents no site.pp e que serão exportadas para o CouchDB. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> Segue abaixo a explicação de uso de um programa que criei para automatizar o processo de exportação. Ele já faz a análise se o agent existe no CouchDB, caso exista o mesmo ignora, do contrário, exporta para a base. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> Repositório GIT do programa: <a href="https://github.com/helkmut/couchdb-populate" style="background-color: white; color: #1155cc; font-size: 12.8000001907349px;" target="_blank">https://github.com/helkmut/<wbr></wbr><span class="il">couchdb</span>-populate</a></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="background-color: white;">
<div>
<div>
<div style="color: #222222; font-size: 12.8000001907349px; text-align: justify;">
<b style="font-family: Arial, Helvetica, sans-serif; font-size: 12.8000001907349px;"> Exemplo de execução: </b></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><div style="text-align: justify;">
<span style="color: #222222; font-size: 12.8000001907349px;"><br /></span></div>
<span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">[root@Teste-</span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> rb-</span><span class="il" style="font-size: 12.8000001907349px;">couchdb</span><span style="font-size: 12.8000001907349px;">-populate]# ./bin/rb-</span><span class="il" style="font-size: 12.8000001907349px;">couchdb</span><span style="font-size: 12.8000001907349px;">-populate.rb</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Starting agent Current Time : 2015-02-04 23:41:22 -0200 |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Test database connection > configuration |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Connection PASS |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Directory /etc/puppet exist |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Parse file /etc/puppet/environments/prd/</span><wbr></wbr><span style="font-size: 12.8000001907349px;">manifests/site.pp |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://azera.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">1.teste.com.br</a><span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://biscayne.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">2.teste.com.br</a><span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">3.teste.com.br</a><span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://chevelle.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">4.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://kapitan.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">5.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://karmanghia.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">6.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://shiraz.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">7.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://tannat.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">8.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://tucson.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">9.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://zeo.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">10.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://panamera.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">11.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://scaglietti.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">12.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://altis.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">13.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://newfocus.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">14.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://venom.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">15.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://poseidon.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">16.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://cadillac.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">17.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://chrysler.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">18.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://seville.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">19.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://dauphine.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">20.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Parse file /etc/puppet/environments/dev/</span><wbr></wbr><span style="font-size: 12.8000001907349px;">manifests/site.pp |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Node </span><a href="http://satiro.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">21.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> already exists in </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://pantera.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">22.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://huayra.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">23.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://laguna.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">24.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Node </span><a href="http://shun.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">25.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> already exists in </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Node </span><a href="http://tetris.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">26.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> already exists in </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://cutlass.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">27.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Node vagrant-teste.local already exists in </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Parse file /etc/puppet/environments/hlg/</span><wbr></wbr><span style="font-size: 12.8000001907349px;">manifests/site.pp |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://fulwin.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">28.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://freemont.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">29.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://hercules.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">30.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Node </span><a href="http://percy.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">31.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> already exists in </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://eva.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">32.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://compass.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">33.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| Import node </span><a href="http://skylark.rbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">34.</a><a href="http://carnival.clicrbs.com.br/" style="color: #1155cc; font-size: 12.8000001907349px;" target="_blank">teste</a>.com.br<span style="font-size: 12.8000001907349px;"> to </span><span class="il" style="font-size: 12.8000001907349px;">CouchDB</span><span style="font-size: 12.8000001907349px;"> |</span></div>
</span><span style="color: #222222; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">| OK - Program end with success |</span></div>
</span><div style="text-align: justify;">
<br /></div>
</span></div>
<span style="font-family: Arial, Helvetica, sans-serif;"><div style="color: #222222; font-size: 12.8000001907349px; text-align: justify;">
<span style="font-size: 12.8000001907349px;"> O que o programa não contempla: </span></div>
<div style="text-align: justify;">
<span style="color: #222222; font-size: 12.8000001907349px;"><br /></span></div>
</span></div>
<span style="color: #222222; font-family: Arial, Helvetica, sans-serif; font-size: 12.8000001907349px;"><div style="text-align: justify;">
<span style="font-size: 12.8000001907349px;">1 - se o Document existir ele não atualiza os fields;</span></div>
</span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><span style="background-color: white; color: #222222; font-size: 12.8000001907349px;">2 - ainda não está fazendo parse das 'tasks', mas faz de chamadas 'includes' e 'classes'. </span></span></div>
<div style="background-color: white; color: #222222; font-size: 12.8000001907349px;">
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"> Sugiro testar em um laboratório com uma Vagrant de CounchDB, hiera e Puppet Master. Naturamente que isto não se aplica a versão Enterprise do Puppet, que já não faz o gerenciamento dos agents por site.pp. </span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
<div style="text-align: justify;">
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span></div>
</div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-14498294780617907162014-12-04T13:28:00.001-02:002014-12-04T13:29:25.937-02:00MySQL - SQL thread is not running?<div>
<br /></div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Imagine o seguinte cenário, você tem um MySQL master e um slave configurado com replicação assíncrona. Por alguma razão você descobre através da consulta de status do slave que o SQL thread parou de funcionar, mas o IO thread continua em execução buscando logs do master. </div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>COMO IDENTIFICAR A CAUSA DO PROBLEMA? </div>
<div>
<br /></div>
<div>
- Verifique o log de erro do MySQL, lá constará o código de erro gerado durante o processo de replicação, seja ela por row ou statement, e este código já lhe ajudará a buscar soluções na documentação. </div>
<div>
<br /></div>
<div>
- No mesmo log você poderá verificar qual a posição e binlog do master em que ocorreu o erro, isso será muito útil no futuro. </div>
<div>
<br /></div>
<div>
Consideraremos aqui neste exemplo que o erro foi causado por um SQL que violou uma CONSTRAINT de PK ou FK.</div>
<div>
<br /></div>
<div>
O ERRO É DE VIOLAÇÃO E AGORA? </div>
<div>
<br /></div>
<div>
1 - Primeiramente utilizando o mysqlbinlog acesse o log binário do master indicado no erro do MySQL do slave e com o -j informe a posição;</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>2 - Ao identificar o STATEMENT ou ROW que foi executado/alterada você poderá acessar o MySQL master e comparar os dados da tabela alvo com a do slave;</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>3 - Aqui é certo que você identificará diferenças de integridade entre as tabelas, pois lembre que o slave está atrasado com relação ao master;</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>4 - Pule uma posição no log do master no slave: </div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>CHANGE MASTER TO MASTER_LOG_FILE = '$master_log_name' MASTER_LOG_POS = $master_log_pos+1; </div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Viu agora o porquê da importância da posição do log lido no master? Onde $master_log_name e $master_log_pos podem ser obtidos ao consultar o status do slave</div>
<div>
<br /></div>
<div>
5 - Feito isto ative o slave novamente:</div>
<div>
</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>START SLAVE;</div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Se nenhum outro erro ocorreu após o slave se atualizar em relação ao master(veja no status do slave) então é hora de verificar como ficaram os dados da tabela que apresentou o erro. COMO? </div>
<div>
<br /></div>
<div>
Se seu slave não tem delay setado e o fluxo de alterações e inserções da tabela não é constante podes realizar a validação por MD5SUM. COMO? </div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>mysql > \P md5sum </div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>mysql > select * from tabela_alvo; (não faça isso em tabelas gigantes!)</div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>O resultado no master e slave devem ser o mesmo valor de md5. Para normalizar o client basta executar \P. </div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span>Bom, se ainda assim tem diferenças na tabela alvo, considere ajustar os dados dela via dump com a function slave parada, ou ressincronizar o slave. </div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<br /></div>
<div>
<span class="Apple-tab-span" style="white-space: pre;"> </span></div>
<div>
<br /></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-25552146688492244342014-08-13T15:51:00.001-03:002014-08-13T16:01:05.986-03:00PostgreSQL - Acompanhando SQL via log<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Ei você! Sim, você que precisa acompanhar DML/DDL/DCL via log, mas não sabe como, ai vai uma dica para acompanhar o mesmo via log em tempo real(depois que já executou, evidente): </span><br />
<br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" />
<br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" />
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">1 - logado por SSH no banco alvo execute :</span><br />
<br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" />
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">watch -n 10 'tail -n 1500 /var/log/pgsql.log | grep -i -A 1 "MEU SQL"'</span><br />
<br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" />
<span style="background-color: white;"><span style="color: #404040; font-family: Roboto, arial, sans-serif; font-size: x-small;"><span style="line-height: 18.200000762939453px;">Em resumo de 10 em 10 segundos você ficará visualizando os SQLs, e caso seja um UPDATE/DELETE que os parâmetros sejam vistos somente na próxima linha será apresentado. </span></span></span><br />
<br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" />
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">Requisitos: </span><br />
<br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" />
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">1 - Cluster PGSQL com log configurado para o syslog/rsyslog;</span><br />
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">2 - Log ser o pgsql.log no '/var/log';</span><br />
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">3 - Ser Linux; </span><br />
<span style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;">4 - Log configurado para logar tudo ou pelo menos SQL por duration. </span><br />
<br style="background-color: white; color: #404040; font-family: Roboto, arial, sans-serif; font-size: 13px; line-height: 18.200000762939453px;" />Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-68377216841858044772014-05-08T10:17:00.001-03:002014-05-08T10:17:10.351-03:00Oracle - ORA-01017 usando JDBCERRO:<br />
<span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;"><br /></span>
<span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">root@appserver:/opt/</span><wbr style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"></wbr><span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">resources/oracletest/jdbctool-</span><wbr style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"></wbr><span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">1.0/bin# CLASSPATH=/opt/resources/</span><wbr style="color: #222222; font-family: arial, sans-serif; font-size: 13px;"></wbr><span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">oracletest/ojdbc5.jar ./jdbctool -u teste -p</span><span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;"> </span><span style="background-color: #ffffcc; color: #222222; font-family: arial, sans-serif; font-size: 13px;">meuteste</span><span style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;"> </span><a href="http://jdbc:oracle%3Athin%3A@10.203.18.164:1521/DB_PORTALDERESULTADOHML" style="color: #1155cc; font-family: arial, sans-serif; font-size: 13px;" target="_blank">jdbc:oracle:thin:@10.0.1.<wbr></wbr>16:1521/DB_MYAPP</a><br />
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">
<br /></div>
<div style="background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 13px;">
Unable to connect to database: java.sql.SQLException: ORA-01017: invalid username/password; logon denied</div>
<br />
<br />
SINTOMA: Ao integrar uma aplicação em um servidor de aplicação Java onde a comunicação seja estabelecida via JDBC ainda que usuário e senha estejam corretos e você consiga conectar através do SQLPlus o erro gerado no servidor de aplicação será o item mencionado no ERRO.<br />
<br />
<br />
SOLUÇÃO: Existem duas formas de solucionar este erro, uma é atualizar seu JDBC para o ojdbc mais atual, outra é executar o comando abaixo como sys ou system na base alvo:<br />
<br />
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE; <br />
<br />
<br />
JUSTIFICATIVA: Por padrão o Oracle11g ou superior vem configurado para senhas case_sensitive e o ojdbc5(baseado em client 10g) ou inferior enviam as senhas em maiúsculo, logo o erro e a solução de ou atualizar o ojdbc6(baseado em client 11g) ou a desativação do recurso.<br />
<br />
SUGESTÃO: Atualizar o driver JDBC.Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0tag:blogger.com,1999:blog-7506291426828755339.post-14070279761953186672014-02-26T17:22:00.002-03:002014-02-26T17:22:27.713-03:00PostgreSQL - Problemas com o pg_repack<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Este post é complemento do post referente ao pg_repack(http://helkmut.blogspot.com.br/2013/11/postgresql-pgrepack.html), onde cito um ponto crítico do repack onde não é viável o rollback. </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Um exemplo é caso sua base tenha um crash durante o repack de uma tabela ou por razão desconhecida você tem a conexão do próprio repack terminada. O que acontece nesta situação com sua tabela? </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
A tabela original possuirá uma trigger enviando todos DMLs para uma tabela temporária de log no schema 'repack' da mesma base de dados, a mesma existirá, pois o processo não foi concluído e a tabela antiga de origem não foi excluída. Assim como existirão os dados da tabela antiga(com outro nome) no schema 'repack' quando o repack foi iniciado. </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Então o que fazer? </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
O primeiro de tudo é isolar a base de dados, fazer uma análise de dados rápida da tabela do schema de origem e a do schema alvo(repack), caso tenhas diferença entre elas significa que podes somente aplicar a tabela de log(DMLs commitados do início do processo até a falha), remover a trigger da tabela de origem, realizar backup das 3 tabelas envolvidas e liberar a base. </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Não sendo possível isolar a base de dados para a correção deves remover a trigger da tabela de origem deixando que novos DMLs sejam computados na mesma e não mais na tabela de log e avaliar um método de aplicação dos dados da tabela de log na tabela de origem. </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
Para um novo repack deverás remover as duas tabelas do schema repack da base de dados alvo. </div>
<div style="text-align: left;">
</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
Gabriel Presteshttp://www.blogger.com/profile/03422923557604239727noreply@blogger.com0