ChefAPI Client Chef 的 Ruby 客户端开源项目

我要开发同款
匿名用户2014年02月17日
17阅读
开发技术Ruby
所属分类Web应用开发、网站API
授权协议Apache

作品详情

ChefAPI是一个依赖最小化的Chef服务器的Ruby客户端。

连接服务器:

ChefAPI.configure do |config|  # The endpoint for the Chef Server. This can be an Open Source Chef Server,  # Hosted Chef Server, or Enterprise Chef Server.  config.endpoint = 'https://api.opscode.com/organizations/meats'  # The client and key must also be specified (unless you are running Chef Zero  # in no-authentication mode). The +key+ attribute may be the raw private key,  # the path to the private key on disk, or an +OpenSSLL::PKey+ object.  config.client = 'bacon'  config.key    = '~/.chef/bacon.pem'  # If you are running your own Chef Server with a custom SSL certificate, you  # will need to specify the path to a pem file with your custom certificates  # and ChefAPI will wire everything up correctly. (NOTE: it must be a valid  # PEM file).  config.ssl_pem_file = '/path/to/my.pem'  # If you would like to be vulnerable to MITM attacks, you can also turn off  # SSL verification. Despite what Internet blog posts may suggest, you should  # exhaust other methods before disabling SSL verification. ChefAPI will emit  # a warning message for every request issued with SSL verification disabled.  config.ssl_verify = false  # If you are behind a proxy, Chef API can run requests through the proxy as  # well. Just set the following configuration parameters as needed.  config.proxy_username = 'user'  config.proxy_password = 'password'  config.proxy_address  = 'my.proxy.server' # or 10.0.0.50  config.proxy_port     = '8080'end
查看全文
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论