Updated script to support PHP7

Added php 7.x support and xenial support using external
ppa from andrej

Depends-On: https://review.openstack.org/611936

Change-Id: Ic30cc62216be3035c363fa0203a757df662acf47
This commit is contained in:
Sebastian Marcet 2018-12-13 08:16:27 -03:00
parent 9a044f8e00
commit 5ad10537b4
19 changed files with 2280 additions and 711 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
Gemfile.lock
.bundled_gems/
.idea/

View File

@ -52,33 +52,14 @@ function site_init {
umask 0022
# link configuration files managed by puppet
if [[ $LARAVEL_VERSION -eq 4 ]]; then
ln -sf /etc/openstackid/environment.php $target_dir/bootstrap/environment.php
ln -sf /etc/openstackid/recaptcha.php $target_dir/app/config/packages/greggilbert/recaptcha/$LARAVEL_ENV/config.php
ln -sf /etc/openstackid/database.php $target_dir/app/config/$LARAVEL_ENV/database.php
ln -sf /etc/openstackid/app.php $target_dir/app/config/$LARAVEL_ENV/app.php
ln -sf /etc/openstackid/log.php $target_dir/app/config/$LARAVEL_ENV/log.php
ln -sf /etc/openstackid/server.php $target_dir/app/config/$LARAVEL_ENV/server.php
ln -sf /etc/openstackid/mail.php $target_dir/app/config/$LARAVEL_ENV/mail.php
# convert app/storage into symlink and set permissions
mv $target_dir/app/storage $SITE_ROOT/
chmod 02770 $SITE_ROOT/storage
find $SITE_ROOT/storage/ -type d -exec chmod 0775 {} \;
find $SITE_ROOT/storage/ -type f -exec chmod 0664 {} \;
rm -rf $target_dir/app/storage
ln -s $SITE_ROOT/storage $target_dir/app
fi
if [[ $LARAVEL_VERSION -eq 5 ]]; then
ln -sf /etc/openstackid/.env $target_dir/.env
# convert app/storage into symlink and set permissions
mv $target_dir/storage $SITE_ROOT/
chmod 02770 $SITE_ROOT/storage
find $SITE_ROOT/storage/ -type d -exec chmod 0775 {} \;
find $SITE_ROOT/storage/ -type f -exec chmod 0664 {} \;
rm -rf $target_dir/storage
ln -s $SITE_ROOT/storage $target_dir
fi
ln -sf /etc/openstackid/.env $target_dir/.env
# convert app/storage into symlink and set permissions
mv $target_dir/storage $SITE_ROOT/
chmod 02770 $SITE_ROOT/storage
find $SITE_ROOT/storage/ -type d -exec chmod 0775 {} \;
find $SITE_ROOT/storage/ -type f -exec chmod 0664 {} \;
rm -rf $target_dir/storage
ln -s $SITE_ROOT/storage $target_dir
# populate application database
cd $target_dir
@ -190,40 +171,25 @@ function site_update {
umask 0022
# link configuration files managed by puppet
if [[ $LARAVEL_VERSION -eq 4 ]]; then
ln -sf /etc/openstackid/environment.php $target_dir/bootstrap/environment.php
ln -sf /etc/openstackid/recaptcha.php $target_dir/app/config/packages/greggilbert/recaptcha/$LARAVEL_ENV/config.php
ln -sf /etc/openstackid/database.php $target_dir/app/config/$LARAVEL_ENV/database.php
ln -sf /etc/openstackid/app.php $target_dir/app/config/$LARAVEL_ENV/app.php
ln -sf /etc/openstackid/log.php $target_dir/app/config/$LARAVEL_ENV/log.php
ln -sf /etc/openstackid/server.php $target_dir/app/config/$LARAVEL_ENV/server.php
ln -sf /etc/openstackid/mail.php $target_dir/app/config/$LARAVEL_ENV/mail.php
# link shared app/storage directory
rm -rf $target_dir/app/storage
ln -s $SITE_ROOT/storage $target_dir/app
ln -sf /etc/openstackid/.env $target_dir/.env
# link shared app/storage directory
rm -rf $target_dir/storage
ln -s $SITE_ROOT/storage $target_dir
# check for new storage structure ( LV 5.x)
if [[ ! -d $SITE_ROOT/storage/framework ]]; then
mkdir -p $SITE_ROOT/storage/framework;
mkdir -p $SITE_ROOT/storage/framework/cache;
mkdir -p $SITE_ROOT/storage/framework/views;
mkdir -p $SITE_ROOT/storage/framework/sessions;
fi
if [[ $LARAVEL_VERSION -eq 5 ]]; then
ln -sf /etc/openstackid/.env $target_dir/.env
# link shared app/storage directory
rm -rf $target_dir/storage
ln -s $SITE_ROOT/storage $target_dir
# check for new storage structure ( LV 5.x)
if [[ ! -d $SITE_ROOT/storage/framework ]]; then
mkdir -p $SITE_ROOT/storage/framework;
mkdir -p $SITE_ROOT/storage/framework/cache;
mkdir -p $SITE_ROOT/storage/framework/views;
mkdir -p $SITE_ROOT/storage/framework/sessions;
fi
if [[ ! -d $SITE_ROOT/storage/app ]]; then
mkdir -p $SITE_ROOT/storage/app;
mkdir -p $SITE_ROOT/storage/app/public;
fi
# set permissions
chmod 02770 $SITE_ROOT/storage;
find $SITE_ROOT/storage/ -type d -exec chmod 0775 {} \;
find $SITE_ROOT/storage/ -type f -exec chmod 0664 {} \;
if [[ ! -d $SITE_ROOT/storage/app ]]; then
mkdir -p $SITE_ROOT/storage/app;
mkdir -p $SITE_ROOT/storage/app/public;
fi
# set permissions
chmod 02770 $SITE_ROOT/storage;
find $SITE_ROOT/storage/ -type d -exec chmod 0775 {} \;
find $SITE_ROOT/storage/ -type f -exec chmod 0664 {} \;
# populate application database
cd $target_dir
@ -235,5 +201,5 @@ function site_update {
rm -rf $SITE_ROOT/w
ln -s $target_dir $SITE_ROOT/w
# to reset op cache
service php5-fpm restart
service $PHP_SERVICE_NAME restart
}

125
files/php7/php-fpm.conf Normal file
View File

@ -0,0 +1,125 @@
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr). This prefix can be dynamically changed by using the
; '-p' argument from the command line.
;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;
[global]
; Pid file
; Note: the default prefix is /var
; Default Value: none
pid = /run/php/php7.2-fpm.pid
; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; into a local file.
; Note: the default prefix is /var
; Default Value: log/php-fpm.log
error_log = /var/log/php7.2-fpm.log
; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
; will be handled differently.
; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
; Default Value: daemon
;syslog.facility = daemon
; syslog_ident is prepended to every message. If you have multiple FPM
; instances running on the same server, you can change the default value
; which must suit common needs.
; Default Value: php-fpm
;syslog.ident = php-fpm
; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
;log_level = notice
; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 0
; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated. This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;emergency_restart_interval = 0
; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;process_control_timeout = 0
; The maximum number of processes FPM will fork. This has been designed to control
; the global number of processes when using dynamic PM within a lot of pools.
; Use it with caution.
; Note: A value of 0 indicates no limit
; Default Value: 0
; process.max = 128
; Specify the nice(2) priority to apply to the master process (only if set)
; The value can vary from -19 (highest priority) to 20 (lowest priority)
; Note: - It will only work if the FPM master process is launched as root
; - The pool process will inherit the master process priority
; unless specified otherwise
; Default Value: no set
; process.priority = -19
; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
;daemonize = yes
; Set open file descriptor rlimit for the master process.
; Default Value: system defined value
;rlimit_files = 1024
; Set max core size rlimit for the master process.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0
; Specify the event mechanism FPM will use. The following is available:
; - select (any POSIX os)
; - poll (any POSIX os)
; - epoll (linux >= 2.5.44)
; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
; - /dev/poll (Solaris >= 7)
; - port (Solaris >= 10)
; Default Value: not set (auto detection)
;events.mechanism = epoll
; When FPM is built with systemd integration, specify the interval,
; in seconds, between health report notification to systemd.
; Set to 0 to disable.
; Available Units: s(econds), m(inutes), h(ours)
; Default Unit: seconds
; Default value: 10
;systemd_interval = 10
;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;
; Multiple pools of child processes may be started with different listening
; ports and different management options. The name of the pool will be
; used in logs and stats. There is no limitation on the number of pools which
; FPM can handle. Your system will tell you anyway :)
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
; Relative path can also be used. They will be prefixed by:
; - the global prefix if it's been set (-p argument)
; - /usr otherwise
include=/etc/php/7.2/fpm/pool.d/*.conf

1920
files/php7/php.ini Normal file

File diff suppressed because it is too large Load Diff

22
files/php7/www.conf Normal file
View File

@ -0,0 +1,22 @@
[www]
; linux socket
; listen = /var/run/php7.2-fpm.sock
; TCP socket
listen = 127.0.0.1:9000
user = www-data
group = www-data
listen.owner = www-data
listen.group = www-data
; request_slowlog_timeout = 5s
; slowlog = /var/log/php-fpm/slowlog-site.log
; child processes
pm = dynamic
pm.max_children = 400
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 10
pm.max_requests = 500

View File

@ -93,9 +93,10 @@ class openstackid (
$mysql_ssl_client_cert_file = '/etc/mysql-client-ssl/client-cert.pem',
$mysql_ssl_client_cert_file_contents = '',
$mysql_ssl_cypher = 'DHE-RSA-AES256-SHA',
$php_version = 5,
) {
# php packages needed for openid server
# php5 packages needed for openid server
$php5_packages = [
'php5-common',
'php5-curl',
@ -107,71 +108,186 @@ class openstackid (
'php5-gmp',
]
package { $php5_packages:
ensure => present,
}
# php7 packages needed for openid server
# binary packages needed
$bin_packages = [
'build-essential'
$php7_packages = [
'php7.2-common',
'php7.2-curl',
'php7.2-cli',
'php7.2-mysqlnd',
'php7.2-fpm',
'php7.2-json',
'php7.2-gmp',
'php7.2-xml',
'php7.2-zip',
]
package { $bin_packages :
ensure => present,
if($php_version == 7 ){
$php_service_name = 'php7.2-fpm'
$php_packages = $php7_packages
}
else{
$php_service_name = 'php5-fpm'
$php_packages = $php5_packages
}
# php5-fpm configuration
$main_packages = [
'curl',
'wget',
'build-essential',
'software-properties-common',
'python-software-properties',
]
exec { 'enable_php5-mbcrypt':
command => '/usr/sbin/php5enmod mcrypt',
timeout => 0,
require => [
Package['php5-fpm'],
],
notify => Service['php5-fpm'],
}
file { '/etc/php5/fpm/php-fpm.conf':
package { $main_packages:
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/php-fpm.conf',
require => [
Package['php5-fpm'],
],
notify => Service['php5-fpm'],
}
file { '/etc/php5/fpm/php.ini':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/php.ini',
require => [
Package['php5-fpm'],
],
notify => Service['php5-fpm'],
if ($php_version == 7) {
if ($::lsbdistcodename == 'xenial') {
apt::ppa { 'ppa:ondrej/php':
require => [
Package[$main_packages],
],
notify => Exec['apt_update'],
}
$php7_requires = [
Class['apt::update'],
Apt::Ppa['ppa:ondrej/php'],
]
}
else{
$php7_requires = [
Class['apt::update'],
Package[$main_packages],
]
}
package { $php7_packages:
ensure => present,
provider => 'apt',
require => [
$php7_requires,
]
}
}
else {
package { $php5_packages:
ensure => present,
require => [
Package[$main_packages],
],
}
}
file { '/etc/php5/fpm/pool.d/www.conf':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/www.conf',
require => [
Package['php5-fpm'],
],
notify => Service['php5-fpm'],
}
if ($php_version == 7) {
service { 'php5-fpm':
ensure => 'running',
enable => true,
require => Package['php5-fpm'],
# php7-fpm configuration
file { '/etc/php/7.2/fpm/php-fpm.conf':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/php7/php-fpm.conf',
require => [
Package[$php_service_name],
],
notify => Service[$php_service_name],
}
file { '/etc/php/7.2/fpm/php.ini':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/php7/php.ini',
require => [
Package[$php_service_name],
],
notify => Service[$php_service_name],
}
file { '/etc/php/7.2/fpm/pool.d/www.conf':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/php7/www.conf',
require => [
Package[$php_service_name],
],
notify => Service[$php_service_name],
}
service { $php_service_name:
ensure => 'running',
enable => true,
require => Package[$php_service_name],
}
}
else{
# php5-fpm configuration
exec { 'enable_php5-mbcrypt':
command => '/usr/sbin/php5enmod mcrypt',
timeout => 0,
require => [
Package[$php_service_name],
],
notify => Service[$php_service_name],
}
file { '/etc/php5/fpm/php-fpm.conf':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/php-fpm.conf',
require => [
Package[$php_service_name],
],
notify => Service[$php_service_name],
}
file { '/etc/php5/fpm/php.ini':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/php.ini',
require => [
Package[$php_service_name],
],
notify => Service[$php_service_name],
}
file { '/etc/php5/fpm/pool.d/www.conf':
ensure => present,
owner => 'root',
group => 'www-data',
mode => '0640',
source => 'puppet:///modules/openstackid/www.conf',
require => [
Package[$php_service_name],
],
notify => Service[$php_service_name],
}
service { $php_service_name:
ensure => 'running',
enable => true,
require => Package[$php_service_name],
}
}
# the deploy scripts use the curl CLI
@ -205,99 +321,15 @@ class openstackid (
mode => '0755',
}
if($laravel_version == 4 ){
# laravel 4.X configuration files
file { '/etc/openstackid/database.php':
file { '/etc/openstackid/.env':
ensure => present,
content => template('openstackid/lv4/database.php.erb'),
content => template('openstackid/.env.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
file { '/etc/openstackid/app.php':
ensure => present,
content => template('openstackid/lv4/app.php.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
file { '/etc/openstackid/log.php':
ensure => present,
content => template('openstackid/lv4/log.php.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
file { '/etc/openstackid/environment.php':
ensure => present,
content => template('openstackid/lv4/environment.php.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
file { '/etc/openstackid/recaptcha.php':
ensure => present,
content => template('openstackid/lv4/recaptcha.php.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
file { '/etc/openstackid/server.php':
ensure => present,
content => template('openstackid/lv4/server.php.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
file { '/etc/openstackid/mail.php':
ensure => present,
content => template('openstackid/lv4/mail.php.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
}
else
{
file { '/etc/openstackid/.env':
ensure => present,
content => template('openstackid/lv5/.env.erb'),
owner => 'root',
group => 'www-data',
mode => '0640',
require => [
File['/etc/openstackid'],
]
}
}
# mysql ssl connection configuration
@ -374,13 +406,7 @@ class openstackid (
class { '::apache::mod::rewrite': }
class { '::apache::mod::proxy': }
if ($::lsbdistcodename == 'precise') {
class { '::apache::mod::fastcgi': }
class { '::apache::mod::actions': }
}
else {
::apache::mod { 'proxy_fcgi': }
}
::apache::mod { 'proxy_fcgi': }
if $ssl_cert_file_contents != '' {
file { $ssl_cert_file:
@ -433,53 +459,22 @@ class openstackid (
require => Deploy['deploytool'],
}
if($laravel_version == 4 ){
$deploy_site_requires = [
File['/opt/deploy/conf.d/openstackid.conf'],
Apache::Vhost::Custom[$vhost_name],
File['/etc/openstackid/recaptcha.php'],
File['/etc/openstackid/database.php'],
File['/etc/openstackid/log.php'],
File['/etc/openstackid/environment.php'],
File['/etc/openstackid/server.php'],
File['/etc/openstackid/app.php'],
Package['curl'],
Package[$php5_packages] ,
Class['::nodejs'],
]
$update_site_requires = [
File['/opt/deploy/conf.d/openstackid.conf'],
Apache::Vhost::Custom[$vhost_name],
File['/etc/openstackid/recaptcha.php'],
File['/etc/openstackid/database.php'],
File['/etc/openstackid/app.php'],
File['/etc/openstackid/log.php'],
File['/etc/openstackid/environment.php'],
File['/etc/openstackid/server.php'],
Package[$php5_packages] ,
Class['::nodejs'],
]
}
else{
$deploy_site_requires = [
$deploy_site_requires = [
File['/opt/deploy/conf.d/openstackid.conf'],
Apache::Vhost::Custom[$vhost_name],
File['/etc/openstackid/.env'],
Package['curl'],
Package[$php5_packages] ,
Package[$php_packages] ,
Class['::nodejs'],
]
]
$update_site_requires = [
File['/opt/deploy/conf.d/openstackid.conf'],
Apache::Vhost::Custom[$vhost_name],
File['/etc/openstackid/.env'],
Package[$php5_packages] ,
Class['::nodejs'],
]
}
$update_site_requires = [
File['/opt/deploy/conf.d/openstackid.conf'],
Apache::Vhost::Custom[$vhost_name],
File['/etc/openstackid/.env'],
Package[$php_packages] ,
Class['::nodejs'],
]
exec { 'deploy-site':
path => '/usr/local/bin:/usr/bin:/bin',

View File

@ -1,187 +0,0 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every error that occurs within your
| application. If disabled, a simple generic error page is shown.
|
*/
'debug' => false,
/*
|--------------------------------------------------------------------------
| Application URL
|--------------------------------------------------------------------------
|
| This URL is used by the console to properly generate URLs when using
| the Artisan command line tool. You should set this to the root of
| your application so that it is used when running Artisan tasks.
|
*/
'url' => '<%= @app_url %>',
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => '<%= @app_timezone %>',
/*
|--------------------------------------------------------------------------
| Application Locale Configuration
|--------------------------------------------------------------------------
|
| The application locale determines the default locale that will be used
| by the translation service provider. You are free to set this value
| to any of the locales which will be supported by the application.
|
*/
'locale' => 'en',
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| This key is used by the Illuminate encrypter service and should be set
| to a random, 32 character string, otherwise these encrypted strings
| will not be safe. Please do this before deploying an application!
|
*/
'key' => '<%= @app_key %>',
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => array(
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Session\CommandsServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Routing\ControllerServiceProvider',
'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider',
'Illuminate\Filesystem\FilesystemServiceProvider',
'Illuminate\Hashing\HashServiceProvider',
'Illuminate\Html\HtmlServiceProvider',
'Illuminate\Log\LogServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Database\MigrationServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Queue\QueueServiceProvider',
'Illuminate\Remote\RemoteServiceProvider',
'Illuminate\Auth\Reminders\ReminderServiceProvider',
'Illuminate\Database\SeedServiceProvider',
'Illuminate\Session\SessionServiceProvider',
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Illuminate\Workbench\WorkbenchServiceProvider',
'Illuminate\Redis\RedisServiceProvider',
'services\utils\UtilsProvider',
'repositories\RepositoriesProvider',
'services\oauth2\OAuth2ServiceProvider',
'services\openid\OpenIdProvider',
'auth\AuthenticationServiceProvider',
'services\ServicesProvider',
'strategies\StrategyProvider',
'oauth2\OAuth2ServiceProvider',
'openid\OpenIdServiceProvider',
'Greggilbert\Recaptcha\RecaptchaServiceProvider',
'services\oauth2\CORS\CORSProvider',
'factories\FactoriesProvider',
),
/*
|--------------------------------------------------------------------------
| Service Provider Manifest
|--------------------------------------------------------------------------
|
| The service provider manifest is used by Laravel to lazy load service
| providers which are not needed for each request, as well to keep a
| list of all of the services. Here, you may set its storage spot.
|
*/
'manifest' => storage_path().'/meta',
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => array(
'App' => 'Illuminate\Support\Facades\App',
'Artisan' => 'Illuminate\Support\Facades\Artisan',
'Auth' => 'Illuminate\Support\Facades\Auth',
'Blade' => 'Illuminate\Support\Facades\Blade',
'Cache' => 'Illuminate\Support\Facades\Cache',
'ClassLoader' => 'Illuminate\Support\ClassLoader',
'Config' => 'Illuminate\Support\Facades\Config',
'Controller' => 'Illuminate\Routing\Controller',
'Cookie' => 'Illuminate\Support\Facades\Cookie',
'Crypt' => 'Illuminate\Support\Facades\Crypt',
'DB' => 'Illuminate\Support\Facades\DB',
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
'Event' => 'Illuminate\Support\Facades\Event',
'File' => 'Illuminate\Support\Facades\File',
'Form' => 'Illuminate\Support\Facades\Form',
'Hash' => 'Illuminate\Support\Facades\Hash',
'HTML' => 'Illuminate\Support\Facades\HTML',
'Input' => 'Illuminate\Support\Facades\Input',
'Lang' => 'Illuminate\Support\Facades\Lang',
'Log' => 'Illuminate\Support\Facades\Log',
'Mail' => 'Illuminate\Support\Facades\Mail',
'Paginator' => 'Illuminate\Support\Facades\Paginator',
'Password' => 'Illuminate\Support\Facades\Password',
'Queue' => 'Illuminate\Support\Facades\Queue',
'Redirect' => 'Illuminate\Support\Facades\Redirect',
'Request' => 'Illuminate\Support\Facades\Request',
'Response' => 'Illuminate\Support\Facades\Response',
'Route' => 'Illuminate\Support\Facades\Route',
'Schema' => 'Illuminate\Support\Facades\Schema',
'Seeder' => 'Illuminate\Database\Seeder',
'Session' => 'Illuminate\Support\Facades\Session',
'SSH' => 'Illuminate\Support\Facades\SSH',
'Str' => 'Illuminate\Support\Str',
'URL' => 'Illuminate\Support\Facades\URL',
'Validator' => 'Illuminate\Support\Facades\Validator',
'View' => 'Illuminate\Support\Facades\View',
'RedisLV4' => 'Illuminate\Support\Facades\Redis',
),
'version' => '<%= @app_version %>',
);

