chef

Adding chef cookbooks from github

时光毁灭记忆、已成空白 提交于 2019-12-03 10:03:12
I've downloaded a number of cookbooks from the opscode site using the command: knife cookbook site install git for example. However now I would like to download a cookbook from a repository on github into my current cookbooks directory. How should I go about doing this? should I just clone the repository into my cookbooks directory? Thank you! You coould install the knife github plugin from https://github.com/websterclay/knife-github-cookbooks , after which you could simply use knife cookbook github install cookbooks/yum to install yum from https://github.com/cookbooks/yum . However, I would

Chef deploy_resource private repo, ssh deploy keys and ssh_wrapper

回眸只為那壹抹淺笑 提交于 2019-12-03 09:53:30
问题 I'm having loads of trouble getting my Chef recipe to clone a private repo. Well, I had it working yesterday but after 'cheffin' my Vagrant box half a dozen times, I've broken it. I'm a Chef newbie as you may guess. Following the deploy_resource guide here, I've created my deploy.rb recipe (shortened): deploy_branch "/var/www/html/ps" do repo git@github.com:simonmorley/private-v2.git ssh_wrapper "/tmp/.ssh/chef_ssh_deploy_wrapper.sh" branch "rails4" migrate false environment "RAILS_ENV" =>

Using knife ec2 plugin to create VM in VPC private subnet

爱⌒轻易说出口 提交于 2019-12-03 09:41:26
问题 Although I've written a fair amount of chef, I'm fairly new to both AWS/VPC and administrating network traffic (especially a bastion host). Using the knife ec2 plugin, I would like the capability to dynamically create and bootstrap a VM from my developer workstation. The VM should be able to exist in either a public or private subnet of my VPC. I would like to do all of this without use of an elastic IP. I would also like for my bastion host to be hands off (i.e. I would like to avoid having

Installing chef-server in a docker container

折月煮酒 提交于 2019-12-03 09:38:56
问题 I have been trying to install Chef-Server in a Docker container and I am having some trouble. I am running a VM with an up to date version of Ubuntu 12.04 and latest install of Docker. I run a base Docker Ubuntu 12.04 container and install chef-server, version 11.0.12 and that goes well. The problem is running the required 'sudo chef-server-ctl reconfigure' step after install. The setup freezes at * link[/opt/chef-server/init/rabbitmq] action create (up to date) * link[/opt/chef-server

RVM + Nginx + Passenger in Chef

匿名 (未验证) 提交于 2019-12-03 09:14:57
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to setup Nginx with Passenger on RVM in Chef using community cookbook for nginx and fnichol's for RVM. Everything on ubuntu. Now, my problem is that if I bootstrap the machine using knife ec2 and try to install everything in one go, it fails. For the most part it works well, picking up RVM and Passenger nicely, until the point when it realizes Passenger is not compiled, tries to do it using rake from default ruby 1.9.1 and fails. If I then connect to the machine and run sudo chef-client , everything finishes beautifully and I have

Chef and postgres; how do I specify the password?

随声附和 提交于 2019-12-03 08:37:21
I'm new to chef, and I'm trying to interprete the documentation. I've added the opscode postgresql recipe to my chef-solo environment. postgresql seems to install and launch just fine, but unfortunately I can't log in to the server, rendering it pretty much unusable. The documentation mentions this: The following node attribute is stored on the Chef Server when using chef-client. Because chef-solo does not connect to a server or save the node object at all, to have the password persist across chef-solo runs, you must specify them in the json_attribs file used. For Example: { "postgresql": {

Chef attributes versus data bags

冷暖自知 提交于 2019-12-03 08:31:28
问题 I'm new to Chef, and after reading the documentation I'm still having trouble understanding when to use Attributes and when to use Data bags. What kind of data should be stored as attributes, and what kind of data should be stored in data bags ? Thanks 回答1: Well, it depends. Although data bags and attributes both hold data, the major difference between them is that attributes are exposed as node properties when recipe is run, but you don't have any clear overview what data bags were used

Chef Ruby loop over attributes in an .erb template file

不打扰是莪最后的温柔 提交于 2019-12-03 08:19:23
So this might be a little confusing but bear with me. In short I want to loop over all attributes with a certain key value and then insert them into a template if the values are not empty. Here is my code: ATTRIBUTES: # === Default file Configurations # default['elasticsearch']['default']['ES_USER'] = '' default['elasticsearch']['default']['ES_GROUP'] = '' default['elasticsearch']['default']['ES_HEAP_SIZE'] = '' default['elasticsearch']['default']['MAX_OPEN_FILES'] = '' default['elasticsearch']['default']['MAX_LOCKED_MEMORY'] = 'unlimited' default['elasticsearch']['default']['MAX_MAP_COUNT'] =

Using Ruby 2.0 on Amazon OpsWorks

。_饼干妹妹 提交于 2019-12-03 07:59:22
I'd like to use Ruby 2.0 on Amazon OpsWorks, so I'm trying the following: Choose custom cookbooks and set them to my fork of https://github.com/aws/opsworks-cookbooks Update all version numbers here https://github.com/aws/opsworks-cookbooks/blob/master/ruby/attributes/ruby.rb to 2.0 values. This doesn't seem to have any effect, though. Do custom cookbooks override their built in counterparts? Does OpsWorks use the Ruby recipe from the cookbook for basic Ruby setup? The same question applies to Nginx too - can I control versions and settings by changing my fork for the cookbooks? OpsWorks now

Provision developer environment with chef server and vagrant without registering node

眉间皱痕 提交于 2019-12-03 07:54:49
问题 I wish to create a developer environment of a web based application which will have an application server and database server installed on a VM using vagrant. I am using open source chef server and vagrant with chef_client provisioner. However each time a developer node is provisioned, chef_client provisioner creates a client node on chef server. This is not desirable because this setup will be used by a lot of developers. Such nodes might get created and destroyed several times. So