Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
18d93673
Commit
18d93673
authored
Mar 24, 2011
by
anarcat
Browse files
readd frontend installer as a separate package
parent
2b994588
Changes
4
Hide whitespace changes
Inline
Side-by-side
debian/aegir-hostmaster.config
0 → 100644
View file @
18d93673
#! /bin/sh
set
-
e
# Source debconf library.
. /
usr
/
share
/
debconf
/
confmodule
if
su
aegir
-
c
'drush @hostmaster status'
|
grep
-
q
'Drupal bootstrap.*Successful'
;
then
# there's already an install, do not go around asking silly questions
exit
0
fi
db_get
aegir
/
email
if
[ -
z
"$RET"
];
then
db_set
aegir
/
email
"aegir@`hostname -f`"
fi
db_input
medium
aegir
/
site
||
true
if
[ -
z
"$RET"
];
then
db_set
aegir
/
site
`
hostname
-
f
`
fi
db_input
low
aegir
/
makefile
||
true
db_input
low
aegir
/
email
||
true
db_input
low
aegir
/
db_host
||
true
db_input
low
aegir
/
db_user
||
true
# if we got here, it means aegir is not installed and we forgot the
# root password, ask for it again
db_reset
aegir
/
db_password
||
true
db_fset
aegir
/
db_password
"seen"
"false"
||
true
db_input
high
aegir
/
db_password
||
true
db_go
debian/aegir-hostmaster.postinst
0 → 100644
View file @
18d93673
#!/bin/sh
# postinst script for hostmaster
#
# see: dh_installdeb(1)
set
-e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
# Source debconf library.
.
/usr/share/debconf/confmodule
VARLIB
=
"/var/aegir"
case
"
$1
"
in
configure
)
# fetch the version number from the makefile. the line we're looking for looks like this
# projects[hostmaster][download][url] = "http://files.aegirproject.org/hostmaster-0.4-beta1.tgz"
# this obviously doesn't work for git releases
VERSION
=
`
sed
-n
'/^version/{s/^.*= *//;p}'
/usr/share/drush/commands/provision/provision.info
`
TEMPFILE
=
`
tempfile
`
su aegir
-c
'drush @hostmaster status'
>>
$TEMPFILE
||
true
if
grep
-q
'Drupal bootstrap.*Successful'
$TEMPFILE
;
then
db_stop
echo
"Aegir frontend (@hostmaster) site detected"
SITE
=
`
grep
URI
$TEMPFILE
|
sed
-e
's/^.*://'
`
OLD_PLATFORM
=
`
grep
'Drupal root'
$TEMPFILE
|
sed
-e
's/^.*:[[:space:]]*//;s/[[:space:]]*$//'
`
NEW_PLATFORM
=
"
$VARLIB
/hostmaster-
$VERSION
"
if
[
-d
"
$NEW_PLATFORM
"
]
&&
[
"
$OLD_PLATFORM
"
=
"
$NEW_PLATFORM
"
]
;
then
echo
"it seems to be the same version as the one we're trying to install, not upgrading"
else
echo
"upgrading the frontend from
$OLD_PLATFORM
to
$NEW_PLATFORM
"
cd
"
$OLD_PLATFORM
"
su aegir
-c
"drush hostmaster-migrate --yes '
$SITE
' '
$NEW_PLATFORM
'"
fi
else
db_get
"aegir/site"
if
[
!
-z
"
$RET
"
]
;
then
SITE
=
"
$RET
"
fi
db_get
"aegir/db_host"
AEGIR_DB_HOST
=
"
$RET
"
db_get
"aegir/db_user"
AEGIR_DB_USER
=
"
$RET
"
db_get
"aegir/db_password"
AEGIR_DB_PASS
=
"
$RET
"
db_get
"aegir/email"
EMAIL
=
"
$RET
"
db_get
"aegir/makefile"
if
[
!
-z
"
$RET
"
]
;
then
MAKEFILE
=
"--makefile='
$RET
'"
fi
db_reset aegir/db_password
||
true
db_fset aegir/db_password
"seen"
"true"
||
true
db_go
db_stop
if
[
-d
$VARLIB
/.drush/provision
]
;
then
echo
"existing provision in
$VARLIB
/.drush/provision detected, move away and try again"
exit
1
fi
echo
"installing the Aegir frontend (Drupal with the hostmaster profile), please wait..."
# pass data through JSON
su aegir
-c
"drush hostmaster-install --backend
$MAKEFILE
$SITE
| drush backend-parse"
<<
EOF
{ "yes": 1,
"version": "
$VERSION
",
"aegir_db_host": "
$AEGIR_DB_HOST
",
"aegir_db_user": "
$AEGIR_DB_USER
",
"aegir_db_pass": "
$AEGIR_DB_PASS
",
"client_email": "
$EMAIL
"
}
EOF
fi
rm
-f
$TEMPFILE
;;
abort-upgrade|abort-remove|abort-deconfigure
)
;;
*
)
echo
"postinst called with unknown argument
\`
$1
'"
>
&2
exit
1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit
0
debian/aegir-hostmaster.templates
0 → 100644
View file @
18d93673
Template:aegir/site
Type: string
Description: URL of the hostmaster frontend:
This is the main URL under which Aegir will be controlled. A Virtual
Host and Drupal website with the Aegir frontend modules
("hostmaster") will be created for that domain.
.
Leave empty to use the default (the domain of this machine).
Template:aegir/db_host
Type: string
Default: localhost
Description: Database server hostname:
This is the hostname at which the database server is available.
Template:aegir/db_user
Type: string
Default: root
Description: Database server user:
This should be a root MySQL user.
Template:aegir/db_password
Type: password
Description: Database server password:
The password for the root MySQL user.
Template:aegir/email
Type: string
Description: Main client email:
This is the email that will receive confirmations for created sites and so on.
Template:aegir/makefile
Type: string
Description: Makefile used to create the platform:
The makefile passed to drush_make to create the hostmaster
platform. Note that this needs specific modules and profiles for the
frontend to work correctly, be careful in changing this from the
default.
.
If this is left empty, Aegir will use its internal makefile.
debian/control
View file @
18d93673
...
...
@@ -26,3 +26,23 @@ Description: backend of the Aegir hosting system
The provision component of this system provides the back end used for
system level tasks such as creating configuration files and managing
databases and backup files.
Package: aegir-hostmaster
Architecture: all
Depends: ${misc:Depends}, drush (>= 2.0), php5-mysql, apache2 | apache, aegir-provision
Description: frontend of the Aegir hosting system
Hostmaster is a component of the Aegir hosting system.
.
Aegir is a set of contributed modules for Drupal that aims to solve
the problem of managing a large number of Drupal sites. It does this
by providing you with a simple Drupal based hosting front end for
your entire network of sites. To deploy a new site you simply have to
create a new Site node. To backup or upgrade sites, you simply manage
your site nodes as you would any other node.
.
The hostmaster component provides the frontend that drives the
backend. It's made up of a regular Drupal site with a custom install
profile, module and theme.
.
This meta-package will dynamically install the frontend using drush
and provision.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment