RoboAdvisor Fund Rebalancer is an Web API that customers can use to manage their portfolio rebalancing preferences and execute portfolio rebalances.
- Java 8
- dev-tools docker services running
- MySQL
- Adminer
- SonarQube
mvn clean package
mvn -DskipSurefire verify
mvn spring-boot:run
Once the servicer is running, the swagger docs can be reached locally at localhost:5000/swagger-ui.html
Sonarqube static code analysis is enabled for this project.
If you have not obtained a Sonarqube user token, please access localhost:9000
and follow the on-screen wizard to create a user. A user token will be generated.
Sonarqube command: mvn sonar:sonar -Dsonar.projectKey=roboadvisor-api -Dsonar.host.url=http://localhost:9000 -Dsonar.login=<user token>
Please complete the UI deployment before continuing with backend deployment. The UI deployment can be found here.
- Recall the MySQL connection string noted earlier.
- Edit roboadvisor-api/src/main/resources/application-cloud.properties by updating
spring.datasource.url
value:jdbc:mysql://google/roboadvisor?cloudSqlInstance=<Your database connection string>&socketFactory=com.google.cloud.sql.mysql.SocketFactory
- Recall the JSON key used for service account noted earlier.
- In Gitlab, Repository Settings > CI/CD > Environment variables > Add new variable
- Input variable key:
DEPLOY_KEY_FILE_PRODUCTION
- Input variable value:
<GCP Service Account Private Key JSON>
- Input variable key:
- Add the project name environment variable:
- Input variable key:
PROJECT_ID
- Input variable value:
<GCP Project ID for the service account>
- Input variable key:
RoboAdvisor Fund Rebalancer API leverages Gitlab's native CI/CD capabilites. A .gitlab-ci.yml file has been configured for automated deployment via a GCP service account.
- In the Gitlab CI/CD tab, click on the green Run Pipeline button to deploy the UI
- The pipeline is configured to also deploy upon successful merge requests
- dev-tools: Docker services for local development
- HSBC-RoboAdvisor UI: User Interface component of HSBC fund rebalancer
- HSBC-RoboAdvisor API: Backend API service for HSBC fund rebalancer
- RoboAdvisor-Cron: Script to ensure 24hr availability