⚡️ A dev tool for microservice developers to run local applications and/or forward others from/to Kubernetes SSH or TCP

Overview

Monday: dev tool for local app and port-forwarding

Test (master) GoDoc GoReportCard

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

What Monday can do for you?

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

Installation

Homebrew (macOS)

$ brew install eko/homebrew-tap/monday

This will install the latest available release

Download binary

You can download the latest version of the binary built for your architecture here:

From sources

Optionally, you can download and build it from the sources. You have to retrieve the project sources by using one of the following way:

$ go get -u github.com/eko/monday
# or
$ git clone https://github.com/eko/monday.git

Then, build the binary using the available target in Makefile:

$ make build

Configuration: Define your projects

Configuration of Monday lives in one or multiple YAML files, depending on how you want to organize your files.

By default, monday init will initiates a ~/monday.yaml file. You can customize the configuration directory by setting the MONDAY_CONFIG_PATH environment variable.

Please note that you can also split this configuration in multiple files by respecting the following pattern: ~/monday.<something>.yaml, for instance:

  • ~/monday.localapps.yaml
  • ~/monday.forwards.yaml
  • ~/monday.projects.yaml

This will help you navigate more easily in your configuration files.

Define a local project

Here is an example of a local application:

<: &graphql-local
  name: graphql
  path: $GOPATH/src/github.com/eko/graphql
  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/eko/graphql
  build: # Optionally, you can define a build section to build your application before running it
    commands:
      - go build -o ./build/graphql-app cmd/ # Here, just build the Go application
    env:
      CGO_ENABLED: on
  run:
    command: ./build/graphql-app # Then, run it using this built binary
    env: # Optional, in case you want to specify some environment variables for this app
      HTTP_PORT: 8005
    env_file: "github.com/eko/graphql/.env" # Or via a .env file also
  files: # Optional, you can also declare some files content with dynamic values coming from your project YAML or simply copy files
    - type: content
      to: $GOPATH/src/github.com/eko/graphql/my_file
      content: |
        This is my file content and here are the current project applications:
          {{- range $app := .Applications }}
          Name: {{ $app.Name }}
          {{- end }}
    - type: copy
      from: $GOPATH/src/github.com/eko/graphql/.env.dist
      to: $GOPATH/src/github.com/eko/graphql/.env

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

<: &user-api-forward
  name: user-api
  type: kubernetes
  values:
    context: staging # This is your kubernetes cluster (kubectl config context name)
    namespace: backend
    labels:
      app: user-api
    hostname: user-api.svc.local # API will be available under this hostname
    ports:
     - 8080:8080

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!

Monday Asciinema

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.yaml configuration 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 --ui option that will allow you to enable the user interface (you can also define a MONDAY_ENABLE_UI environment variable to enable it).

Or, you can run a specific project directly by running:

$ monday run [--ui] <project name>

When you want to edit your configuration again, simply run this command to open it in your favorite editor:

$ monday edit

Environment variables

The following environment variables can be used to tweak your Monday configuration:

Environment variable Description
MONDAY_CONFIG_PATH Specify the configuration path where your YAML files can be found
MONDAY_EDITOR Specify which editor you want to use in order to edit configuration files
MONDAY_EDITOR_ARGS Specify the editor arguments you want to pass (separated by coma), example: -t,--wite
MONDAY_ENABLE_UI Specify that you want to use the terminal UI instead of simply logging to stdout
MONDAY_KUBE_CONFIG Specify the location of your Kubernetes config file (if not in your home directory)

Community

You can join the community Slack space to discuss about your issues, new features or anything else regarding Monday.

Run tests

Test suite can be run with:

