krisnova / naml

Convert Kubernetes YAML to Golang
Apache License 2.0
1.26k stars 38 forks source link

Naml Gets an RPC πŸŽ‰ #29

Closed krisnova closed 3 years ago

krisnova commented 3 years ago

Now we can access pre-compiled binaries with user applications with the very same command line tool the rest of NAML uses.

The more I pulled the samples out to naml-examples the more I realized the CLI tool and the primitives built in (in addition to the Deployable() interface of course) were the bulk of the work.


This PR will allow the following workflows.

Given two users (alice and emma) each with a set of applications. The naml runtime can use them both with Kubernetes.

.
β”œβ”€β”€ alice
β”‚Β Β  β”œβ”€β”€ app.go
β”‚Β Β  β”œβ”€β”€ Makefile
β”‚Β Β  └── naml
└── emma
    β”œβ”€β”€ app.go
    β”œβ”€β”€ Makefile
    └── naml

The user experience would look something like this.

naml -f alice/naml -f emma/naml list # This will list the aggregate of both alice and emmas applications
./alice/naml # This is the same program but only with alice's applications
./emma/naml # This is the same program but only with emma's appications

I still have at least another commit or two to refactor the child processes and harden the RPC - but this is working prototype code with bad names