Deployment 在发动机舱里做些什么

Deployment 在发动机舱里做些什么,deployment,engineyard,nmatrix,Deployment,Engineyard,Nmatrix,我正在将rails应用程序部署到Engine Yard 到目前为止我所拥有的: 1.创建SSH嘿 2.将公钥安装到Engine Yard应用程序。 3.sshdeploy@my.server.ip.address 我被安排在home/deploy,这不是一个执行git拉动的合适地方 我需要以这种方式部署的原因是因为我的应用程序使用的是NMARCGEM,需要使用C++编译器手动安装。自动绑定器在获取该宝石时出错,并停止。 更新: 我想我的问题应该是,如何将nmatrix安装到EngineYard。

我正在将rails应用程序部署到Engine Yard

到目前为止我所拥有的: 1.创建SSH嘿 2.将公钥安装到Engine Yard应用程序。 3.sshdeploy@my.server.ip.address

我被安排在home/deploy,这不是一个执行git拉动的合适地方

我需要以这种方式部署的原因是因为我的应用程序使用的是NMARCGEM,需要使用C++编译器手动安装。自动绑定器在获取该宝石时出错,并停止。 更新: 我想我的问题应该是,如何将nmatrix安装到EngineYard。这是调用gem install nmatrix时收到的错误消息:

Building native extensions.  This could take a while...
ERROR:  Error installing nmatrix:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby21 extconf.rb
checking for main() in -llapack... no
checking for main() in -lcblas... yes
checking for main() in -latlas... no
checking for clapack.h... no
checking for cblas.h... yes
checking for cblas.h... yes
checking for clapack_dgetrf() in cblas.h,clapack.h... no
checking for clapack_dgetri() in cblas.h,clapack.h... no
checking for dgesvd_() in clapack.h... no
checking for cblas_dgemm() in cblas.h... yes
using C++ standard... c++0x
g++ reports version... Hardened
creating nmatrix_config.h
creating Makefile

make "DESTDIR="
compiling nmatrix.cpp
In file included from nmatrix.cpp:331:0:
ruby_nmatrix.c: In function ‘VALUE nm_mset(int, VALUE*, VALUE)’:
ruby_nmatrix.c:1378:108: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘size_t’
ruby_nmatrix.c: In function ‘VALUE nm_xslice(int, VALUE*, void* (*)(const STORAGE*, SLICE*), void (*)(NMATRIX*), VALUE)’:
ruby_nmatrix.c:1556:91: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘size_t’
ruby_nmatrix.c: In function ‘SLICE* get_slice(size_t, int, VALUE*, size_t*)’:
ruby_nmatrix.c:1903:104: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘size_t’
ruby_nmatrix.c:1903:104: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘size_t’
compiling ruby_constants.cpp
compiling data/data.cpp
compiling util/io.cpp
compiling math.cpp
In file included from math.cpp:140:0:
math/rot.h: In function ‘void nm::math::rot(int, DType*, int, DType*, int, CSDType, CSDType) [with DType = nm::Complex<float>, CSDType = float]’:
math/rot.h:123:40: error: ‘cblas_csrot’ was not declared in this scope
math/rot.h: In function ‘void nm::math::rot(int, DType*, int, DType*, int, CSDType, CSDType) [with DType = nm::Complex<double>, CSDType = double]’:
math/rot.h:128:40: error: ‘cblas_zdrot’ was not declared in this scope
In file included from math.cpp:141:0:
math/rotg.h: In function ‘void nm::math::rotg(DType*, DType*, DType*, DType*) [with DType = nm::Complex<float>]’:
math/rotg.h:99:125: error: ‘cblas_crotg’ was not declared in this scope
math/rotg.h: In function ‘void nm::math::rotg(DType*, DType*, DType*, DType*) [with DType = nm::Complex<double>]’:
math/rotg.h:104:125: error: ‘cblas_zrotg’ was not declared in this scope
make: *** [math.o] Error 1