View File

@ -1,94 +0,0 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass object; however, you may desire to retrieve records in an
| array format for simplicity. Here you can tweak the fetch style.
|
*/
'fetch' => PDO::FETCH_CLASS,
/*
|--------------------------------------------------------------------------
| Default Database Connection Name
|--------------------------------------------------------------------------
|
| Here you may specify which of the database connections below you wish
| to use as your default connection for all database work. Of course
| you may use many connections at once using the Database library.
|
*/
'default' => 'openstackid',
/*
|--------------------------------------------------------------------------
| Database Connections
|--------------------------------------------------------------------------
|
| Here are each of the database connections setup for your application.
| Of course, examples of configuring each database platform that is
| supported by Laravel is shown below to make development simple.
|
|
| All database work in Laravel is done through the PHP PDO facilities
| so make sure you have the driver for your particular database of
| choice installed on your machine before you begin development.
|
*/
'connections' => array(
//primary DB
'openstackid' => array(
'driver' => 'mysql',
'host' => '<%= @id_mysql_host %>',
'database' => '<%= @id_db_name %>',
'username' => '<%= @id_mysql_user %>',
'password' => '<%= @id_mysql_password %>',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
//secondary DB (OS Membership)
'os_members' => array(
'driver' => 'mysql',
'host' => '<%= @ss_mysql_host %>',
'database' => '<%= @ss_db_name %>',
'username' => '<%= @ss_mysql_user %>',
'password' => '<%= @ss_mysql_password %>',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
),
),
/*
|--------------------------------------------------------------------------
| Migration Repository Table
|--------------------------------------------------------------------------
|
| This table keeps track of all the migrations that have already run for
| your application. Using this information, we can determine which of
| the migrations on disk have not actually be run in the databases.
|
*/
'migrations' => 'migrations',
/*
|--------------------------------------------------------------------------
| Redis Databases
|--------------------------------------------------------------------------
|
| Redis is an open source, fast, and advanced key-value store that also
| provides a richer set of commands than a typical key-value systems
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => array(
'cluster' => false,
'default' => array(
'host' => '<%= @redis_host %>',
'port' => <%= @redis_port %>,
'database' => <%= @redis_db %>,
'password' => '<%= @redis_password %>'
),
),
);

View File

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

View File

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

View File

@ -1,124 +0,0 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Mail Driver
|--------------------------------------------------------------------------
|
| Laravel supports both SMTP and PHP's "mail" function as drivers for the
| sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "mail", "sendmail"
|
*/
'driver' => '<%= @email_driver %>',
/*
|--------------------------------------------------------------------------
| SMTP Host Address
|--------------------------------------------------------------------------
|
| Here you may provide the host address of the SMTP server used by your
| applications. A default option is provided that is compatible with
| the Postmark mail service, which will provide reliable delivery.
|
*/
'host' => '<%= @email_smtp_server %>',
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
|
| This is the SMTP port used by your application to delivery e-mails to
| users of your application. Like the host we have set this value to
| stay compatible with the Postmark e-mail application by default.
|
*/
'port' => <%= @email_smtp_server_port %>,
/*
|--------------------------------------------------------------------------
| Global "From" Address
|--------------------------------------------------------------------------
|
| You may wish for all e-mails sent by your application to be sent from
| the same address. Here, you may specify a name and address that is
| used globally for all e-mails that are sent by your application.
|
*/
'from' => array('address' => null, 'name' => null),
/*
|--------------------------------------------------------------------------
| E-Mail Encryption Protocol
|--------------------------------------------------------------------------
|
| Here you may specify the encryption protocol that should be used when
| the application send e-mail messages. A sensible default using the
| transport layer security protocol should provide great security.
|
*/
'encryption' => 'tls',
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => '<%= @email_smtp_server_user %>',
/*
|--------------------------------------------------------------------------
| SMTP Server Password
|--------------------------------------------------------------------------
|
| Here you may set the password required by your SMTP server to send out
| messages from your application. This will be given to the server on
| connection so that the application will be able to send messages.
|
*/
'password' => '<%= @email_smtp_server_password %>',
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Mail "Pretend"
|--------------------------------------------------------------------------
|
| When this option is enabled, e-mail will not actually be sent over the
| web and will instead be written to your application's logs files so
| you may inspect the message. This is great for local development.
|
*/
'pretend' => false,
);

