Browse Source

Clean up puppet (deploy LAMP / setup app config)

Implements: blueprint openid-oauth2-infra-implementation-puppet-script

Prepares a raw server with all software stack needed to run
openstackid project:

* installs PHP
* installs Apache
* installs Redis Server
* creates a initial environment configuration for laravel application
  (using *.erb templates)

Change-Id: If6216da0d70a45609076e8111a67055dbc87c9e4
smarcet 5 years ago
parent
commit
0c6631eeb7

+ 39
- 0
files/deploy.sh View File

@@ -0,0 +1,39 @@
1
+#!/bin/bash -e
2
+#
3
+# Site deployment tool
4
+#
5
+# Commands:
6
+#   init @sitealias http://example.com/source.tar.gz
7
+#   status @sitealias
8
+#   update @sitelias http://example.com/source.tar.gz
9
+#   rollback @sitealias
10
+#
11
+#
12
+
13
+
14
+
15
+TOP_DIR=$(cd $(dirname "$0") && pwd)
16
+source $TOP_DIR/functions
17
+
18
+if [ ! -r $TOP_DIR/deployrc ]; then
19
+    echo "ERROR: missing deployrc - did you grab more than just deploy.sh?"
20
+    exit 1
21
+fi
22
+source $TOP_DIR/deployrc
23
+
24
+command="${1}"
25
+case $command in
26
+  init)
27
+    site_init ${2}
28
+    ;;
29
+  status)
30
+    site_status ${2}
31
+    ;;
32
+  update)
33
+    site_update ${2}
34
+    ;;
35
+  *)
36
+    print_help
37
+    exit 1
38
+    ;;
39
+esac

+ 8
- 0
files/deployrc View File

@@ -0,0 +1,8 @@
1
+CONF_DIR=$TOP_DIR
2
+FILE_OWNER=root
3
+FILE_GROUP=www-data
4
+
5
+# allow local overrides of env variables
6
+if [ -f $TOP_DIR/localrc ]; then
7
+    . $TOP_DIR/localrc
8
+fi

+ 150
- 0
files/functions View File

