-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change demo default database to h2 #111
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a good idea to change the default database to h2 so that users could simply download the quick start and run with no extra config.
However, the quick start shipped with some demo data, is it possible to load them to the h2 database automatically?
apollo-quick-start/sql/apolloconfigdb.sql
Lines 435 to 476 in c8a6eb2
INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`, `Comment`) | |
VALUES | |
('eureka.service.url', 'default', 'http://localhost:8080/eureka/', 'Eureka服务Url,多个service以英文逗号分隔'), | |
('namespace.lock.switch', 'default', 'false', '一次发布只能有一个人修改开关'), | |
('item.key.length.limit', 'default', '128', 'item key 最大长度限制'), | |
('item.value.length.limit', 'default', '20000', 'item value最大长度限制'), | |
('config-service.cache.enabled', 'default', 'false', 'ConfigService是否开启缓存,开启后能提高性能,但是会增大内存消耗!'); | |
# Sample Data | |
# ------------------------------------------------------------ | |
INSERT INTO `App` (`AppId`, `Name`, `OrgId`, `OrgName`, `OwnerName`, `OwnerEmail`) | |
VALUES | |
('SampleApp', 'Sample App', 'TEST1', '样例部门1', 'apollo', '[email protected]'); | |
INSERT INTO `AppNamespace` (`Name`, `AppId`, `Format`, `IsPublic`, `Comment`) | |
VALUES | |
('application', 'SampleApp', 'properties', 0, 'default app namespace'); | |
INSERT INTO `Cluster` (`Name`, `AppId`) | |
VALUES | |
('default', 'SampleApp'); | |
INSERT INTO `Namespace` (`Id`, `AppId`, `ClusterName`, `NamespaceName`) | |
VALUES | |
(1, 'SampleApp', 'default', 'application'); | |
INSERT INTO `Item` (`NamespaceId`, `Key`, `Value`, `Comment`, `LineNum`) | |
VALUES | |
(1, 'timeout', '100', 'sample timeout配置', 1); | |
INSERT INTO `Release` (`ReleaseKey`, `Name`, `Comment`, `AppId`, `ClusterName`, `NamespaceName`, `Configurations`) | |
VALUES | |
('20161009155425-d3a0749c6e20bc15', '20161009155424-release', 'Sample发布', 'SampleApp', 'default', 'application', '{\"timeout\":\"100\"}'); | |
INSERT INTO `ReleaseHistory` (`AppId`, `ClusterName`, `NamespaceName`, `BranchName`, `ReleaseId`, `PreviousReleaseId`, `Operation`, `OperationContext`, `DataChange_CreatedBy`, `DataChange_LastModifiedBy`) | |
VALUES | |
('SampleApp', 'default', 'application', 'default', 1, 0, 0, '{}', 'apollo', 'apollo'); | |
INSERT INTO `ReleaseMessage` (`Message`) | |
VALUES | |
('SampleApp+default+application'); |
apollo-quick-start/sql/apolloportaldb.sql
Lines 334 to 352 in c8a6eb2
# Config | |
# ------------------------------------------------------------ | |
INSERT INTO `ServerConfig` (`Key`, `Value`, `Comment`) | |
VALUES | |
('apollo.portal.envs', 'dev', '可支持的环境列表'), | |
('organizations', '[{\"orgId\":\"TEST1\",\"orgName\":\"样例部门1\"},{\"orgId\":\"TEST2\",\"orgName\":\"样例部门2\"}]', '部门列表'), | |
('superAdmin', 'apollo', 'Portal超级管理员'), | |
('api.readTimeout', '10000', 'http接口read timeout'), | |
('consumer.token.salt', 'someSalt', 'consumer token salt'), | |
('admin.createPrivateNamespace.switch', 'true', '是否允许项目管理员创建私有namespace'), | |
('configView.memberOnly.envs', 'dev', '只对项目成员显示配置信息的环境列表,多个env以英文逗号分隔'), | |
('apollo.portal.meta.servers', '{}', '各环境Meta Service列表'); | |
INSERT INTO `Users` (`Username`, `Password`, `UserDisplayName`, `Email`, `Enabled`) | |
VALUES | |
('apollo', '$2a$10$7r20uS.BQ9uBpf3Baj3uQOZvMVvB1RN3PYoKE94gtz2.WAOuiiwXS', 'apollo', '[email protected]', 1); | |
INSERT INTO `Authorities` (`Username`, `Authority`) VALUES ('apollo', 'ROLE_user'); |
Co-authored-by: Jason Song <[email protected]>
This pull request has been automatically marked as stale because it has not had activity in the last 21 days. It will be closed in 14 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
No description provided.