friendsofcake / vagrant-chef Goto Github PK
View Code? Open in Web Editor NEWa vagrant installation with all the necessary chef cookbooks to run a basic cakephp application
a vagrant installation with all the necessary chef cookbooks to run a basic cakephp application
Hello,
I have recently moved my app to a new computer. Installed VB and Vagrant and vagrant ssh back to my cakephp app without problem.
However the environment (nginx, php, ..etc) is gone, how can I reinstall them without starting a new cakephp app template?
Ive tried both usernames and passwords you provided.
the box is up and the app can successfully connect to the db.
Im getting the following error:
Unable to connect to host 192.168.13.37, or the request timed out.
Be sure that the address is correct and that you have the necessary privileges, or try increasing the connection timeout (currently 10 seconds).
MySQL said: Host '192.168.13.1' is not allowed to connect to this MySQL server
Awkward devs might like to, gasp, edit files and type stuff inside the vm - vim isn't installed though so they'll be reduced to tears pico.
This might break apps that do not use fallbacks or don't use .env, so we should release a version of vagrant-chef first.
It will ensure that people overriding config in their .env
file will see those changes. Thoughts, @AD7six ?
I get the following error while trying to install the vagrant box using the readme:
==> default: Running provisioner: chef_solo...
default: Installing Chef (latest)...
==> default: Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2016-09-27T08:38:42+00:00] INFO: Started chef-zero at chefzero://localhost:8889 with repository at /tmp/vagrant-chef/cc38d023d872e062432f49ed6f16cad5
==> default: One version per cookbook
==> default: roles at /tmp/vagrant-chef/a0e2744a5017776ae61566f146bca8eb/roles
==> default: [2016-09-27T08:38:42+00:00] INFO: Forking chef instance to converge...
==> default: Starting Chef Client, version 12.14.98
==> default: [2016-09-27T08:38:42+00:00] INFO: *** Chef 12.14.98 ***
==> default: [2016-09-27T08:38:42+00:00] INFO: Platform: x86_64-linux
==> default: [2016-09-27T08:38:42+00:00] INFO: Chef-client pid: 1904
==> default: [2016-09-27T08:38:45+00:00] INFO: HTTP Request Returned 404 Not Found: Object not found: chefzero://localhost:8889/nodes/vagrant-e2381580
==> default: [2016-09-27T08:38:45+00:00] INFO: HTTP Request Returned 404 Not Found: Parent not found: chefzero://localhost:8889/nodes
==> default: ================================================================================
==> default: Chef encountered an error attempting to load the node data for "vagrant-e2381580"
==> default: ================================================================================
==> default: Resource Not Found:
==> default: -------------------
==> default: The server returned a HTTP 404. This usually indicates that your chef_server_url is incorrect.
==> default: Relevant Config Settings:
==> default: -------------------------
==> default: chef_server_url "chefzero://localhost:8889"
==> default: Platform:
==> default: ---------
==> default:
==> default: x86_64-linux
==> default:
==> default:
==> default: Running handlers:
==> default: [2016-09-27T08:38:45+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2016-09-27T08:38:45+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 0 resources updated in 02 seconds
==> default: [2016-09-27T08:38:45+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2016-09-27T08:38:45+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2016-09-27T08:38:45+00:00] ERROR: 404 "Not Found"
==> default: [2016-09-27T08:38:45+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
I'm not the only one having this issue, all of the guys in my office prepping for the PHPCraft 2016 conference is experiencing the same problem.
Should help alleviate issues users have when running the box on machines without hardware virtualization.
I got following error when i try to provisioning an already provisioned (and working) vagrant machine:
$ vagrant provision
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
==> default: Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2016-08-23T17:03:39+00:00] INFO: Forking chef instance to converge...
==> default: Starting Chef Client, version 12.7.2
==> default: [2016-08-23T17:03:39+00:00] INFO: *** Chef 12.7.2 ***
==> default: [2016-08-23T17:03:39+00:00] INFO: Chef-client pid: 3190
==> default: [2016-08-23T17:03:41+00:00] INFO: Setting the run_list to ["role[vagrant]"] from CLI options
==> default: [2016-08-23T17:03:41+00:00] INFO: Run List is [role[vagrant]]
==> default: [2016-08-23T17:03:41+00:00] INFO: Run List expands to [system::init, system::update, hostname::default, git::install, percona::install, postgresql::install, redis::install, memcached::install, nginx::server, ruby::install, php::install, cakephp::setup]
==> default: [2016-08-23T17:03:41+00:00] INFO: Starting Chef Run for vagrant-336a60fa
==> default: [2016-08-23T17:03:41+00:00] INFO: Running start handlers
==> default: [2016-08-23T17:03:41+00:00] INFO: Start handlers complete.
==> default: Compiling Cookbooks...
==> default:
==> default: ================================================================================
==> default: Recipe Compile Error in /tmp/vagrant-chef/795bb757d3bb74dcdc0c581c11db1c17/cookbooks/git/recipes/install.rb
==> default: ================================================================================
==> default:
==> default:
==> default: NoMethodError
==> default: -------------
==> default: No resource or method named `apt_repository' for `Chef::Recipe "apt_repository"'
==> default:
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef/795bb757d3bb74dcdc0c581c11db1c17/cookbooks/git/recipes/apt_repository.rb:1:in `from_file'
==> default:
==> default: /tmp/vagrant-chef/795bb757d3bb74dcdc0c581c11db1c17/cookbooks/git/recipes/install.rb:1:in `from_file'
==> default:
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/795bb757d3bb74dcdc0c581c11db1c17/cookbooks/git/recipes/apt_repository.rb:
==> default:
==> default:
==> default:
==> default: 1>> apt_repository "git" do
==> default:
==> default: 2: key "E1DF1F24"
==> default:
==> default: 3: uri "ppa:git-core/ppa"
==> default:
==> default: 4: distribution node["lsb"]["codename"]
==> default:
==> default: 5: end
==> default:
==> default: 6:
==> default:
==> default:
==> default:
==> default: Running handlers:
==> default: [2016-08-23T17:03:41+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2016-08-23T17:03:41+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 0 resources updated in 01 seconds
==> default: [2016-08-23T17:03:41+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2016-08-23T17:03:41+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2016-08-23T17:03:41+00:00] ERROR: No resource or method named `apt_repository' for `Chef::Recipe "apt_repository"'
==> default: [2016-08-23T17:03:41+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
This is the stacktrace dump mentioned in the FATAL above:
Generated at 2016-08-23 16:56:45 +0000
NoMethodError: No resource or method named `apt_repository' for `Chef::Recipe "apt_repository"'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/dsl/recipe.rb:102:in `rescue in method_missing'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/dsl/recipe.rb:99:in `method_missing'
/tmp/vagrant-chef/795bb757d3bb74dcdc0c581c11db1c17/cookbooks/git/recipes/apt_repository.rb:1:in `from_file'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/mixin/from_file.rb:30:in `from_file'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/cookbook_version.rb:229:in `load_recipe'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context.rb:332:in `load_recipe'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context.rb:288:in `block in include_recipe'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context.rb:287:in `each'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context.rb:287:in `include_recipe'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/dsl/include_recipe.rb:26:in `include_recipe'
/tmp/vagrant-chef/795bb757d3bb74dcdc0c581c11db1c17/cookbooks/git/recipes/install.rb:1:in `from_file'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/mixin/from_file.rb:30:in `instance_eval'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/mixin/from_file.rb:30:in `from_file'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/cookbook_version.rb:229:in `load_recipe'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context.rb:332:in `load_recipe'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:140:in `block in compile_recipes'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:138:in `each'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:138:in `compile_recipes'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context/cookbook_compiler.rb:75:in `compile'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/run_context.rb:167:in `load'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/policy_builder/expand_node_object.rb:93:in `setup_run_context'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/client.rb:509:in `setup_run_context'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/client.rb:277:in `run'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application.rb:270:in `block in fork_chef_client'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application.rb:258:in `fork'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application.rb:258:in `fork_chef_client'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application.rb:223:in `block in run_chef_client'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application.rb:211:in `run_chef_client'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application/solo.rb:297:in `block in interval_run_chef_client'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application/solo.rb:286:in `loop'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application/solo.rb:286:in `interval_run_chef_client'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application/solo.rb:265:in `run_application'
/var/lib/gems/2.2.0/gems/chef-12.7.2/lib/chef/application.rb:58:in `run'
/var/lib/gems/2.2.0/gems/chef-12.7.2/bin/chef-solo:25:in `<top (required)>'
/usr/local/bin/chef-solo:23:in `load'
/usr/local/bin/chef-solo:23:in `<main>'
I'm a little noob in vagrant+chef, any clue is (really) appreciated xD
After having cloned this git-rep and running the command "vagrant up" the terminal shows the error:
The box 'bento/ubuntu-14.04' could not be found or could not be accessed
in the remote catalog. If this is a private box on HashiCorp's Atlas,
please verify you're logged in via vagrant login. Also, please
double-check the name. The expanded URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/bento/ubuntu-14.04"]
The README says it should use "Trusty Tahr" which is not in the vagrant-file.
I'm having an issue sending emails from my dev installation.
Error message:
sh: 1: /usr/sbin/sendmail: not found
It happens when the php mail
function is called.
The solution for this seems to install postfix (apt-get install postfix
).
I would send a pull-request for this but I don't know much about chef :-/
With the last release 0.4.4 i got this after a correct installation:
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'bento/ubuntu-14.04' is up to date...
==> default: Resuming suspended VM...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
[...]
I can correctly connect to [email protected]
[Console]
==> default: Running handlers:
==> default: [2020-05-12T13:30:02+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2020-05-12T13:30:02+00:00] ERROR: Exception handlers complete
==> default: Chef Infra Client failed. 25 resources updated in 01 minutes 51 seconds
==> default: [2020-05-12T13:30:02+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2020-05-12T13:30:02+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2020-05-12T13:30:02+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: apt_package[percona-server-common-5.6] (percona::client line 3) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of ["apt-get", "-q", "-y", "--allow-downgrades", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "percona-server-common-5.6=5.6.47-87.0-1.xenial"] ----
See attached stacktrace chef-stacktrace.txt
So I've just downloaded and provisioned my VM, and I'm testing out Rocketeer to do deploys.
I'm getting an error that mcrypt
isn't found. The following extensions could not be found: mcrypt
Although I can see it in the list of php extensions.
But doing vagrant ssh
and php -m
the module doesn't show up in the list. I think the configuration needs to be updated to enable the module.
Hello all,
I have an issue setting up vagrant-chef.
I'm receiving a "404 not found" error when trying to use Vagrant Cloud.
See below.
C:\Program Files (x86)\HashiCorp\Vagrant\bin>vagrant init friendsofcake/cakephp-
baking
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
C:\Program Files (x86)\HashiCorp\Vagrant\bin>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'friendsofcake/cakephp-baking' could not be found. Attempting t
o find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'friendsofcake/cakephp-baking'
default: URL: https://atlas.hashicorp.com/friendsofcake/cakephp-baking
==> default: Adding box 'friendsofcake/cakephp-baking' (v1.0) for provider: virt
ualbox
default: Downloading: https://app.vagrantup.com/friendsofcake/boxes/cakephp-
baking/versions/1.0/providers/virtualbox.box
default: Progress: 0% (Rate: 0curl:/s, Estimated time remaining: --:--:--)
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
The requested URL returned error: 404 Not Found
This is more of a support question, but anyway:
I can't get hold on the permissions for the tmp folder (running mac). '
If I try chmod -R 777 app/app/tmp it works for the next call. But if I refresh Cake default page a couple of times I get some kind of access problems, for example:
Warning: SplFileInfo::openFile(/vagrant/app/app/tmp/cache/persistent/myapp_cake_core_file_map): failed to open stream: Permission denied in /vagrant/app/vendor/pear-pear.cakephp.org/CakePHP/Cake/Cache/Engine/FileEngine.php on line 355
The official doc says "change ownership on tmp to the web server user". On the Virtual Machine www-data is running the web server, and that user doesn't exist in the host os.
Any ideas?
This is the most over engineered vagrant setup i have seen inside my entire life. Homestead is even better than this setup. This vagrant setup even include XORG server which is for UI.
1 hour or installation time is pretty hectic.
If somebody just want to try cakephp he doesn't want 2 databases on it.
I could contribute to optimizing this vagrant setup and improve the installation time.
I've got a fresh vagrant box and has created a new project with
composer create-project --prefer-dist josegonzalez/app
If I go to 192.168.13.37 I get the standard page with "Replace the app directory with your application and you'll be off to the races!"-message.
If I add app.dev in my hosts file and access it through http://app.dev it works as expected.
From /var/log/nginx/error.log:
2017/07/06 18:31:48 [crit] 906#906: *1 open() "/var/log/nginx/-access.log" failed (13: Permission denied) while logging request, client: 192.168.13.1, server: ~^(?<sname>.+)\.dev, request: "GET / HTTP/1.1", host: "192.168.13.37"
2017/07/06 18:31:48 [crit] 906#906: *1 open() "/var/log/nginx/-access.log" failed (13: Permission denied) while logging request, client: 192.168.13.1, server: ~^(?<sname>.+)\.dev, request: "GET /favicon.ico HTTP/1.1", host: "192.168.13.37", referrer: "http://192.168.13.37/"
Earlier, I've used the old vagrant box without support for multiple repos, and there it worked well accessing the ip directly.
Background: I noticed that my master branch was 2 commits behind the remote and decided to switch to Multiple Repositories.
After running the following:
git pull origin master
vagrant reload --provision
Here's the output
==> default: [vagrant-hostsupdater] Removing hosts
==> default: Attempting graceful shutdown of VM...
==> default: Checking if box 'bento/ubuntu-14.04' is up to date...
==> default: A newer version of the box 'bento/ubuntu-14.04' is available! You currently
==> default: have version '2.3.1'. The latest is version '2.3.4'. Run
==> default: `vagrant box update` to update.
==> default: Clearing any previously set forwarded ports...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2200
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
[default] GuestAdditions 5.1.18 running --- OK.
==> default: Checking for guest additions in VM...
==> default: [vagrant-hostsupdater] Checking for host entries
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/kbm/Sites/www/me_too_and_co/web
default: /tmp/vagrant-chef/e4cbceee618c84ec0a370ffc3a2cb1fb/roles => /Users/kbm/Sites/www/me_too_and_co/web/cookbooks/roles
default: /tmp/vagrant-chef/aa182ebd466f84178fd6ac3d6f567090/cookbooks => /Users/kbm/Sites/www/me_too_and_co/web/cookbooks
==> default: Running provisioner: chef_solo...
==> default: Detected Chef (latest) is already installed
==> default: Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: [2017-03-31T09:20:25+00:00] INFO: Forking chef instance to converge...
==> default: Starting Chef Client, version 12.7.2
==> default: [2017-03-31T09:20:25+00:00] INFO: *** Chef 12.7.2 ***
==> default: [2017-03-31T09:20:25+00:00] INFO: Chef-client pid: 2481
==> default: [2017-03-31T09:20:27+00:00] INFO: Setting the run_list to ["role[vagrant]"] from CLI options
==> default: [2017-03-31T09:20:27+00:00] INFO: Run List is [role[vagrant]]
==> default: [2017-03-31T09:20:27+00:00] INFO: Run List expands to [system::init, system::update, hostname::default, git::install, percona::install, postgresql::install, redis::install, memcached::install, nginx::server, ruby::install, php::install, cakephp::setup]
==> default: [2017-03-31T09:20:27+00:00] INFO: Starting Chef Run for vagrant-227cc076
==> default: [2017-03-31T09:20:27+00:00] INFO: Running start handlers
==> default: [2017-03-31T09:20:27+00:00] INFO: Start handlers complete.
==> default: Compiling Cookbooks...
==> default:
==> default: ================================================================================
==> default: Recipe Compile Error in /tmp/vagrant-chef/aa182ebd466f84178fd6ac3d6f567090/cookbooks/git/recipes/install.rb
==> default: ================================================================================
==> default:
==> default:
==> default: NoMethodError
==> default: -------------
==> default: undefined method `uri' for Custom resource apt_repository from cookbook apt
==> default:
==> default:
==> default: Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef/aa182ebd466f84178fd6ac3d6f567090/cookbooks/git/recipes/apt_repository.rb:3:in `block in from_file'
==> default:
==> default: /tmp/vagrant-chef/aa182ebd466f84178fd6ac3d6f567090/cookbooks/git/recipes/apt_repository.rb:1:in `from_file'
==> default:
==> default: /tmp/vagrant-chef/aa182ebd466f84178fd6ac3d6f567090/cookbooks/git/recipes/install.rb:1:in `from_file'
==> default:
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/aa182ebd466f84178fd6ac3d6f567090/cookbooks/git/recipes/apt_repository.rb:
==> default:
==> default: 1: apt_repository "git" do
==> default: 2: key "E1DF1F24"
==> default: 3>> uri "ppa:git-core/ppa"
==> default: 4: distribution node["lsb"]["codename"]
==> default: 5: end
==> default: 6:
==> default:
==> default:
==> default: Running handlers:
==> default: [2017-03-31T09:20:27+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2017-03-31T09:20:27+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 0 resources updated in 02 seconds
==> default: [2017-03-31T09:20:27+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2017-03-31T09:20:27+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2017-03-31T09:20:27+00:00] ERROR: undefined method `uri' for Custom resource apt_repository from cookbook apt
==> default: [2017-03-31T09:20:27+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
I switched to postgres, and Cake couldn't connect to the database. Postgres was installed correctly, but it turned out that the PDO driver was missing. I had to do a
vagrant ssh
sudo apt-get update
sudo apt-get install php5-pgsql
And then it worked.
In addition, it would be nice if the same DB and user/password was created in Postgres as in MySQL, so you could switch just by changing datasource.
Hope you have a great time in Madrid, wish I could have been there :)
There are official trusty images available on https://vagrantcloud.com/ubuntu, ready to use:
vagrant box add ubuntu/trusty64
Some users would like this option because of familiarity with the webserver.
I'm not entirely sure if this is a VirtualBox or a Vagrant issue, but I specifically have it with this box all the time. When I suspend the box:
$ vagrant suspend
==> default: Saving VM state and suspending execution...
And then immediately want to resume it, it "lost" the VM:
$ vagrant resume
==> default: VM not created. Moving on...
With some searching and fiddling I came up with this bash script that seems to fix the problem for me, but I'm puzzled as of why I need to do this all the time:
#!/bin/bash
# Get the VM identifier string from VirtualBox (without the curly brackets)
VMID=`vboxmanage list vms|awk '{ gsub("[{}]", "", $2); print $2 }'`
# Set this in the "id" file
echo -n $VMID > .vagrant/machines/default/virtualbox/id
vagrant up
When I run this script, everything comes back up fine. If I don't run it and just do vagrant up
, it will start importing the base box and provision everything all over again, like (as the error indicates) the box was never there in the first place. Any clues on this issue?
I've been at this for a couple of hours now. First Percona wouldn't install(which caused the whole setup to abort) so I settled with default MySQL. Now that I finally have the machine running, I had quite the hard time figuring out the folder structure. It's in the readme, sure, but kind of buried(is db config really more important than putting your app in the right place?).
Next, I put FriendsOfCake/app-template under apps and got an error 500. Logs say it can't find CakePHP, so I checked what's wrong. Seems that the app template tries to look for Cake in a different directory. But never mind that, I was under the impression that CakePHP would be included(It's in the readme title + a CakePHP cookbook is included) but that doesn't seem to be the case after all.
I realise some if not most of these problems are due to me being new to Chef and perhaps not understanding the conventions used here. However the readme makes it seem like everything should work out-of box, especially when using the recommended app template and as suggested by the very noob-friendly section about running and stopping vagrant. As things are now, it's way easier to just install everything by hand on a vanilla ubuntu than to try to make sense of the multiple errors that come from following instructions.
My suggestion is to improve the readme to include ALL steps from provisioning to the point where you access a working CakePHP app through browser. Even a crude list of required commands is better than nothing.
Hello!
When I try to install the box it returns an error due to a postgres-client dependency. Can you please help to solve it? Thank you.
Error executing action `install` on resource 'apt_package[postgresql-client-9.6]'
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of ["apt-get", "-q", "-y", "install", "postgresql-client-9.6=9.6.5-1.pgdg16.04+2"] ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: Some packages could not be installed. This may mean that you have
==> default: requested an impossible situation or if you are using the unstable
==> default:
==> default: distribution that some required packages have not yet been created
==> default:
==> default:
==> default: or been moved out of Incoming.
==> default:
==> default:
==> default: The following information may help to resolve the situation:
==> default:
==> default: The following packages have unmet dependencies:
==> default: postgresql-client-9.6 : Depends: libpq5 (>= 9.6.5) but 9.5.9-0ubuntu0.16.04 is to be installed
==> default: STDERR: E: Unable to correct problems, you have held broken packages.
==> default: ---- End output of ["apt-get", "-q", "-y", "install", "postgresql-client-9.6=9.6.5-1.pgdg16.04+2"] ----
==> default: Ran ["apt-get", "-q", "-y", "install", "postgresql-client-9.6=9.6.5-1.pgdg16.04+2"] returned 100
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /var/chef/cache/cookbooks/postgresql/recipes/client.rb
==> default:
==> default: 3: package "postgresql-client-9.6" do
==> default: 4: action :install
==> default: 5: end
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /var/chef/cache/cookbooks/postgresql/recipes/client.rb:3:in `from_file'
==> default:
==> default: apt_package("postgresql-client-9.6") do
==> default: package_name "postgresql-client-9.6"
==> default: action [:install]
==> default: default_guard_interpreter :default
==> default: declared_type :package
==> default: cookbook_name "postgresql"
==> default: recipe_name "client"
==> default: end
==> default:
==> default: System Info:
==> default: ------------
==> default: chef_version=13.5.3
==> default: platform=ubuntu
==> default: platform_version=16.04
==> default: ruby=ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
==> default: program_name=chef-solo worker: ppid=26486;start=10:11:45;
==> default: executable=/opt/chef/bin/chef-solo
==> default:
==> default: [2017-10-31T10:11:53+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default:
==> default: Running handlers:
==> default: [2017-10-31T10:11:53+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2017-10-31T10:11:53+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 0 resources updated in 07 seconds
Hello,
I try to use vagrant-chef on mac OS-X but I have an error when I execute vagrant up.
"default: You are already using composer version c83650f299cfff1049cd61ea72ee5345bd4f92d3."
When I go to http://192.168.13.37/ I have "File not found."
Thx ;)
If you use the apps dir to host several repos, there is no working www-redirect. For example,
http://www.myapp.dev
will get you to the default /etc/nginx/app/index.html page.
It is much easier to connect from the host box instead from the inside. Also we should reflect in the README that the password is bananas
It would contains client/mysql/mysqldump/mysqldiff sections and could be filled with vars coming from cookbooks/roles/vagrant.json
I'd love to pull request if I knew how achieve that in chef ^^
That is 1.6 as of this writing. There should be a ppa somewhere that lets us do this.
I'm getting the following error when trying to install the box:
SO -> Windows 10
Vagrant version -> 1.9.1
VirtualBox version -> 5.1.10
[vagrant-chef_log.txt](https://github.com/FriendsOfCake/vagrant-chef/files/656946/vagrant-chef_log.txt)
[vagrant-chef_log.txt](https://github.com/FriendsOfCake/vagrant-chef/files/656948/vagrant-chef_log.txt)
==> default: GPG error: https://repo.percona.com trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 9334A25F8507EFA5
==> default: [2016-12-16T10:35:19+00:00] INFO: execute[apt-get -q update] ran successfully
==> default:
==> default: - execute apt-get -q update
==> default:
==> default:
==> default:
==> default: * apt_preference[percona] action add
==> default:
==> default: * directory[/etc/apt/preferences.d] action create
==> default: (up to date)
==> default:
==> default: * file[/etc/apt/preferences.d/percona.pref] action delete
==> default: (skipped due to only_if)
==> default:
==> default: * file[/etc/apt/preferences.d/percona] action delete
==> default: (up to date)
==> default:
==> default: * file[/etc/apt/preferences.d/percona.pref] action create
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/percona.pref] created file /etc/apt/preferences.d/percona.pref
==> default:
==> default: - create new file /etc/apt/preferences.d/percona.pref
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/percona.pref] updated file contents /etc/apt/preferences.d/percona.pref
==> default:
==> default: - update content in file /etc/apt/preferences.d/percona.pref from none to 698084
==> default:
==> default: --- /etc/apt/preferences.d/percona.pref 2016-12-16 10:35:19.550942203 +0000
==> default:
==> default: +++ /etc/apt/preferences.d/.chef-percona20161216-1861-1kv33cp.pref 2016-12-16 10:35:19.550942203 +0000
==> default:
==> default: @@ -1 +1,4 @@
==> default:
==> default: +Package: *
==> default:
==> default: +Pin: origin repo.percona.com
==> default: +Pin-Priority: 700
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/percona.pref] owner changed to 0
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/percona.pref] group changed to 0
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/percona.pref] mode changed to 644
==> default:
==> default: - change mode from '' to '0644'
==> default:
==> default: - change owner from '' to 'root'
==> default:
==> default: - change group from '' to 'root'
==> default:
==> default:
==> default: * apt_preference[ubuntu] action add
==> default:
==> default: * directory[/etc/apt/preferences.d] action create
==> default: (up to date)
==> default:
==> default: * file[/etc/apt/preferences.d/ubuntu.pref] action delete
==> default: (skipped due to only_if)
==> default:
==> default: * file[/etc/apt/preferences.d/ubuntu] action delete
==> default: (up to date)
==> default:
==> default: * file[/etc/apt/preferences.d/ubuntu.pref] action create
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/ubuntu.pref] created file /etc/apt/preferences.d/ubuntu.pref
==> default:
==> default: - create new file /etc/apt/preferences.d/ubuntu.pref
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/ubuntu.pref] updated file contents /etc/apt/preferences.d/ubuntu.pref
==> default:
==> default: - update content in file /etc/apt/preferences.d/ubuntu.pref from none to 03c987
==> default:
==> default: --- /etc/apt/preferences.d/ubuntu.pref 2016-12-16 10:35:19.606914203 +0000
==> default:
==> default: +++ /etc/apt/preferences.d/.chef-ubuntu20161216-1861-xi3wco.pref 2016-12-16 10:35:19.602916203 +0000
==> default:
==> default: @@ -1 +1,4 @@
==> default:
==> default: +Package: *
==> default: +Pin: origin archive.ubuntu.com
==> default: +Pin-Priority: 600
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/ubuntu.pref] owner changed to 0
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/ubuntu.pref] group changed to 0
==> default: [2016-12-16T10:35:19+00:00] INFO: file[/etc/apt/preferences.d/ubuntu.pref] mode changed to 644
==> default:
==> default: - change mode from '' to '0644'
==> default:
==> default: - change owner from '' to 'root'
==> default:
==> default: - change group from '' to 'root'
==> default:
==> default: Recipe: percona::client
==> default:
==> default: * apt_package[percona-server-common-5.6] action install
==> default:
==> default:
==> default: ================================================================================
==> default: Error executing action `install` on resource 'apt_package[percona-server-common-5.6]'
==> default: ================================================================================
==> default:
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of apt-get -q -y install percona-server-common-5.6=5.6.34-79.1-1.trusty ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following NEW packages will be installed:
==> default: percona-server-common-5.6
==> default: 0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
==> default: Need to get 12.0 kB of archives.
==> default: After this operation, 78.8 kB of additional disk space will be used.
==> default: WARNING: The following packages cannot be authenticated!
==> default: percona-server-common-5.6
==> default: STDERR: E: There are problems and -y was used without --force-yes
==> default: ---- End output of apt-get -q -y install percona-server-common-5.6=5.6.34-79.1-1.trusty ----
==> default: Ran apt-get -q -y install percona-server-common-5.6=5.6.34-79.1-1.trusty returned 100
==> default:
==> default: Resource Declaration:
==> default: ---------------------
==> default: # In /var/chef/cache/cookbooks/percona/recipes/client.rb
==> default:
==> default: 3: package "percona-server-common-5.6" do
==> default: 4: action :install
==> default: 5: end
==> default: 6:
==> default:
==> default: Compiled Resource:
==> default: ------------------
==> default: # Declared in /var/chef/cache/cookbooks/percona/recipes/client.rb:3:in `from_file'
==> default:
==> default: apt_package("percona-server-common-5.6") do
==> default: package_name "percona-server-common-5.6"
==> default: action [:install]
==> default: retries 0
==> default: retry_delay 2
==> default: default_guard_interpreter :default
==> default: declared_type :package
==> default: cookbook_name "percona"
==> default: recipe_name "client"
==> default: end
==> default:
==> default: Platform:
==> default: ---------
==> default: x86_64-linux
==> default:
==> default: [2016-12-16T10:35:21+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default:
==> default: Running handlers:
==> default: [2016-12-16T10:35:21+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2016-12-16T10:35:21+00:00] ERROR: Exception handlers complete
==> default: Chef Client failed. 23 resources updated in 05 minutes 12 seconds
==> default: [2016-12-16T10:35:21+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2016-12-16T10:35:21+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
==> default: [2016-12-16T10:35:21+00:00] ERROR: apt_package[percona-server-common-5.6] (percona::client line 3) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of apt-get -q -y install percona-server-common-5.6=5.6.34-79.1-1.trusty ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following NEW packages will be installed:
==> default: percona-server-common-5.6
==> default: 0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
==> default: Need to get 12.0 kB of archives.
==> default: After this operation, 78.8 kB of additional disk space will be used.
==> default: WARNING: The following packages cannot be authenticated!
==> default: percona-server-common-5.6
==> default: STDERR: E: There are problems and -y was used without --force-yes
==> default: ---- End output of apt-get -q -y install percona-server-common-5.6=5.6.34-79.1-1.trusty ----
==> default: Ran apt-get -q -y install percona-server-common-5.6=5.6.34-79.1-1.trusty returned 100
==> default: [2016-12-16T10:35:21+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Full log:
vagrant-chef_log.txt
git clone [email protected]:FriendsOfCake/vagrant-chef.git
should be
git clone [email protected]:FriendsOfCake/vagrant-chef.git cake-vagrant
When creating custom sites under the vagrant/apps-folder, nginx is configured to generate and write to application specific access.log-files.
Problem is that user www-data lacks rights to create files in /var/log/nginx
In my nginx error.log these kind of errors was thrown:
2017/07/07 08:29:17 [crit] 20437#20437: *14 open() "/var/log/nginx/calico-access.log" failed (13: Permission denied) while logging request, client: 192.168.13.1, server: ~^(?<sname>.+)\.dev, request: "GET /favicon.ico HTTP/1.1", host: "calico.dev", referrer: "http://www.calico.dev/"
I solved the problem with
sudo chown -R www-data:adm /var/log/nginx
I guess the "correct" solution is to add something like this to cookbooks/nginx/recipes/server.rb
directory '/var/log/nginx' do | owner "www-data" | group "www-data" | end
A recent update to Chrome forces all http on .dev domains to redirect to https (https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/)
This breaks all apps that are accessed by http://appname.dev
Solutions:
Thoughts on this?
When I do a vagrant up, the following error displays:
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
Any ideas what I might be doing wrong?
I'm getting the following error when running vagrant up
Host machine: Windows 10.
Funny enough it works just fine on my Mac.
Mixlib::ShellOut::ShellCommandFailed: apt_package[postgresql-client-9.6] (postgresql::client line 3) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "postgresql-client-9.6=9.6.8-1.pgdg16.04+1"] ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
postgresql-client-9.6 : Depends: libpq5 (>= 9.6.8) but 9.5.12-0ubuntu0.16.04 is to be installed
STDERR: E: Unable to correct problems, you have held broken packages.
---- End output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "postgresql-client-9.6=9.6.8-1.pgdg16.04+1"] ----
Ran ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "postgresql-client-9.6=9.6.8-1.pgdg16.04+1"] returned 100
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.3.2/lib/mixlib/shellout.rb:293:in `invalid!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.3.2/lib/mixlib/shellout.rb:280:in `error!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/mixin/shell_out.rb:120:in `shell_out!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/mixin/shell_out.rb:76:in `shell_out_compact!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/mixin/shell_out.rb:95:in `shell_out_compact_timeout!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package/apt.rb:146:in `run_noninteractive'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package/apt.rb:85:in `install_package'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package.rb:102:in `block (3 levels) in <class:Package>'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package.rb:269:in `multipackage_api_adapter'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package.rb:101:in `block (2 levels) in <class:Package>'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/mixin/why_run.rb:51:in `add_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider.rb:227:in `converge_by'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package.rb:100:in `block in <class:Package>'
(eval):2:in `block in action_install'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider.rb:236:in `instance_eval'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider.rb:236:in `compile_and_converge_action'
(eval):2:in `action_install'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider.rb:182:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/resource.rb:576:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/runner.rb:70:in `run_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/runner.rb:98:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/runner.rb:98:in `each'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/runner.rb:98:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/resource_collection/resource_list.rb:94:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/resource_collection/stepable_iterator.rb:114:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/resource_collection/stepable_iterator.rb:103:in `iterate'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/resource_collection/resource_list.rb:92:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/runner.rb:97:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/client.rb:717:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/client.rb:712:in `catch'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/client.rb:712:in `converge'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/client.rb:751:in `converge_and_save'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/client.rb:283:in `run'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/application.rb:303:in `run_with_graceful_exit_option'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/application.rb:279:in `block in run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/local_mode.rb:44:in `with_server_connectivity'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/application.rb:261:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/application/client.rb:440:in `run_application'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/application.rb:66:in `run'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/application/solo.rb:224:in `run'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/bin/chef-solo:25:in `<top (required)>'
/usr/bin/chef-solo:59:in `load'
/usr/bin/chef-solo:59:in `<main>'
>>>> Caused by Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
---- Begin output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "postgresql-client-9.6=9.6.8-1.pgdg16.04+1"] ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
postgresql-client-9.6 : Depends: libpq5 (>= 9.6.8) but 9.5.12-0ubuntu0.16.04 is to be installed
STDERR: E: Unable to correct problems, you have held broken packages.
---- End output of ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "postgresql-client-9.6=9.6.8-1.pgdg16.04+1"] ----
Ran ["apt-get", "-q", "-y", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "postgresql-client-9.6=9.6.8-1.pgdg16.04+1"] returned 100
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.3.2/lib/mixlib/shellout.rb:293:in `invalid!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.3.2/lib/mixlib/shellout.rb:280:in `error!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/mixin/shell_out.rb:120:in `shell_out!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/mixin/shell_out.rb:76:in `shell_out_compact!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/mixin/shell_out.rb:95:in `shell_out_compact_timeout!'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package/apt.rb:146:in `run_noninteractive'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package/apt.rb:85:in `install_package'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package.rb:102:in `block (3 levels) in <class:Package>'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package.rb:269:in `multipackage_api_adapter'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider/package.rb:101:in `block (2 levels) in <class:Package>'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/mixin/why_run.rb:51:in `add_action'
/opt/chef/embedded/lib/ruby/gems/2.5.0/gems/chef-14.0.202/lib/chef/provider.rb:227:in `converge_by'
I followed installation instruction.
The box 'chef/ubuntu-14.04' could not be found or could not be accessed in the remote catalog.
I have got this error above.
https://atlas.hashicorp.com/chef/ubuntu-14.04 is HTTP/1.1 404 Not Found.
There aren't any boxes to show.
https://atlas.hashicorp.com/chef/
I think that It does not really exist.
$ git clone [email protected]:FriendsOfCake/vagrant-chef.git
Cloning into 'vagrant-chef'...
remote: Counting objects: 1064, done.
remote: Total 1064 (delta 0), reused 0 (delta 0), pack-reused 1064
Receiving objects: 100% (1064/1064), 131.53 KiB | 0 bytes/s, done.
Resolving deltas: 100% (493/493), done.
Checking connectivity... done.
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'chef/ubuntu-14.04' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'chef/ubuntu-14.04' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/chef/ubuntu-14.04"]
Error: The requested URL returned error: 404 Not Found
$ vagrant login
[snip]
You are now logged in.
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'chef/ubuntu-14.04' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'chef/ubuntu-14.04' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/chef/ubuntu-14.04"]
Error: The requested URL returned error: 404 Not Found
$ git show
commit 01f11c6b4129e07565cb0e6ef91eab348121cf00
Merge: 0c3763f fdff76c
Author: Jose Diaz-Gonzalez <[email protected]>
Date: Wed Aug 12 14:17:27 2015 -0400
Merge pull request #40 from bilson/parallels-support
Parallels support added.
$ vagrant login --check
You are already logged in.
$ vagrant version
Installed Version: 1.7.4
Latest Version: 1.7.4
You're running an up-to-date version of Vagrant!
$ VBoxManage --version
5.0.0r101573
Mac OS X 10.10.4
$ vagrant init friendsofcake/cakephp-baking
$ vagrant up
I did this before git clone installation.
It seemed successfully installed.
I can connect by vagrant ssh
. But I cannot access by http://192.168.13.37/
.
That is why I tried git clone installation.
It would be nice to have a section in the readme with the credentials to be used for accessing the vm through
ssh -lvagrant 192.168.13.37
instead of
vagrant ssh
and the credentials to be used with MySQL.
For mysql root/bananas work fine from my cake app, but MySQL Workbench can't establish connection with those credentials. Workbench instead accepts "user" with empty password, but that's not accepted in the cake app.
I'm trying to run Console/cake from the vagrant box. On my macs file system the permission is set correct, but when I ssh to the virtual box the execute permission is not set for my vagrant user. Is there a way to get around this?
When running vagrant up
the script crashes when trying to install chef, because one of the chef dependencies depends on ruby 2.2.2, whereas we install ruby 2.1.
✔ ~/code
13:32 $ git clone https://github.com/FriendsOfCake/vagrant-chef.git
Cloning into 'vagrant-chef'...
remote: Counting objects: 1111, done.
remote: Total 1111 (delta 0), reused 0 (delta 0), pack-reused 1111
Receiving objects: 100% (1111/1111), 136.34 KiB | 0 bytes/s, done.
Resolving deltas: 100% (523/523), done.
Checking connectivity... done.
✔ ~/code
13:32 $ cd vagrant-chef/
✔ ~/code/vagrant-chef [master|✔]
13:32 $ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'bento/ubuntu-14.04' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'bento/ubuntu-14.04'
default: URL: https://atlas.hashicorp.com/bento/ubuntu-14.04
==> default: Adding box 'bento/ubuntu-14.04' (v2.2.3) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/bento/boxes/ubuntu-14.04/versions/2.2.3/providers/virtualbox.box
==> default: Successfully added box 'bento/ubuntu-14.04' (v2.2.3) for 'virtualbox'!
==> default: Importing base box 'bento/ubuntu-14.04'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/ubuntu-14.04' is up to date...
==> default: Setting the name of the VM: vagrant-chef_default_1451133273665_44675
==> default: Auto-generating node name for Chef...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /Users/jesper/code/vagrant-chef
default: /tmp/vagrant-chef/d331b98d4193f3bb791306a4615ab1d6/roles => /Users/jesper/code/vagrant-chef/cookbooks/roles
default: /tmp/vagrant-chef/7df3106cf756f2cf898623524e5ed110/cookbooks => /Users/jesper/code/vagrant-chef/cookbooks
==> default: Running provisioner: shell...
default: Running: inline script
==> default: stdin: is not a tty
==> default: - setting up auto chdir on ssh
==> default: - updating deb repository
==> default: - installing build requirements
==> default: - installing latest ruby version
==> default: - installing chef
==> default: ERROR: Error installing chef:
==> default: rack requires Ruby version >= 2.2.2.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
The master branch chef cookbooks that include reference to apt-repository
fail.
The changes in 5644854 seem to work for master too. Perhaps they can be merged in master before 14.04 is out.
Would be wise/handy to install typical dev dependences rather than make it an application dependency
There's only one application possible to install automatically, which means either:
vagrant ssh; su vagrant; sudo su; etc
)The first point is problematic for anyone working regularly on multiple applications - they will at least be at risk of running out of memory; The second point will lead to users having virtual machines which may have been installed into a consistent state but at the time of having some kind of problem, be in an INconsistent state.
It would be logical to permit by default multiple applications (http hosts) to prevent problems or hacks as users grow past their first steps using this repo.
As it's needed by the worldwide famous DebugKit, it would be great to have installed sqlite & php5-sqlite. Otherwise, logs/error.log is screaming:
Warning: DebugKit not enabled. You need to either install pdo_sqlite, or define the "debug_kit" connection name.
In the meantime, this can be achieved easily :
apt-get -y install sqlite
apt-get -y install php5-sqlite
Hello!
I am having problem installing vagrant-chef, please read the log below.
(I have tried using normal and root user)
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'precise32'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: crm_default_1421577683463_38111
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => /home/damiano/lavoro/apps/crm
default: /tmp/vagrant-chef-3/chef-solo-2/roles => /home/damiano/lavoro/apps/crm/cookbooks/roles
default: /tmp/vagrant-chef-3/chef-solo-1/cookbooks => /home/damiano/lavoro/apps/crm/cookbooks
==> default: Running provisioner: shell...
default: Running: inline script
==> default: stdin: is not a tty
==> default: - setting up auto chdir on ssh
==> default: - updating deb repository
==> default: - installing build requirements
==> default: Preconfiguring packages ...
==> default: (Reading database ...
==> default: 29361 files and directories currently installed.)
==> default: Preparing to replace libssl-dev 1.0.1-4ubuntu5.5 (using .../libssl-dev_1.0.1-4ubuntu5.21_i386.deb) ...
==> default: Unpacking replacement libssl-dev ...
==> default: Preparing to replace libssl1.0.0 1.0.1-4ubuntu5.5 (using .../libssl1.0.0_1.0.1-4ubuntu5.21_i386.deb) ...
==> default: Unpacking replacement libssl1.0.0 ...
==> default: Setting up libssl1.0.0 (1.0.1-4ubuntu5.21) ...
==> default: Processing triggers for libc-bin ...
==> default: ldconfig deferred processing now taking place
==> default: (Reading database ...
==> default: 29361 files and directories currently installed.)
==> default: Preparing to replace libxml2 2.7.8.dfsg-5.1ubuntu4 (using .../libxml2_2.7.8.dfsg-5.1ubuntu4.11_i386.deb) ...
==> default: Unpacking replacement libxml2 ...
==> default: Selecting previously unselected package libxslt1.1.
==> default: Unpacking libxslt1.1 (from .../libxslt1.1_1.1.26-8ubuntu1.3_i386.deb) ...
==> default: Selecting previously unselected package libstdc++6-4.6-dev.
==> default: Unpacking libstdc++6-4.6-dev (from .../libstdc++6-4.6-dev_4.6.3-1ubuntu5_i386.deb) ...
==> default: Selecting previously unselected package g++-4.6.
==> default: Unpacking g++-4.6 (from .../g++-4.6_4.6.3-1ubuntu5_i386.deb) ...
==> default: Selecting previously unselected package g++.
==> default: Unpacking g++ (from .../g++_4%3a4.6.3-1ubuntu5_i386.deb) ...
==> default: Selecting previously unselected package make.
==> default: Unpacking make (from .../make_3.81-8.1ubuntu1.1_i386.deb) ...
==> default: Selecting previously unselected package libdpkg-perl.
==> default: Unpacking libdpkg-perl (from .../libdpkg-perl_1.16.1.2ubuntu7.5_all.deb) ...
==> default: Selecting previously unselected package patch.
==> default: Unpacking patch (from .../patch_2.6.1-3_i386.deb) ...
==> default: Selecting previously unselected package dpkg-dev.
==> default: Unpacking dpkg-dev (from .../dpkg-dev_1.16.1.2ubuntu7.5_all.deb) ...
==> default: Selecting previously unselected package build-essential.
==> default: Unpacking build-essential (from .../build-essential_11.5ubuntu2.1_i386.deb) ...
==> default: Selecting previously unselected package fakeroot.
==> default: Unpacking fakeroot (from .../fakeroot_1.18.2-1_i386.deb) ...
==> default: Selecting previously unselected package libalgorithm-diff-perl.
==> default: Unpacking libalgorithm-diff-perl (from .../libalgorithm-diff-perl_1.19.02-2_all.deb) ...
==> default: Selecting previously unselected package libalgorithm-diff-xs-perl.
==> default: Unpacking libalgorithm-diff-xs-perl (from .../libalgorithm-diff-xs-perl_0.04-2build2_i386.deb) ...
==> default: Selecting previously unselected package libalgorithm-merge-perl.
==> default: Unpacking libalgorithm-merge-perl (from .../libalgorithm-merge-perl_0.08-2_all.deb) ...
==> default: Selecting previously unselected package libxml2-dev.
==> default: Unpacking libxml2-dev (from .../libxml2-dev_2.7.8.dfsg-5.1ubuntu4.11_i386.deb) ...
==> default: Selecting previously unselected package libxslt1-dev.
==> default: Unpacking libxslt1-dev (from .../libxslt1-dev_1.1.26-8ubuntu1.3_i386.deb) ...
==> default: Selecting previously unselected package unzip.
==> default: Unpacking unzip (from .../unzip_6.0-4ubuntu2.1_i386.deb) ...
==> default: Processing triggers for man-db ...
==> default: Setting up libssl-dev (1.0.1-4ubuntu5.21) ...
==> default: Setting up libxml2 (2.7.8.dfsg-5.1ubuntu4.11) ...
==> default: Setting up libxslt1.1 (1.1.26-8ubuntu1.3) ...
==> default: Setting up make (3.81-8.1ubuntu1.1) ...
==> default: Setting up libdpkg-perl (1.16.1.2ubuntu7.5) ...
==> default: Setting up patch (2.6.1-3) ...
==> default: Setting up dpkg-dev (1.16.1.2ubuntu7.5) ...
==> default: Setting up fakeroot (1.18.2-1) ...
==> default: update-alternatives:
==> default: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode.
==> default: Setting up libalgorithm-diff-perl (1.19.02-2) ...
==> default: Setting up libalgorithm-diff-xs-perl (0.04-2build2) ...
==> default: Setting up libalgorithm-merge-perl (0.08-2) ...
==> default: Setting up libxml2-dev (2.7.8.dfsg-5.1ubuntu4.11) ...
==> default: Setting up libxslt1-dev (1.1.26-8ubuntu1.3) ...
==> default: Setting up unzip (6.0-4ubuntu2.1) ...
==> default: Setting up libstdc++6-4.6-dev (4.6.3-1ubuntu5) ...
==> default: Setting up g++-4.6 (4.6.3-1ubuntu5) ...
==> default: Setting up g++ (4:4.6.3-1ubuntu5) ...
==> default: update-alternatives:
==> default: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode.
==> default: Setting up build-essential (11.5ubuntu2.1) ...
==> default: Processing triggers for libc-bin ...
==> default: ldconfig deferred processing now taking place
==> default: Selecting previously unselected package m4.
==> default: (Reading database ...
==> default: 30745 files and directories currently installed.)
==> default: Unpacking m4 (from .../m4_1.4.16-2ubuntu1_i386.deb) ...
==> default: Selecting previously unselected package libfl-dev.
==> default: Unpacking libfl-dev (from .../libfl-dev_2.5.35-10ubuntu3_i386.deb) ...
==> default: Selecting previously unselected package flex.
==> default: Unpacking flex (from .../flex_2.5.35-10ubuntu3_i386.deb) ...
==> default: Selecting previously unselected package libltdl7.
==> default: Unpacking libltdl7 (from .../libltdl7_2.4.2-1ubuntu1_i386.deb) ...
==> default: Selecting previously unselected package autoconf.
==> default: Unpacking autoconf (from .../autoconf_2.68-1ubuntu2_all.deb) ...
==> default: Selecting previously unselected package autotools-dev.
==> default: Unpacking autotools-dev (from .../autotools-dev_20120210.1ubuntu1_all.deb) ...
==> default: Selecting previously unselected package automake.
==> default: Unpacking automake (from .../automake_1%3a1.11.3-1ubuntu2_all.deb) ...
==> default: Selecting previously unselected package binutils-doc.
==> default: Unpacking binutils-doc (from .../binutils-doc_2.22-6ubuntu1.1_all.deb) ...
==> default: Selecting previously unselected package libbison-dev.
==> default: Unpacking libbison-dev (from .../libbison-dev_1%3a2.5.dfsg-2.1_i386.deb) ...
==> default: Selecting previously unselected package bison.
==> default: Unpacking bison (from .../bison_1%3a2.5.dfsg-2.1_i386.deb) ...
==> default: Selecting previously unselected package libltdl-dev.
==> default: Unpacking libltdl-dev (from .../libltdl-dev_2.4.2-1ubuntu1_i386.deb) ...
==> default: Selecting previously unselected package libtool.
==> default: Unpacking libtool (from .../libtool_2.4.2-1ubuntu1_i386.deb) ...
==> default: Processing triggers for install-info ...
==> default: Processing triggers for man-db ...
==> default: Setting up m4 (1.4.16-2ubuntu1) ...
==> default: Setting up libfl-dev (2.5.35-10ubuntu3) ...
==> default: Setting up flex (2.5.35-10ubuntu3) ...
==> default: Setting up libltdl7 (2.4.2-1ubuntu1) ...
==> default: Setting up autoconf (2.68-1ubuntu2) ...
==> default: Setting up autotools-dev (20120210.1ubuntu1) ...
==> default: Setting up automake (1:1.11.3-1ubuntu2) ...
==> default: update-alternatives:
==> default: using /usr/bin/automake-1.11 to provide /usr/bin/automake (automake) in auto mode.
==> default: Setting up binutils-doc (2.22-6ubuntu1.1) ...
==> default: Setting up libbison-dev (1:2.5.dfsg-2.1) ...
==> default: Setting up bison (1:2.5.dfsg-2.1) ...
==> default: update-alternatives:
==> default: using /usr/bin/bison.yacc to provide /usr/bin/yacc (yacc) in auto mode.
==> default: Setting up libltdl-dev (2.4.2-1ubuntu1) ...
==> default: Setting up libtool (2.4.2-1ubuntu1) ...
==> default: Processing triggers for libc-bin ...
==> default: ldconfig deferred processing now taking place
==> default: Selecting previously unselected package libyaml-0-2.
==> default: (Reading database ...
==> default: 31201 files and directories currently installed.)
==> default: Unpacking libyaml-0-2 (from .../libyaml-0-2_0.1.4-2ubuntu0.12.04.4_i386.deb) ...
==> default: Selecting previously unselected package libruby1.9.1.
==> default: Unpacking libruby1.9.1 (from .../libruby1.9.1_1.9.3.0-1ubuntu2.10_i386.deb) ...
==> default: Selecting previously unselected package ruby1.9.1.
==> default: Unpacking ruby1.9.1 (from .../ruby1.9.1_1.9.3.0-1ubuntu2.10_i386.deb) ...
==> default: Selecting previously unselected package ri1.9.1.
==> default: Unpacking ri1.9.1 (from .../ri1.9.1_1.9.3.0-1ubuntu2.10_all.deb) ...
==> default: Selecting previously unselected package ruby1.9.1-dev.
==> default: Unpacking ruby1.9.1-dev (from .../ruby1.9.1-dev_1.9.3.0-1ubuntu2.10_i386.deb) ...
==> default: Processing triggers for man-db ...
==> default: Setting up libyaml-0-2 (0.1.4-2ubuntu0.12.04.4) ...
==> default: Setting up libruby1.9.1 (1.9.3.0-1ubuntu2.10) ...
==> default: Setting up ruby1.9.1 (1.9.3.0-1ubuntu2.10) ...
==> default: update-alternatives:
==> default: using /usr/bin/gem1.9.1 to provide /usr/bin/gem (gem) in auto mode.
==> default: update-alternatives:
==> default: using /usr/bin/ruby1.9.1 to provide /usr/bin/ruby (ruby) in auto mode.
==> default: Setting up ri1.9.1 (1.9.3.0-1ubuntu2.10) ...
==> default: Setting up ruby1.9.1-dev (1.9.3.0-1ubuntu2.10) ...
==> default: Processing triggers for libc-bin ...
==> default: ldconfig deferred processing now taking place
==> default: Running provisioner: chef_solo...
Generating chef JSON and uploading...
==> default: Running chef-solo...
==> default: stdin: is not a tty
==> default: [2015-01-18T10:42:38+00:00] INFO: *** Chef 10.14.2 ***
==> default: [2015-01-18T10:42:38+00:00] INFO: Setting the run_list to ["role[vagrant]"] from JSON
==> default: [2015-01-18T10:42:38+00:00] INFO: Run List is [role[vagrant]]
==> default: [2015-01-18T10:42:38+00:00] INFO: Run List expands to [system::update, hostname::default, git::install, percona::install, postgresql::install, redis::install, memcached::install, nginx::server, ruby::install, php::install, cakephp::setup]
==> default: [2015-01-18T10:42:38+00:00] INFO: Starting Chef Run for precise32
==> default: [2015-01-18T10:42:38+00:00] INFO: Running start handlers
==> default: [2015-01-18T10:42:38+00:00] INFO: Start handlers complete.
==> default: [2015-01-18T10:42:38+00:00] INFO: execute[trigger apt-get update] ran successfully
==> default: [2015-01-18T10:42:38+00:00] INFO: execute[trigger apt-get update] sending run action to executeapt-get update
==> default: [2015-01-18T10:42:43+00:00] INFO: execute[apt-get update] ran successfully
==> default: [2015-01-18T10:43:12+00:00] INFO: execute[request git key] ran successfully
==> default: [2015-01-18T10:43:12+00:00] INFO: execute[install git key] ran successfully
==> default: [2015-01-18T10:43:12+00:00] INFO: template[/etc/apt/sources.list.d/git.list] updated content
==> default: [2015-01-18T10:43:12+00:00] INFO: template[/etc/apt/sources.list.d/git.list] owner changed to 0
==> default: [2015-01-18T10:43:12+00:00] INFO: template[/etc/apt/sources.list.d/git.list] group changed to 0
==> default: [2015-01-18T10:43:12+00:00] INFO: template[/etc/apt/sources.list.d/git.list] mode changed to 644
==> default: [2015-01-18T10:43:12+00:00] INFO: template[/etc/apt/sources.list.d/git.list] sending run action to executeapt-get update
==> default: [2015-01-18T10:43:17+00:00] INFO: execute[apt-get update] ran successfully
==> default: [2015-01-18T10:43:33+00:00] INFO: package[git] upgraded from uninstalled to 1:2.2.2-0ppa1~ubuntu12.04.1
==> default: [2015-01-18T10:43:34+00:00] INFO: execute[request percona key] ran successfully
==> default: [2015-01-18T10:43:34+00:00] INFO: execute[install percona key] ran successfully
==> default: [2015-01-18T10:43:34+00:00] INFO: template[/etc/apt/sources.list.d/percona.list] updated content
==> default: [2015-01-18T10:43:34+00:00] INFO: template[/etc/apt/sources.list.d/percona.list] owner changed to 0
==> default: [2015-01-18T10:43:34+00:00] INFO: template[/etc/apt/sources.list.d/percona.list] group changed to 0
==> default: [2015-01-18T10:43:34+00:00] INFO: template[/etc/apt/sources.list.d/percona.list] mode changed to 644
==> default: [2015-01-18T10:43:34+00:00] INFO: template[/etc/apt/sources.list.d/percona.list] sending run action to executeapt-get update
==> default: [2015-01-18T10:43:39+00:00] INFO: execute[apt-get update] ran successfully
==> default: [2015-01-18T10:43:39+00:00] INFO: file[/etc/apt/preferences.d/percona] owner changed to 0
==> default: [2015-01-18T10:43:39+00:00] INFO: file[/etc/apt/preferences.d/percona] group changed to 0
==> default: [2015-01-18T10:43:39+00:00] INFO: file[/etc/apt/preferences.d/percona] mode changed to 644
==> default: [2015-01-18T10:43:39+00:00] INFO: file[/etc/apt/preferences.d/percona] created file /etc/apt/preferences.d/percona
==> default: [2015-01-18T10:43:39+00:00] INFO: file[/etc/apt/preferences.d/ubuntu] owner changed to 0
==> default: [2015-01-18T10:43:39+00:00] INFO: file[/etc/apt/preferences.d/ubuntu] group changed to 0
==> default: [2015-01-18T10:43:39+00:00] INFO: file[/etc/apt/preferences.d/ubuntu] mode changed to 644
==> default: [2015-01-18T10:43:39+00:00] INFO: file[/etc/apt/preferences.d/ubuntu] created file /etc/apt/preferences.d/ubuntu
==> default: [2015-01-18T10:45:21+00:00] INFO: directory[/var/lib/mysql/binlogs] created directory /var/lib/mysql/binlogs
==> default: [2015-01-18T10:45:21+00:00] INFO: directory[/var/lib/mysql/binlogs] owner changed to 106
==> default: [2015-01-18T10:45:21+00:00] INFO: directory[/var/lib/mysql/binlogs] group changed to 111
==> default: [2015-01-18T10:45:21+00:00] INFO: directory[/var/lib/mysql/binlogs] mode changed to 755
==> default: [2015-01-18T10:45:29+00:00] INFO: package[xtrabackup] upgraded from uninstalled to 2.2.8-5059-1.precise
==> default: [2015-01-18T10:45:29+00:00] INFO: execute[set-mysql-root] ran successfully
==> default: [2015-01-18T10:45:30+00:00] INFO: template[/etc/mysql/my.cnf] updated content
==> default: [2015-01-18T10:45:30+00:00] INFO: template[/etc/mysql/my.cnf] sending restart action to servicemysql
==> default: [2015-01-18T10:45:36+00:00] INFO: service[mysql] restarted
==> default: [2015-01-18T10:45:36+00:00] INFO: execute[create-mysql-database-test_database_name] ran successfully
==> default: [2015-01-18T10:45:36+00:00] INFO: execute[create-mysql-database-database_name] ran successfully
==> default: [2015-01-18T10:45:36+00:00] INFO: execute[create-mysql-user-user] ran successfully
==> default: [2015-01-18T10:45:54+00:00] INFO: template[/postgresql.conf] updated content
==> default: [2015-01-18T10:45:54+00:00] INFO: template[/postgresql.conf] owner changed to 107
==> default: [2015-01-18T10:45:54+00:00] INFO: template[/postgresql.conf] group changed to 113
==> default: [2015-01-18T10:45:54+00:00] INFO: template[/postgresql.conf] mode changed to 600
==> default: [2015-01-18T10:45:54+00:00] INFO: template[/postgresql.conf] sending restart action to servicepostgresql
==> default: [2015-01-18T10:45:58+00:00] INFO: service[postgresql] restarted
==> default: [2015-01-18T10:45:58+00:00] INFO: template[/pg_hba.conf] updated content
==> default: [2015-01-18T10:45:58+00:00] INFO: template[/pg_hba.conf] owner changed to 107
==> default: [2015-01-18T10:45:58+00:00] INFO: template[/pg_hba.conf] group changed to 113
==> default: [2015-01-18T10:45:58+00:00] INFO: template[/pg_hba.conf] mode changed to 600
==> default: [2015-01-18T10:45:58+00:00] INFO: template[/pg_hba.conf] sending restart action to servicepostgresql
==> default: [2015-01-18T10:46:01+00:00] INFO: service[postgresql] restarted
==> default: [2015-01-18T10:46:01+00:00] INFO: template[/pg_hba.conf] sending run action to executeadd-default-username
==> default: ================================================================================
==> default: Error executing action run
on resource 'execute[add-default-username]'
==> default: ================================================================================
==> default: Mixlib::ShellOut::ShellCommandFailed
==> default: ------------------------------------
==> default:
==> default: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of echo "CREATE USER username WITH ENCRYPTED PASSWORD 'password' CREATEDB;" | psql
==> default: createdb username
==> default: touch /var/chef/postgres_default_username
==> default: ----
==> default: STDOUT: CREATE ROLE
==> default: STDERR: touch: cannot touch /var/chef/postgres_default_username': Permission denied ==> default: ---- End output of echo "CREATE USER username WITH ENCRYPTED PASSWORD 'password' CREATEDB;" | psql ==> default: createdb username ==> default: touch /var/chef/postgres_default_username ==> default: ---- ==> default: Ran echo "CREATE USER username WITH ENCRYPTED PASSWORD 'password' CREATEDB;" | psql ==> default: createdb username ==> default: touch /var/chef/postgres_default_username ==> default: returned 1 ==> default: ==> default: Resource Declaration: ==> default: --------------------- ==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/postgresql/recipes/server.rb ==> default: ==> default: 26: ==> default: 27: execute "add-default-username" do ==> default: 28: action :nothing ==> default: 29: user 'postgres' ==> default: 30: command <<-EOH ==> default: 31: echo "CREATE USER username WITH ENCRYPTED PASSWORD '#{node['postgresql']['password']['postgres']}' CREATEDB;" | psql ==> default: 32: createdb username ==> default: 33: touch /var/chef/postgres_default_username ==> default: 34: EOH ==> default: 35: creates "/var/chef/postgres_default_username" ==> default: 36: end ==> default: 37: ==> default: ==> default: Compiled Resource: ==> default: ------------------ ==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/postgresql/recipes/server.rb:27:in
from_file'
==> default:
==> default: execute("add-default-username") do
==> default: retry_delay 2
==> default: user "postgres"
==> default: returns 0
==> default: command "echo "CREATE USER username WITH ENCRYPTED PASSWORD 'password' CREATEDB;" | psql\ncreatedb username\ntouch /var/chef/postgres_default_username\n"
==> default: retries 0
==> default: recipe_name "server"
==> default: creates "/var/chef/postgres_default_username"
==> default: action [:nothing]
==> default: cookbook_name :postgresql
==> default: backup 5
==> default: end
==> default:
==> default: [2015-01-18T10:46:01+00:00] ERROR: Running exception handlers
==> default: [2015-01-18T10:46:01+00:00] ERROR: Exception handlers complete
==> default: [2015-01-18T10:46:01+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2015-01-18T10:46:01+00:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: execute[add-default-username](postgresql::server line 27) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of echo "CREATE USER username WITH ENCRYPTED PASSWORD 'password' CREATEDB;" | psql
==> default: createdb username
==> default: touch /var/chef/postgres_default_username
==> default: ----
==> default: STDOUT: CREATE ROLE
==> default: STDERR: touch: cannot touch `/var/chef/postgres_default_username': Permission denied
==> default: ---- End output of echo "CREATE USER username WITH ENCRYPTED PASSWORD 'password' CREATEDB;" | psql
==> default: createdb username
==> default: touch /var/chef/postgres_default_username
==> default: ----
==> default: Ran echo "CREATE USER username WITH ENCRYPTED PASSWORD 'password' CREATEDB;" | psql
==> default: createdb username
==> default: touch /var/chef/postgres_default_username
==> default: returned 1
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.
Is there any way to use vagrant public network, type"dhcp" in multi repositories.
I need to access from other devices on same network to test my api and application.
I can't find any way on documentation.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.