View File

@ -1,22 +0,0 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| API Keys
|--------------------------------------------------------------------------
|
| Set the public and private API keys as provided by reCAPTCHA.
|
*/
'public_key' => '<%= @id_recaptcha_public_key %>',
'private_key' => '<%= @id_recaptcha_private_key %>',
/*
|--------------------------------------------------------------------------
| Template
|--------------------------------------------------------------------------
|
| Set a template to use if you don't want to use the standard one.
|
*/
'template' => '<%= @id_recaptcha_template %>'
);

View File

@ -1,5 +0,0 @@
<?php
return array(
'SSL_Enable' => <%= @ssl_enable %>,
'OAuth2_Enable' => <%= @oauth2_enable %>,
);

View File

@ -4,4 +4,5 @@ LARAVEL_ENV=<%= @id_environment %>
RELEASE_NAME=openstackid-<%= @openstackid_release %>.tar.gz
SOURCE_ROOT=http://tarballs.openstack.org/openstackid/
USE_DB_SEEDING=<%= @use_db_seeding?1:0 %>
LARAVEL_VERSION=<%= @laravel_version %>
LARAVEL_VERSION=<%= @laravel_version %>
PHP_SERVICE_NAME=<%= @php_service_name %>

View File

@ -42,20 +42,7 @@
AllowOverride All
</Directory>
<IfModule mod_proxy_fcgi.c>
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000<%= @docroot %>/$1 retry=0 timeout=1800
</IfModule>
ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000<%= @docroot %>/$1 retry=0 timeout=1800
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization
<Directory /usr/lib/cgi-bin>
Options ExecCGI FollowSymLinks
SetHandler fastcgi-script
Require all granted
</Directory>
</IfModule>
</VirtualHost>
</IfModule>