Browse Source

change default image name and improve doc

pull/2/head
Nicolas Massé 9 years ago
parent
commit
452c4de404
  1. 49
      README.md
  2. 2
      setup/hostpath-provisioner-template.yaml

49
README.md

@ -1,6 +1,32 @@
# An Hostpath Provisioner for OpenShift # 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" $ 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 $ 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 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 $ oc project my-project
@ -30,9 +56,18 @@ $ oc create -f setup/sample-claim.yaml
$ ls -l /tmp/openshift/ $ ls -l /tmp/openshift/
``` ```
## Cleanup ### Cleanup
``` ```
$ oc project default $ oc project default
$ oc delete all -l template=hostpath-provisioner-template $ 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/<your-username>/openshift-hostpath-provisioner
$ docker push index.docker.io/<your-username>/openshift-hostpath-provisioner
```

2
setup/hostpath-provisioner-template.yaml

@ -129,7 +129,7 @@ parameters:
- description: Name of the Docker Image to be used for the Hostpath Provisioner DaemonSet. - description: Name of the Docker Image to be used for the Hostpath Provisioner DaemonSet.
displayName: Hostpath Provisioner Docker Image displayName: Hostpath Provisioner Docker Image
name: HOSTPATH_PROVISIONER_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. - description: The OpenShift Namespace on which you want to deploy the Hostpath Provisioner.
displayName: Hostpath Provisioner Target Namespace displayName: Hostpath Provisioner Target Namespace
name: TARGET_NAMESPACE name: TARGET_NAMESPACE

Loading…
Cancel
Save