From 037673abe43f7b9fbe568f0cca31aafb7ebcdd51 Mon Sep 17 00:00:00 2001 From: Christian Sailer Date: Fri, 15 Dec 2017 16:15:11 +0000 Subject: [PATCH] perftest scripts (#172) * SQL scripts to set up SQL server for perftest cluster * Fix notary name in jmx files --- .../src/main/sql/01_create_logins.sql | 7 +++++ perftestcordapp/src/main/sql/02_setup_db.sql | 26 +++++++++++++++++++ .../main/resources/Example Flow Request.jmx | 2 +- .../main/resources/IssueAndPay Request.jmx | 2 +- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 perftestcordapp/src/main/sql/01_create_logins.sql create mode 100644 perftestcordapp/src/main/sql/02_setup_db.sql diff --git a/perftestcordapp/src/main/sql/01_create_logins.sql b/perftestcordapp/src/main/sql/01_create_logins.sql new file mode 100644 index 0000000000..ab00a062d0 --- /dev/null +++ b/perftestcordapp/src/main/sql/01_create_logins.sql @@ -0,0 +1,7 @@ +USE master + +CREATE LOGIN perfnode1 with PASSWORD = 'yourStrong(!)Password'; +CREATE LOGIN perfnode2 with PASSWORD = 'yourStrong(!)Password'; +CREATE LOGIN perfnode3 with PASSWORD = 'yourStrong(!)Password'; +CREATE LOGIN perfnode4 with PASSWORD = 'yourStrong(!)Password'; +CREATE LOGIN perfnotary with PASSWORD = 'yourStrong(!)Password'; \ No newline at end of file diff --git a/perftestcordapp/src/main/sql/02_setup_db.sql b/perftestcordapp/src/main/sql/02_setup_db.sql new file mode 100644 index 0000000000..2752287825 --- /dev/null +++ b/perftestcordapp/src/main/sql/02_setup_db.sql @@ -0,0 +1,26 @@ +USE perftesting + +IF NOT EXISTS (SELECT schema_name FROM information_schema.schemata WHERE schema_name = 'perfnode1') EXEC('CREATE SCHEMA perfnode1'); +IF NOT EXISTS (SELECT * FROM sys.sysusers WHERE name='perfnode1') CREATE USER perfnode1 FOR LOGIN perfnode1 WITH DEFAULT_SCHEMA = perfnode1; +GRANT ALTER, DELETE, EXECUTE, INSERT, REFERENCES, SELECT, UPDATE, VIEW DEFINITION ON SCHEMA::perfnode1 TO perfnode1; +GRANT CREATE TABLE, CREATE PROCEDURE, CREATE FUNCTION, CREATE VIEW TO perfnode1; + +IF NOT EXISTS (SELECT schema_name FROM information_schema.schemata WHERE schema_name = 'perfnode2') EXEC('CREATE SCHEMA perfnode2'); +IF NOT EXISTS (SELECT * FROM sys.sysusers WHERE name='perfnode2') CREATE USER perfnode2 FOR LOGIN perfnode2 WITH DEFAULT_SCHEMA = perfnode2; +GRANT ALTER, DELETE, EXECUTE, INSERT, REFERENCES, SELECT, UPDATE, VIEW DEFINITION ON SCHEMA::perfnode2 TO perfnode2; +GRANT CREATE TABLE, CREATE PROCEDURE, CREATE FUNCTION, CREATE VIEW TO perfnode2; + +IF NOT EXISTS (SELECT schema_name FROM information_schema.schemata WHERE schema_name = 'perfnode3') EXEC('CREATE SCHEMA perfnode3'); +IF NOT EXISTS (SELECT * FROM sys.sysusers WHERE name='perfnode3') CREATE USER perfnode3 FOR LOGIN perfnode3 WITH DEFAULT_SCHEMA = perfnode3; +GRANT ALTER, DELETE, EXECUTE, INSERT, REFERENCES, SELECT, UPDATE, VIEW DEFINITION ON SCHEMA::perfnode3 TO perfnode3; +GRANT CREATE TABLE, CREATE PROCEDURE, CREATE FUNCTION, CREATE VIEW TO perfnode3; + +IF NOT EXISTS (SELECT schema_name FROM information_schema.schemata WHERE schema_name = 'perfnode4') EXEC('CREATE SCHEMA perfnode4'); +IF NOT EXISTS (SELECT * FROM sys.sysusers WHERE name='perfnode4') CREATE USER perfnode4 FOR LOGIN perfnode4 WITH DEFAULT_SCHEMA = perfnode4; +GRANT ALTER, DELETE, EXECUTE, INSERT, REFERENCES, SELECT, UPDATE, VIEW DEFINITION ON SCHEMA::perfnode4 TO perfnode4; +GRANT CREATE TABLE, CREATE PROCEDURE, CREATE FUNCTION, CREATE VIEW TO perfnode4; + +IF NOT EXISTS (SELECT schema_name FROM information_schema.schemata WHERE schema_name = 'perfnotary') EXEC('CREATE SCHEMA perfnotary'); +IF NOT EXISTS (SELECT * FROM sys.sysusers WHERE name='perfnotary') CREATE USER perfnotary FOR LOGIN perfnotary WITH DEFAULT_SCHEMA = perfnotary; +GRANT ALTER, DELETE, EXECUTE, INSERT, REFERENCES, SELECT, UPDATE, VIEW DEFINITION ON SCHEMA::perfnotary TO perfnotary; +GRANT CREATE TABLE, CREATE PROCEDURE, CREATE FUNCTION, CREATE VIEW TO perfnotary; \ No newline at end of file diff --git a/tools/jmeter/src/main/resources/Example Flow Request.jmx b/tools/jmeter/src/main/resources/Example Flow Request.jmx index 7a6e027265..d244b74e8e 100644 --- a/tools/jmeter/src/main/resources/Example Flow Request.jmx +++ b/tools/jmeter/src/main/resources/Example Flow Request.jmx @@ -51,7 +51,7 @@ notaryName - O=Perf-10.155.0.8,OU=Corda,L=London,C=GB,CN=corda.node.simple + O=Perf-10.155.0.8,OU=Corda,L=London,C=GB,CN=corda.notary.simple = diff --git a/tools/jmeter/src/main/resources/IssueAndPay Request.jmx b/tools/jmeter/src/main/resources/IssueAndPay Request.jmx index 187cb219ce..66b60c5cfa 100644 --- a/tools/jmeter/src/main/resources/IssueAndPay Request.jmx +++ b/tools/jmeter/src/main/resources/IssueAndPay Request.jmx @@ -51,7 +51,7 @@ notaryName - O=Perf-10.155.0.8,OU=Corda,L=London,C=GB,CN=corda.node.simple + O=Perf-10.155.0.8,OU=Corda,L=London,C=GB,CN=corda.notary.simple =