mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
db: Fix developer's deploydb and cloud-setup-databases for rolling update
- Fix developer prefill to use 4.0's schema - Fix developer/pom.xml and cloud-setup-databases to not run create-schema-view, the upgrade path is configured to do a rolling update and set it up Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
c63dbb8804
commit
16e81130cc
@ -18,25 +18,25 @@
|
|||||||
-- Add a default ROOT domain
|
-- Add a default ROOT domain
|
||||||
use cloud;
|
use cloud;
|
||||||
|
|
||||||
INSERT INTO `cloud`.`domain` (id, uuid, name, parent, path, owner, region_id) VALUES
|
INSERT INTO `cloud`.`domain` (id, uuid, name, parent, path, owner) VALUES
|
||||||
(1, UUID(), 'ROOT', NULL, '/', 2, 1);
|
(1, UUID(), 'ROOT', NULL, '/', 2);
|
||||||
|
|
||||||
-- Add system and admin accounts
|
-- Add system and admin accounts
|
||||||
INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state, region_id) VALUES
|
INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state) VALUES
|
||||||
(1, UUID(), 'system', 1, 1, 'enabled', 1);
|
(1, UUID(), 'system', 1, 1, 'enabled');
|
||||||
|
|
||||||
INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state, region_id) VALUES
|
INSERT INTO `cloud`.`account` (id, uuid, account_name, type, domain_id, state) VALUES
|
||||||
(2, UUID(), 'admin', 1, 1, 'enabled', 1);
|
(2, UUID(), 'admin', 1, 1, 'enabled');
|
||||||
|
|
||||||
-- Add system user
|
-- Add system user
|
||||||
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
|
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
|
||||||
lastname, email, state, created, region_id) VALUES (1, UUID(), 'system', RAND(),
|
lastname, email, state, created) VALUES (1, UUID(), 'system', RAND(),
|
||||||
'1', 'system', 'cloud', NULL, 'enabled', NOW(), 1);
|
'1', 'system', 'cloud', NULL, 'enabled', NOW());
|
||||||
|
|
||||||
-- Add system user with encrypted password=password
|
-- Add system user with encrypted password=password
|
||||||
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
|
INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname,
|
||||||
lastname, email, state, created, region_id) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99',
|
lastname, email, state, created) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99',
|
||||||
'2', 'Admin', 'User', 'admin@mailprovider.com', 'enabled', NOW(), 1);
|
'2', 'Admin', 'User', 'admin@mailprovider.com', 'enabled', NOW());
|
||||||
|
|
||||||
-- Add configurations
|
-- Add configurations
|
||||||
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
INSERT INTO `cloud`.`configuration` (category, instance, component, name, value)
|
||||||
|
|||||||
@ -157,8 +157,6 @@
|
|||||||
<!-- Create default schema and db table views -->
|
<!-- Create default schema and db table views -->
|
||||||
<argument>${basedir}/target/db/create-schema.sql</argument>
|
<argument>${basedir}/target/db/create-schema.sql</argument>
|
||||||
<argument>${basedir}/target/db/create-schema-premium.sql</argument>
|
<argument>${basedir}/target/db/create-schema-premium.sql</argument>
|
||||||
<!-- Create schema view -->
|
|
||||||
<argument>${basedir}/target/db/create-schema-view.sql</argument>
|
|
||||||
<!-- Seed templates -->
|
<!-- Seed templates -->
|
||||||
<argument>${basedir}/target/db/templates.sql</argument>
|
<argument>${basedir}/target/db/templates.sql</argument>
|
||||||
<!-- Run cloudbridge related sqls -->
|
<!-- Run cloudbridge related sqls -->
|
||||||
|
|||||||
@ -211,7 +211,7 @@ for full help
|
|||||||
""),
|
""),
|
||||||
)
|
)
|
||||||
|
|
||||||
for f in ["create-database","create-schema", "create-database-premium","create-schema-premium", "create-schema-view"]:
|
for f in ["create-database","create-schema", "create-database-premium","create-schema-premium"]:
|
||||||
p = os.path.join(self.dbFilesPath,"%s.sql"%f)
|
p = os.path.join(self.dbFilesPath,"%s.sql"%f)
|
||||||
if not os.path.exists(p): continue
|
if not os.path.exists(p): continue
|
||||||
text = file(p).read()
|
text = file(p).read()
|
||||||
@ -358,7 +358,7 @@ for example:
|
|||||||
if not os.path.exists(dbf):
|
if not os.path.exists(dbf):
|
||||||
self.errorAndExit("Cannot find %s"%dbf)
|
self.errorAndExit("Cannot find %s"%dbf)
|
||||||
|
|
||||||
coreSchemas = ['create-database.sql', 'create-schema.sql', 'create-schema-view.sql', 'templates.sql']
|
coreSchemas = ['create-database.sql', 'create-schema.sql', 'templates.sql']
|
||||||
if not self.serversetup:
|
if not self.serversetup:
|
||||||
coreSchemas.append('server-setup.sql')
|
coreSchemas.append('server-setup.sql')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user