Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
typo3_site
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Patrick Oberdorf
typo3_site
Commits
dae2f00d
Commit
dae2f00d
authored
9 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[FEATURE] Allow the configuration of the mysql version
parent
b3caaca1
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
attributes/default.rb
+1
-0
1 addition, 0 deletions
attributes/default.rb
recipes/default.rb
+14
-19
14 additions, 19 deletions
recipes/default.rb
templates/default/my-5.6.cnf.erb
+0
-0
0 additions, 0 deletions
templates/default/my-5.6.cnf.erb
with
15 additions
and
19 deletions
attributes/default.rb
+
1
−
0
View file @
dae2f00d
...
...
@@ -13,6 +13,7 @@ default['typo3_site']['repository_hostname'] = ''
default
[
'typo3_site'
][
'repository_port'
]
=
22
default
[
'typo3_site'
][
'download_typo3'
]
=
false
default
[
'typo3_site'
][
'typo3_version'
]
=
'6.2'
default
[
'typo3_site'
][
'mysql_version'
]
=
'5.6'
default
[
'typo3_site'
][
'deploy_dump'
]
=
'~/site/dump.sql'
default
[
'typo3_site'
][
'solr'
][
'init'
]
=
false
...
...
This diff is collapsed.
Click to expand it.
recipes/default.rb
+
14
−
19
View file @
dae2f00d
...
...
@@ -292,14 +292,17 @@ end
###################
mysql_service
'default'
do
version
'5.6'
version
node
[
'typo3_site'
][
'mysql_version'
]
initial_root_password
'root'
action
[
:create
,
:start
]
end
mysql_config
'default'
do
source
'my.cnf.erb'
action
:create
# overwrite the configuration only for MySQL 5.6 (disables the strict checks)
if
node
[
'typo3_site'
][
'mysql_version'
]
===
'5.6'
mysql_config
'default'
do
source
"my-
#{
node
[
'typo3_site'
][
'mysql_version'
]
}
.cnf.erb"
action
:create
end
end
mysql_client
'default'
do
...
...
@@ -359,22 +362,14 @@ node['typo3_site']['sync_databases'].each do |database_data|
action
:run
end
# load the dump
bash
'Import Dump for '
+
database_data
[
'database_name'
]
do
code
<<-
EOF
mysql -h 127.0.0.1 -u root -proot
#{
database_data
[
'database_name'
]
}
<
#{
database_data
[
'dump_local'
]
}
EOF
action
:run
# this would be better, but currently buggy in the database cookbook
# https://github.com/opscode-cookbooks/database/issues/128
mysql_database
'Import Dump for '
+
database_data
[
'database_name'
]
do
connection
connection_info
database_name
database_data
[
'database_name'
]
sql
{
::
File
.
open
(
database_data
[
'dump_local'
]).
read
}
action
:query
end
# # this would be better, but currently buggy in the database cookbook
# # https://github.com/opscode-cookbooks/database/issues/128
# mysql_database 'Import Dump for ' + database_data['database_name'] do
# connection connection_info
# database_name #{database_data['database_name']}
# sql { ::File.open(#{database_data['dump_local']}).read }
# action :query
# end
end
if
database_data
[
'post_install_queries'
]
...
...
This diff is collapsed.
Click to expand it.
templates/default/my.cnf.erb
→
templates/default/my
-5.6
.cnf.erb
+
0
−
0
View file @
dae2f00d
File moved
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment