【问题标题】:Installing a package on a Server using Chef no internet使用 Chef no internet 在服务器上安装包
【发布时间】:2016-08-04 13:51:28
【问题描述】:

我想知道是否有一种方法可以将 Management Framewok 5.0 安装在具有 Intranet 连接但没有 Internet 到使用 Chef 食谱的系统外其他任何东西的服务器中。

我的想法有点像从我的本地计算机直接将文件发送到服务器,而无需服务器从互联网上下载它。 我现在这样做的方式需要服务器从微软网站获取它。 :

# Create installs directory to house downloads
directory 'c:/installs' do
end

# Install Windows Management Framework 5.0
remote_file "c:/installs/Windows-Management-Framework-5.0-2k12R2.msu" do
  source "http://go.microsoft.com/fwlink/?LinkId=717507"
end

# Executes the MSU
execute "c:/installs/Windows-Management-Framework-5.0-2k12R2.msu /quiet" do
  action :nothing
  subscribes :run, resources(:remote_file => "c:/installs/Windows-Management-Framework-5.0-2k12R2.msu")
end

【问题讨论】:

    标签: ruby windows powershell server chef-infra


    【解决方案1】:

    不,这不是 Chef 的特定功能。我们有cookbook_file 资源,允许在食谱旁边分发文件,但是将它用于像这样的安装程序很快就会变得难以管理。与往常一样,在制作气隙环境时,您可能必须构建自己的镜像服务器并从中下载。

    【讨论】:

    • 谢谢,暂时我会使用cookbook_file。并尽量保持整洁。
    • 别说我们没有警告你'。
    猜你喜欢
    • 1970-01-01
    • 2023-03-15
    • 2017-03-01
    • 1970-01-01
    • 2023-03-30
    • 2016-11-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多