Commit ab5c1ba4 authored by MARGERY David's avatar MARGERY David
Browse files

Adapt puppet rule to usage outside vagrant

parent 21901475
......@@ -100,6 +100,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
puppet.environment = 'development'
puppet.environment_path = "puppet"
puppet.facter = {
"owner" => ENV['OWNER']||'vagrant',
"workspace" => ENV['WORKSPACE']||'/vagrant',
"developer" => ENV['DEVELOPER']||'ajenkins',
"oardbsite" => ENV['OAR_DB_SITE']||'rennes'
}
......
......@@ -40,11 +40,11 @@ class development {
exec{ "Run bundle install":
user => root,
group => root,
cwd => "/vagrant",
command => "/bin/su -c '/usr/local/bin/bundle install' vagrant",
cwd => $workspace",
command => "/bin/su -c '/usr/local/bin/bundle install' $owner",
require => [Exec["install bundler"],Package['libxml2-dev','libxslt-dev']],
logoutput => true,
unless => "/bin/su -c '/usr/local/bin/bundle show' vagrant"
unless => "/bin/su -c '/usr/local/bin/bundle show' $owner"
}
......
......@@ -35,10 +35,10 @@ class apache {
}
file {
'/vagrant/lib/tasks/tunneling.rake':
"$workspace/lib/tasks/tunneling.rake":
mode => '0644',
owner => vagrant,
group => vagrant,
owner => $owner,
group => $owner,
content => template('apache/tunneling.rake.erb'),
}
......@@ -55,7 +55,7 @@ class apache {
}
exec { "Generate certificate authority":
command => "/usr/bin/openssl req -new -x509 -days 3650 -keyform PEM -keyout /etc/ssl/private/cakey.pem -outform PEM -out /etc/ssl/certs/ca.pem -passout file:/etc/ssl/secret -batch -subj \"/C=FR/ST=Bretagne/L=Rennes/O=dev/OU=Grid5000/CN=vagrant/emailAddress=support-staff@lists.grid5000.fr\"",
command => "/usr/bin/openssl req -new -x509 -days 3650 -keyform PEM -keyout /etc/ssl/private/cakey.pem -outform PEM -out /etc/ssl/certs/ca.pem -passout file:/etc/ssl/secret -batch -subj \"/C=FR/ST=Bretagne/L=Rennes/O=dev/OU=Grid5000/CN=$owner/emailAddress=support-staff@lists.grid5000.fr\"",
user => root, group => root,
require => File["/etc/ssl/secret"],
creates => "/etc/ssl/private/cakey.pem",
......
......@@ -12,7 +12,7 @@ Listen 8443
TimeOut 300
ServerName <%= @fqdn %>
ServerAlias server api.grid5000.fr
DocumentRoot /vagrant/public
DocumentRoot <%= @workspace %>/public
CustomLog /var/log/apache2/api-proxy-dev-ssl.log "%v %h %l %t %D \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
ErrorLog syslog:local1
......@@ -46,8 +46,8 @@ Listen 8080
TimeOut 600
ServerName <%= @fqdn %>
ServerAlias api.grid5000.fr
DocumentRoot /vagrant/public
<Directory /vagrant/public/ui/javascripts/vendor/exhibitv2>
DocumentRoot <%= @workspace %>/public
<Directory <%= @workspace %>/public/ui/javascripts/vendor/exhibitv2>
Options -Indexes
</Directory>
# see http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#customlog
......@@ -111,7 +111,7 @@ Listen 8080
<VirtualHost *:4444>
TimeOut 60
ServerName <%= @fqdn %>
DocumentRoot /vagrant/public
DocumentRoot <%= @workspace %>/public
# see http://httpd.apache.org/docs/2.0/mod/mod_log_config.html#customlog
CustomLog /var/log/apache2/api-proxy-dev-2.log "%v %h %{X-Api-User-Cn}i %t %D \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
ErrorLog syslog:local1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment