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 https://example.com/organizations/myorg 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 configuration. Here is my complete working blueprint: http://paste.apache.org/80Yb Hope this helps. I'll be submitting a patch to fix the privateKeyFile bug and update the Chef documentation. Richard. On 20 October 2015 at 11:16, Gowri LN <[email protected]> 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 > http://brooklyn.incubator.apache.org/v/latest/yaml/chef/creating-blueprints.html > 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/mysqld.pid > location: > jclouds:aws-ec2: > region: us-west-2 > osFamily: UBUNTU > osVersionRegex: 12.04 > inboundPorts: [22,3306,443] > > Thanks, > Gowri
