chef

Docker for GUI-based environments?

人走茶凉 提交于 2019-12-28 04:46:31
问题 Problem I have a set of client machines that are a part of an enterprise web application. Each machine runs identical software, which is a PyQT-based web client that connects to a server. This client software is updated regularly and I would like to have some configuration/provisioning tool that allows to have the same environment on each machine and hence provide easy deployment and configuration of the software onto each of the clients' machines. The problem is that I have tried to use Chef

CHEF commands help ,

泄露秘密 提交于 2019-12-25 16:34:27
问题 How can I write this command in chef ? /home/vagrant$ source ~/.rvm/scripts/rvm (->enter) I tried... execute "foo" do command "source ~/.rvm/scripts/rvm" action :run end in short, how can I write a simple command in chef? not installing something. thanks!!! 回答1: This isn't something Chef supports. source is a shell builtin, not a command, and it would have no effect on Ruby anyway has that isn't a Ruby script, it is a shell script. You can use a bash resource like this: bash 'do the needful'

CHEF commands help ,

不打扰是莪最后的温柔 提交于 2019-12-25 16:33:12
问题 How can I write this command in chef ? /home/vagrant$ source ~/.rvm/scripts/rvm (->enter) I tried... execute "foo" do command "source ~/.rvm/scripts/rvm" action :run end in short, how can I write a simple command in chef? not installing something. thanks!!! 回答1: This isn't something Chef supports. source is a shell builtin, not a command, and it would have no effect on Ruby anyway has that isn't a Ruby script, it is a shell script. You can use a bash resource like this: bash 'do the needful'

Resolve valid image value error

和自甴很熟 提交于 2019-12-25 07:00:12
问题 I'm trying to create and deploy a PostgreSQL server to AWS using the knife-ec2 gem and chef. In my .chef repository of my project I have the knife.rb file. Here are the contents of that file. cookbook_path [ 'Users/Petesta/Git/ringbase/chef/cookbooks' ] knife[:aws_access_key_id] = "randomString" knife[:aws_secret_access_key] = "randomString" knife[:aws_ssh_key_id] = "default" knife[:flavor] = "t1.micro" knife[:image] = "ami-6aad335a" knife[:region] = "us-west-1" knife[:availability_zone] =

what are the side effects of disabling ohai 'passwd' plugin

試著忘記壹切 提交于 2019-12-25 05:13:25
问题 I have couple of nodes where i face '413 "Request Entity Too Large" error'. After googling, I found that we need to disable the 'passwd' ohai plugin to reduce the node data size which is being saved to Chef server - Referring to: Opscode Chef Request entity too large registering a node Just wanted to know, if there will be any side effect, if we disable the 'passwd' ohai plugin. 回答1: The side effect is that node['etc']['passwd'] wont' be populated. 来源: https://stackoverflow.com/questions

SBT hangs when running with chef solo

痴心易碎 提交于 2019-12-25 04:35:16
问题 I'm running SBT under chef-solo, and it hangs trying to read from the terminal. Redirecting /dev/null into it doesn't help, even if I run the jar directly with java. It only works if I orphan it, and will only terminate when the parent chef-solo terminates. It must be closing stdin, and then reopening it, thus getting the stdin of the parent. The stack trace during the hang seems to indicate that. I suspect it has something to do with one of the plugins Thread 22379: (state = IN_NATIVE) -

Why am I getting prompted for sudo password via knife-vsphere when giving --ssh-user & --ssh-password params?

ε祈祈猫儿з 提交于 2019-12-25 04:18:13
问题 I'm trying to get knife-vsphere working in my vCenter environment. I have a script working that spins up a VM from a template then bootstraps it and runs cookbook recipes to completion. However, I get prompted to supply a sudo password. Is this expected? I supplied the '--ssh-user' and '--ssh-password' params and, upon being prompted, I'm typing the same password in and then chef build continues. isn't there a way to make this hands off? what may I have missed? Thanks! 回答1: As pointed out in

How to update the file with multiple lines without deleting the contents of the original file using chef recipe

▼魔方 西西 提交于 2019-12-25 03:57:25
问题 I would like to append my file /var/rsyslog.conf file with the following lines without having to delete my existing file. Lines to include in the file are ************* #audit log $ModLoad imfile $InputFileName /var/log/audit/audit.log $InputFileTag tag_audit_log: $InputFileStateFile audit_log $InputFileSeverity info $InputFileFacility local6 $InputRunFileMonitor *.* @@172.167.189.67:514 ************* In the recipe I gave the following as a file resourse **** file '/etc/rsyslog.conf' do

Bootstrap chef node with Jclouds

 ̄綄美尐妖づ 提交于 2019-12-25 03:53:30
问题 i'm using the Jclouds library to bootstrap my Vms instead of used "knife bootstrap" , i find the following code package com.sagemcom.administration.chef; import java.io.File; import java.io.IOException; import java.util.List; import java.util.Properties; import org.jclouds.Constants; import org.jclouds.ContextBuilder; import org.jclouds.chef.ChefContext; import org.jclouds.chef.ChefService; import org.jclouds.chef.config.ChefProperties; import org.jclouds.chef.domain.BootstrapConfig; import

Reporting and knife runs command for opensource chef

荒凉一梦 提交于 2019-12-25 02:57:46
问题 Chef reporting doc says its for Enterprise chef. For opensource chef I am able to get JSON reports which is getting stored in same directory for all nodes. Is there any better way of reporting fof opensource chef? 回答1: We are using a ReportHandler to report statistics into our Zabbix monitoring at the end of chef-client runs: here. You can adopt this example to your needs. 来源: https://stackoverflow.com/questions/24630230/reporting-and-knife-runs-command-for-opensource-chef