# okd

oc

# get token from web console
oc login <url> --token=<token>
oc get all
oc get <name>
oc start-build <buildConfig>            # start async build
oc start-build <buildConfig> --follow   # show logs
oc start-build <buildConfig> --wait     # wait for finish, proper exit code
oc debug -f definiton.yaml  # interactive shell
oc rsh <name>
oc logs <name>
oc exec <name> <cmd>
oc rsync <local_dir> <pod>:<pod_dir>
oc rsync <pod>:<pod_dir> <local_dir>

arch

lots of REST apis, developers typically are/use clients, like oc or web console.

builds

reference

s2i builder images

s2i build <src> <s2i-image>, images must follow some s2i rules, f.e. centos/python-35-centos7, ibotty/s2i-nginx and python.

play with:

s2i-demo1:
    docker run centos/python-34-centos7
    s2i build https://github.com/openshift/s2i-python.git --context-dir=3.4/test/setup-test-app/ centos/python-34-centos7 python-sample-app
    docker run -p 8080:8080 python-sample-app

s2i-demo2:
    docker run centos/python-34-centos7
    s2i build https://github.com/openshift/django-ex centos/python-34-centos7 my/python
    docker run -p 8080:8080 my/python

minishift

needs a hypervisor, which is host system dependent. on mac make sure to use supported version (0.3.3 atm). hyperkit had problems restarting once minishift was stopped.

minishift --vm-driver=hyperkit start
minishift config set vm-driver hyperkit