Skip to content

Deploy containerized applications to Helmcode's Kubernetes clusters easily, quickly, and simply

License

Notifications You must be signed in to change notification settings

helmcode/coderun-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CodeRun CLI

CodeRun CLI is a command-line tool that allows you to deploy and manage Docker containers on a Helmcode Kubernetes platform easily.

πŸš€ Installation

Quick Installation (Recommended)

Linux (AMD64)

curl -L https://github.com/helmcode/coderun-cli/releases/latest/download/coderun-linux-amd64 -o coderun
chmod +x coderun
sudo mv coderun /usr/local/bin/

Linux (ARM64)

curl -L https://github.com/helmcode/coderun-cli/releases/latest/download/coderun-linux-arm64 -o coderun
chmod +x coderun
sudo mv coderun /usr/local/bin/

macOS (Intel)

curl -L https://github.com/helmcode/coderun-cli/releases/latest/download/coderun-darwin-amd64 -o coderun
chmod +x coderun
sudo mv coderun /usr/local/bin/

macOS (Apple Silicon)

curl -L https://github.com/helmcode/coderun-cli/releases/latest/download/coderun-darwin-arm64 -o coderun
chmod +x coderun
sudo mv coderun /usr/local/bin/

Windows

  1. Download the appropriate file from Releases
  2. Rename it to coderun.exe
  3. Place it in your PATH

Build from Source

git clone https://github.com/helmcode/coderun-cli.git
cd coderun-cli
go build -o coderun .

πŸ“‹ Installation Verification

coderun --version

πŸ”§ Basic Usage

1. Authentication

coderun login

2. Deploy an Application

Web Applications (HTTP)

# Basic deployment
coderun deploy nginx:latest --name my-web-app --http-port 80

# With custom resources
coderun deploy my-app:v1.0 --name web-app --http-port 8080 --replicas 3 --cpu 500m --memory 1Gi

# With environment variables
coderun deploy my-app:latest --name prod-app --http-port 3000 --env-file .env

TCP Applications (Databases, etc.)

# Redis
coderun deploy redis:latest --name my-redis --tcp-port 6379

# PostgreSQL
coderun deploy postgres:latest --name my-db --tcp-port 5432 --env-file database.env

# Custom TCP application
coderun deploy my-tcp-app:latest --name tcp-service --tcp-port 9000

3. Deployment Management

List deployments

coderun list

View detailed status

coderun status <DEPLOYMENT_ID>

Delete deployment

coderun delete <DEPLOYMENT_ID>

πŸ“– Available Commands

Command Description
login Authenticate with the platform
deploy Deploy an application
list List all deployments
status View detailed deployment status
delete Delete a deployment

πŸ”— Connection Types

HTTP/HTTPS

  • Web applications are automatically exposed with HTTPS
  • URL format: https://app-name-id.helmcode.com
  • Automatic TLS certificates

TCP

  • TCP applications are exposed on the LoadBalancer
  • Format: app-name-id.helmcode.com:port
  • Ideal for databases, TCP APIs, etc.

βš™οΈ Configuration Options

Deploy Command Flags

Flag Description Example
--name Application name (required) --name my-app
--replicas Number of replicas --replicas 3
--cpu CPU limit --cpu 500m
--memory Memory limit --memory 1Gi
--http-port HTTP port to expose --http-port 8080
--tcp-port TCP port to expose --tcp-port 5432
--env-file Environment variables file --env-file .env

Environment File Format (.env)

DATABASE_URL=postgres://user:pass@host:5432/db
API_KEY=your-secret-key
DEBUG=true

πŸ” Practical Examples

Deploy WordPress

coderun deploy wordpress:latest --name my-blog --http-port 80 --replicas 2

Deploy Node.js API

coderun deploy my-api:v2.1 --name api-service --http-port 3000 --cpu 200m --memory 512Mi --env-file api.env

Deploy Redis for Caching

coderun deploy redis:alpine --name cache --tcp-port 6379

Deploy MongoDB

coderun deploy mongo:latest --name database --tcp-port 27017 --env-file mongo.env

πŸ”’ Validations

The CLI includes automatic validations for:

  • βœ… Application names (3-30 characters, lowercase, letters/numbers/hyphens)
  • βœ… Ports in valid range (1-65535)
  • βœ… HTTP/TCP mutual exclusion (only one allowed)
  • βœ… Resource format (CPU/memory)
  • βœ… Authentication verification

🚦 Deployment States

State Description
pending Deployment being created
running Application running correctly
failed Deployment error
stopped Application stopped

πŸ› Troubleshooting

Error: "Please login first"

coderun login

Error: "App name is required"

# Add the --name flag
coderun deploy nginx:latest --name my-application

Error: "Cannot specify both --http-port and --tcp-port"

# Use only one of them
coderun deploy my-app:latest --name app --http-port 8080
# Or
coderun deploy my-app:latest --name app --tcp-port 9000

πŸ“¦ Releases

Releases are automatically generated when a tag is created in the repository:

git tag v0.0.1
git push origin v0.0.1

This automatically triggers compilation for all platforms and creates a release on GitHub.

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ Complete documentation

  1. Intro
  2. Basic Usage
  3. Basic Deploy
  4. Advanced Deploy
  5. Debugging
  6. Build and Deploy from a Dockerfile

πŸ“„ License

Apache License 2.0

πŸ”— Links

About

Deploy containerized applications to Helmcode's Kubernetes clusters easily, quickly, and simply

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages