Open gabnasr opened 8 years ago
It may not be as clear as it could be in the documentation. If you are following the instructions in the README you will notice that we mention the node['fqdn']
must be the exact names of the nodes inside of the data bag. This is because we utilize the index of the array of hosts to be the unique identifier for the ZK cluster.
Yeah i know, its exactly the same
+1
Thanks so much for writing this cookbook! I have a small clarifying question that is related to the node[‘fqdn’]
part of the readme. Is this part supposed to be an array of hostnames, like node[‘ip’,’another ip’,’yet another ip’]
that matches what’s in the data bag item? It would be helpful if the readme showed the completed code based onthe example data bag file rather than the placeholder ‘fqdn’.
I’m using this cookbook in conjunction with the related kafka-cluster cookbook, so I also have the same question about the analogous broker_id line that uses rpartition to assign the last place value of the IP address to the broker ID. The rpartition function takes a single string, not an array of strings. I’m just confused on the syntax here and it would help to see a fully fleshed out example. Thanks!
@chuckinator0 - I suspect you've figured this out by now, but I'm posting this because I hadn't, and it might help the next person that comes along starting from scratch with Chef:
The syntax is exactly as specified. Copy and past those four lines exactly as they are into your recipe. You'll need nothing else in the recipe file itself (unless you want more -- also, see the last paragraph regarding the attributes file for your recipe).
What's implied is that you need an "fqdn" attribute included in the JSON configuration file for your node (if you've gotten far enough to try to run this, you should already have this file). That will contain just the FQDN for that specific node. In order for the recipe to know about your other nodes, you'll need to create a databag named "zookeeper" with an array of those FQDNs specified for your environment (See the example JSON at the very bottom of the README). If you haven't already, this means you'll have to setup an environment and assign that environment to your node.
Lastly, you might also want to create your own attributes file for your own recipe. See the provide attributes file for all of the supported options. You may want to set the specific version that gets downloaded, so you'll want to copy the three service attributes from lines 21-23 to your recipe's attributes file.
Hi i'm trying this cookbook with a data bag like the one in the example but i'm getting this error and i don't know why