Link
Link
Text

how-to : setup a http proxy in chef environment

If you are struggling to setup your vagrant chef environment when behind a http_proxy @work for example. You will find that trick useful… directory structure

|-- site-cookbooks
|   |-- cookbook
|   `-- proxy
|       |-- CHANGELOG.md
|       |-- metadata.rb
|       |-- README.md
|       `-- recipes
|           `-- default.rb
|-- Vagrantfile

Add these to the site-cookbooks/proxy/recipes/default.rb file:

if node['proxy']['http_proxy']
  Chef::Log.info(node['http_proxy'])
  proxy = "Acquire::http::Proxy \""
  proxy += node['proxy']['http_proxy']
  proxy += "\";\n"
  file "/etc/apt/apt.conf.d/01proxy" do
    owner "root"
    group "root"
    mode 00644
    content proxy
    action :create
  end
else
  Chef::Log.info("No http_proxy found.")
  file "/etc/apt/apt.conf.d/01proxy" do
    action :delete
    only_if {::File.exists?("/etc/apt/apt.conf.d/01proxy")}
  end
end

Warning you need to load the proxy recipe before anything else… in your Vagrantfile, add this parameter:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant::Config.run do |config|

  # your vm configuration

  # setup chef as provisionner
  config.vm.provision :chef_solo do |chef|
    # add path to cookbooks (official) and site-cookbooks (vendor)
    chef.cookbooks_path = ["cookbooks", "site-cookbooks"]
    chef.log_level = ENV['CHEF_LOG'] || "info"

    # Load the proxy cookbook first!
    chef.add_recipe "proxy"
    
    # Load other recipes...

    #specific config
    chef.json = {
    	:proxy => {
	    	:http_proxy => "http://your.company.proxy.host:proxy_port",
    	},
        # Load other configuration...
    }
  end
end

replace your.company.proxy.host with your company http proxy host (ex. proxy.vmware.com) and proxy_port with your company proxy port (ex: 8080)

Text

howto - configure virtual host for apache

make sure that analyser is in your hosts file:
C:\Windows\System32\drivers\etc\hosts
127.0.0.1         localhost analyser

Note for windows users: the directory as to be setup as /path/to/web/root and not D:\path\to\web\root !!

<VirtualHost *:80>
    ServerName analyser
    DocumentRoot /utils/xampp-portable/htdocs/php/EventFlowAnalyserBundle/web
    SetEnv APPLICATION_ENV "development"
    <Directory /utils/xampp-portable/htdocs/php/EventFlowAnalyserBundle/web>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>
Link
Text

Checkout Maven project from SCM

If you want to be able to checkout a maven project in eclipse Juno using SCM from a subversion repository, you need to do this:

  1. Start Eclipse and open preferences.
  2. Find the Maven group and expand it.
  3. Select the “Discovery” item and click “Open Catalog”.
  4. A dialog will pop up with all the goodies. The connectors are at the bottom.
Link
Link
Link
Link