ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v..@apache.org
Subject incubator-ranger git commit: RANGER-412 : Packaging changes for Ranger KMS
Date Mon, 20 Apr 2015 17:37:17 GMT
Repository: incubator-ranger
Updated Branches:
  refs/heads/master 3adafa493 -> da7002470


RANGER-412 : Packaging changes for Ranger KMS

Signed-off-by: Velmurugan Periasamy <vel@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ranger/commit/da700247
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ranger/tree/da700247
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ranger/diff/da700247

Branch: refs/heads/master
Commit: da700247066b65a89e67bbcc60bdabe4509995d9
Parents: 3adafa4
Author: Gautam Borad <gborad@gmail.com>
Authored: Mon Apr 20 10:39:07 2015 +0530
Committer: Velmurugan Periasamy <vel@apache.org>
Committed: Mon Apr 20 13:36:56 2015 -0400

----------------------------------------------------------------------
 kms/scripts/db/oracle/kms_core_db_oracle.sql    | 31 +++++++++++++
 .../db/postgres/kms_core_db_postgres.sql        | 34 +++++++++++++++
 .../db/sqlserver/kms_core_db_sqlserver.sql      | 46 ++++++++++++++++++++
 kms/scripts/db_setup.py                         |  2 +-
 kms/scripts/dba_script.py                       |  2 +-
 kms/scripts/install.properties                  |  6 +--
 .../db/mysql/patches/013-permissionmodel.sql    |  2 +-
 .../db/oracle/patches/013-permissionmodel.sql   |  2 +-
 .../db/postgres/xa_core_db_postgres.sql         |  2 +-
 .../db/sqlserver/xa_core_db_sqlserver.sql       |  2 +-
 10 files changed, 120 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/kms/scripts/db/oracle/kms_core_db_oracle.sql
