Fazendo Deploy pacote nativo - pag 182-183

51 views
Skip to first unread message

Leandro Marinho

unread,
Sep 28, 2016, 7:48:31 AM9/28/16
to Livro "Devops na Prática"
Bom dia.
Estou com problema agora no deploy com acesso ao repositório. Destrui a maq web e após subir novamente da a seguinte mensagem:

leandro-sony modules # vagrant provision web
==> web: Installing Puppet modules in "librarian" with Librarian-Puppet...
==> web: Running provisioner: puppet...
==> web: Running Puppet with web.pp...
==> web: stdin: is not a tty
==> web: Could not retrieve java_default_home: undefined method `strip' for nil:NilClass
==> web: Could not retrieve java_default_home: undefined method `strip' for nil:NilClass
==> web: notice: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/Apt::Key[Add key: 63462B1B from Apt::Source devopsnapratica]/Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b]/returns: gpg: no valid OpenPGP data found.
==> web: err: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/Apt::Key[Add key: 63462B1B from Apt::Source devopsnapratica]/Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b]/returns: change from notrun to 0 failed: wget -q 'http://192.168.33.16/devopskgs.gpg' -O- | apt-key add - returned 2 instead of one of [0] at /tmp/vagrant-puppet/modules-27c2541554ac491f887a3dd993ba5a1f/apt/manifests/key.pp:64

==> web: notice: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/Apt::Key[Add key: 63462B1B from Apt::Source devopsnapratica]/Anchor[apt::key 63462B1B present]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/Apt::Key[Add key: 63462B1B from Apt::Source devopsnapratica]/Anchor[apt::key 63462B1B present]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/Apt::Key[Add key: 63462B1B from Apt::Source devopsnapratica]/Anchor[apt::key/Add key: 63462B1B from Apt::Source devopsnapratica]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/Apt::Key[Add key: 63462B1B from Apt::Source devopsnapratica]/Anchor[apt::key/Add key: 63462B1B from Apt::Source devopsnapratica]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/File[devopsnapratica.list]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/File[devopsnapratica.list]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Apt::Update/Exec[apt_update]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Apt::Update/Exec[apt_update]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/Anchor[apt::source::devopsnapratica]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Loja_virtual::Web/Apt::Source[devopsnapratica]/Anchor[apt::source::devopsnapratica]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Apt/Anchor[apt::update]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Apt/Anchor[apt::update]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Mysql::Client/Package[mysql-client]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Mysql::Client/Package[mysql-client]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Tomcat::Server/Package[tomcat7]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Tomcat::Server/Package[tomcat7]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Tomcat::Server/File[/var/lib/tomcat7/conf/context.xml]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Tomcat::Server/File[/var/lib/tomcat7/conf/context.xml]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Tomcat::Server/File[/var/lib/tomcat7/conf/server.xml]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Tomcat::Server/File[/var/lib/tomcat7/conf/server.xml]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Tomcat::Server/File[/etc/default/tomcat7]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Tomcat::Server/File[/etc/default/tomcat7]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Loja_virtual::Web/Package[devopsnapratica]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Loja_virtual::Web/Package[devopsnapratica]: Skipping because of failed dependencies
==> web: notice: /Stage[main]/Tomcat::Server/Service[tomcat7]: Dependency Exec[299666ae006bd3fb963d3c60a980e93a19cb9d3b] has failures: true
==> web: warning: /Stage[main]/Tomcat::Server/Service[tomcat7]: Skipping because of failed dependencies
==> web: notice: Finished catalog run in 4.76 seconds

Acrescento a informação de que o FPM não esta instalando via puppet, pois este esta requerindo o ruby com versão maior ( tópico este aberto e sem resposta aqui -> https://groups.google.com/forum/#!topic/livro-devops-na-pratica/6fLpb0CaJeI),
o que conternei de forma manual.

Alguem sabe sobre o que o erro trata ?

alandr...@gmail.com

unread,
Feb 10, 2017, 7:15:50 PM2/10/17
to Livro "Devops na Prática"

Leandro, vi que voce consegui contornar o problema da instalação do fpm via puppet, manualmente.

Eu tentei fazer a instalação assim:

gem install --ignore-dependencies  fpm

Instalado com sucesso. 

Porem ao rodar o build, no jenkins, e este ao executar o Script para fpm, aparece o erro: 

channel stopped 
[workspace] $ /bin/sh -xe /tmp/hudson4896210677898911031.sh 
+ fpm -s dir -t deb -C combined/target --prefix /var/lib/tomcat7/webapps/ -d tomcat7 -n devopsnapratica -v 1.master -a noarch devopsnapratica.war 
/tmp/hudson4896210677898911031.sh: 2: /tmp/hudson4896210677898911031.sh: fpm: not found 
Build step 'Execute shell' marked build as failure 
Archiving artifacts 
Finished: FAILURE 

Como voce fez a instalação do fpm? poderia descrever em detalhes?

Ate tentei atualizar a versão do ruby, devido a erro:


==> ci:         ruby-xz requires Ruby version >= 1.9.3. 

De:

root@precise32:/var/lib/jenkins/secrets# ruby -v 
ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux] 
root@precise32:/var/lib/jenkins/secrets# 

Para:

root@precise32:~# ruby -v 
ruby 1.9.3p551 (2014-11-13 revision 48407) [i686-linux] 
root@precise32:~# 

E reprovisionar a ci, mas não deu certo:

C:\Users\alex>vagrant provision ci 
==> ci: Installing Puppet modules in "librarian" with Librarian-Puppet... 
==> ci: Running provisioner: puppet... 
==> ci: Running Puppet with ci.pp... 
==> ci: stdin: is not a tty 
==> ci: /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:900:in `report_activate_error' 
==> ci: : 
==> ci: Could not find RubyGem puppet (>= 0) 
==> ci:  ( 
==> ci: Gem::LoadError 
==> ci: ) 
==> ci:         from /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:248:in `activate' 
==> ci:         from /opt/vagrant_ruby/lib/ruby/site_ruby/1.8/rubygems.rb:1276:in `gem' 
==> ci:         from /opt/vagrant_ruby/bin/puppet:18 
The SSH command responded with a non-zero exit status. Vagrant 
assumes that this means the command failed. The output for this command 
should be in the log above. Please read the output to determine what 
went wrong. 


Ou seja com a atualização do ruby 1.8.7 para ruby 1.9.3, o rubygems continua tentando usar o ruby 1.8.7, entao ocorre erro no provisionamento.


Consegue detalhar como fez a instalação do fpm , manualmente?

Reply all
Reply to author
Forward
0 new messages