brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Downer <>
Subject Re: need help with chef server yaml
Date Thu, 22 Oct 2015 15:21:50 GMT
Hi Gowri,

I've been experimenting with this (after a bit of setting up - it's
been a while since I used Chef Server) but I have managed to get a
successful deployment.

Some key alterations from your blueprint that I had to make:

`chef_mode` needs to be `knife` to work in Chef Server mode. Slightly
unintuitive, but this is because that the interaction with Chef Server
is through the workstation `knife` tool (we don't currently support
direct API interaction with the Chef server.)

`chef_server_url` needs to include the organization within the server
- like

You need to have the `knife` workstation tools installed, and a
suitable `knife.rb` configuration file. You may need to use the
`brooklyn.chef.knife.configFile` configuration option to tell Brooklyn
where the `knife.rb` file is located, if it's not in a suitable
default location.

It seems that the `mysql::server` recipe referred to in the example
documentation no longer exists. But a different cookbook, `mysqld`,
may be a suitable replacement.

There is unfortunately a bug in Brooklyn 0.8.0 which mis-reads the
`privateKeyFile` location configuration option - it doesn't understand
that the configuration can specify multiple private key files and
tries to read it as a literal string. The workaround is to manually
specify a correct, singular `privateKeyFile` in the location

Here is my complete working blueprint:

Hope this helps. I'll be submitting a patch to fix the privateKeyFile
bug and update the Chef documentation.


On 20 October 2015 at 11:16, Gowri LN <> wrote:
> Hi ,
> I have a chef server setup and I am trying to deploy a yaml with
> chef_server_url value set. Can anyone please provide a link to a sample
> working yaml ?
> I have looked at
> but I have been unsuccessfull.
> and also when I set chef_mode as server , I get an error saying
> unrecognised.
> Can anyone help me with this ?
> Blueprint that I have tried :
> name: Chef with Server
> services:
> - type:
>   chef:mysql
>   chef_mode: autodetect
>   chef_server_url: http://my_chef_server_url
>   launch_run_list: [ "mysql::server" ]
>   launch_attributes:
>     mysql:
>       # these attrs are required by the mysql cookbook under node['mysql']
>       server_root_password: p4ssw0rd
>       server_repl_password: p4ssw0rd
>       server_debian_password: p4ssw0rd
>       # many others are attrs are supported by the cookbook and can be
> passed here...
>   # how to determine if the process is running and how to kill it
>   # (supported options are `service_name` and `pid_file`; normally you
> should just pick one.
>   # here we use the pid_file because the service_name varies, mysql on
> centos, mysqld on ubuntu!)
>   #service_name: mysqld
>   pid_file: /var/run/mysqld/
> location:
>  jclouds:aws-ec2:
>   region: us-west-2
>   osFamily: UBUNTU
>   osVersionRegex: 12.04
>   inboundPorts: [22,3306,443]
> Thanks,
> Gowri

View raw message