$ go test -v ./...
Issues
  • Issues with creating ip address/assinging port in Linux (arch)

    Issues with creating ip address/assinging port in Linux (arch)

    I am having some issues running monday on arch linux, while looking through the code base looks like the networkinterface is being hard coded: /monday/pkg/proxy/network.go:

    const (
    	networkInterface = "lo0"
    )
    

    my loopback interface is set to lo. I changed the constant and ran into some other issues: ifconfig is being used to, some linux distros dont come with net-tools installed (ip is a better choice) but even with net-tools installed it is running ifconfig incorrectly for linux:

    args := []string{"lo0", "alias", ip.String(), "up"}

    linux should be args := []string{"lo", ip.String(), "up"}

    after making all these changes on my local i am still getting this error:

    Unable to find an available IP/Port

    Looks like its unable to assign a port to ip addresses ( last byte in addr is always off by one so it never assigns a port) in /monday/pkg/proxy/network.go if addr.String() == ip.String()+"/8"

    opened by ocnix 11
  • Linux assumes presence of gedit

    Linux assumes presence of gedit

    Simple one: during init on Mint Linux, I see:

    command not found: gedit
    

    This is because gedit is assumed. Mint uses xed. Can we make this an ENV, or maybe it could try for both?

    opened by hlascelles 3
  • Add disable_proxy Option for Kubernetes Forwards

    Add disable_proxy Option for Kubernetes Forwards

    Hello!

    We're using Monday for a local development tool, and we need the option to run kubernetes port forwards to localhost on the port provided in the config, without any proxying. I've added the changes necessary to disable proxying for kubernetes type forwards.

    opened by kelseyfrose 3
  • Ctrl-C signal not handled if labels not found on forwards

    Ctrl-C signal not handled if labels not found on forwards

    Hi,

    Another issue that's kind of allowing I noticed, might as well raise it, should be easy to fix. If I start some forwards and the namespace does not contain the deployment with the labels specified, then it's going to hang forever, and no feedback at all from the program just blank screen. It would be nice to first have some feedback whats it trying to do, here find the deployment with those labels, maybe even print the labels its looking for, so we might realise we made an error or wrong namespace. And at this point monday already is catching signal Ctrl-C so we can't kill the program at this point from that shell. We need to open a new shell and kill the process manually. And then the other shell is in a bad state cause the program was also trying to redirect stdout stderr I am guessing. It's not closed "properly".

    If you have sometime to work on that at some point, I wouldn't say its high priority but a nice to have.

    Thanks for the tool again.

    Steps for Reproduction*

    1. Set up a kubernetes-remote forward in the config.yaml configuration file with labels not available in the namespace specified or a wrong namespace
    2. Start Monday
    3. Blank screen
    4. Hit Ctrl-C to kill the program

    Expected behavior:

    The program is closed properly.

    Actual behavior:

    Nothing happens, manually killing the process then put that shell in a "bad" state.

    Platforms:

    Linux Ubuntu 18.04 / Mac OS

    Versions:

    Monday 1.0.4

    opened by mcadam 3
  • Chmod +a not available on Linux

    Chmod +a not available on Linux

    The +a parameter you use in the README and also in your curl installer script is not available on Linux, this is a Mac only parameter.

    I'm running this on ubuntu 18.04 but as far as I know this gives the same error message on other distros:

    chmod: invalid mode: ‘+a’
    
    opened by MelvinLoos 3
  • Bump golang from 1.16.4-alpine3.12 to 1.16.5-alpine3.12

    Bump golang from 1.16.4-alpine3.12 to 1.16.5-alpine3.12

    Bumps golang from 1.16.4-alpine3.12 to 1.16.5-alpine3.12.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies docker 
    opened by dependabot[bot] 2
  • Bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0

    Bump gopkg.in/yaml.v2 from 2.3.0 to 2.4.0

    Bumps gopkg.in/yaml.v2 from 2.3.0 to 2.4.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies go 
    opened by dependabot-preview[bot] 2
  • Not found getmonday.sh

    Not found getmonday.sh

    It seems that https://composieux.fr/getmonday.sh is not found now. So I installed monday with other method.

    Steps for Reproduction

    • curl -i https://composieux.fr/getmonday.sh

    Expected behavior:

    It returns content of getmonday.sh.

    Actual behavior:

    curl -i https://composieux.fr/getmonday.sh
    HTTP/2 404
    server: nginx/1.10.3
    date: Mon, 05 Aug 2019 02:51:51 GMT
    content-type: text/html; charset=utf-8
    content-length: 169
    
    <html>
    <head><title>404 Not Found</title></head>
    <body bgcolor="white">
    <center><h1>404 Not Found</h1></center>
    <hr><center>nginx/1.10.3</center>
    </body>
    </html>
    

    Platforms:

    macOS 10.13.16

    Include browser, operating system and respective versions

    Versions:

    README in master

    opened by stormcat24 2
  • chmod: 无效模式:

    chmod: 无效模式:"+a"

    Hi guys,

    When I set up monday with the shell cmd in https://github.com/eko/monday, I got the error as follows:

    # curl https://composieux.fr/getmonday.sh | sh
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  1091  100  1091    0     0    432      0  0:00:02  0:00:02 --:--:--   432
    -> Determining your OS and architecture type...\n
    -> Downloading Monday binary...\n
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   138    0   138    0     0    205      0 --:--:-- --:--:-- --:--:--   205
      0     0    0   609    0     0    398      0 --:--:--  0:00:01 --:--:--  594k
    100 26.8M  100 26.8M    0     0    99k      0  0:04:36  0:04:36 --:--:-- 74759
    -> Setting permissions on Monday binary (password could be required)\n
    -> Setting access to /etc/hosts file for the current user (password could be required)\n
    chmod: 无效模式:"+a"
    Try 'chmod --help' for more information.
    -> monday alias has been added in your ~/.bashrc\n
    🖥  Monday - version 1.0.1
    

    I checked the issues in this repository, I found this https://github.com/eko/monday/issues/3.

    Someone said the shell script is now up-to-date, but I still come into this problem. Can anybody help me?

    opened by zwwhdls 2
  • No Auth Provider found for name

    No Auth Provider found for name "oidc"

    Our company uses okta for authentication. When I try to connect do port-forwarding I get the following error: ❌ No Auth Provider found for name "oidc"

    Part of our configuration looks like this:

    • context: cluster: staging.company.com user: okta name: staging.company.com

    • name: okta user: auth-provider: config: client-id: clientid id-token: token idp-issuer-url: https://company.okta.com name: oidc

    opened by parkee 2
  • Bump k8s.io/apimachinery from 0.24.2 to 0.24.3

    Bump k8s.io/apimachinery from 0.24.2 to 0.24.3

    Bumps k8s.io/apimachinery from 0.24.2 to 0.24.3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies go 
    opened by dependabot[bot] 1
