Regarding Service Dependency
# 🌱|help-and-getting-started
q
Hi Team, I would like to know if Garden supports service dependency management. For example, I want to perform integration testing in an isolated Garden environment, where: Service A depends on Service B Service B depends on Service C Each service has its own garden.yaml file defined in its respective repository If a developer working on Service A wants to spin up Services B and C within the same ephemeral namespace, does Garden provide a way to achieve this? Specifically, can the developer specify the repository links for Services B and C in Service A’s garden.yaml file, so that Garden automatically deploys all required services within the same ephemeral namespace? Thanks!
c
Hi @quaint-hospital-75270 sorry for the late reply, we have been busy with launching the new app.garden.io and Kubecon. 🙂 The short answer to your message is yes, Garden can do everything you described. Garden allows you to define your stack in terms of actions: one action for example could be building the image for service A, another one for deploying service B, another action for initializing the database, and so on. You can define dependencies between all actions, so for example, let's say that service A needs to be up before service B is deployed, you can define a dependency on the deploy action for service A on the service B deploy action configuration. When you then run
garden deploy
Garden will figure out the dependency graph based on your configuration files and execute every action in sequence or in parallel, following the right order. Garden will also figure out what needs to be executed based on the status of the deployment of if the source code has changed, skipping the unnecessary steps. Additionally, we support something called remote actions and remote sources: you can define your actions in separate repositories and include them in your projects (and depend on them) or you can define your actions in your projects but include a remote source repository instead of having the source code next to your action configuration files. This is a lot of information and it might sounds more complex than it is, I'd suggest you to start with the following examples and guides: - https://docs.garden.io/overview/what-is-garden - https://docs.garden.io/getting-started/quickstart - https://docs.garden.io/getting-started/basics And the guide for the Remote Sources: https://docs.garden.io/features/remote-sources Please let me know how it goes, we are here to answer any other question you might have!