Joh*_*ohn 6 python chef-infra engineyard
我们正在使用默认安装了Python的EngineYard.但是当我们启用SSL时,我们从我们的logentries厨师食谱收到以下错误消息.
"警告:"ssl"模块不存在.使用不可靠的解决方法,无法验证主机身份.如果可能,请安装"ssl"模块或更新版本的Python(2.6)."
我正在寻找一种方法来安装带有厨师食谱的SSL模块,但我根本没有足够的经验.有人能指出我正确的方向吗?
资源:Logentries厨师食谱:https://github.com/logentries/le_chef
Logentries EY docs:https://logentries.com/doc/engineyard/
Nat*_*ens 14
现在似乎有一个更好的社区支持的解决方案(基于它在opscode网站上记录的事实).
你可以试试:
include_recipe 'python'
python_pip 'ssl'
Run Code Online (Sandbox Code Playgroud)
我刚刚为此编写了一个配方,现在可以在 EngineYard 上运行最新的 Logentries 客户端。干得好:
file_dir = "/mnt/src/python-ssl"
file_name = "ssl-1.15.tar.gz"
file_path = File.join(file_dir,file_name)
uncompressed_file_dir = File.join(file_dir, file_name.split(".tar.gz").first)
directory file_dir do
owner "deploy"
group "deploy"
mode "0755"
recursive true
action :create
end
remote_file file_path do
source "http://pypi.python.org/packages/source/s/ssl/ssl-1.15.tar.gz"
mode "0644"
not_if { File.exists?(file_path) }
end
execute "gunzip ssl" do
command "gunzip -c #{file_name} | tar xf -"
cwd file_dir
not_if { File.exists?(uncompressed_file_dir) }
end
installed_file_path = File.join(uncompressed_file_dir, "installed")
execute "install python ssl module" do
command "python setup.py install"
cwd uncompressed_file_dir
not_if { File.exists?(installed_file_path) }
end
execute "touch #{installed_file_path}" do
action :run
end
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11278 次 |
| 最近记录: |