cluster up: add registry instructions
- [Etcd Data](#etcd-data)
- [Routing](#routing)
- [Specifying Images to Use](#specifying-images-to-use)
+- [Accessing the OpenShift Registry Directly](#accessing-the-openshift-registry-directly)
## Pre-requisites
@@ -386,3 +387,61 @@ oc cluster up --image=myregistry.example.com/ose/origin
```
Both --version and --image may be combined to specify the image name prefix and tag for the images to use.
+
+## Accessing the OpenShift Registry Directly
+
+On cluster startup, cluster up creates an OpenShift registry by default. The registry can be accessed directly
+via docker commands by using its service IP address.
+
+> Starting with release v1.5.0-alpha.2, the service IP of the registry is fixed at `172.30.1.1`
+
+To determine the service IP of the registry (if using a client prior to v1.5.0-alpha.2):
+
+1. Login as system:admin
+ ```
+ oc login -u system:admin
+ ```
+
+2. Get the registry service from the default namespace
+ ```
+ oc get svc docker-registry -n default
+ ```
+
+3. Log back in as your regular user
+ ```
+ oc login -u developer
+ ```
+
+To push arbitrary images from your local Docker daemon to this registry, you will need to:
+
+1. Obtain your OpenShift token and store it in a variable
+ ```
+ OPENSHIFT_TOKEN=$(oc whoami -t)
+ ```
+
+2. Login to the registry
+ (Substitute the registry service IP for 172.30.1.1 if different on your system)
+ ```
+ docker login -u developer -p ${OPENSHIFT_TOKEN} 172.30.1.1:5000
+ ```
+
+3. Tag an image with your registry and namespace, and push it.
+
+ An image tag must be of the format `REGISTRY_IP:5000/NAMESPACE/name[:TAG]`
+
+ where REGISTRY_IP is the IP of your registry, NAMESPACE is an OpenShift namespace that
+ you have access to, and TAG is an optional tag that you want to create for the image.
+
+ After an image is pushed, an ImageStream is automatically created for it in the namespace
+ that you used to tag it.
+
+ Following is an example of pulling an nginx image and pushing it to your local namespace
+
+ ```
+ docker pull nginx:latest
+ docker tag nginx:latest 172.30.1.1:5000/myproject/nginx:latest
+ docker push 172.30.1.1:5000/myproject/nginx:latest
+ ```
+
+ After the image is pushed to the local registry, an ImageStream named `nginx` will be
+ created in the `myproject` namespace.
