예제 #1
0
from install import wp_installer, mage_installer
from install.wp_installer import *
from install.mage_installer import *

from optparse import OptionParser

opt_parser = OptionParser()
opt_parser.add_option("-p", "--package", dest="package", help="Package to install, allowed values: wordpress, magento, codeigniter")
opt_parser.add_option("-d", "--dest",    dest="dest",    help="Destination directory to install to, must exist.")

(options, args) = opt_parser.parse_args()

if options.package == "wordpress":
    wp = wp_installer(options.dest)
elif options.package == "magento":
    mage = mage_installer(options.dest)
예제 #2
0
if not project_exists_in_manifest(project):
    print "Project does not exist in manifest, try creating it first."
    import sys
    sys.exit()

env = environment(username, project, env_type, options.url)
env_results = env.create()

conf = json.load(get_server_config())

db_details = { "database_name": env_results["db_name"],
               "database_user": conf["mysql_user"]["username"],
               "database_pass": re.escape(conf["mysql_user"]["password"]),
               "database_host": "localhost" }

# --with-package
# @todo - httpdocs should be configurable (server_config.json)
if options.with_package == "wordpress":
    wp = wp_installer(env_results["directory"] + "/httpdocs", db_details)
elif options.with_package == "magento":
    mage = mage_installer(env_results["directory"] + "/httpdocs", db_details)    

# --checkout
if options.checkout:
    env.checkout()

# --pull-db
if options.pull_db:
    env.pull_db()