chef-solo

Chef - How Reboot VM and continue performing actions

瘦欲@ 提交于 2019-12-18 06:56:39
问题 In a Chef recipe, I need to perform a reboot on a Node after doing some actions, and after the reboot is done, I need to continue doing another actions: Recipe: -action 1 -action 2 -reboot -action3 -action4.... I have checked some existing cookbook in the community: reboot-handler, chef-reboot, chef-restart, chef-dominous, but I cannot make any of them work. Is there some method in Chef to get what I need? Please provide detailed examples. Thanks a lot for the help. 回答1: How about using chef

Can the java cookbook be used to install a local copy of oracle java?

萝らか妹 提交于 2019-12-17 17:06:53
问题 I have been trying to learn chef recently because I was planning on using it for deploying server config and server application software. I am having issues understanding how to use other people's cookbooks. For example, I want to deploy JDK8u31. I can't figure it out how to implement this cookbook. https://supermarket.chef.io/cookbooks/java I read the instructions and I see the following Simply include the java recipe wherever you would like Java installed, such as a run list (recipe[java])

Setting postgresql password with Vagrant/Chef-solo

这一生的挚爱 提交于 2019-12-13 18:56:18
问题 I'm trying my hand at a bit of chef-solo for the first time on a Vagrant box for my open source project apartment so that contributors can more easily get a dev env up and running. One thing I'm as of yet unable to achieve though is override the default password set by the postgresql recipe from this cookbook The docs mention setting the json config with something like: postgresql: { password: { postgres: '' } } which I've done here but I can't seem to get it to override the default encrypted

Unable Bootstrap chef client on windows 7

懵懂的女人 提交于 2019-12-13 17:28:45
问题 Following are the steps I have performed till now, Installed chef-server and configured v11.0 on Ubuntu 10.04 LTS Installed chefDK 0.17 on windows 7 Fetched certificate on workstation as well as on node from chef server I have also updated hosts files on every machine Now , while bootstrapping from workstation to install and register chef node on chef server I'm getting the following error ERROR: Failed to authenticate to https://EVALCHEFLIN01.ecsemea.com:443 as ECSAdm in with key C:/Users

Chef solo can't find cookbook during kitchen test run

夙愿已清 提交于 2019-12-13 07:56:21
问题 I'm trying to add a Test Kitchen for a bunch of cookbooks that we use to provision a Jenkins CI instance. We use Berkshelf to manage dependencies. The file structure is as follows: | .gitignore | .kitchen.yml | Berksfile | Berksfile.lock | bootstrap.sh | chefignore | metadata.rb | provision.sh | readme.md | solo.json | solo.rb | tree.txt | VERSION | +---.kitchen | | default-ubuntu-1404.yml | | | +---kitchen-vagrant | | \---kitchen-chef-jenkins-default-ubuntu-1404 | | | Vagrantfile | | | | | \

chef solo private key missing when trying to use database cookbook

£可爱£侵袭症+ 提交于 2019-12-12 04:36:21
问题 Can anyone tell me what I'm doing wrong here. I am trying to use chef solo to deploy a rails stack. I am using the database cookbook. I have two roles webserver & sparkle_database_master that are attached at the end. My command line: knife solo cook --identity-file=/home/sburke/.ssh/sab-sburke-sparkle.pem -r "role[sparkle_database_master], role[webserver]" -E production ubuntu@54.173.103.4 Output: ================================================================================ Recipe Compile

Installing rpm packages using chef (with dependencies)

女生的网名这么多〃 提交于 2019-12-11 11:08:11
问题 I have a list of rpm packages including dependencies. Locally I do rpm -i *.rpm and it works fine. How do I use the -i flag when I use chef's rpm_package resource. I cant use yum as we are trying something that works offline. Just need a chef way for rpm -i. 回答1: You have two options: Bash it Just like you did in your question, you can use the bash resource to execute the rpm command. This is not idempotent by default and is (obviously) not cross-platform: bash 'rpm -i *.rpm' do cwd '/path/to

How to find out version of software package installed on the node?

北城以北 提交于 2019-12-10 20:13:09
问题 I'm adapting Apache cookbook to work with 2.4 Apache. Opscode cookbook is currently failing because it's generating conf file with LockFile keyword that is excluded from the list of the Apache 2.4 keywords. I want to make a general solution, and populate my conf file depending on the version of software. To do so, I have to find out what's the version of already installed software. This same question has been bothering me for about a time now, but I've been managing to avoid it. Since I'm

ChefZero returning 404

三世轮回 提交于 2019-12-09 14:40:30
问题 I am setting up a simple vagrant box with chef solo as the provisioner. Everything was going fine until i tried running it on my laptop. The machine comes up fine but when it provisions it spits out some errors. I'm relatively fresh to chef and i'm not quite sure what i'm looking at. Any help is immensely appreciated. Error ==> default: [2016-05-20T00:27:27+00:00] INFO: GET /organizations/chef/nodes/vagrant-ebebf4d0 ==> default: [2016-05-20T00:27:27+00:00] INFO: #<ChefZero::RestErrorResponse:

Using Ruby 2.0 on Amazon OpsWorks

时光总嘲笑我的痴心妄想 提交于 2019-12-09 06:22:20
问题 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