Giter Site home page Giter Site logo

cli's Introduction

⚠️ This project is not under active development

Open-source, self-hosted, container management solution

CI Release Go Report Card

Krane is a container management solution that helps you to deploy infrastructure with ease. Lightweight and easy to setup, Krane is great for developers who want to self-host infrastructure at the lowest cost possible.

Tooling

These development tools help manage and automate infrastructure running on Krane.

Features

  • Krane runs on compute as low as $3.50
  • Single command deployments
  • Single file deployments
  • Deployment DNS aliases (subdomain.example.com)
  • Deployment secrets for hiding sensitive environment variables
  • Deployment scaling to distribute the workload between containers
  • Deployment rate limit to limit incoming requests
  • HTTPS/TLS out-of-the-box with auto generated Let's Encrypt certificates
  • Self-hosted - Cost-effective, bring your own server, scale when you need

Quick-Start - Install Script

  1. Install Krane

The install.sh script provides a convenient way to download Krane on virtually any compute such as Vultr, Digital Ocean, AWS, Azure, GCP, Linode, and even on your localhost.

To install Krane just run:

bash <(wget -qO- get.krane.sh)
  1. Create a deployment configuration file

deployment.json

{
  "name": "krane-getting-started",
  "image": "docker/getting-started",
  "alias": ["getting-started.example.com"]
}
  1. Deploy
krane deploy -f ./deployment.json

Please see the official docs site for complete documentation.

Motivation

Krane is a self-hosted PaaS. You bring your own server and install Krane on it to manage your containers in the form of deployments - The benefit, cost per deployment. A self-hosted solution allows you to own your server (cost-effective), and the benefit of any number of deployments at no extra cost. Maintaining and managing your own solution may sound complex, Krane tries to make the process straight-forward and cost-effective .

Krane isn't a replacement for Kubernetes, ECS, or any other container orchestration solution you might see running production applications, instead it's a tool you can leverage to make development of side-projects or small workloads cheap and straight forward. That was the main objective, a productive deployment tool for managing non-critical container workloads on remote servers.

Contributions

Krane is released under the MIT license. Please refer to the contribution guidelines before raising an issue or feature request. We appreciate all contributions, small or large, and look forward to hearing feedback and improvement proposals.

cli's People

Contributors

david-castaneda avatar dependabot[bot] avatar jalvarado91 avatar

Stargazers

 avatar

Watchers

 avatar

cli's Issues

Prints NaN when listing deployments

$ krane ls -i
Name        Ready   Updated                       Secure    Tag       Image
krane-proxy 1/1     succesfully 8 minute(s) ago   false     latest    biensupernice/proxy
krane-ui    0/3     succesfully NaN day(s) ago    false     latest    biensupernice/krane-ui

Scale deployments using a dedicated CLI command

Streamline the process for scaling a deployment by a given number of replicas using the scale command

krane scale my-app --replicas 3

shorthand:

krane scale my-app -r 3

Flags:

  • --replicas (-r)
    required: true
    type: number (should be a non-negative number)

`krane login` errors when command runs for the first time

When running krane login for the first time the CLI will error out with the following error

Error: ENOENT: no such file or directory, open '~/.krane/krane.config'
Code: ENOENT

On subsequent requests this command should work as the missing directory would have been created.

How to fix

  1. Always check if ~/.krane/krane.config exists, if it doesnt exists then create it.

Command to switch between Krane instances

Implement a command to switch between Krane instances.

Using a sub-command like context or switch is a possible solution

krane switch <what-goes-here?>

Another alternative, on a "re-loggin" display a "cached" list of urls to select from...

krane login
http://localhost:8500
http://krane.dev:8500
http://biensupernice.com:8500
> Add a new Krane instance

Source environment variables from `.env` file when adding deployment secrets

Currently, setting secrets is a very manual process and can be streamlined using a users .env file. The .env file can be referenced in the command line so that they get sourced and uploaded as secrets.

$ krane secrets add my-deployment -f ./.env

If an environment variable defined in the .env ALREADY exists it should not be overridden

Done uploading secrets for my-deployment sourced from ./env:
DB_URL: @DB_URL
DB_USER: @DB_USER

We found some secrets which where already in use and not overriden:
DB_PASSWORD: @DB_PASSWORD

Better error when invalid URL passed into `krane login`

When running the below command the CLI will error with Error: Unable to authenticate with example.com

$ krane login example.com

This happens because the URL does not contain http or https. We should instead either default to https or throw an error when an invalid URL is passed in.

Fix

Add http or https

$ krane login https://example.com

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.