summaryrefslogtreecommitdiffstats
path: root/engine-d-standalone/src/main
diff options
context:
space:
mode:
authortangpeng <tang.peng5@zte.com.cn>2017-02-27 14:23:22 +0800
committertangpeng <tang.peng5@zte.com.cn>2017-02-27 14:45:09 +0800
commit11ca44c2132eb2ce12d3e36789b04896bf518149 (patch)
tree78144fbf83b554d06db46c9fb8a4a95eef736aa9 /engine-d-standalone/src/main
parenta83d08161f34b503fbb9275418b0e828a6d219eb (diff)
Add holmes sql script
Change-Id: I707d410fe4f1389f8002a4526f53d15484125377 Issue-Id:HOLMES-47 Signed-off-by: tangpeng <tang.peng5@zte.com.cn>
Diffstat (limited to 'engine-d-standalone/src/main')
-rw-r--r--engine-d-standalone/src/main/assembly/conf/engine-d.yml4
-rw-r--r--engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql43
2 files changed, 45 insertions, 2 deletions
diff --git a/engine-d-standalone/src/main/assembly/conf/engine-d.yml b/engine-d-standalone/src/main/assembly/conf/engine-d.yml
index 247ac4b..5fce4b8 100644
--- a/engine-d-standalone/src/main/assembly/conf/engine-d.yml
+++ b/engine-d-standalone/src/main/assembly/conf/engine-d.yml
@@ -67,6 +67,6 @@ database:
mqConfig:
brokerIp: 127.0.0.1
brokerPort: 61616
- mqServiceName: activemq
- mqServiceVersion: v1
+ brokerUsername: activemq
+ brokerPassword: v1
diff --git a/engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql b/engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql
index 4f5294a..73d51ee 100644
--- a/engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql
+++ b/engine-d-standalone/src/main/assembly/dbscripts/mysql/openo-holmes_engine_d-createobj.sql
@@ -13,5 +13,48 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
+/******************drop old database and user***************************/
+use mysql;
+drop database IF EXISTS holmes;
+delete from user where User='holmes';
+FLUSH PRIVILEGES;
+/******************create new database and user***************************/
+create database holmes CHARACTER SET utf8;
+
+GRANT ALL PRIVILEGES ON holmes.* TO 'holmes'@'%' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON mysql.* TO 'holmes'@'%' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+
+GRANT ALL PRIVILEGES ON catalog.* TO 'holmes'@'localhost' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+GRANT ALL PRIVILEGES ON mysql.* TO 'holmes'@'localhost' IDENTIFIED BY 'holmes' WITH GRANT OPTION;
+FLUSH PRIVILEGES;
+
+use holmes;
+set Names 'utf8';
+/******************delete old table and create new***************************/
+use holmes;
+DROP TABLE IF EXISTS aplus_rule;
+CREATE TABLE aplus_rule (
+ rid varchar(30) NOT NULL,
+ name varchar(150) CHARACTER NOT NULL,
+ description varchar(4000) CHARACTER SET DEFAULT NULL,
+ enable int(1) NOT NULL,
+ templateID int(10) NOT NULL,
+ engineID varchar(20) CHARACTER NOT NULL,
+ engineType varchar(20) CHARACTER NOT NULL,
+ creator varchar(20) CHARACTER NOT NULL,
+ createTime datetime NOT NULL,
+ updator varchar(20) CHARACTER DEFAULT NULL,
+ updateTime datetime DEFAULT NULL,
+ params varchar(4000) CHARACTER DEFAULT NULL,
+ content varchar(4000) CHARACTER NOT NULL,
+ vendor varchar(100) CHARACTER NOT NULL,
+ package varchar(255) DEFAULT NULL,
+ PRIMARY KEY (rid),
+ UNIQUE KEY name (name),
+ KEY IDX_APLUS_RULE_ENABLE (enable),
+ KEY IDX_APLUS_RULE_TEMPLATEID (templateID),
+ KEY IDX_APLUS_RULE_ENGINEID (engineID),
+ KEY IDX_APLUS_RULE_ENGINETYPE (engineType)
+)