Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Editing placements requres a 'tcs' user

Table of Contents


Install the tools you will need with the windows package manager chocolatey

...

  • Additionally, pasting http://192.168.99.100:9200/ into a google chrome browser should get an elastic search REST response

...

Create databases

In a command prompt:

mysql -u root
create database esr;
create database heetiscleardbconcerns;
create database profile;
create database reference;
create database heetiscleardbrevalidation;
create database heetiscleardbtraineeid;
create database heetiscleardbnotification;
create database tcs;
create database connectiondiscrepancy;


...

          mvn clean package spring-boot:run

          If you see any error as follows:

          'nested exception is org.flywaydb.core.api.FlywayException: Unable to obtain Jdbc connection from DataSource (jdbc:mysql://localhost:3306/esr?useUnicode=true&characterEncoding=utf8&useSSL=false) for user 'root': Unknown database 'esr'

          then create a database in your MySQL called 'esr' and run the 'mvn clean package spring-boot:run' command again.


etc etc

*********************

...

          However, it may not fix it the second time. If this is the case, download a suitable REST client (https://www.getpostman.com/)

          Enter the URL http://192.168.99.100:9200/_all (check the IP matches that of your docker → use "docker-machine ls" in a cmd prompt

          Choose DELETE and click Send

...

          and then run the query.

          

INSERT INTO `HeeUser` (`name`, `firstName`, `lastName`, `gmcId`, `phoneNumber`, `emailAddress`, `active`)
VALUES
('jamesh', 'James', 'Hudson', '1000000', '7788996655', 'jamesh@fake.com', 1);
INSERT INTO `UserRole` (`userName`, `roleName`)
VALUES
('jamesh', 'ConcernsAdmin'),
('jamesh', 'ETL'),
('jamesh', 'ProfileAdmin'),
('jamesh', 'RVAdmin'),
('jamesh', 'TisAdmin');
INSERT INTO `UserDesignatedBody` (`userName`, `designatedBodyCode`)
VALUES
('jamesh', '1-AIIDR8'),
('jamesh', '1-AIIDSA'),
('jamesh', '1-AIIDVS'),
('jamesh', '1-AIIDWA'),
('jamesh', '1-AIIDWI');


insert into Role values ('SuperUser');
INSERT INTO `RolePermission` (`roleName`, `permissionName`)
SELECT 'SuperUser' as 'roleName', `name` as 'permissionName'
FROM `Permission`;

delete from RolePermission where permissionName = 'revalidation:submit:to:gmc' and roleName = 'SuperUser';


INSERT INTO `UserRole` (`userName`, `roleName`)
VALUES
('jamesh', 'SuperUser');


INSERT INTO `HeeUser` (`name`, `firstName`, `lastName`, `gmcId`, `phoneNumber`, `emailAddress`, `active`)
VALUES
('local_ro', 'local', 'RO', '1234567', NULL , 'local.ro@fake.email.com', 1);
INSERT INTO `UserDesignatedBody` (`userName`, `designatedBodyCode`)
VALUES
('local_ro', '1-85KJU0');

INSERT INTO `UserRole` (`userName`, `roleName`)
VALUES
('local_ro', 'RVOfficer');


--Add TCS user for writing to some tables:
CREATE USER 'tcs'@'%';
GRANT ALL ON *.* TO 'tcs';



At the end of it all your app should run like so:

...

  • Concerns takes a long time to load through the UI (http://local.sm.com/concerns/)
  • Notifications takes a long time to load through the UI (http://local.sm.com/notifications)
  • Can't run git pull (or git clone) on SM's windows machine - ok on Ola's
  • clean package spring-boot:run -Drun.jvmArguments=-Dspring.profiles.active=local → See above (had to set = local in intellij)
  • Having to update spring.profiles.active=local in application.properties (related to/same as ^)
  • Script to create docker container + elastic search etc
  • script to get all the packages up and running - incorporate git pull and spring-boot:run etc
  • Manually having to update 
    <groupId>com.transformuk.hee</groupId>
    <artifactId>reference-client</artifactId>
    <version>2.1.2</version>
    Is this ^ an issue?