构建安装程序比创建厨师食谱更复杂。用户需要为每个模块编写一个 DSL(这有关于收集工件并将其安装在特定操作系统上的说明)。
创建综合项目后,请参阅 README 文件以开始使用基础知识。
有关如何构建自己的 DSL 的详细信息,请参阅此 github 项目。Gitlab 综合项目为一些模块(如 postgresql 等)提供了 DSL。
https://gitlab.com/gitlab-org/omnibus-gitlab/tree/master
在安装程序中嵌入 nginx 模块的示例 DSL 如下所示:
名称“nginx”默认版本“1.9.10”
依赖“pcre”依赖“openssl”
源网址:“ http://nginx.org/download/nginx-# {版本}.tar.gz”,md5:“64cc970988356a5e0fc4fcd1ab84fe57”
相对路径“nginx-#{版本}”
构建执行命令 [“./configure”、“--prefix=#{install_dir}/embedded”、“--with-http_ssl_module”、“--with-http_stub_status_module”、“--with-http_gzip_static_module”、“-- with-http_v2_module”、“--with-ipv6”、“--with-debug”、“--with-ld-opt=-L#{install_dir}/embedded/lib”、“--with-cc-opt =\"-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include\""].join(" ") command "make -j #{workers}", :env => {" LD_RUN_PATH" => "#{install_dir}/embedded/lib"} 命令“make install”结束