apt – 在ubuntu lucid上安装varnish 3.0的厨师食谱?

这是我的问题.我想要Varnish 3.0,但Lucid只有2.1包.

所以使用Chef,我需要制作一个安装配方,将varnish-cache.org存储库添加到apt源并安装varnish-3.0软件包.

(我可以选择从源代码构建它(对吗?),但如果我这样做,我就不会得到/etc/init.d脚本(对吧?)).

所以我正在编写一个apt_install.rb配方,可能会添加存储库:

apt_repository "varnish-3.0" do
  uri "http://repo.varnish-cache.org/ubuntu/"
  repo_name "varnish-3.0"
  distribution "lucid"
  components ["varnish-3.0"]
  key "http://repo.varnish-cache.org/debian/GPG-key.txt"
  deb_src true
  action :add
end

事实上,这在/etc/apt/sources.list.d中添加一个varnish-3.0-source.list,其中说:

# Created by the Chef apt_repository LWRP
deb http://repo.varnish-cache.org/ubuntu/ lucid main

然后我有

package "varnish" do
  source "http://repo.varnish-cache.org/ubuntu/"
  action :install
end

继续在我的服务器上安装2.1版,而不是3.0.

如果我在包块中指定了“版本”,则会收到“未找到版本”.

在这里想念的是什么?它必须是简单的东西.

我最大的问题是旧版本的apt cookbook.即便如此,Varnish的分销名称也有点不同寻常.这是我的配置:
apt_repository "varnish-3.0" do
  uri "http://repo.varnish-cache.org/ubuntu/"
  repo_name "varnish-3.0"
  distribution "lucid"
  components ["varnish-3.0"]
  key "varnish-cache.org.gpg-key.txt"
  deb_src true
  action :add
end

package "varnish" do
  source "http://repo.varnish-cache.org/ubuntu/"
  version "3.0.2-1~1lucid1"
  options "--force-yes"
  action :install
end

存储库密钥作为cookbook文件包含在内.

在现有Varnish 2.3安装的基础上运行此配方时,第一个chef-client运行在尝试处理apt的升级配置文件对话框时失败.在我的实例中,第二个厨师 – 客户端正确运行清洁.

相关文章

目录前言一、创建Hadoop用户二、更新apt和安装Vim编辑器三、...
原文连接:https://www.cnblogs.com/yasmi/p/5192694.html ...
电脑重启后,打开VirtualBox,发现一直用的虚拟机莫名的消失...
参见:https://blog.csdn.net/weixin_38883338/article/deta...
Ubuntu 18.04 LTS 已切换到 Netplan 来配置网络接口。Netpla...
介绍每个 Web 服务都可以通过特定的 URL 在 Internet 上访问...