Have developer friendly wrapper for openshift with an application-centric perspective.
Avoid steep learning curve to initial learn oc ....
commands and concepts. Enable self-service by design.
- have the application openshift configuration in the application repository
- have a common stage-aware config tree at hand like hiera in puppet (see https://puppet.com/docs/puppet/4.10/hiera_intro.html)
- have a really simple cli for deployment of the openshift config (stages aware)
this is the directory tree
/
.openshift/
global/
build.yml
...
config.yml
...
deployment.yml
network-policy.yml
project.yml
secrets.yml
services_and_routes.yml
stages/
dev/
config.yml
tst/
config.yml
pro/
config.yml
src/
Makefile
this is the command ocw
(openshift wrapper)
$ ocw help
ocw <command> [<args>]
Openshift wrapper 0.0.1
commands:
help display help
deploy <STAGE> merges files from global/ with files from stage/<STAGE>
and pushes config to openshift
pull fetches the current config from openshift for all stages
ocw pull
would pull config changes and write those into files into stages/<stage>
config named by the type
$ oc types | grep "^*" | sed -e 's#^* ##g; s#:##g; s#\ .*##'| tr '[:upper:]' '[:lower:]' | sort
build
builds
containers
deployment
image
image
labels
nodes
pods
projects
replication
routes
secrets
services
volumes
ocw deploy <STAGE>
would merge files from global/
with files from stage/<STAGE>
.
behaviour:
- will prevent duplicate configuration in global
(any merge which will override any config from other file, will be rejected)
- will prevent duplicate configuration in
stages/<STAGE>
(any merge which will override any config from other file, will be rejected) - config fromstages/<STAGE>
overridesglobal