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
60e8fe59
Commit
60e8fe59
authored
10 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Some features must be optional
parent
be95a6db
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
attributes/default.rb
+2
-2
2 additions, 2 deletions
attributes/default.rb
recipes/default.rb
+57
-50
57 additions, 50 deletions
recipes/default.rb
with
59 additions
and
52 deletions
attributes/default.rb
+
2
−
2
View file @
60e8fe59
default
[
'typo3_site'
][
'ip_address'
]
=
'
192.168.156.140
'
default
[
'typo3_site'
][
'ip_address'
]
=
''
default
[
'typo3_site'
][
'webroot'
]
=
'/var/www'
default
[
'typo3_site'
][
'site_configuration'
]
=
'SiteConfiguration.php'
default
[
'typo3_site'
][
'server_aliases'
]
=
'www.site.dev'
default
[
'typo3_site'
][
'hostname'
]
=
'site.dev'
default
[
'typo3_site'
][
'repository'
]
=
''
default
[
'typo3_site'
][
'repository_hostname'
]
=
'
git.domain
'
default
[
'typo3_site'
][
'repository_hostname'
]
=
''
default
[
'typo3_site'
][
'repository_port'
]
=
22
default
[
'typo3_site'
][
'download_typo3'
]
=
false
default
[
'typo3_site'
][
'typo3_version'
]
=
'6.2'
...
...
This diff is collapsed.
Click to expand it.
recipes/default.rb
+
57
−
50
View file @
60e8fe59
...
...
@@ -141,6 +141,7 @@ if node['typo3_site']['download_typo3']
cd
#{
node
[
'typo3_site'
][
'webroot'
]
}
/
#{
node
[
'typo3_site'
][
'hostname'
]
}
rm -f typo3_src
ln -s ../typo3_src-
#{
node
[
'typo3_site'
][
'typo3_version'
]
}
typo3_src
touch typo3conf/ENABLE_INSTALL_TOOL
if [ ! -f typo3 ]
then
...
...
@@ -160,20 +161,22 @@ end
### Provide Sources ###
#######################
ssh_known_hosts_entry
node
[
'typo3_site'
][
'repository_hostname'
]
do
port
node
[
'typo3_site'
][
'repository_port'
]
end
if
node
[
'typo3_site'
][
'repository'
]
!=
''
ssh_known_hosts_entry
node
[
'typo3_site'
][
'repository_hostname'
]
do
port
node
[
'typo3_site'
][
'repository_port'
]
end
git
"
#{
node
[
'typo3_site'
][
'webroot'
]
}
/
#{
node
[
'typo3_site'
][
'hostname'
]
}
"
do
repository
node
[
'typo3_site'
][
'repository'
]
remote
'origin'
revision
'HEAD'
reference
'master'
timeout
100000
user
'vagrant'
group
'vagrant'
action
:checkout
ssh_wrapper
'/home/vagrant/ssh_wrapper.sh'
git
"
#{
node
[
'typo3_site'
][
'webroot'
]
}
/
#{
node
[
'typo3_site'
][
'hostname'
]
}
"
do
repository
node
[
'typo3_site'
][
'repository'
]
remote
'origin'
revision
'HEAD'
reference
'master'
timeout
100000
user
'vagrant'
group
'vagrant'
action
:checkout
ssh_wrapper
'/home/vagrant/ssh_wrapper.sh'
end
end
###########################################
...
...
@@ -266,47 +269,51 @@ node['typo3_site']['sync_databases'].each do |database_data|
action
:grant
end
# add host to ssh known hosts
ssh_known_hosts_entry
database_data
[
'dump_hostname'
]
do
port
database_data
[
'dump_port'
]
end
if
database_data
[
'dump_hostname'
]
# add host to ssh known hosts
ssh_known_hosts_entry
database_data
[
'dump_hostname'
]
do
port
database_data
[
'dump_port'
]
end
# download the sql data
bash
'Download Dump for '
+
database_data
[
'database_name'
]
do
user
'vagrant'
group
'vagrant'
timeout
3000000
code
<<-
EOF
rsync --delete -auvz --progress -e "ssh -i /home/vagrant/.ssh/id_rsa -p
#{
database_data
[
'dump_port'
]
}
-o StrictHostKeyChecking=no" \
--no-o --no-g
#{
database_data
[
'dump_user'
]
}
@
#{
database_data
[
'dump_hostname'
]
}
:
#{
database_data
[
'dump_remote'
]
}
\
#{
database_data
[
'dump_local'
]
}
;
EOF
action
:run
end
# download the sql data
bash
'Download Dump for '
+
database_data
[
'database_name'
]
do
user
'vagrant'
group
'vagrant'
timeout
3000000
code
<<-
EOF
rsync --delete -auvz --progress -e "ssh -i /home/vagrant/.ssh/id_rsa -p
#{
database_data
[
'dump_port'
]
}
-o StrictHostKeyChecking=no" \
--no-o --no-g
#{
database_data
[
'dump_user'
]
}
@
#{
database_data
[
'dump_hostname'
]
}
:
#{
database_data
[
'dump_remote'
]
}
\
#{
database_data
[
'dump_local'
]
}
;
EOF
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
# 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
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
# # 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
database_data
[
'post_install_queries'
].
each
do
|
query
|
mysql_database
'Execute Post Install Query'
do
connection
connection_info
database_name
database_data
[
'database_name'
]
sql
query
action
:query
if
database_data
[
'post_install_queries'
]
database_data
[
'post_install_queries'
].
each
do
|
query
|
mysql_database
'Execute Post Install Query'
do
connection
connection_info
database_name
database_data
[
'database_name'
]
sql
query
action
:query
end
end
end
end
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