@@ -0,0 +1,150 @@
1
+function print_help() {
2
+  echo "Usage: `basename $0` command [options]"
3
+  echo ""
4
+  echo "Commands:"
5
+  echo "  status [site]    return status information about site configurations"
6
+  echo "  init <site>      initialize site structure"
7
+  echo "  update <site>    update to new version"
8
+  echo ""
9
+}
10
+
11
+function site_init() {
12
+  if [ ! $1 ]; then
13
+    echo "ERROR: site parameter mandatory"
14
+    exit 1
15
+  fi
16
+  CONF_PATH="$CONF_DIR/conf.d/$1.conf"
17
+  if [ ! -f $CONF_PATH ]; then
18
+    echo "Site configuration not found: " $1
19
+    exit 1
20
+  fi
21
+  source $CONF_PATH
22
+  if [ -f "$SITE_ROOT/w/public/index.php" ]; then
23
+    echo "Cannot override an existing deployment: $SITE_ROOT/w"
24
+    exit 1
25
+  fi
26
+  # cleanup previous broken deployment
27
+  rm -rf $SITE_ROOT/slot0
28
+  # create directory structure
29
+  for dir in slot0 slot1; do
30
+    mkdir -p $SITE_ROOT/$dir
31
+    chown $FILE_OWNER:$FILE_GROUP $SITE_ROOT/$dir
32
+  done
33
+  target_dir="$SITE_ROOT/slot0"
34
+  # fetch and extract release tarball
35
+  umask 0027
36
+  if [[ $SOURCE_TARBALL == http* ]]; then
37
+    echo "Download from http!"
38
+    curl $SOURCE_TARBALL | tar -xzv -C $target_dir --strip-components 1 --no-same-permissions
39
+  else
40
+    echo "extract from local file system"
41
+    if [ ! -f $SOURCE_TARBALL ]; then
42
+      echo "Source tarball not found: $SOURCE_TARBALL"
43
+      exit 1
44
+    fi
45
+    tar -xzvf $SOURCE_TARBALL -C $target_dir --strip-components 1 --no-same-permissions
46
+  fi
47
+  chown -R $FILE_OWNER:$FILE_GROUP $target_dir
48
+  umask 0022
49
+  # link configuration files managed by puppet
50
+  ln -s /etc/openstackid/environment.php $target_dir/bootstrap/environment.php
51
+  ln -s /etc/openstackid/recaptcha.php $target_dir/app/config/packages/greggilbert/recaptcha/$LARAVEL_ENV/config.php
52
+  ln -s /etc/openstackid/database.php $target_dir/app/config/$LARAVEL_ENV/database.php
53
+  ln -s /etc/openstackid/log.php $target_dir/app/config/$LARAVEL_ENV/log.php
54
+  # convert app/storage into symlink and set permissions
55
+  mv $target_dir/app/storage $SITE_ROOT/
56
+  chmod 02770 $SITE_ROOT/storage
57
+  find $SITE_ROOT/storage/ -type d -exec chmod 0775 {} \;
58
+  find $SITE_ROOT/storage/ -type f -exec chmod 0664 {} \;
59
+  rm -rf $target_dir/app/storage
60
+  ln -s $SITE_ROOT/storage $target_dir/app
61
+  # populate application database
62
+  cd $target_dir
63
+  php artisan migrate --env=$LARAVEL_ENV
64
+  php artisan db:seed --env=$LARAVEL_ENV
65
+  # activate site
66
+  rm -rf $SITE_ROOT/w
67
+  ln -s $SITE_ROOT/slot0 $SITE_ROOT/w
68
+}
69
+
70
+function site_status() {
71
+  if [ ! $1 ]; then
72
+    echo "ERROR: site parameter mandatory"
73
+    exit 1
74
+  fi
75
+  CONF_PATH="$CONF_DIR/conf.d/$1.conf"
76
+  if [ ! -f $CONF_PATH ]; then
77
+    echo "Site configuration not found: $1"
78
+    exit 0
79
+  fi
80
+  source $CONF_PATH
81
+  if [ ! -f "$SITE_ROOT/w/public/index.php" ]; then
82
+    if [ -d "$SITE_ROOT/slot0" ]; then
83
+      echo "PENDING"
84
+    else
85
+      echo "N/A"
86
+      exit 1
87
+    fi
88
+  else
89
+    echo "INSTALLED"
90
+  fi
91
+}
92
+
93
+function site_update() {
94
+  if [ ! $1 ]; then
95
+    echo "ERROR: missing site parameter"
96
+    exit 1
97
+  fi
98
+  CONF_PATH="$CONF_DIR/conf.d/$1.conf"
99
+  if [ ! -f $CONF_PATH ]; then
100
+    echo "Site configuration not found: $1"
101
+    exit 0
102
+  fi
103
+  source $CONF_PATH
104
+  SITE_LINK=`readlink -f $SITE_ROOT/w`
105
+  ACTIVE_SLOT=`basename $SITE_LINK`
106
+  case $ACTIVE_SLOT in
107
+    slot0)
108
+      TARGET_SLOT='slot1'
109
+      ;;
110
+    slot1)
111
+      TARGET_SLOT='slot0'
112
+      ;;
113
+    *)
114
+      echo "Invalid active slot"
115
+      exit 1
116
+  esac
117
+  echo "Target slot: $TARGET_SLOT"
118
+  target_dir="$SITE_ROOT/$TARGET_SLOT"
119
+  rm -rf $target_dir
120
+  mkdir $target_dir
121
+  # fetch and extract release tarball
122
+  umask 0027
123
+  if [[ $SOURCE_TARBALL == http* ]]; then
124
+    echo "Download from http!"
125
+    curl $SOURCE_TARBALL | tar -xzv -C $target_dir --strip-components 1 --no-same-permissions
126
+  else
127
+    echo "extract from local file system"
128
+    if [ ! -f $SOURCE_TARBALL ]; then
129
+      echo "Source tarball not found: $SOURCE_TARBALL"
130
+      exit 1
131
+    fi
132
+    tar -xzvf $SOURCE_TARBALL -C $target_dir --strip-components 1 --no-same-permissions
133
+  fi
134
+  chown -R $FILE_OWNER:$FILE_GROUP $target_dir
135
+  umask 0022
136
+  # link configuration files managed by puppet
137
+  ln -s /etc/openstackid/environment.php $target_dir/bootstrap/environment.php
138
+  ln -s /etc/openstackid/recaptcha.php $target_dir/app/config/packages/greggilbert/recaptcha/$LARAVEL_ENV/config.php
139
+  ln -s /etc/openstackid/database.php $target_dir/app/config/$LARAVEL_ENV/database.php
140
+  ln -s /etc/openstackid/log.php $target_dir/app/config/$LARAVEL_ENV/log.php
141
+  # link shared app/storage directory
142
+  rm -rf $target_dir/app/storage
143
+  ln -s $SITE_ROOT/storage $target_dir/app
144
+  # populate application database
145
+  cd $target_dir
146
+  php artisan migrate --env=$LARAVEL_ENV
147
+  # activate site
148
+  rm -rf $SITE_ROOT/w
149
+  ln -s $target_dir $SITE_ROOT/w
150
+}

+ 53
- 0
manifests/deploy.pp View File

@@ -0,0 +1,53 @@
1
+# Copyright 2013  OpenStack Foundation
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License"); you may
4
+# not use this file except in compliance with the License. You may obtain
5
+# a copy of the License at
6
+#
7
+#      http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
+# License for the specific language governing permissions and limitations
13
+# under the License.
14
+#
15
+# == Define: deploy
16
+#
17
+# deployment tool for laravel framework/php site management
18
+#
19
+define openstackid::deploy (
20
+) {
21
+  $deploy_dirs = [ '/opt/deploy', '/opt/deploy/conf.d' ]
22
+
23
+  file { $deploy_dirs:
24
+    ensure  => directory,
25
+    owner   => 'root',
26
+    group   => 'root',
27
+    mode    => '0755',
28
+  }
29
+
30
+  file { '/opt/deploy/deploy.sh':
31
+    source  => 'puppet:///modules/openstackid/deploy.sh',
32
+    owner   => 'root',
33
+    group   => 'root',
34
+    mode    => '0755',
35
+    require => File[$deploy_dirs],
36
+  }
37
+
38
+  file { '/opt/deploy/functions':
39
+    source  => 'puppet:///modules/openstackid/functions',
40
+    owner   => 'root',
41
+    group   => 'root',
42
+    mode    => '0644',
43
+    require => File[$deploy_dirs],
44
+  }
45
+
46
+  file { '/opt/deploy/deployrc':
47
+    source  => 'puppet:///modules/openstackid/deployrc',
48
+    owner   => 'root',
49
+    group   => 'root',
50
+    mode    => '0644',
51
+    require => File[$deploy_dirs],
52
+  }
53
+}

+ 74
- 64
manifests/init.pp View File

