From a239c948a61d0d19e5281e19b0e00d5521101b4d Mon Sep 17 00:00:00 2001 From: sergeyPensov Date: Thu, 20 Sep 2018 13:28:09 +0300 Subject: [PATCH 1/3] Add setUp for developers to read.me file --- README.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index df97891..cf58d11 100644 --- a/README.md +++ b/README.md @@ -34,19 +34,22 @@ The generated artifacts are then referenced from the .proto repo as Maven depend Unit tests ``` -# How to build -1. Make sure there's Java 10 installed. -2. Get proper Maven settings.xml file and place it under ~/.m2 directory. This is needed because of the proto artifactory repo. -3. Run `mvn clean install` -4. (Optional, developers only) If you're using Eclipse, make sure you are on Eclipse Photon version at least. - -# How to run -1. Make sure there's Cassandra reachable somewhere within your network. -For developers: the 'dev' profile (src/main/resources/application-dev.yml) assumes Cassandra will be reachable on localhost:9042. -For production: few environment variables should be set (see src/main/resources/application-production.yml). - -2. Use your IDE to start the Spring Boot Application (remember to set the 'Dev' profile) or run the Java application as: -`java -jar account-service.jar --spring.profiles.active=dev` +# SetUp info for developers + + For starting current service you must do next: + 1. Install JDK 10 for project and JDK 8 for Cassandra DB + 2. Install Cassandra + a. If you use a Windows machine, you must save in JAVA_HOME variable path to jdk8. + Install python 2.7. + Download 7z or other archive manager and extract Cassandra's files to a necessary directory + Delete from cassandra.bat file -XX:+UseParNewGC^ . + Start cassandra.bat + b. With Linux, we have the same behavior + 3. Install maven and add to .m2 folder settings.xml (ping your teamLead with this issue) + 4. Set to VM options dev profile " -Dspring.profiles.active=staging" + 5. Start application + If you're using Eclipse, make sure you are on Eclipse Photon version at least. + # Build the Docker image ``` -- GitLab From b1d84d9c50c37d5365f4fe82ed5df806f353926b Mon Sep 17 00:00:00 2001 From: sergeyPensov Date: Thu, 20 Sep 2018 15:07:56 +0300 Subject: [PATCH 2/3] Fix mistake with profile on the read.me file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cf58d11..553b989 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The generated artifacts are then referenced from the .proto repo as Maven depend Start cassandra.bat b. With Linux, we have the same behavior 3. Install maven and add to .m2 folder settings.xml (ping your teamLead with this issue) - 4. Set to VM options dev profile " -Dspring.profiles.active=staging" + 4. Set to VM options dev profile " -Dspring.profiles.active=dev" 5. Start application If you're using Eclipse, make sure you are on Eclipse Photon version at least. -- GitLab From dbd7743158b03a5c03c7c3c459d2ef52e14b1d0d Mon Sep 17 00:00:00 2001 From: sergeyPensov Date: Thu, 20 Sep 2018 15:13:15 +0300 Subject: [PATCH 3/3] Return build and run info for devOps --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 553b989..5cdc11e 100644 --- a/README.md +++ b/README.md @@ -50,13 +50,24 @@ The generated artifacts are then referenced from the .proto repo as Maven depend 5. Start application If you're using Eclipse, make sure you are on Eclipse Photon version at least. +# SetUp for DevOps -# Build the Docker image +## How to build + 1. Make sure there's Java 10 installed. + 2. Get proper Maven settings.xml file and place it under ~/.m2 directory. This is needed because of the proto artifactory repo. + 3. Run `mvn clean install` + +## How to run + Make sure there's Cassandra reachable somewhere within your network. + For production: few environment variables should be set (see src/main/resources/application-production.yml). + + +## Build the Docker image ``` docker build -t account-service . ``` -# Run the containerized application +## Run the containerized application ``` docker run --rm -ti -p 8080:8080 -p 6565:6565 account-service ``` -- GitLab