I'm connecting to hosted chef with scalr and also from my workstation, so I
think that the version of chef client is provisioned by hosted chef.
This is my recipe (you can see my comments on the code):
--------------------------------------------------------------------------------------------------------------------------
#
# Cookbook Name:: appweb
# Recipe:: default
#
# Copyright (c) 2016 The Authors, All Rights Reserved.
# IF I USE THIS CODE, IT WORKS ON SCALR
# %w(httpd git php php-mysql).each do |packages|
# package "#{packages}"
# end
# THIS IS THE LINE THAT DOESN'T WORK IN SCALR
package ['httpd', 'git', 'php', 'php-mysql']
service 'httpd' do
action [:enable, :start]
end
# THIS ALSO DOESN'T WORK AND THROW ME AN ERROR
node.default['db']['ipaddress'] = search(:node,
'role:dbserver').first['ec2']['public_ipv4']
#THIS LINE WORKS ON SCALR
#node.default['db']['ipaddress'] = search(:node,
'role:dbserver').first['ipaddress']
directory '/var/www/html/appweb'
template '/var/www/html/appweb/index.php' do
source 'index.php.erb'
end
cookbook_file '/etc/httpd/conf.d/appweb.conf' do
source 'mysite.conf'
end
service 'httpd' do
action :restart
end
--------------------------------------------------------------------------------------------------------------------------
Kind regards.
El jueves, 26 de mayo de 2016, 15:03:12 (UTC-5), Marc O'Brien escribió:
>
> Hi Angel,
>
> We are using Chef 12. Can you confirm what version of Chef you are using
> on your workstation where this does not fail? Could you also attach a full
> copy of your recipe?
>
> Many thanks,
> Wm. Marc O'Brien
> Scalr Technical Support
>
>
> On Thursday, May 26, 2016 at 12:45:54 PM UTC-6, Angel Bulas wrote:
>>
>>
>> Hi
>>
>> I have a problem with a chef recipe when I run a farm that deploy a
>> database server, a web server and a load balancer.
>>
>> The chef recipe that deploy the webserver use the "package" resource to
>> install the necesary packages to work but it's not accepting the following
>> syntax:
>>
>> package ['httpd', 'git', 'php', 'php-mysql']
>>
>> When I run it directly from my workstation using a script it works fine
>> and deploy the instances correctly but when i use scalr sends the following
>> error:
>>
>>
>> <https://lh3.googleusercontent.com/-kLqEOyo4jZc/V0dEMfl4ylI/AAAAAAAAFzo/AalLIEwEZGIjF0vr6c6C-moRwYx32VXBQCLcB/s1600/Untitled.png>
>>
>> Thanks in advance for your help.
>>
>
--
You received this message because you are subscribed to the Google Groups
"scalr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.