A choose your own adventure git+ops authenticated journaled deployment controller development pipeline kubernetes utility test service.
polly
uses the basename of the current "working directory" ($PWD) as a source of information on conventional pipelines.
There are also the notion of the polly
deployment "itself", known as $POLLY
.
polly can be used to debug several types of ci platforms, to facilitate local CI, and as a general purpose dev tool.
Do not expose polly to a kubernetes cluster unless you have thoroughly understood the risk.
TODO, in the future, polly
will be available via sudo gem install polly
... until then it must be installed manually, see below
sudo apt-get install ruby rubygems-integration libffi-dev build-essential --no-install-recommends
sudo gem install bundler
cd ~/workspace
git clone [email protected]:unhookd/polly.git
cd polly
bundle config set --local path vendor/bundle
bundle install
sudo ln -fs ${HOME}/workspace/polly/bin/polly /usr/local/bin/polly
polly help
polly understands circleci config and is able to plan and execute workflows on a local or remote kubernetes cluster
TBD: rebake this bootstrap script into github actions as test-suite cross-check
We can re-bootstrap polly
from scratch for development purposes, or just start in a given project directory
cd ~/workspace/myproj
polly build # build polly controller Dockerfile
Install the polly
controller into your kube cluster.
kubectx
polly init
should install polly
controller into desired kubernetes context
the push
command will push the git repo from $PWD
to the polly controller
requires $PATH/git
to be present.
begins pipeline by sending latest commits to git remote controller
git remote controller will process inbound commits via git-receive-pack
current local branch will be stored into bare repo
polly requires a valid git repo to work, and includes event hooks that are dispatched
cd ~/workspace/myproj
git status
polly push
installs a copy of the current PWD as a bare git repo checkout in the deployed polly
controller
the polly changelog
command is a tool that appends to development journal CHANGELOG.md by default.
Useful for creating notes, or making blank commits for pushing into a git+ops pipeline
It can also be used to increment a VERSION file
prints current polly version
the test
command will run the auto-detected workflow (currently supports Pollyfile
and .circleci/config.yml
declared suites)
polly test --dry-run # emit plan for execution for detected ci workflow
polly test # execute detected ci workflows
the dev
command is a tool to help local development by executing Procfile
cd ~/workspace/myproj
cat Procfile # ensure you have a Procfile present, see below for example
# example Procfile
one: sleep 5 && echo true
two: sleep 2 && echo false
polly dev # will run commands in Procfile
The output is multiplexed and highlight on a per-process basis, this makes it useful for a variety of debugging uses.
build $APP:latest
using the the detected packaging system, Pollyfile
and Dockerfile
are automatically detected, from the HEAD version of the current working directory's git repo.
exec's into the polly controller deployement to provide a debugging interactive tty
prints logs of polly controller deployement for debugging
accepts on STDIN a ~/.docker/config.json
document, and creates a specific secret for allowin fetching from private repos in private clusters.
TBD: allow STDIN creation of a variety of configMap/secretMap resources (SEE: polly certificate
)
TBD: manages authentication
TBD: useful gitflow utilities
TBD: internal process for looping
while true
polly gitch -m -u
the watch
command facilitates local CI workfow or T.C.R. style development practices
#TODO polly tcr