----------------------------------------------------------------------
diff --git a/kms/scripts/db/oracle/kms_core_db_oracle.sql b/kms/scripts/db/oracle/kms_core_db_oracle.sql
new file mode 100644
index 0000000..bb43d18
--- /dev/null
+++ b/kms/scripts/db/oracle/kms_core_db_oracle.sql
@@ -0,0 +1,31 @@
+/
+CREATE SEQUENCE RANGER_MASTERKEY_SEQ START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
+CREATE TABLE ranger_masterkey (
+id NUMBER(20) NOT NULL,
+create_time DATE DEFAULT NULL NULL,
+update_time DATE DEFAULT NULL NULL,
+added_by_id NUMBER(20) DEFAULT NULL NULL,
+upd_by_id NUMBER(20) DEFAULT NULL NULL,
+cipher VARCHAR(255) DEFAULT NULL NULL,
+bitlength NUMBER(11) DEFAULT NULL NULL,
+masterkey VARCHAR(2048) DEFAULT NULL NULL,
+PRIMARY KEY (id)
+);
+
+CREATE SEQUENCE RANGER_KEYSTORE_SEQ START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
+CREATE TABLE ranger_keystore(
+id NUMBER(20) NOT NULL,
+create_time DATE DEFAULT NULL NULL,
+update_time DATE DEFAULT NULL NULL,
+added_by_id NUMBER(20) DEFAULT NULL NULL,
+upd_by_id NUMBER(20) DEFAULT NULL NULL,
+kms_alias VARCHAR(255) NOT NULL,
+kms_createdDate NUMBER(20) DEFAULT NULL NULL,
+kms_cipher VARCHAR(255) DEFAULT NULL NULL,
+kms_bitLength NUMBER(20) DEFAULT NULL NULL,
+kms_description VARCHAR(512) DEFAULT NULL NULL,
+kms_version NUMBER(20) DEFAULT NULL NULL,
+kms_attributes VARCHAR(1024) DEFAULT NULL NULL,
+kms_encoded VARCHAR(2048),
+PRIMARY KEY (id)
+);
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/kms/scripts/db/postgres/kms_core_db_postgres.sql
----------------------------------------------------------------------
diff --git a/kms/scripts/db/postgres/kms_core_db_postgres.sql b/kms/scripts/db/postgres/kms_core_db_postgres.sql
new file mode 100644
index 0000000..829ab84
--- /dev/null
+++ b/kms/scripts/db/postgres/kms_core_db_postgres.sql
@@ -0,0 +1,34 @@
+DROP TABLE IF EXISTS ranger_masterkey CASCADE;
+DROP SEQUENCE IF EXISTS ranger_masterkey_seq;
+CREATE SEQUENCE ranger_masterkey_seq;
+CREATE TABLE ranger_masterkey(
+id BIGINT DEFAULT nextval('ranger_masterkey_seq'::regclass),
+create_time TIMESTAMP DEFAULT NULL NULL,
+update_time TIMESTAMP DEFAULT NULL NULL,
+added_by_id BIGINT DEFAULT NULL NULL,
+upd_by_id BIGINT DEFAULT NULL NULL,
+cipher VARCHAR(255) DEFAULT NULL NULL ,
+bitlength INT DEFAULT NULL NULL,
+masterkey VARCHAR(2048),
+PRIMARY KEY (id)
+);
+
+DROP TABLE IF EXISTS ranger_keystore CASCADE;
+DROP SEQUENCE IF EXISTS ranger_keystore_seq;
+CREATE SEQUENCE ranger_keystore_seq;
+CREATE TABLE ranger_keystore(
+id BIGINT DEFAULT nextval('ranger_keystore_seq'::regclass),
+create_time TIMESTAMP DEFAULT NULL NULL,
+update_time TIMESTAMP DEFAULT NULL NULL,
+added_by_id BIGINT DEFAULT NULL NULL,
+upd_by_id BIGINT DEFAULT NULL NULL,
+kms_alias VARCHAR(255) NOT NULL,
+kms_createdDate BIGINT DEFAULT NULL NULL,
+kms_cipher VARCHAR(255) DEFAULT NULL NULL,
+kms_bitLength BIGINT DEFAULT NULL NULL,
+kms_description VARCHAR(512) DEFAULT NULL NULL,
+kms_version BIGINT DEFAULT NULL NULL,
+kms_attributes VARCHAR(1024) DEFAULT NULL NULL,
+kms_encoded VARCHAR(2048),
+PRIMARY KEY (id)
+);

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/kms/scripts/db/sqlserver/kms_core_db_sqlserver.sql
----------------------------------------------------------------------
diff --git a/kms/scripts/db/sqlserver/kms_core_db_sqlserver.sql b/kms/scripts/db/sqlserver/kms_core_db_sqlserver.sql
new file mode 100644
index 0000000..234939b
--- /dev/null
+++ b/kms/scripts/db/sqlserver/kms_core_db_sqlserver.sql
@@ -0,0 +1,46 @@
+SET ANSI_NULLS ON
+GO
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_PADDING ON
+GO
+CREATE TABLE [dbo].[ranger_masterkey](
+	[id] [bigint] IDENTITY(1,1) NOT NULL,
+	[create_time] [datetime2] DEFAULT NULL NULL,
+	[update_time] [datetime2] DEFAULT NULL NULL,
+	[added_by_id] [bigint] DEFAULT NULL NULL,
+	[upd_by_id] [bigint] DEFAULT NULL NULL,
+	[cipher] [varchar](255) DEFAULT NULL NULL,
+	[bitlength] [int] DEFAULT NULL NULL,
+	[masterkey] [varchar](2048),
+PRIMARY KEY CLUSTERED 
+(
+	[id] ASC
+)WITH (PAD_INDEX = OFF,STATISTICS_NORECOMPUTE = OFF,IGNORE_DUP_KEY = OFF,ALLOW_ROW_LOCKS
= ON,ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+GO
+SET ANSI_NULLS ON
+GO
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_PADDING ON
+GO
+CREATE TABLE [dbo].[ranger_keystore](
+	[id] [bigint] IDENTITY(1,1) NOT NULL,
+	[create_time] [datetime2] DEFAULT NULL NULL,
+	[update_time] [datetime2] DEFAULT NULL NULL,
+	[added_by_id] [bigint] DEFAULT NULL NULL,
+	[kms_alias] [varchar](255) NOT NULL,
+	[kms_createdDate] [bigint] DEFAULT NULL NULL,
+	[kms_cipher] [varchar](255) DEFAULT NULL NULL,
+	[kms_bitLength] [bigint] DEFAULT NULL NULL,
+	[kms_description] [varchar](512) DEFAULT NULL NULL,
+	[kms_version] [bigint] DEFAULT NULL NULL,
+	[kms_attributes] [varchar](1024) DEFAULT NULL NULL,
+	[kms_encoded] [varchar](2048),
+PRIMARY KEY CLUSTERED 
+(
+	[id] ASC
+)WITH (PAD_INDEX = OFF,STATISTICS_NORECOMPUTE = OFF,IGNORE_DUP_KEY = OFF,ALLOW_ROW_LOCKS
= ON,ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+GO
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/kms/scripts/db_setup.py
----------------------------------------------------------------------
diff --git a/kms/scripts/db_setup.py b/kms/scripts/db_setup.py
index afb2ed6..eaf72ac 100644
--- a/kms/scripts/db_setup.py
+++ b/kms/scripts/db_setup.py
@@ -70,7 +70,7 @@ def populate_global_dict():
 			key , value = each_line.strip().split("=",1)
 			key = key.strip()
 			if 'PASSWORD' in key:
-				jceks_file_path = os.path.join(os.getenv('RANGER_HOME'), 'jceks','ranger_db.jceks')
+				jceks_file_path = os.path.join(RANGER_KMS_HOME, 'jceks','ranger_db.jceks')
 				statuscode,value = call_keystore(library_path,key,'',jceks_file_path,'get')
 				if statuscode == 1:
 					value = ''

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/kms/scripts/dba_script.py
----------------------------------------------------------------------
diff --git a/kms/scripts/dba_script.py b/kms/scripts/dba_script.py
index c3b126a..e1a253a 100644
--- a/kms/scripts/dba_script.py
+++ b/kms/scripts/dba_script.py
@@ -88,7 +88,7 @@ def populate_global_dict():
 			key , value = each_line.strip().split("=",1)
 			key = key.strip()
 			if 'PASSWORD' in key:
-				jceks_file_path = os.path.join(os.getenv('RANGER_HOME'), 'jceks','ranger_db.jceks')
+				jceks_file_path = os.path.join(RANGER_KMS_HOME, 'jceks','ranger_db.jceks')
 				statuscode,value = call_keystore(library_path,key,'',jceks_file_path,'get')
 				if statuscode == 1:
 					value = ''

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/kms/scripts/install.properties
----------------------------------------------------------------------
diff --git a/kms/scripts/install.properties b/kms/scripts/install.properties
index 0b463b9..1a77976 100644
--- a/kms/scripts/install.properties
+++ b/kms/scripts/install.properties
@@ -186,10 +186,10 @@ JAVA_ORACLE='Java(TM) SE Runtime Environment'
 
 mysql_core_file=db/mysql/kms_core_db.sql
 
-oracle_core_file=db/oracle/xa_core_db_oracle.sql
+oracle_core_file=db/oracle/kms_core_db_oracle.sql
 
-postgres_core_file=db/postgres/xa_core_db_postgres.sql
+postgres_core_file=db/postgres/kms_core_db_postgres.sql
 
-sqlserver_core_file=db/sqlserver/xa_core_db_sqlserver.sql
+sqlserver_core_file=db/sqlserver/kms_core_db_sqlserver.sql
 
 cred_keystore_filename=$app_home/WEB-INF/classes/conf/.jceks/rangerkms.jceks

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/security-admin/db/mysql/patches/013-permissionmodel.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/mysql/patches/013-permissionmodel.sql b/security-admin/db/mysql/patches/013-permissionmodel.sql
index 0d711d3..4bf3e8e 100644
--- a/security-admin/db/mysql/patches/013-permissionmodel.sql
+++ b/security-admin/db/mysql/patches/013-permissionmodel.sql
@@ -21,7 +21,7 @@ CREATE TABLE `x_modules_master` (
 `added_by_id` bigint(20) NULL DEFAULT NULL,
 `upd_by_id` bigint(20) NULL DEFAULT NULL,
 `module` varchar(1024) NOT NULL,
-`url` varchar(1024) NOT NULL,
+`url` varchar(1024) NULL DEFAULT NULL,
 PRIMARY KEY (`id`)
 );
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/security-admin/db/oracle/patches/013-permissionmodel.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/oracle/patches/013-permissionmodel.sql b/security-admin/db/oracle/patches/013-permissionmodel.sql
index 1adb9da..9504261 100644
--- a/security-admin/db/oracle/patches/013-permissionmodel.sql
+++ b/security-admin/db/oracle/patches/013-permissionmodel.sql
@@ -22,7 +22,7 @@ update_time DATE DEFAULT NULL NULL,
 added_by_id NUMBER(20) DEFAULT NULL NULL,
 upd_by_id NUMBER(20) DEFAULT NULL NULL,
 module VARCHAR(1024) NOT NULL,
-url VARCHAR(1024) NOT NULL,
+url VARCHAR(1024) DEFAULT NULL NULL,
 PRIMARY KEY (id)
 );
 COMMIT;

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/security-admin/db/postgres/xa_core_db_postgres.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/postgres/xa_core_db_postgres.sql b/security-admin/db/postgres/xa_core_db_postgres.sql
index 01fb25b..d4aee9f 100644
--- a/security-admin/db/postgres/xa_core_db_postgres.sql
+++ b/security-admin/db/postgres/xa_core_db_postgres.sql
@@ -919,7 +919,7 @@ update_time TIMESTAMP DEFAULT NULL NULL,
 added_by_id BIGINT DEFAULT NULL NULL,
 upd_by_id BIGINT DEFAULT NULL NULL,
 module VARCHAR(1024) NOT NULL,
-url VARCHAR(1024) NOT NULL,
+url VARCHAR(1024) DEFAULT NULL NULL,
 PRIMARY KEY(id)
 );
 

http://git-wip-us.apache.org/repos/asf/incubator-ranger/blob/da700247/security-admin/db/sqlserver/xa_core_db_sqlserver.sql
----------------------------------------------------------------------
diff --git a/security-admin/db/sqlserver/xa_core_db_sqlserver.sql b/security-admin/db/sqlserver/xa_core_db_sqlserver.sql
index eb74cfe..835dd3e 100644
--- a/security-admin/db/sqlserver/xa_core_db_sqlserver.sql
+++ b/security-admin/db/sqlserver/xa_core_db_sqlserver.sql
@@ -2654,7 +2654,7 @@ CREATE TABLE [dbo].[x_modules_master] (
 	[added_by_id] [bigint] DEFAULT NULL NULL,
 	[upd_by_id] [bigint] DEFAULT NULL NULL,
 	[module] [varchar](1024)NOT NULL,
-	[url] [varchar](1024)NOT NULL,
+	[url] [varchar](1024) DEFAULT NULL NULL,
 	PRIMARY KEY CLUSTERED 
 (
 	[id] ASC


Mime
View raw message