Skip to content

jacobsalmela/sampo

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
This branch is 12 commits ahead of avleen:master.

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

sampo
A shell script API server for running your shell scripts.

joukahainen:~$ curl -i http://localhost:1042/echo/rusty-fork
HTTP/1.1 200 OK
Date: Sun, 06 Sep 2020 16:54:45 UTC
Version: HTTP/1.1
Accept: text/plain
Accept-Language: en-US
Server: sampo/1.0.0
Content-Type: text/plain

rusty-fork

How It Works

The sampo Kubernetes Deployment runs a sampo container, which is running a shell script that processes your API calls. Each endpoint can call any arbitrary shell code.

You can run sampo directly in your shell, but it works best in Kubernetes.

Details

Details can be found on this blog post.

Developing/testing

If you want to test this out yourself, you can. I run it on Kubernetes in Docker for Mac, but the instructions should basically be the same:

git clone https://github.com/jacobsalmela/sampo.git
cd sampo/
kubectl create -f sampo/

Testing changes

I use a simple build script to delete my current deployment, re-deploy it, and set up port forwarding (this all assumes local development on Docker for Mac). Then I just run:

./build.sh

I currently use bats-core in the script. It doesn't work all that well, but it's a nice indicator if something is immediately wrong.

About

A shell script API server for running your shell scripts.

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 95.4%
  • Dockerfile 4.6%