Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
liggitt committed Feb 19, 2015
1 parent f33c2cf commit 510c55e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The simplest way to run OpenShift Origin is in a Docker container:
Once the container is started, you can jump into a console inside the container and run the CLI.

$ docker exec -it openshift-origin bash
$ ln -s /var/lib/openshift/openshift.local.certificates/admin/.kubernetes_auth $HOME/.kubernetes_auth
$ export KUBECONFIG=/var/lib/openshift/openshift.local.certificates/admin/.kubeconfig
$ osc --help


Expand Down
9 changes: 5 additions & 4 deletions docs/routing.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ Once it is pulled it will start and be visible in the `docker ps` list of contai
[vagrant@openshiftdev origin]$ export PATH=/data/src/github.com/openshift/origin/_output/local/bin/linux/amd64:$PATH
[vagrant@openshiftdev origin]$ sudo /data/src/github.com/openshift/origin/_output/local/bin/linux/amd64/openshift start &

If running in https mode, ensure osc can authenticate
[vagrant@openshiftdev origin]$ sudo chmod a+r openshift.local.certificates/admin/*
If running in https mode, ensure osc can authenticate to the master
[vagrant@openshiftdev origin]$ export KUBECONFIG=/data/src/github.com/openshift/origin/openshift.local.certificates/admin/.kubeconfig
[vagrant@openshiftdev origin]$ sudo chmod a+r "$KUBECONFIG"

If running in https mode, ensure install-router.sh has root certificates for the master
[vagrant@openshiftdev origin]$ CERT_DIR=$CERT_DIR/openshift-client hack/install-router.sh {router_id} {master_url}
If running in https mode, ensure install-router.sh can authenticate to the master
[vagrant@openshiftdev origin]$ sudo chmod a+r openshift.local.certificates/openshift-client/key.key
[vagrant@openshiftdev origin]$ CERT_DIR=openshift.local.certificates/openshift-client hack/install-router.sh {router_id} {master_url}
[vagrant@openshiftdev origin]$ osc get pods

#### Clustered vagrant environment
Expand Down
22 changes: 11 additions & 11 deletions examples/sample-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,22 @@ the present working directory is the same directory as this README.
need to accept the server certificates and present its own client
certificate. These are generated as part of the `openshift start`
command in whatever the current directory is at the time. You will
need to point osc and curl at the appropriate CA bundle and client
key/cert in order to connect to OpenShift. Assuming you are running as
a user other than root, you will also need to make the private client
key readable by that user. (Note: this is just for example purposes;
in a real installation, users would generate their own keys and not
have access to the system keys.)
need to point osc and curl at the appropriate .kubeconfig in order
to connect to OpenShift. Assuming you are running as a user other
than root, you will also need to make the .kubeconfig readable by
that user. (Note: this is just for example purposes; in a real
installation, users would generate their own keys and not have access
to the system keys.)

$ export KUBECONFIG=`pwd`/openshift.local.certificates/admin/.kubeconfig
$ export CURL_CA_BUNDLE=`pwd`/openshift.local.certificates/admin/root.crt
$ sudo chmod +r `pwd`/openshift.local.certificates/admin/key.key
$ sudo chmod +r "$KUBECONFIG"

4. Deploy a private docker registry within OpenShift with the certs necessary for access to master:

$ sudo chmod +r ./openshift.local.certificates/master/key.key
$ sudo chmod +r ./openshift.local.certificates/openshift-client/key.key
$ pushd ../..
$ CERT_DIR=examples/sample-app/openshift.local.certificates/master hack/install-registry.sh
$ CERT_DIR=examples/sample-app/openshift.local.certificates/openshift-client hack/install-registry.sh
$ popd

Note that the private docker registry is using ephemeral storage,
Expand Down Expand Up @@ -303,9 +303,9 @@ the ip address shown below with the correct one for your environment.
# take some time. Your pod will stay in Pending state while the pull is completed
$ docker pull openshift/origin-haproxy-router
$ export OPENSHIFT_CA_DATA=$(<openshift.local.certificates/master/root.crt)
$ pushd ../..
$ hack/install-router.sh router https://10.0.2.15:8443
$ sudo chmod +r ./openshift.local.certificates/openshift-client/key.key
$ CERT_DIR=openshift.local.certificates/openshift-client hack/install-router.sh router https://10.0.2.15:8443
Creating router file and starting pod...
router
$ popd
Expand Down
6 changes: 3 additions & 3 deletions examples/sample-app/container-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ bits that are used in the sample app.

$ export KUBECONFIG=`pwd`/openshift.local.certificates/admin/.kubeconfig
$ export CURL_CA_BUNDLE=`pwd`/openshift.local.certificates/admin/root.crt
$ chmod +r `pwd`/openshift.local.certificates/admin/key.key
$ chmod +r "$KUBECONFIG"

For more information on this step, see [Application Build, Deploy, and Update
Flow](https://github.com/openshift/origin/blob/master/examples/sample-app/README.md#application-build-deploy-and-update-flow),
step #3.

## Deploy the private docker registry

$ chmod +r ./openshift.local.certificates/master/key.key
$ CERT_DIR=openshift.local.certificates/master ./install-registry.sh
$ chmod +r ./openshift.local.certificates/openshift-client/key.key
$ CERT_DIR=openshift.local.certificates/openshift-client ./install-registry.sh
$ cd examples/sample-app

For more information on this step, see [Application Build, Deploy, and Update
Expand Down
6 changes: 3 additions & 3 deletions hack/install-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
# for connecting securely to the OpenShift master's.
#
# To use key/certs generated automatically by "openshift start", look for the
# openshift.local.certificates/master/ directory underneath where it was started.
# openshift.local.certificates/openshift-client/ directory underneath where it was started.
# For instance, if the openshift home directory is /var/lib/openshift, then run:
# CERT_DIR=/var/lib/openshift/openshift.local.certificates/master hack/install-registry.sh
# CERT_DIR=/var/lib/openshift/openshift.local.certificates/openshift-client hack/install-registry.sh
#
# You may also need to set KUBERNETES_MASTER if the master is not listening at https://localhost:8443/

if [ -z "${CERT_DIR}" ]; then
echo "You have to set the CERT_DIR environment variable to point into master certificate"
echo "Example:"
echo "$ CERT_DIR='/var/lib/openshift/openshift.local.certificates/master' hack/install-registry.sh"
echo "$ CERT_DIR='/var/lib/openshift/openshift.local.certificates/openshift-client' hack/install-registry.sh"
exit 1
fi

Expand Down

0 comments on commit 510c55e

Please sign in to comment.