Skip to content

Instantly share code, notes, and snippets.

@mariusbutuc
Created March 10, 2013 02:38
Show Gist options
  • Save mariusbutuc/5126850 to your computer and use it in GitHub Desktop.
Save mariusbutuc/5126850 to your computer and use it in GitHub Desktop.
Chef Solo + Berkshelf + Vagrant » Install nginx from source
$ vagrant up
[default] Importing base box 'precise64bootstrap'...
[default] Matching MAC address for NAT networking...
[default] Clearing any previously set forwarded ports...
[default] Fixed port collision for 22 => 2222. Now on port 2201.
[default] Forwarding ports...
[default] -- 22 => 2201 (adapter 1)
[Berkshelf] installing cookbooks...
[Berkshelf] Using nginx (1.4.0)
[Berkshelf] Using bluepill (2.2.0)
[Berkshelf] Using rsyslog (1.5.0)
[Berkshelf] Using runit (0.16.2)
[Berkshelf] Using build-essential (1.3.4)
[Berkshelf] Using yum (2.1.0)
[Berkshelf] Using apt (1.9.0)
[Berkshelf] Using ohai (1.1.8)
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Setting host name...
[default] Mounting shared folders...
[default] -- v-root: /vagrant
[default] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks
[default] Running provisioner: Vagrant::Provisioners::ChefSolo...
[default] Generating chef JSON and uploading...
[default] Running chef-solo...
stdin: is not a tty
[2013-03-10T02:33:19+00:00] INFO: *** Chef 10.24.0 ***
[2013-03-10T02:33:19+00:00] INFO: Setting the run_list to ["recipe[nginx::source]"] from JSON
[2013-03-10T02:33:19+00:00] INFO: Run List is [recipe[nginx::source]]
[2013-03-10T02:33:19+00:00] INFO: Run List expands to [nginx::source]
[2013-03-10T02:33:19+00:00] INFO: Starting Chef Run for demo-chef-berkshelf-berkshelf
[2013-03-10T02:33:19+00:00] INFO: Running start handlers
[2013-03-10T02:33:19+00:00] INFO: Start handlers complete.
[2013-03-10T02:33:20+00:00] INFO: ohai plugins will be at: /etc/chef/ohai_plugins
[2013-03-10T02:33:20+00:00] INFO: Processing remote_directory[/etc/chef/ohai_plugins] action create (ohai::default line 30)
[2013-03-10T02:33:20+00:00] INFO: remote_directory[/etc/chef/ohai_plugins] created directory /etc/chef/ohai_plugins
[2013-03-10T02:33:20+00:00] INFO: remote_directory[/etc/chef/ohai_plugins] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: Processing cookbook_file[/etc/chef/ohai_plugins/README] action create (dynamically defined)
[2013-03-10T02:33:20+00:00] INFO: cookbook_file[/etc/chef/ohai_plugins/README] mode changed to 644
[2013-03-10T02:33:20+00:00] INFO: cookbook_file[/etc/chef/ohai_plugins/README] created file /etc/chef/ohai_plugins/README
[2013-03-10T02:33:20+00:00] INFO: Processing ohai[custom_plugins] action reload (ohai::default line 44)
[2013-03-10T02:33:20+00:00] INFO: ohai[custom_plugins] reloaded
[2013-03-10T02:33:20+00:00] WARN: Cloning resource attributes for service[nginx] from prior resource (CHEF-3694)
[2013-03-10T02:33:20+00:00] WARN: Previous service[nginx]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/runit/definitions/runit_service.rb:172:in `block in from_file'
[2013-03-10T02:33:20+00:00] WARN: Current service[nginx]: /tmp/vagrant-chef-1/chef-solo-1/cookbooks/nginx/recipes/source.rb:83:in `from_file'
[2013-03-10T02:33:20+00:00] INFO: Processing user[www-data] action create (nginx::source line 43)
[2013-03-10T02:33:20+00:00] INFO: user[www-data] altered
[2013-03-10T02:33:20+00:00] INFO: Processing ohai[reload_nginx] action nothing (nginx::ohai_plugin line 22)
[2013-03-10T02:33:20+00:00] INFO: Processing template[/etc/chef/ohai_plugins/nginx.rb] action create (nginx::ohai_plugin line 27)
[2013-03-10T02:33:20+00:00] INFO: template[/etc/chef/ohai_plugins/nginx.rb] updated content
[2013-03-10T02:33:20+00:00] INFO: template[/etc/chef/ohai_plugins/nginx.rb] owner changed to 0
[2013-03-10T02:33:20+00:00] INFO: template[/etc/chef/ohai_plugins/nginx.rb] group changed to 0
[2013-03-10T02:33:20+00:00] INFO: template[/etc/chef/ohai_plugins/nginx.rb] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: template[/etc/chef/ohai_plugins/nginx.rb] sending reload action to ohai[reload_nginx] (immediate)
[2013-03-10T02:33:20+00:00] INFO: Processing ohai[reload_nginx] action reload (nginx::ohai_plugin line 22)
[2013-03-10T02:33:20+00:00] INFO: ohai[reload_nginx] reloaded
[2013-03-10T02:33:20+00:00] INFO: Processing remote_directory[/etc/chef/ohai_plugins] action nothing (ohai::default line 30)
[2013-03-10T02:33:20+00:00] INFO: Processing ohai[custom_plugins] action nothing (ohai::default line 44)
[2013-03-10T02:33:20+00:00] INFO: Processing directory[/etc/nginx] action create (nginx::commons_dir line 21)
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx] created directory /etc/nginx
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx] owner changed to 0
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx] group changed to 0
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: Processing directory[/var/log/nginx] action create (nginx::commons_dir line 28)
[2013-03-10T02:33:20+00:00] INFO: directory[/var/log/nginx] created directory /var/log/nginx
[2013-03-10T02:33:20+00:00] INFO: directory[/var/log/nginx] owner changed to 33
[2013-03-10T02:33:20+00:00] INFO: directory[/var/log/nginx] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: Processing directory[/etc/nginx/sites-available] action create (nginx::commons_dir line 36)
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/sites-available] created directory /etc/nginx/sites-available
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/sites-available] owner changed to 0
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/sites-available] group changed to 0
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/sites-available] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: Processing directory[/etc/nginx/sites-enabled] action create (nginx::commons_dir line 36)
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/sites-enabled] created directory /etc/nginx/sites-enabled
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/sites-enabled] owner changed to 0
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/sites-enabled] group changed to 0
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/sites-enabled] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: Processing directory[/etc/nginx/conf.d] action create (nginx::commons_dir line 36)
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/conf.d] created directory /etc/nginx/conf.d
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/conf.d] owner changed to 0
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/conf.d] group changed to 0
[2013-03-10T02:33:20+00:00] INFO: directory[/etc/nginx/conf.d] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: Processing template[/usr/sbin/nxensite] action create (nginx::commons_script line 22)
[2013-03-10T02:33:20+00:00] INFO: template[/usr/sbin/nxensite] updated content
[2013-03-10T02:33:20+00:00] INFO: template[/usr/sbin/nxensite] owner changed to 0
[2013-03-10T02:33:20+00:00] INFO: template[/usr/sbin/nxensite] group changed to 0
[2013-03-10T02:33:20+00:00] INFO: template[/usr/sbin/nxensite] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: Processing template[/usr/sbin/nxdissite] action create (nginx::commons_script line 22)
[2013-03-10T02:33:20+00:00] INFO: template[/usr/sbin/nxdissite] updated content
[2013-03-10T02:33:20+00:00] INFO: template[/usr/sbin/nxdissite] owner changed to 0
[2013-03-10T02:33:20+00:00] INFO: template[/usr/sbin/nxdissite] group changed to 0
[2013-03-10T02:33:20+00:00] INFO: template[/usr/sbin/nxdissite] mode changed to 755
[2013-03-10T02:33:20+00:00] INFO: Processing package[build-essential] action install (build-essential::default line 51)
[2013-03-10T02:33:21+00:00] INFO: Processing package[binutils-doc] action install (build-essential::default line 51)
[2013-03-10T02:33:24+00:00] INFO: Processing package[autoconf] action install (build-essential::default line 58)
[2013-03-10T02:33:30+00:00] INFO: Processing package[flex] action install (build-essential::default line 58)
[2013-03-10T02:33:35+00:00] INFO: Processing package[bison] action install (build-essential::default line 58)
[2013-03-10T02:33:39+00:00] INFO: Processing package[libpcre3] action install (nginx::source line 62)
[2013-03-10T02:33:39+00:00] INFO: Processing package[libpcre3-dev] action install (nginx::source line 62)
[2013-03-10T02:33:45+00:00] INFO: Processing package[libssl-dev] action install (nginx::source line 62)
[2013-03-10T02:33:45+00:00] INFO: Processing remote_file[http://nginx.org/download/nginx-1.2.6.tar.gz] action create (nginx::source line 65)
[2013-03-10T02:33:47+00:00] INFO: remote_file[http://nginx.org/download/nginx-1.2.6.tar.gz] updated
[2013-03-10T02:33:47+00:00] INFO: Processing execute[start-runsvdir] action nothing (runit::default line 22)
[2013-03-10T02:33:47+00:00] INFO: Processing execute[runit-hup-init] action nothing (runit::default line 31)
[2013-03-10T02:33:47+00:00] INFO: Processing package[runit] action install (runit::default line 44)
[2013-03-10T02:33:47+00:00] INFO: Processing cookbook_file[/tmp/vagrant-chef-1/preseed/runit/runit-2.1.1-6.2ubuntu2.seed] action create (dynamically defined)
[2013-03-10T02:33:47+00:00] INFO: cookbook_file[/tmp/vagrant-chef-1/preseed/runit/runit-2.1.1-6.2ubuntu2.seed] created file /tmp/vagrant-chef-1/preseed/runit/runit-2.1.1-6.2ubuntu2.seed
[2013-03-10T02:33:47+00:00] INFO: package[runit] pre-seeding package installation instructions
[2013-03-10T02:33:49+00:00] INFO: package[runit] sending nothing action to execute[start-runsvdir] (immediate)
[2013-03-10T02:33:49+00:00] INFO: Processing execute[start-runsvdir] action nothing (runit::default line 22)
[2013-03-10T02:33:49+00:00] INFO: package[runit] sending nothing action to execute[runit-hup-init] (immediate)
[2013-03-10T02:33:49+00:00] INFO: Processing execute[runit-hup-init] action nothing (runit::default line 31)
[2013-03-10T02:33:49+00:00] INFO: Processing directory[/etc/sv/nginx] action create (nginx::source line 37)
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx] created directory /etc/sv/nginx
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx] owner changed to 0
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx] group changed to 0
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx] mode changed to 755
[2013-03-10T02:33:49+00:00] INFO: Processing directory[/etc/sv/nginx/log] action create (nginx::source line 45)
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx/log] created directory /etc/sv/nginx/log
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx/log] owner changed to 0
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx/log] group changed to 0
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx/log] mode changed to 755
[2013-03-10T02:33:49+00:00] INFO: Processing directory[/etc/sv/nginx/log/main] action create (nginx::source line 52)
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx/log/main] created directory /etc/sv/nginx/log/main
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx/log/main] owner changed to 0
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx/log/main] group changed to 0
[2013-03-10T02:33:49+00:00] INFO: directory[/etc/sv/nginx/log/main] mode changed to 755
[2013-03-10T02:33:49+00:00] INFO: Processing template[/etc/sv/nginx/log/run] action create (nginx::source line 70)
[2013-03-10T02:33:49+00:00] INFO: template[/etc/sv/nginx/log/run] updated content
[2013-03-10T02:33:49+00:00] INFO: template[/etc/sv/nginx/log/run] owner changed to 0
[2013-03-10T02:33:49+00:00] INFO: template[/etc/sv/nginx/log/run] group changed to 0
[2013-03-10T02:33:49+00:00] INFO: template[/etc/sv/nginx/log/run] mode changed to 755
[2013-03-10T02:33:49+00:00] INFO: Processing template[/etc/sv/nginx/run] action create (nginx::source line 83)
[2013-03-10T02:33:49+00:00] INFO: template[/etc/sv/nginx/run] updated content
[2013-03-10T02:33:49+00:00] INFO: template[/etc/sv/nginx/run] owner changed to 0
[2013-03-10T02:33:49+00:00] INFO: template[/etc/sv/nginx/run] group changed to 0
[2013-03-10T02:33:49+00:00] INFO: template[/etc/sv/nginx/run] mode changed to 755
[2013-03-10T02:33:49+00:00] INFO: Processing link[/etc/init.d/nginx] action create (nginx::source line 143)
[2013-03-10T02:33:49+00:00] INFO: link[/etc/init.d/nginx] created
[2013-03-10T02:33:49+00:00] INFO: Processing template[/etc/init.d/nginx] action create (nginx::source line 147)
[2013-03-10T02:33:49+00:00] INFO: Processing link[/etc/service/nginx] action create (nginx::source line 159)
[2013-03-10T02:33:49+00:00] INFO: link[/etc/service/nginx] created
[2013-03-10T02:33:49+00:00] INFO: Processing ruby_block[supervise_nginx_sleep] action create (nginx::source line 164)
[2013-03-10T02:33:54+00:00] INFO: ruby_block[supervise_nginx_sleep] called
[2013-03-10T02:33:54+00:00] INFO: Processing service[nginx] action nothing (nginx::source line 172)
[2013-03-10T02:33:54+00:00] INFO: Processing service[nginx] action nothing (nginx::source line 83)
[2013-03-10T02:33:54+00:00] INFO: Processing template[nginx.conf] action create (nginx::commons_conf line 21)
[2013-03-10T02:33:55+00:00] INFO: template[nginx.conf] updated content
[2013-03-10T02:33:55+00:00] INFO: template[nginx.conf] owner changed to 0
[2013-03-10T02:33:55+00:00] INFO: template[nginx.conf] group changed to 0
[2013-03-10T02:33:55+00:00] INFO: template[nginx.conf] mode changed to 644
[2013-03-10T02:33:55+00:00] INFO: Processing template[/etc/nginx/sites-available/default] action create (nginx::commons_conf line 30)
[2013-03-10T02:33:55+00:00] INFO: template[/etc/nginx/sites-available/default] updated content
[2013-03-10T02:33:55+00:00] INFO: template[/etc/nginx/sites-available/default] owner changed to 0
[2013-03-10T02:33:55+00:00] INFO: template[/etc/nginx/sites-available/default] group changed to 0
[2013-03-10T02:33:55+00:00] INFO: template[/etc/nginx/sites-available/default] mode changed to 644
[2013-03-10T02:33:55+00:00] INFO: template[/etc/nginx/sites-available/default] not queuing delayed action reload on service[nginx] (delayed), as it's already been queued
[2013-03-10T02:33:55+00:00] INFO: Processing execute[nxensite default] action run (nginx::commons_conf line 23)
[2013-03-10T02:33:55+00:00] INFO: execute[nxensite default] ran successfully
[2013-03-10T02:33:55+00:00] INFO: execute[nxensite default] not queuing delayed action reload on service[nginx] (delayed), as it's already been queued
[2013-03-10T02:33:55+00:00] INFO: Processing cookbook_file[/etc/nginx/mime.types] action create (nginx::source line 153)
[2013-03-10T02:33:55+00:00] INFO: cookbook_file[/etc/nginx/mime.types] owner changed to 0
[2013-03-10T02:33:55+00:00] INFO: cookbook_file[/etc/nginx/mime.types] group changed to 0
[2013-03-10T02:33:55+00:00] INFO: cookbook_file[/etc/nginx/mime.types] mode changed to 644
[2013-03-10T02:33:55+00:00] INFO: cookbook_file[/etc/nginx/mime.types] created file /etc/nginx/mime.types
[2013-03-10T02:33:55+00:00] INFO: cookbook_file[/etc/nginx/mime.types] not queuing delayed action reload on service[nginx] (delayed), as it's already been queued
[2013-03-10T02:33:55+00:00] INFO: Processing bash[compile_nginx_source] action run (nginx::source line 168)
[2013-03-10T02:34:26+00:00] INFO: bash[compile_nginx_source] ran successfully
[2013-03-10T02:34:26+00:00] INFO: template[/etc/sv/nginx/run] sending restart action to service[nginx] (delayed)
[2013-03-10T02:34:26+00:00] INFO: Processing service[nginx] action restart (nginx::source line 172)
[2013-03-10T02:34:26+00:00] INFO: service[nginx] restarted
[2013-03-10T02:34:26+00:00] INFO: template[nginx.conf] sending reload action to service[nginx] (delayed)
[2013-03-10T02:34:26+00:00] INFO: Processing service[nginx] action reload (nginx::source line 83)
[2013-03-10T02:34:26+00:00] INFO: service[nginx] reloaded
[2013-03-10T02:34:26+00:00] INFO: bash[compile_nginx_source] sending restart action to service[nginx] (delayed)
[2013-03-10T02:34:26+00:00] INFO: Processing service[nginx] action restart (nginx::source line 83)
[2013-03-10T02:34:27+00:00] INFO: service[nginx] restarted
[2013-03-10T02:34:27+00:00] INFO: Chef Run complete in 67.219822902 seconds
[2013-03-10T02:34:27+00:00] INFO: Running report handlers
[2013-03-10T02:34:27+00:00] INFO: Report handlers complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment