diff --git a/README.md b/README.md index 1c5ebe0..d967a93 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,32 @@ # An Hostpath Provisioner for OpenShift -## Build +## If you just want to use it + +### Setup + +``` +$ oc project default +$ oc process -f setup/hostpath-provisioner-template.yaml | oc create -f - +``` + +### Test + +``` +$ oc project my-project +$ oc create -f setup/sample-claim.yaml +$ ls -l /tmp/openshift/ +``` + +### Cleanup + +``` +$ oc project default +$ oc delete all -l template=hostpath-provisioner-template +``` + +## If you want to hack it + +### Build ``` $ export GOPATH="$PWD" @@ -9,20 +35,20 @@ $ glide install -v $ CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o ../hostpath-provisioner hostpath-provisioner/hostpath-provisioner.go ``` -## Package +### Package ``` -$ docker build -t hostpath-provisioner . +$ docker build -t openshift-hostpath-provisioner:latest . ``` -## Setup +### Setup ``` $ oc project default -$ oc process -f setup/hostpath-provisioner-template.yaml +$ oc process -f setup/hostpath-provisioner-template.yaml -p HOSTPATH_PROVISIONER_IMAGE=openshift-hostpath-provisioner:latest | oc create -f - ``` -## Test +### Test ``` $ oc project my-project @@ -30,9 +56,18 @@ $ oc create -f setup/sample-claim.yaml $ ls -l /tmp/openshift/ ``` -## Cleanup +### Cleanup ``` $ oc project default $ oc delete all -l template=hostpath-provisioner-template ``` + +### Pushing your image to DockerHub (Optional) + +``` +$ docker login https://index.docker.io/v1/ +$ docker images openshift-hostpath-provisioner:latest --format '{{ .ID }}' +$ docker tag $(docker images openshift-hostpath-provisioner:latest --format '{{ .ID }}') index.docker.io//openshift-hostpath-provisioner +$ docker push index.docker.io//openshift-hostpath-provisioner +``` diff --git a/setup/hostpath-provisioner-template.yaml b/setup/hostpath-provisioner-template.yaml index 1ac15ee..4dd42c6 100644 --- a/setup/hostpath-provisioner-template.yaml +++ b/setup/hostpath-provisioner-template.yaml @@ -129,7 +129,7 @@ parameters: - description: Name of the Docker Image to be used for the Hostpath Provisioner DaemonSet. displayName: Hostpath Provisioner Docker Image name: HOSTPATH_PROVISIONER_IMAGE - value: hostpath-provisioner:latest + value: nmasse/openshift-hostpath-provisioner:latest - description: The OpenShift Namespace on which you want to deploy the Hostpath Provisioner. displayName: Hostpath Provisioner Target Namespace name: TARGET_NAMESPACE