Skip to content

ffrewer/chef-t3org

Repository files navigation

Overview

This is a repository used for setting up a development version of typo3.org website.

For the first installation, consider 1 good hour to walk through all the steps. The time will depend on the performance of your hardware and on the speed of the network. There will about > 500 Mb to download which includes a virtual machine and the typo3.org files.

Login in the Vagrant

The most simple way to get into the Box with ssh is to use vagrant itself::

vagrant ssh

Trouble shooting

It happens sometimes Vagrant can not finish the setup and remains stuck. An easy fix is to login into the Box using the GUI window and to reboot with "sudo reboot".

Requirements

Chef environment

To get started you need a environment as described here:

http://wiki.opscode.com/display/chef/Workstation+Setup

You'll especially need

Virtualbox + Vagrant

Gems

Bundler

gem install bundler --no-ri --no-rdoc

Then run this command to install the basic gems needed:

bundle install

Please also install these gems which can not be installed by bundler at the moment because of invalid dependencies:

#- A bundler for your Chef-based infrastructure repositories (http://rubydoc.info/gems/librarian/frames)

gem install librarian

#- A lint tool for your Opscode Chef cookbooks (http://acrmp.github.com/foodcritic/)

gem install foodcritic

Librarian

#Once installed, run librarian-chef to copy the chef cookbooks to the local host:

librarian-chef install

Create a cookbook

Because we have a modified knife.rb in the .chef directory, this command creates new cookbooks inside ./site-cookbooks:

knife create cookbook my_awesome_cookbook

Now you can remove unneeded folders like definitions.

To add the new cookbook I recommend to create a new role and add the recipe to the run_list:

$ cat workshop.rb
name "workshop"
description "Role for the workshop."

run_list(
  "recipe[workshop]"
)


$ cat Vagrantfile
chef.add_role       "workshop"

or through a role:

Notes

TODO

Problems

If your box does not finish booting up, it is most likely caused by networking issues.

  • Run vagrant using the following line:

    config.vm.boot_mode = :gui

  • Next, login using "vagrant" / "vagrant"

  • Now run "sudo -s" and try to fix the problem manually:

    sudo /etc/init.d/networking restart

If that helps, you might try adding the following line to /etc/rc.local (right before "exit 0"):

sh /etc/init.d/networking restart

(Source: hashicorp/vagrant#391)

Usage of cookbooks and librarian-chef

  • cookbooks store the pristine upstream community cookbooks

  • cookbooks must NEVER be edited, use site-cookbooks for custom and/or adapted cookbooks

  • use 'librarian-chef outdated' to find new upstream cookbooks

  • adapt Cheffile if you want to test/use different version, use 'librarian-chef install' to install them in the configured versions

  • mind the usage of 'librarian-chef update'! as if will update the cookbooks and deploy them into our infrastructure

About

Chef recipe for setting up typo3.org together with Vagrant

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published