-
Notifications
You must be signed in to change notification settings - Fork 6
New Domain Setup
To set up a new domain folder and deployment configuration for a Partner Team, this page enumerates the tasks, which are organized into the following stages:
- Gradle domain subproject for all domain code
- Docker configurations to containerize applications
- Helm configuration for LHDI Deployment
- Miscellaneous Setup
Unless otherwise stated, any team member (including those in the Partner Team) can perform the described tasks.
These tasks set up and configure the resources needed for eventual deployment. For deployment to LHDI, see Partner Team Deploy Process.
PRs that add a new domain:
- domain-cc Feature - run contention classification api in docker #1646
- Setup a deployment process/plan for domain-ee in nonprod #1922
- By 8/21: Setup a deployment process/plan for domain-ee in nonprod #1932
PRs that add a new VRO microservices:
Create a new domain-XYZ
folder (replacing XYZ
with a name or acronym associated with the Partner Team).
In that folder, add build.gradle
and README.md
with build and test instructions for the domain. Refer to other domain-*
folders.
In the domain-XYZ
folder, create Gradle subproject(s) for your application. The subprojects depend on your application.
- Populate the subprojects with code -- refer to Software Conventions and other
domain-*
folders; for example:- For Java projects, refer to
domain-xample
. - For non-Java projects, the
XYZ-app
subproject should havebuild.gradle
andgradle.properties
files in thedomain-XYZ/XYZ-app
folder. There can be multiple*-app
subprojects in the domain folder.
- For Java projects, refer to
- Add each subproject to
settings.gradle
in the project root folder. - Add unit tests to the subprojects and ensure
./gradlew :domain-XYZ:test
executes those tests. Then in.github/workflows/test-code.yml
, update and add job steps to run unit tests in the domain by running./gradlew :domain-XYZ:test
.
-
For end-to-end and integration tests, add a
docker-compose.yml
in thedomain-XYZ
folder (see Docker Compose). It should set up any new containers added in thedomain-XYZ
folder. Not all subprojects are manifested as Docker container, i.e., some subprojects are used as libraries -- those projects don't need to be added todocker-compose.yml
. -
Add container to
scripts/image-names.sh
the list ofIMAGES
environment variable. Run./scripts/image-names.sh
to updatescripts/image_vars.src
, which is used by GH Action workflows (e.g., to build and publish the Docker image to GHCR). Commit both files.
- For each new container, add a healthcheck.
- Add a job step to
.github/workflows/container-healthchecks.yml
that exercises the healthcheck.
- Add end-to-end and/or integration tests for the domain.
- Add a new GitHub Action workflow that runs those tests. For examples, refer to
*-integration-test.yml
and*-end2end-test.yml
. - Add the new workflow as a job in
.github/workflows/continuous-integration.yml
.
If a new mock service is needed, add it to the mocks/
folder. Note that mocks/
is a Gradle composite build (not a Gradle subproject) to isolate it from the typical VRO codebase because the mocks are not built for LHDI deployment. See PR Gradle: refactor mocks into composite build #1704 for details.
- For each Python subproject, add the
requirements.txt
files to.github/actions/setup-vro/action.yml
and.github/secrel/config.yml
. - If the domain application is ready for daily deployments to LHDI
dev
as part of [our CI/CD](CI CD Workflows), then add a job to.github/workflows/continuous-delivery.yml
.
- Add a new
helm/domain-XYZ/
folder and populate it. Refer to Helm Charts andhelm/domain-*/
.- Ensure that
helm/domain-XYZ/templates/named_templates
is a symbolic link.
- Ensure that
- Add an entry to
helmChartAppVersions
inbuild.gradle
in the project root folder so that Helm chart version number are updated when a release is created.
- Add the new helm chart folder as a
helm_chart
option in.github/workflows/update-deployment.yml
. - Optionally, create
.github/workflows/update-deployment-XYZ.yml
that deploys to all LHDI environments exceptprod
for Partner Teams to use. Tip: copy and modify existing workflows, e.g.update-deployment-cc.yml
andupdate-deployment-ee.yml
. - In the rare situation where different versions of containers in the same helm chart needs to be deployed, create a new workflow (refer to
update-deployment-app.yml
) and updatedeploy.sh
(to pass the version numbers to thehelm
command).
If the Partner Team wants to work on a separate git branch (see ):
- Ask the VRO Team to create a
domain-XYZ
branch in the repo. It will be a protected branch and is configurable by repo admins at https://github.com/department-of-veterans-affairs/abd-vro/settings/branches. - Add the branch as a
domain_branch
option to.github/workflows/fast-forward-develop.yml
.
To have the OpenAPI spec available via Swagger UI, update configurations for the API Gateway -- refer to which:
- configures the
VirtualService
- updates Swagger UI configuration