⚡️ A dev tool for microservice developers to run local applications and/or forward others from/to Kubernetes SSH or TCP
Your new microservice development environment friend. This CLI tool allows you to define a configuration to work with both local applications (Go, NodeJS, Rust or others) and forward some other applications over Kubernetes in case you don't want to run them locally.
The Monday GUI (available for macOS and Linux) application is now also available here: https://github.com/eko/monday-app
✅ Define a unified way to setup applications for all your developers
✅ Run your local applications
✅ Hot reload your applications automatically when a change is made locally
✅ Port-forward an application locally using a remote one on Kubernetes (targeting a pod via label) or over SSH
✅ Forward traffic of a remote application over Kubernetes, SSH or TCP locally (see example forward types)
✅ Auto reconnect when a port-forward connection is lost
✅ Forward multiple times the same port locally, using an hostname
✅ Monitor your local and/or forwarded applications
$ brew install eko/homebrew-tap/monday
This will install the latest available release
You can download the latest version of the binary built for your architecture here:
Optionally, you can download and build it from the sources. You have to retrieve the project sources by using one of the following way: ```bash $ go get -u github.com/eko/monday
$ git clone https://github.com/eko/monday.git ```
Then, build the binary using the available target in Makefile:
bash $ make build
Configuration of Monday lives in one or multiple YAML files, depending on how you want to organize your files.
monday initwill initiates a
~/monday.yamlfile. You can customize the configuration directory by setting the
Please note that you can also split this configuration in multiple files by respecting the following pattern:
~/monday..yaml, for instance: *
This will help you navigate more easily in your configuration files.
Here is an example of a local application:
<: name: graphql path: watch: true hostname: graphql.svc.local project will be available using this hostname on your machine setup: setup installation step in case specified path does not exists go get github.com build: optionally you can define a build section to application before running it commands: . cmd here just the env: cgo_enabled: run: command: then run built binary optional want specify some environment variables for app http_port: env_file: or via .env file also files: declare files content with dynamic values coming from yaml simply copy type: to: content: is my and are current applications: range :=".Applications" end from:>
Then, imagine this GraphQL instance needs to call a user-api but we want to forward it from a Kubernetes environment, we will define it as follows.
Define a port-forwarded project<: name: user-api type: kubernetes values: context: staging this is your cluster config context name namespace: backend labels: app: hostname: user-api.svc.local api will be available under hostname ports:>
Well, you have defined both a local app and an application that needs to be forwarded, now just create the project!
Define a project with both local app and a port-forwarded one- name: graphql local: - *graphql-local forward: - *user-api-forward
Your project configuration is ready, you can now work easily with your microservices.
For an overview of what's possible to do with configuration file, please look at the configuration example directory here.
To learn more about the configuration, please take a look at the Configuration Wiki page.
Usage: Run your projects!
First, you have to initialize monday and edit your configuration file (you have a configuration example directory here). Run the following command and edit the~/monday.yamlconfiguration file just created for you:
⚠️ Important note: Because Monday tries to be your best dev tool and manage things for you, you have to give it some chances to help you in editing host file and manipulating network interface for IP/port mapping.
That's why I suggest to run Monday using the following alias:alias monday='sudo -E monday'$ monday init
Once your configuration file is ready, you can simply run Monday:$ monday [--ui]
Note the--uioption that will allow you to enable the user interface (you can also define aMONDAY_ENABLE_UIenvironment variable to enable it).
Or, you can run a specific project directly by running:$ monday run [--ui]
When you want to edit your configuration again, simply run this command to open it in your favorite editor:$ monday edit
The following environment variables can be used to tweak your Monday configuration:
| Environment variable | Description | |:----------------------------:|-------------------------------------------------------------------------------------------| | MONDAYCONFIGPATH | Specify the configuration path where your YAML files can be found | | MONDAYEDITOR | Specify which editor you want to use in order to edit configuration files | | MONDAYEDITORARGS | Specify the editor arguments you want to pass (separated by coma), example: -t,--wite | | MONDAYENABLEUI | Specify that you want to use the terminal UI instead of simply logging to stdout | | MONDAYKUBE_CONFIG | Specify the location of your Kubernetes config file (if not in your home directory) |
You can join the community Slack space to discuss about your issues, new features or anything else regarding Monday.
Test suite can be run with:$ go test -v ./...