Is there a way to manually install or otherwise en...
# 🤖|ask-kapa
f
@microscopic-river-74022 Is there a way to manually install or otherwise ensure that plugins are installed by Garden? I have an issue where in CI, the
garden deploy
and
garden cleanup
operations happen in different containers. When
garden cleanup
occurs,
kustomize
is not installed in the new context and it fails to find the binary. My guess is that this doesn't happen with
deploy
because
garden deploy
checks for these dependencies being present.
m
Please stand by @fresh-yak-35965 as I search the knowledge base. I normally take about 15 seconds or so. :wave:
---------------------- Yes, there is a way to manually fetch and install plugin tools in Garden. The
garden util fetch-tools
command is designed for this purpose. This command pre-fetches all the available tools for the configured providers in the current project/environment, or for all registered providers if you use the
--all
option. Here's how you can use it: 1. To fetch tools for the current project/environment:
Copy code
garden util fetch-tools
2. To fetch tools for all registered providers:
Copy code
garden util fetch-tools --all
Garden Commands Reference () By running this command before your
garden cleanup
operation in CI, you can ensure that all necessary tools, including
kustomize
, are installed and available for use. Additionally, Garden plugins generally define their external tool dependencies, allowing Garden to automatically fetch them when needed. The
garden tools
command can be used to access these tools without separate installation. This command works within a Garden project root. Using the CLI - Plugin tools () By incorporating the
garden util fetch-tools
command into your CI pipeline before the
garden cleanup
step, you should be able to resolve the issue of missing tools in the cleanup container. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
f
@microscopic-river-74022 What determines which tools are registered for the current environment?
m
Let me check the knowledge base for you again. One moment! :books:
---------------------- To answer your question about what determines which tools are registered for the current environment in Garden, we need to look at how Garden's plugin system works. The tools registered for the current environment are primarily determined by the plugins configured in your Garden project. Each plugin can define its own set of tools that it requires to function. According to the How Garden Works - Plugins () section of the documentation: "Garden is pluggable by design and supports a variety of providers and action types, which you can choose based on preference and to suit your existing set-up. It's the plugins that determine what happens when you run a given Garden command. Each action, or node in the graph, belongs to a plugin which is responsible for executing it." For example, if you have the Kubernetes plugin configured in your project, it will register tools like
kubectl
and potentially
helm
. Similarly, if you have the Terraform plugin configured, it will register the
terraform
tool. The specific tools that are registered depend on: 1. The plugins you have configured in your Garden project. 2. The specific requirements of each plugin. 3. The current environment you're working in (as different environments might use different plugins or plugin configurations). It's worth noting that Garden has a powerful templating engine that allows you to enable or disable parts of the configuration depending on your environment. As mentioned in the Templating section (): "You might for e.g. deploy a development database with the Kubernetes plugin in development but use the Terraform plugin to provision a managed database for production."
This means that the tools registered can potentially vary between different environments within the same project. To see which tools are available in your current environment, you can use the
garden tools
command without any arguments. This will list all available tools for your current project and environment configuration. Garden Tools Command Reference () Remember, the tools are fetched and made available based on the needs of the configured plugins in your specific project and environment setup. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
message has been deleted
3 Views