Adding a New Job/Microservice
Job
Let <J>
be a name of the job service you'd like to create (wfrunner
, for example).
- Add job definitions to
jobQueues
field ofinfra/manifests/mesh/mesh.yaml
to express possible connectivity among serivces/jobs. - Run
./bazel.sh run //infra/env/remote/aws/common:messages-gen
- Create
proto/jobqueue/<verb form of J>
to use these AWS resources following other implementations. - Create
backend/jobs/<J>
and define//backend/jobs/<J>:image
withgo_image
or any other Bazel rule generating a container image. - Edit
skaffold.yaml
to include//backend/jobs/<J>:image.tar
toartifacts
. - Create
infra/manifests/jobs/<J>.yaml
and defineServiceAccount
,Deployment
, and anything you want. You can use the artifact name specified in step 1 as an image name. - Edit
infra/manifests/jobs/kustomize.yaml
to includeinfra/manifests/jobs/<J>.yaml
toresources
.
Microservice
Let <S>
be a name of the job service you'd like to create (wfhistory
, for example).
- Add a service to
services
field ofinfra/manifests/mesh/mesh.yaml
to express possible connectivity among serivces and jobs. - Run
./bazel.sh query kind(copy_to_workspace, //...) | xargs ./bazel.sh run
to generate codes. - Edit
skaffold.yaml
to include//backend/microservices/<S>:image.tar
toartifacts
. - Create
infra/manifests/microservices/<S>.yaml
and defineServiceAccount
,Deployment
,Service
,DestinationRule
,VirtualService
,AuthorizationPolicy
, and anything you want. You can use the artifact name specified in step 1 as an image name. - Edit
infra/manifests/microservices/kustomization.yaml
to includeinfra/manifests/microservices/<S>.yaml
toresources
. - Edit
infra/env/local/microservices/common.yaml
to add hosts toGateway
andVirtualService
for local testing. - Create some more YAMLs in
infra/env/local/microservices
if you need to do.