chef-infra

chef server webui not working

北城以北 提交于 2021-02-07 19:54:01
问题 I have download and installed chef-server-core_12.x DPKG package on ubuntu 13.x chef-server-ctl reconfigure ran successfully but when i try URL http://chef.example.com i get following page saying chef server API thats all, i didn't find any login info etc anywhere. How do i get webui interface, is there anything i missed? Chef Server API This is the main endpoint for all of the Chef API's. In general, none of these have any HTML representations, and the vast majority of them require that you

Minimize service restarts from chef notifications?

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-07 03:12:09
问题 Currently my recipe with attributes that matter is structured like this: service 'myservice' do action :nothing supports :status => true, :start => true, :stop => true, :restart => true end package 'packagename' do ... end template 'configfile1' notifies :restart, 'service[myservice]' end ... template 'configfileN' notifies :restart, 'service[myservice]' end execute "a command from package which generates and enables the init script" do notifies :start, 'service[myservice]', :immediately end

Minimize service restarts from chef notifications?

天涯浪子 提交于 2021-02-07 03:10:18
问题 Currently my recipe with attributes that matter is structured like this: service 'myservice' do action :nothing supports :status => true, :start => true, :stop => true, :restart => true end package 'packagename' do ... end template 'configfile1' notifies :restart, 'service[myservice]' end ... template 'configfileN' notifies :restart, 'service[myservice]' end execute "a command from package which generates and enables the init script" do notifies :start, 'service[myservice]', :immediately end

systemctl error in docker 'Failed to connect to bus: No such file or directory'

混江龙づ霸主 提交于 2020-12-31 13:59:06
问题 I am using Ubuntu-16.04 image with docker to test my cookbook in local. While doing kitchen converge , I am getting the following error. I figured out systemctl is not working properly. Can someone please help me to fix this problem OR any other way to achieve the same thing? [2017-11-30T15:22:30+00:00] INFO: Running queued delayed notifications before re-raising exception Running handlers: [2017-11-30T15:22:30+00:00] ERROR: Running exception handlers Running handlers complete [2017-11-30T15

Chef Multi line command

。_饼干妹妹 提交于 2020-12-26 05:07:13
问题 I'm trying to write a recipe in Chef but I'm stuck on how I can do a multi line execute into command line in Linux. Firstly is the recipe and following that is the error output I receive. node['freeswitch']['source']['dependencies'].each { |d| package d } execute "apt_update" do command "wget -O - https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub | apt-key add -&&" "echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/ jessie main" > /etc/apt/sources.list.d

Understanding Chef only_if not_if

末鹿安然 提交于 2020-07-31 17:44:07
问题 Im not sure I understand Chef conditional execution. I'd like to do some conditional execution based on whether or not a database exists in Postgresql So here's my example execute "add_db" do cwd "/tmp" user "dbuser" command "createdb -T template_postgis mydb" not_if 'psql --list|grep mydb' end Running psql --list|grep mydb return what you would expect if the db exists (the line with the dbname entry) and nothing at all if it doesnt. So how does not_if only evaluate that? True or false? 1 or