-
Notifications
You must be signed in to change notification settings - Fork 6
Local Setup
If you are on a Windows machine, take a look at Setup on Windows first.
- IDE
- Required Dependencies
- Running the Application
- Verifying the Application is Running
- Running app container locally
VRO is architected to be language agnostic though you should always confirm with maintainers that a language is supported before using it.
If a language is supported, you should feel free to use your preferred IDE for your language. However, it is recommended to use an IDE which supports an integration with Gradle (VRO's build system), like IntelliJ.
Make sure you have both abd-vro and abd-vro-dev-secrets cloned in sibling directories.
path/to/code/
|-----abd-vro/
|-----abd-vro-dev-secrets/
See Ubuntu VM Setup for detailed software setup instructions on Ubuntu.
Before you run this application locally, you will need to make sure you have all the following required dependencies available in your local environment:
- Java 17 (Mac Guide | Other OS Guide)
- Gradle
7.2,7.4(to be compatible with Java 17), 7.5 - docker
Note for Apple Silicon Macs:
export DOCKER_DEFAULT_PLATFORM=linux/amd64
LHDI has additional setup documentation for Mac OS and Other Operating Systems.
This should no longer be needed:
- Create a GitHub personal access token with
read:packages
permission. - Add the newly created token to your shell
# add this to your shell profile (e.g. ~/.zprofile)
export GITHUB_ACCESS_TOKEN=<replace-with-token-from-github>
- This is required to in order to download application artifacts that are published to the VA GitHub Package Registry.
You should also be added to the VA-ABD-RRD GitHub team.
You'll need port 5432 (default for postgres) available/not-in-use when running the code.
Also, be sure that you have a docker daemon running on your machine. If you use Docker Desktop, having the application running will run the daemon. However, if you are using a different Docker runtime like Colima, you will need to manually start the daemon process configure it to always run at boot time.
Once you have all the required dependencies, you can start the application in your local environment by navigating to the root of your application directory and running the following command:
./gradlew clean
./gradlew build check docker
This will build all the application artifacts and docker images.
Note: Due to the way Gradle computes dependencies, the
clean
command must always be separate frombuild
commands
You can then start the application by running (more details at Docker Compose):
./gradlew :dockerComposeUp
Note: Make sure you have completed the instructions in the abd-vro-dev-secrets README
This should bring up a docker container with the app running at http://localhost:8111
You can verify that the application is up and running by issuing the following commands in your terminal:
curl http://localhost:8111/actuator/health
curl http://localhost:8111/actuator/info
You should get back responses similar to the following:
curl http://localhost:8111/actuator/health
{
"status":"UP",
"components":{
"db":{
"status":"UP",
"details":{
"database":"PostgreSQL",
"validationQuery":"isValid()"
}
},
"diskSpace":{
"status":"UP",
"details":{
"total":62725623808,
"free":53279326208,
"threshold":10485760,
"exists":true
}
},
"livenessState":{
"status":"UP"
},
"ping":{
"status":"UP"
},
"readinessState":{
"status":"UP"
}
},
"groups":[
"liveness",
"readiness"
]
}
curl http://localhost:8111/actuator/info
{
"app": {
"description": "Java API Starter from Template",
"name": "abd_vro"
}
}
The above instructions should give you enough to get all the necessary docker containers running to test new functionality in abd-vro. However, developers may wish to run the vro-app-1
container with a run configuration to more quickly iterate on changes being made as opposed to performing a full ./gradlew dockerComposeUp
every time.
- Refer to Docker Compose
- Find instructions for setting up a jetbrains run configuration for
vro-app-1
HERE.