-
Notifications
You must be signed in to change notification settings - Fork 4.7k
make openshift start --write-config take a dir #1737
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
openshift-bot
merged 1 commit into
openshift:master
from
deads2k:deads-openshift-start-take-dir
Apr 28, 2015
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ if [[ -z "${BASETMPDIR-}" ]]; then | |
fi | ||
ETCD_DATA_DIR="${BASETMPDIR}/etcd" | ||
VOLUME_DIR="${BASETMPDIR}/volumes" | ||
CERT_DIR="${BASETMPDIR}/certs" | ||
FAKE_HOME_DIR="${BASETMPDIR}/openshift.local.home" | ||
LOG_DIR="${LOG_DIR:-${BASETMPDIR}/logs}" | ||
ARTIFACT_DIR="${ARTIFACT_DIR:-${BASETMPDIR}/artifacts}" | ||
mkdir -p $LOG_DIR | ||
|
@@ -61,6 +61,10 @@ KUBELET_SCHEME="${KUBELET_SCHEME:-https}" | |
KUBELET_HOST="${KUBELET_HOST:-127.0.0.1}" | ||
KUBELET_PORT="${KUBELET_PORT:-10250}" | ||
|
||
SERVER_CONFIG_DIR="${BASETMPDIR}/openshift.local.config" | ||
MASTER_CONFIG_DIR="${SERVER_CONFIG_DIR}/master" | ||
NODE_CONFIG_DIR="${SERVER_CONFIG_DIR}/node-${KUBELET_HOST}" | ||
|
||
# use the docker bridge ip address until there is a good way to get the auto-selected address from master | ||
# this address is considered stable | ||
# used as a resolve IP to test routing | ||
|
@@ -177,7 +181,7 @@ echo "[INFO] `openshift version`" | |
echo "[INFO] Server logs will be at: ${LOG_DIR}/openshift.log" | ||
echo "[INFO] Test artifacts will be in: ${ARTIFACT_DIR}" | ||
echo "[INFO] Volumes dir is: ${VOLUME_DIR}" | ||
echo "[INFO] Certs dir is: ${CERT_DIR}" | ||
echo "[INFO] Config dir is: ${SERVER_CONFIG_DIR}" | ||
echo "[INFO] Using images: ${USE_IMAGES}" | ||
|
||
# Start All-in-one server and wait for health | ||
|
@@ -191,48 +195,57 @@ do | |
done <<< "${ALL_IP_ADDRESSES}" | ||
|
||
openshift admin create-master-certs \ | ||
--overwrite=false \ | ||
--cert-dir="${CERT_DIR}" \ | ||
--hostnames="${SERVER_HOSTNAME_LIST}" \ | ||
--master="${MASTER_ADDR}" \ | ||
--public-master="${API_SCHEME}://${PUBLIC_MASTER_HOST}" | ||
--overwrite=false \ | ||
--cert-dir="${MASTER_CONFIG_DIR}" \ | ||
--hostnames="${SERVER_HOSTNAME_LIST}" \ | ||
--master="${MASTER_ADDR}" \ | ||
--public-master="${API_SCHEME}://${PUBLIC_MASTER_HOST}" | ||
|
||
openshift admin create-node-config \ | ||
--listen="${KUBELET_SCHEME}://0.0.0.0:${KUBELET_PORT}" \ | ||
--node-dir="${CERT_DIR}/node-${KUBELET_HOST}" \ | ||
--node="${KUBELET_HOST}" \ | ||
--hostnames="${KUBELET_HOST}" \ | ||
--master="${MASTER_ADDR}" \ | ||
--node-client-certificate-authority="${CERT_DIR}/ca/cert.crt" \ | ||
--certificate-authority="${CERT_DIR}/ca/cert.crt" \ | ||
--signer-cert="${CERT_DIR}/ca/cert.crt" \ | ||
--signer-key="${CERT_DIR}/ca/key.key" \ | ||
--signer-serial="${CERT_DIR}/ca/serial.txt" | ||
--listen="${KUBELET_SCHEME}://0.0.0.0:${KUBELET_PORT}" \ | ||
--node-dir="${NODE_CONFIG_DIR}" \ | ||
--node="${KUBELET_HOST}" \ | ||
--hostnames="${KUBELET_HOST}" \ | ||
--master="${MASTER_ADDR}" \ | ||
--node-client-certificate-authority="${MASTER_CONFIG_DIR}/ca.crt" \ | ||
--certificate-authority="${MASTER_CONFIG_DIR}/ca.crt" \ | ||
--signer-cert="${MASTER_CONFIG_DIR}/ca.crt" \ | ||
--signer-key="${MASTER_CONFIG_DIR}/ca.key" \ | ||
--signer-serial="${MASTER_CONFIG_DIR}/ca.serial.txt" | ||
|
||
osadm create-bootstrap-policy-file --filename="${MASTER_CONFIG_DIR}/policy.json" | ||
|
||
# create openshift config | ||
openshift start \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same question... what is this testing in addition to the create-master-certs/create-node-config |
||
--write-config=${SERVER_CONFIG_DIR} \ | ||
--create-certs=false \ | ||
--listen="${API_SCHEME}://0.0.0.0:${API_PORT}" \ | ||
--master="${MASTER_ADDR}" \ | ||
--public-master="${API_SCHEME}://${PUBLIC_MASTER_HOST}" \ | ||
--hostname="${KUBELET_HOST}" \ | ||
--volume-dir="${VOLUME_DIR}" \ | ||
--etcd-dir="${ETCD_DATA_DIR}" \ | ||
--images="${USE_IMAGES}" | ||
|
||
|
||
echo "[INFO] Starting OpenShift server" | ||
sudo env "PATH=${PATH}" OPENSHIFT_PROFILE=web OPENSHIFT_ON_PANIC=crash openshift start \ | ||
--listen="${API_SCHEME}://0.0.0.0:${API_PORT}" \ | ||
--master="${MASTER_ADDR}" \ | ||
--public-master="${API_SCHEME}://${PUBLIC_MASTER_HOST}" \ | ||
--hostname="${KUBELET_HOST}" \ | ||
--volume-dir="${VOLUME_DIR}" \ | ||
--etcd-dir="${ETCD_DATA_DIR}" \ | ||
--cert-dir="${CERT_DIR}" \ | ||
--loglevel=4 \ | ||
--images="${USE_IMAGES}" \ | ||
--create-certs=false \ | ||
&> "${LOG_DIR}/openshift.log" & | ||
--master-config=${MASTER_CONFIG_DIR}/master-config.yaml \ | ||
--node-config=${NODE_CONFIG_DIR}/node-config.yaml \ | ||
--loglevel=4 \ | ||
&> "${LOG_DIR}/openshift.log" & | ||
OS_PID=$! | ||
|
||
export HOME="${FAKE_HOME_DIR}" | ||
|
||
if [[ "${API_SCHEME}" == "https" ]]; then | ||
export CURL_CA_BUNDLE="${CERT_DIR}/ca/cert.crt" | ||
export CURL_CERT="${CERT_DIR}/admin/cert.crt" | ||
export CURL_KEY="${CERT_DIR}/admin/key.key" | ||
|
||
# Make osc use ${CERT_DIR}/admin/.kubeconfig, and ignore anything in the running user's $HOME dir | ||
export HOME="${CERT_DIR}/admin" | ||
sudo chmod -R a+rwX "${HOME}" | ||
export OPENSHIFTCONFIG="${CERT_DIR}/admin/.kubeconfig" | ||
export CURL_CA_BUNDLE="${MASTER_CONFIG_DIR}/ca.crt" | ||
export CURL_CERT="${MASTER_CONFIG_DIR}/admin.crt" | ||
export CURL_KEY="${MASTER_CONFIG_DIR}/admin.key" | ||
|
||
# Make osc use ${MASTER_CONFIG_DIR}/admin.kubeconfig, and ignore anything in the running user's $HOME dir | ||
export OPENSHIFTCONFIG="${MASTER_CONFIG_DIR}/admin.kubeconfig" | ||
sudo chmod -R a+rwX "${OPENSHIFTCONFIG}" | ||
echo "[INFO] To debug: export OPENSHIFTCONFIG=$OPENSHIFTCONFIG" | ||
fi | ||
|
||
|
@@ -253,12 +266,12 @@ echo "Log in as 'e2e-user' to see the 'test' project." | |
|
||
# install the router | ||
echo "[INFO] Installing the router" | ||
openshift admin router --create --credentials="${CERT_DIR}/openshift-router/.kubeconfig" --images="${USE_IMAGES}" | ||
openshift admin router --create --credentials="${MASTER_CONFIG_DIR}/openshift-router.kubeconfig" --images="${USE_IMAGES}" | ||
|
||
# install the registry. The --mount-host option is provided to reuse local storage. | ||
echo "[INFO] Installing the registry" | ||
# TODO: add --images="${USE_IMAGES}" when the Docker registry is built alongside OpenShift | ||
openshift admin registry --create --credentials="${CERT_DIR}/openshift-registry/.kubeconfig" --mount-host="/tmp/openshift.local.registry" --images='openshift/origin-${component}:latest' | ||
openshift admin registry --create --credentials="${MASTER_CONFIG_DIR}/openshift-registry.kubeconfig" --mount-host="/tmp/openshift.local.registry" --images='openshift/origin-${component}:latest' | ||
|
||
echo "[INFO] Pre-pulling and pushing ruby-20-centos7" | ||
docker pull openshift/ruby-20-centos7:latest | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do this in addition to create-master-certs / create-node-config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creates the master config pointing to certs in a non-default location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so are we expecting all the certs to exist already? if so, should we do
--create-certs=false
so we know ifcreate-master-certs
andcreate-node-config
didn't make enough things to satisfyopenshift start
? same comment in other test scripts that use this setup pattern, I guessThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running with a config file, certs are never created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're not running from config here, we're writing it... wouldn't that generate the certs if missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, just got down to where you removed certargs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind... --create-certs is just a raw boolean now... think we should pass
--create-certs=false
here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refresh your diff. Got that a couple commits ago.