Releases(v2.2.0)
Owner
Vincent Composieux
Freelance web architect who loves code and infrastructure. Issue solver around various technologies.
Vincent Composieux
Multi cluster kubernetes dashboard with batteries included. Build by developers, for developers.

kubetower Multi cluster kubernetes dashboard with batteries included. Built by developers, for developers. Features Restart deployments with one click

Emre Savcı 33 Jun 19, 2022
An experimental Go application that allows an SSH session to interact with the clipboard of the host machine and forward calls to open

Remote Development Manager An experimental Go application that allows an SSH session to interact with the clipboard of the host machine and forward ca

Blake Williams 22 Aug 1, 2022
Litmus helps Kubernetes SREs and developers practice chaos engineering in a Kubernetes native way.

Litmus Cloud-Native Chaos Engineering Read this in other languages. ???? ???? ???? ???? Overview Litmus is a toolset to do cloud-native chaos engineer

Litmus Chaos 3.1k Aug 1, 2022
Stackie enables developers to configure their local environment/toolchain with ease.

Stackie enables developers to configure their local environment/toolchain with ease. Made for Pulumi CLI, Google Cloud Platform (gcloud), and Amazon Web Services (aws-cli).

Bjerk AS 6 Sep 10, 2021
The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases

The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.

Oracle 74 Aug 5, 2022
A multi-service dev environment for teams on Kubernetes

Tilt Kubernetes for Prod, Tilt for Dev Modern apps are made of too many services. They're everywhere and in constant communication. Tilt powers multi-

Tilt Dev 5.9k Aug 10, 2022
Render helm values-files from others

helm-plugin-render-values The Helm downloader plugin with rendering templated values files Install Use helm CLI to install this plugin: $ helm plugin

Vivid Money 5 Jun 27, 2022
Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.

HashiCorp 12.1k Aug 3, 2022
Kubernetes IN Docker - local clusters for testing Kubernetes

kind is a tool for running local Kubernetes clusters using Docker container "nodes".

Kubernetes SIGs 10.2k Aug 6, 2022
Kubernetes IN Docker - local clusters for testing Kubernetes

Please see Our Documentation for more in-depth installation etc. kind is a tool for running local Kubernetes clusters using Docker container "nodes".

Kaisen Linux 0 Feb 14, 2022
This is a SSH CA that allows you to retrieve a signed SSH certificate by authenticating to Duo.

github-duo-ssh-ca Authenticate to GitHub Enterprise in a secure way by requiring users to go through a Duo flow to get a short-lived SSH certificate t

Niels Hofmans 8 Jan 7, 2022
Integrated ssh-agent for windows. (pageant compatible. openSSH ssh-agent etc ..)

OmniSSHAgent About The chaotic windows ssh-agent has been integrated into one program. Chaos Map of SSH-Agent on Windows There are several different c

YAMASAKI Masahide 25 Jul 29, 2022
kube-champ 39 Aug 6, 2022
The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes.

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes. Apache NiFI is a free, open-source solution that support powerful and scalable directed graphs of data routing, transformation, and system mediation logic.

konpyutaika 30 Aug 8, 2022
Open URL in your local web browser from the SSH-connected remote environment.

opener Open URL in your local web browser from the SSH-connected remote environment. How does opener work? opener is a daemon process that runs locall

Kazuki Suda 55 Jun 29, 2022
Local Storage is one of HwameiStor components. It will provision the local LVM volume.

Local Storage Module English | Simplified_Chinese Introduction Local Storage is one of modules of HwameiStor which is a cloud native local storage sys

HwameiStor 164 Jul 29, 2022
Run VS Code on any server over SSH.

sshcode This project has been deprecated in favour of the code-server install script See the discussion in #185 sshcode is a CLI to automatically inst

Coder 5.8k Jul 27, 2022
webhook forward, such as: synology

Webhook-Forward Usage docker pull starudream/webhook-forward docker run -d starudream/webhook-forward Env ADDR=127.0.0.1:9988 DEBUG=true PROXY=http:/

sheng.wang 0 Jun 10, 2022
k6 is a modern load testing tool for developers and testers in the DevOps era.

k6 is a modern load testing tool, building on our years of experience in the load and performance testing industry. It provides a clean, approachable scripting API, local and cloud execution, and flexible configuration.

k6 17.4k Aug 4, 2022