Skip to content

Commit

Permalink
Merge pull request #129 from abg/feature/bootstrap_after_sandbox_sh
Browse files Browse the repository at this point in the history
Delay bootstrapping until sandbox.sh has been generated
  • Loading branch information
abg committed Mar 20, 2017
2 parents 9c76a00 + d0ca21c commit 52c0437
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dbsake/core/mysql/sandbox/__init__.py
Expand Up @@ -55,8 +55,10 @@ def create(**options):
# And generating defaults cannot be done until we have an
# innodb-log-file-size
datasource.preload(sbopts)

info(" Deploying MySQL distribution")
dist = distribution.deploy(sbopts)

info(" Generating my.sandbox.cnf")
common.generate_defaults(sbopts,
mysql_user=sbopts.mysql_user,
Expand All @@ -69,15 +71,17 @@ def create(**options):
tmpdir=os.path.join(sbdir, 'tmp'),
mysql_version=dist.version,
port=dist.version.as_int())
info(" Bootstrapping sandbox instance")
common.bootstrap(sbopts, dist)

info(" Creating sandbox.sh initscript")
common.generate_initscript(sbdir,
distribution=dist,
datadir=sbopts.datadir,
defaults_file=os.path.join(sbdir,
'my.sandbox.cnf'))

info(" Bootstrapping sandbox instance")
common.bootstrap(sbopts, dist)

info(" Initializing database user")
common.initialize_mysql_user(sbopts)

Expand Down

0 comments on commit 52c0437

Please sign in to comment.