Your development environment is up, and now you want to make changes! This is possible within this tooling using the Remote Sources feature from Garden and some additional tooling.
To link a project to your local source code, simply run the link source
command:
1garden link source <source-name> <path-to-source-code>
For example, for mono and app-renderer (with the repos checked out at the same level as mntd-dot-dev
):
1garden link source mono ../minted 2garden link source app-renderer ../app-renderer
or for hitchedup (with the repo in ~/Code/minted/hitchedup
):
1garden link source hitchedup ~/Code/minted/hitchedup
When you do this, you will now be able to make changes to the source code in the linked directory and your deployed project will receive those changes.
You can view what you have linked with:
1garden get linked-repos
When you are not actively developing on a project, you can unlink the source:
1garden unlink source hitchedup
1# deploy start the developer-mode for your environment 2garden dev 3 4# specific apps 5garden dev saved-designs-api,saved-designs-db,saved-designs-consumer
While in garden dev
mode, when you make code changes to your project, your changes will be automatically synchronized to the remote development environment. Depending on the project, these code changes are observed through different mechanism, and different strategies are employed to "reload" the modules and services that depend on them. Refer to the project list for specifics on the code reloading behavior, and refer to the [https://docs.garden.io/guides/hot-reload](Garden documentation) for more details as well.
When you are not actively working on a project, you should consider "unlinking" the source and using the upstream code for your environment. See the Linking Sources section for more details. For unlinked sources, you may wish to occasionally update all your projects to pull the latest changes in to your environment. You can do so by using the update-remote
command in Garden, as so:
1garden update-remote sources
You can also update individual sources with:
1garden update-remote sources <source-name>
disabled-projects
has been deprecated. By default these projects are enabled:
1 projects-to-deploy: 2 - mono 3 - app-renderer 4 - dev-db 5 - login
To add more projects, add this to your local Garden variable file: .variables.local.yaml
. For example:
1 projects-to-deploy: 2 - abacus # I also like to work on finance things. 3 - customizer # I love customizing things. 4 - mono 5 - app-renderer 6 - dev-db 7 - login
To disable some modules, add this to your local Garden variable file: .variables.local.yaml
. For example:
1 disabled-modules: 2 - addressbook 3 - kowl 4 - login-mbo 5 - mono-mbo 6 - mono-minted-api 7 - mono-photoupload 8 - mono-printer-api 9 - mono-product-api 10 - shared-zookeeper-data 11 - shared-kafka-data 12 - zookeeper
You can find a full list of projects in the directory. Once defined in .variables.local.yaml
it overwrites the default, and you must include any projects to be run.
After updating your local variables, you must re-run the get-env-variables
workflow:
1garden run workflow get-env-variables