-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started
Refer to Oracle site for installation instructions
Install lombok plugin for your IDE (Recommended IDE - Intellij IDEA Community Edition). Refer to Lombok site for installation instructions
Refer to Docker site for installation instructions
Refer to Vault site for installation instructions
Refer to MySQL site for installation instructions
Refer to (Git site)[https://gitforwindows.org/] for installation instructions
-
Download the latest starter project source code from Releases section or clone this repository
-
Extract the source code and then open terminal/console in your working directory
-
Run
cd engine/ && ./gradlew clean buildfor linux orcd engine\ && gradlew.bat clean buildfor windows. This will generateengine/build/libs/engine-1.0.0.jarfile which is used by gradle to build serve microservices -
Import
serve/as a gradle project into IDE. In case of Intellij, check following boxes while importing project :Use auto-importandcreate directories for empty content roots automatically -
Run
cd ../serve/ && ./gradlew clean build -x testusing linux terminal orcd ..\serve\ && gradlew.bat clean build -x teston windows console
The configservice is used for centralized configurations. By default it is making use of serve-configuration repository.
You can change it by updating
spring.cloud.config.server.git.uri property in file configservice > src > main > resources > bootstrap.yml
All the security-related configurations, i.e. keys, usernames, passwords etc, are stored using Vault. On startup Vault imports configurations using json files located in vault folder.
- All json files should be updated with real configuration values before starting the microservices.
All microservices which are dependent on Vault for configuration have vault related properties in configuration file resources > bootstrap.yml. One of these is an authentication token which is used to connect to Vault.
Default auth token: 47d1d790-0cce-384f-5a28-3cf2eb9e5489
- Linux/Mac - Open terminal in
serve/folder and then run following command
sudo docker-compose up
- Windows - Run powershell as an administrator, navigate to
serve/folder, and then enter following command
docker-compose up
- Start Vault in development mode. Run following command in terminal/powershell
vault server -dev -dev-root-token-id=47d1d790-0cce-384f-5a28-3cf2eb9e5489
-dev-root-token-id argument lets vault know that instead of generating a token, use the mentioned one
- Import vault configurations. Open terminal/gitbash in
serve/vaultdirectory and run following command
export VAULT_ADDR='http://127.0.0.1:8200' && ./init.sh 47d1d790-0cce-384f-5a28-3cf2eb9e5489
-
Run
./gradlew clean build -x testinserve/folder to generate jar files -
Start
discoveryservicefirst as every service is dependent on it. Open a new terminal/console inservefolder and then run
java -jar discoveryservice/build/libs/discoveryservice-1.0.jar
- Start
configservicesecond as most services are dependent on it for loading configurations. Open a new terminal/console inservefolder and then run
java -jar configservice/build/libs/configservice-1.0.jar
- Start
edgeservicenow as API calls go through edge service. Open a new terminal/console inservefolder and then run
java -jar edgeservice/build/libs/edgeservice-1.0.jar
- Start
authservicenext as all services are dependent on it for authentication. Open a new terminal/console inservefolder and then run
java -jar authservice/build/libs/authservice-1.0.jar
- Start rest of the services using the same command, each in a separate terminal/console
java -jar <path_to_service_jar_file>
NOTE: Each service can also be started by running
<service>Application.main()using IDE
-
Docker - Run following command
docker-compose down -
Local - Press
ctrl + cin terminal/console to stop service