Gem files will remain installed in /home/deploy/.gem/ruby/2.1.0/gems/nmatrix-0.0.9 for inspection.
Results logged to /home/deploy/.gem/ruby/2.1.0/gems/nmatrix-0.0.9/ext/nmatrix/gem_make.out
构建本机扩展。这可能需要一段时间。。。
错误:安装nmatrix时出错:
错误:无法生成gem本机扩展。
/usr/bin/ruby21 extconf.rb
正在检查-llapack中的main()。。。不
正在检查-lcblas中的main()。。。对
正在检查-latlas中的main()。。。不
正在检查clapack.h。。。不
正在检查cblas.h。。。对
正在检查cblas.h。。。对
正在检查cblas.h、clapack.h中的clapack_dgetrf()。。。不
正在检查cblas.h、clapack.h中的clapack_dgetri()。。。不
正在检查clapack.h中的dgesvd_2;()。。。不
正在检查cblas.h中的cblas_dgemm()。。。对
使用C++标准…c++0x
g++报告版本。。。硬化
创建nmatrix_config.h
创建Makefile
使“DESTDIR=”
编译nmatrix.cpp
在nmatrix.cpp中包含的文件中:331:0:
ruby_nmatrix.c:在函数“VALUE nm_mset(int,VALUE*,VALUE)”中:
ruby\u nmatrix.c:1378:108:警告:格式“%u”要求类型为“unsigned int”,但参数4的类型为“size\t”
ruby_nmatrix.c:在函数“VALUE nm_xslice(int,VALUE*,void*(*)(const STORAGE*,SLICE*)、void(*)(nmatrix*),VALUE)”中:
ruby\u nmatrix.c:1556:91:警告:格式“%u”要求类型为“unsigned int”,但参数4的类型为“size\t”
ruby\u nmatrix.c:在函数“SLICE*get\u SLICE(size\t,int,VALUE*,size\t*)”中:
ruby\u nmatrix.c:1903:104:警告:格式“%u”要求类型为“unsigned int”,但参数3的类型为“size\t”
ruby\u nmatrix.c:1903:104:警告:格式“%u”要求类型为“unsigned int”,但参数4的类型为“size\t”
编译ruby_constants.cpp
编译数据/data.cpp
编译util/io.cpp
编译math.cpp
在math.cpp:140:0中包含的文件中:
math/rot.h:在函数“void nm::math::rot(int,DType*,int,DType*,int,CSDType,CSDType)[DType=nm::Complex,CSDType=float]中]:
math/rot.h:123:40:错误:“cblas_csrot”未在此范围内声明
math/rot.h:在函数“void nm::math::rot(int,DType*,int,DType*,int,CSDType,CSDType)[其中DType=nm::Complex,CSDType=double]”中:
math/rot.h:128:40:错误:“cblas_zdrot”未在此范围内声明
在math.cpp:141:0中包含的文件中:
math/rotg.h:在函数“void nm::math::rotg(DType*,DType*,DType*,DType*)[其中DType=nm::Complex]”中:
math/rotg.h:99:125:错误:“cblas_crotg”未在此范围内声明
math/rotg.h:在函数“void nm::math::rotg(DType*,DType*,DType*,DType*)[其中DType=nm::Complex]”中:
math/rotg.h:104:125:错误:“cblas_zrotg”未在此范围内声明
make:**[math.o]错误1
Gem文件仍将安装在/home/deploy/.Gem/ruby/2.1.0/gems/nmatrix-0.0.9中以供检查。
结果记录到/home/deploy/.gem/ruby/2.1.0/gems/nmatrix-0.0.9/ext/nmatrix/gem_make.out

安装nmatrix的一个先决条件是gcc>v4.7,但EngineYard只有v4.5.4。有人知道如何升级gcc吗?我想我正在运行Gentoo。

问题实际上应该包括你想要git拉什么

当您ssh进入时,您将被放入/home/deploy,这是您的主目录

应用程序的Git副本位于应用程序主机上的
/data/APPNAME/shared/cache copy/

一个实例上可以有多个应用程序,每个应用程序都可以有不同的部署密钥,因此可以使用GIT_SSH包装器

GIT_SSH=/data/APPNAME/shared/config/pulse-ssh-wrapper git pull
(在上述所有命令中,请记住用应用程序使用的名称替换APPNAME)

如果您想找到捆绑宝石的实际位置,可以查看

/data/APPNAME/shared/bundled\u gems/ruby/2.0.0/gems
(版本取决于ruby-ABI)

如果您的gem文件使用
:git
请记住,应用程序克隆和捆绑阶段只能使用一个部署密钥,您不能为每个gem选择不同的密钥

安装nmatrix gem最可能的问题是ATLAS库尚未安装,这些库将随系统的包管理器(Portage for Gentoo和Apt get for Ubuntu)一起安装。您可以通过UI上的“编辑Unix软件包”添加它们,只需选择sci libs/blas atlas和sci libs/lapack atlas。目前,这将失败,因为EC2实例是Xeon处理器,而库尚未基于这些处理器构建

您可以通过“cat/proc/cpuinfo”查看Linux实例上的CPU类型,并将看到如下内容

model name  :Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz

你能发布更多关于Bundler试图获取gem时出现的错误的信息吗?您指定了NMatrix的哪个版本?请发布这些信息,我们可能会帮助您。在向发动机厂工程师发送电子邮件几天后,他们似乎为我解决了问题。硬件相关问题确实影响了安装。我得到的不是nmatrix-0.0.9,而是0.1.0.rc3