@@ -19,13 +19,17 @@
19 19
 class openstackid (
20 20
   $git_source_repo = 'https://git.openstack.org/openstack-infra/openstackid',
21 21
   $site_admin_password = '',
22
-  $mysql_host = '',
23
-  $mysql_user = '',
24
-  $mysql_password = '',
22
+  $id_mysql_host = '',
23
+  $id_mysql_user = '',
24
+  $id_mysql_password = '',
25 25
   $id_db_name = '',
26
+  $ss_mysql_host = '',
27
+  $ss_mysql_user = '',
28
+  $ss_mysql_password = '',
26 29
   $ss_db_name = '',
27 30
   $redis_port = '',
28 31
   $redis_host = '',
32
+  $redis_password = '',
29 33
   $vhost_name = $::fqdn,
30 34
   $robots_txt_source = '',
31 35
   $serveradmin = "webmaster@${::fqdn}",
@@ -37,29 +41,26 @@ class openstackid (
37 41
   $ssl_key_file_contents = '', # If left empty puppet will not create file.
38 42
   $ssl_chain_file_contents = '', # If left empty puppet will not create file.
39 43
   $httpd_acceptorthreads = '',
44
+  $id_log_error_to_email = '',
45
+  $id_log_error_from_email = '',
46
+  $id_environment = 'dev',
47
+  $id_hostname = $::fqdn,
48
+  $id_recaptcha_public_key = '',
49
+  $id_recaptcha_private_key = '',
50
+  $id_recaptcha_template = '',
40 51
 ) {
41 52
 
42
-  vcsrepo { '/opt/openstackid':
43
-    ensure   => latest,
44
-    provider => git,
45
-    revision => 'master',
46
-    source   => $git_source_repo,
47
-  }
48
-
49
-  # we need PHP 5.4 or greather
50
-  include apt
51
-  apt::ppa { 'ppa:ondrej/php5-oldstable': }
52
-
53 53
   # php packages needed for openid server
54
-  package {
55
-    [
54
+  $php5_packages = [
56 55
       'php5-common',
57 56
       'php5-curl',
58 57
       'php5-cli',
59 58
       'php5-json',
60 59
       'php5-mcrypt',
61 60
       'php5-mysql',
62
-    ]:
61
+    ]
62
+
63
+  package { $php5_packages:
63 64
     require => Exec[apt_update],
64 65
   }
65 66
 
@@ -87,60 +88,54 @@ class openstackid (
87 88
     ensure  => present,
88 89
     content => template('openstackid/database.php.erb'),
89 90
     owner   => 'root',
90
-    group   => 'openstackid',
91
+    group   => 'www-data',
91 92
     mode    => '0640',
92 93
     require => [
93 94
       File['/etc/openstackid'],
94
-      Group['openstackid'],
95 95
     ]
96 96
   }
97 97
 
98
-  file { '/srv/openstackid':
99
-    ensure => directory,
100
-    owner  => 'root',
101
-    group  => 'root',
102
-    mode   => '0755',
103
-  }
104
-
105
-  file { '/srv/openstackid/app':
106
-    ensure  => directory,
107
-    owner   => 'root',
108
-    group   => 'root',
109
-    mode    => '0755',
110
-    require => File['/srv/openstackid'],
98
+  file { '/etc/openstackid/log.php':
99
+      ensure  => present,
100
+      content => template('openstackid/log.php.erb'),
101
+      owner   => 'root',
102
+      group   => 'www-data',
103
+      mode    => '0640',
104
+      require => [
105
+        File['/etc/openstackid'],
106
+      ]
111 107
   }
112 108
 
113
-  file { '/srv/openstackid/app/config':
114
-    ensure  => directory,
115
-    owner   => 'root',
116
-    group   => 'root',
117
-    mode    => '0755',
118
-    require => File['/srv/openstackid/app'],
109
+  file { '/etc/openstackid/environment.php':
110
+      ensure  => present,
111
+      content => template('openstackid/environment.php.erb'),
112
+      owner   => 'root',
113
+      group   => 'www-data',
114
+      mode    => '0640',
115
+      require => [
116
+        File['/etc/openstackid'],
117
+      ]
119 118
   }
120 119
 
121
-  file { '/srv/openstackid/app/config/dev':
122
-    ensure  => directory,
123
-    owner   => 'root',
124
-    group   => 'root',
125
-    mode    => '0755',
126
-    require => File['/srv/openstackid/app/config'],
120
+  file { '/etc/openstackid/recaptcha.php':
121
+        ensure  => present,
122
+        content => template('openstackid/recaptcha.php.erb'),
123
+        owner   => 'root',
124
+        group   => 'www-data',
125
+        mode    => '0640',
126
+        require => [
127
+          File['/etc/openstackid'],
128
+        ]
127 129
   }
128 130
 
129
-  file { '/srv/openstackid/app/config/dev/database.php':
130
-    ensure  => link,
131
-    target  => '/etc/openstackid/database.php',
132
-    require => [
133
-      File['/srv/openstackid/app/config/dev'],
134
-      File['/etc/openstackid/database.php'],
135
-    ],
136
-  }
131
+  $docroot_dirs = [ '/srv/openstackid', '/srv/openstackid/w',
132
+    '/srv/openstackid/w/public']
137 133
 
138
-  file { '/srv/openstackid/public':
134
+  file { $docroot_dirs:
139 135
     ensure  => directory,
140 136
     owner   => 'root',
141 137
     group   => 'root',
142 138
     mode    => '0755',
143
-    require => File['/srv/openstackid'],
144 139
   }
145 140
 
146 141
   include apache
@@ -148,11 +143,11 @@ class openstackid (
148 143
   include apache::php
149 144
   apache::vhost { $vhost_name:
150 145
     port     => 443,
151
-    docroot  => '/srv/openstackid/public',
146
+    docroot  => '/srv/openstackid/w/public',
152 147
     priority => '50',
153 148
     template => 'openstackid/vhost.erb',
154 149
     ssl      => true,
155
-    require  => File['/srv/openstackid/public'],
150
+    require  => File[$docroot_dirs],
156 151
   }
157 152
   a2mod { 'rewrite':
158 153
     ensure => present,
@@ -194,14 +189,29 @@ class openstackid (
194 189
     }
195 190
   }
196 191
 
197
-  if $robots_txt_source != '' {
198
-    file { '/srv/openstackid/public/robots.txt':
199
-      owner   => 'root',
200
-      group   => 'root',
201
-      mode    => '0644',
202
-      source  => $robots_txt_source,
203
-      require => File['/srv/openstackid/public'],
204
-    }
192
+  deploy { 'deploytool':
193
+  }
194
+
195
+  file { '/opt/deploy/conf.d/openstackid.conf':
196
+    content => template('openstackid/openstackid.conf.erb'),
197
+    owner   => 'root',
198
+    group   => 'root',
199
+    mode    => '0644',
200
+    require => Deploy['deploytool'],
201
+  }
202
+
203
+  exec { 'deploy-site':
204
+    path      => '/usr/bin:/bin:/usr/local/bin',
205
+    command   => '/opt/deploy/deploy.sh init openstackid',
206
+    onlyif    => '/opt/deploy/deploy.sh status openstackid | grep N/A',
207
+    logoutput => on_failure,
208
+    require   => [
209
+      File['/opt/deploy/conf.d/openstackid.conf'],
210
+      Apache::Vhost[$vhost_name],
211
+      File['/etc/openstackid/recaptcha.php'],
212
+      File['/etc/openstackid/database.php'],
213
+      File['/etc/openstackid/log.php'],
214
+      Package[$php5_packages] ],
205 215
   }
206 216
 
207 217
 }

+ 89
- 102
templates/database.php.erb View File

@@ -1,107 +1,94 @@
1 1
 <?php
2
-
3 2
 return array(
4
-
5
-    /*
6
-    |--------------------------------------------------------------------------
7
-    | PDO Fetch Style
8
-    |--------------------------------------------------------------------------
9
-    |
10
-    | By default, database results will be returned as instances of the PHP
11
-    | stdClass object; however, you may desire to retrieve records in an
12
-    | array format for simplicity. Here you can tweak the fetch style.
13
-    |
14
-    */
15
-
16
-    'fetch' => PDO::FETCH_CLASS,
17
-
18
-    /*
19
-    |--------------------------------------------------------------------------
20
-    | Default Database Connection Name
21
-    |--------------------------------------------------------------------------
22
-    |
23
-    | Here you may specify which of the database connections below you wish
24
-    | to use as your default connection for all database work. Of course
25
-    | you may use many connections at once using the Database library.
26
-    |
27
-    */
28
-
29
-    'default' => 'mysql',
30
-
31
-    /*
32
-    |--------------------------------------------------------------------------
33
-    | Database Connections
34
-    |--------------------------------------------------------------------------
35
-    |
36
-    | Here are each of the database connections setup for your application.
37
-    | Of course, examples of configuring each database platform that is
38
-    | supported by Laravel is shown below to make development simple.
39
-    |
40
-    |
41
-    | All database work in Laravel is done through the PHP PDO facilities
42
-    | so make sure you have the driver for your particular database of
43
-    | choice installed on your machine before you begin development.
44
-    |
45
-    */
46
-
47
-    'connections' => array(
48
-        /* OpenID IDP database */
49
-        'mysql' => array(
50
-            'driver'    => 'mysql',
51
-            'host'      => '<%= mysql_host %>',
52
-            'database'  => '<%= id_db_name %>',
53
-            'username'  => '<%= mysql_user %>',
54
-            'password'  => '<%= mysql_password %>',
55
-            'charset'   => 'utf8',
56
-            'collation' => 'utf8_unicode_ci',
57
-            'prefix'    => '',
58
-        ),
59
-        /* Silverstripe database */
60
-        'mysql_external' => array(
61
-            'driver'    => 'mysql',
62
-            'host'      => '<%= mysql_host %>',
63
-            'database'  => '<%= ss_db_name %>',
64
-            'username'  => '<%= mysql_user %>',
65
-            'password'  => '<%= mysql_password %>',
66
-            'charset'   => 'utf8',
67
-            'collation' => 'utf8_unicode_ci',
68
-            'prefix'    => '',
69
-        ),
3
+  /*
4
+  |--------------------------------------------------------------------------
5
+  | PDO Fetch Style
6
+  |--------------------------------------------------------------------------
7
+  |
8
+  | By default, database results will be returned as instances of the PHP
9
+  | stdClass object; however, you may desire to retrieve records in an
10
+  | array format for simplicity. Here you can tweak the fetch style.
11
+  |
12
+  */
13
+  'fetch' => PDO::FETCH_CLASS,
14
+  /*
15
+  |--------------------------------------------------------------------------
16
+  | Default Database Connection Name
17
+  |--------------------------------------------------------------------------
18
+  |
19
+  | Here you may specify which of the database connections below you wish
20
+  | to use as your default connection for all database work. Of course
21
+  | you may use many connections at once using the Database library.
22
+  |
23
+  */
24
+  'default' => 'openstackid',
25
+  /*
26
+  |--------------------------------------------------------------------------
27
+  | Database Connections
28
+  |--------------------------------------------------------------------------
29
+  |
30
+  | Here are each of the database connections setup for your application.
31
+  | Of course, examples of configuring each database platform that is
32
+  | supported by Laravel is shown below to make development simple.
33
+  |
34
+  |
35
+  | All database work in Laravel is done through the PHP PDO facilities
36
+  | so make sure you have the driver for your particular database of
37
+  | choice installed on your machine before you begin development.
38
+  |
39
+  */
40
+  'connections' => array(
41
+     //primary DB
42
+     'openstackid' => array(
43
+     'driver'    => 'mysql',
44
+     'host'      => '<%= id_mysql_host %>',
45
+     'database'  => '<%= id_db_name %>',
46
+     'username'  => '<%= id_mysql_user %>',
47
+     'password'  => '<%= id_mysql_password %>',
48
+     'charset'   => 'utf8',
49
+     'collation' => 'utf8_unicode_ci',
50
+     'prefix'    => '',
51
+  ),
52
+     //secondary DB (OS Membership)
53
+     'os_members' => array(
54
+     'driver'    => 'mysql',
55
+     'host'      => '<%= ss_mysql_host %>',
56
+     'database'  => '<%= ss_db_name %>',
57
+     'username'  => '<%= ss_mysql_user %>',
58
+     'password'  => '<%= ss_mysql_password %>',
59
+     'charset'   => 'utf8',
60
+     'collation' => 'utf8_unicode_ci',
61
+     'prefix'    => '',
70 62
     ),
71
-
72
-    /*
73
-    |--------------------------------------------------------------------------
74
-    | Migration Repository Table
75
-    |--------------------------------------------------------------------------
76
-    |
77
-    | This table keeps track of all the migrations that have already run for
78
-    | your application. Using this information, we can determine which of
79
-    | the migrations on disk have not actually be run in the databases.
80
-    |
81
-    */
82
-
83
-    'migrations' => 'migrations',
84
-
85
-    /*
86
-    |--------------------------------------------------------------------------
87
-    | Redis Databases
88
-    |--------------------------------------------------------------------------
89
-    |
90
-    | Redis is an open source, fast, and advanced key-value store that also
91
-    | provides a richer set of commands than a typical key-value systems
92
-    | such as APC or Memcached. Laravel makes it easy to dig right in.
93
-    |
94
-    */
95
-
96
-    'redis' => array(
97
-
98
-        'cluster' => true,
99
-
100
-        'default' => array(
101
-            'host'     => '<%= redis_host %>',
102
-            'port'     => <%= redis_port %>,
103
-        ),
104
-
63
+  ),
64
+  /*
65
+  |--------------------------------------------------------------------------
66
+  | Migration Repository Table
67
+  |--------------------------------------------------------------------------
68
+  |
69
+  | This table keeps track of all the migrations that have already run for
70
+  | your application. Using this information, we can determine which of
71
+  | the migrations on disk have not actually be run in the databases.
72
+  |
73
+  */
74
+  'migrations' => 'migrations',
75
+  /*
76
+  |--------------------------------------------------------------------------
77
+  | Redis Databases
78
+  |--------------------------------------------------------------------------
79
+  |
80
+  | Redis is an open source, fast, and advanced key-value store that also
81
+  | provides a richer set of commands than a typical key-value systems
82
+  | such as APC or Memcached. Laravel makes it easy to dig right in.
83
+  |
84
+  */
85
+  'redis' => array(
86
+     'cluster' => false,
87
+     'default' => array(
88
+     'host' => '<%= redis_host %>',
89
+     'port' => <%= redis_port %>,
90
+     'database' => 0,
91
+     'password' => '<%= redis_password %>'
105 92
     ),
106
-
93
+  ),
107 94
 );

+ 6
- 0
templates/environment.php.erb View File

@@ -0,0 +1,6 @@
1
+<?php
2
+
3
+$env = $app->detectEnvironment(array(
4
+  '<%= id_environment %>' => array('<%= id_hostname %>')
5
+));
6
+

+ 10
- 0
templates/log.php.erb View File

@@ -0,0 +1,10 @@
1
+<?php
2
+return array(
3
+  /**
4
+  * EMAIL ERROR LOG CONFIGURATION
5
+  */
6
+  //The receiver of the mail
7
+  'to_email'   => '<%= id_log_error_to_email %>',
8
+  //The sender of the mail
9
+  'from_email' => '<%= id_log_error_from_email %>'
10
+);

+ 3
- 0
templates/openstackid.conf.erb View File

@@ -0,0 +1,3 @@
1
+SITE_ROOT=/srv/openstackid
2
+SOURCE_TARBALL=http://tarballs.openstack.org/openstackid/openstackid-latest.tar.gz
3
+LARAVEL_ENV=dev

+ 22
- 0
templates/recaptcha.php.erb View File

@@ -0,0 +1,22 @@
1
+<?php
2
+return array(
3
+  /*
4
+  |--------------------------------------------------------------------------
5
+  | API Keys
6
+  |--------------------------------------------------------------------------
7
+  |
8
+  | Set the public and private API keys as provided by reCAPTCHA.
9
+  |
10
+  */
11
+  'public_key'  => '<%= id_recaptcha_public_key %>',
12
+  'private_key' => '<%= id_recaptcha_private_key %>',
13
+  /*
14
+  |--------------------------------------------------------------------------
15
+  | Template
16
+  |--------------------------------------------------------------------------
17
+  |
18
+  | Set a template to use if you don't want to use the standard one.
19
+  |
20
+  */
21
+  'template' => '<%= id_recaptcha_template %>'
22
+);

Loading…
Cancel
Save