Bug 1469704 - [DOCS] No steps on how to add or overwrite router default certificate after deployed
Summary: [DOCS] No steps on how to add or overwrite router default certificate after d...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Michael Burke
QA Contact: zhaozhanqi
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-11 16:31 UTC by Ryan Howe
Modified: 2021-08-30 13:21 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-14 18:13:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2650171 0 None None None 2017-07-11 16:35:00 UTC

Description Ryan Howe 2017-07-11 16:31:21 UTC
Document URL: 

https://docs.openshift.com/container-platform/3.3/install_config/router/default_haproxy_router.html#using-wildcard-certificates

Section Number and Name: 
redeploying-router-certificates-manually

Describe the issue: 

  Steps are missing on how to  manually redeploy the router certs. 

Suggestions for improvement: 
The steps involved can be here in this KCS: 

  https://access.redhat.com/solutions/2650171

I have also typed them out again here: 

1. Check to see if a secret containing the router default certs is already added to the router. 

   # oc volumes dc/router
deploymentconfigs/router
  secret/router-certs as server-certificate
    mounted at /etc/pki/tls/private

  -If this is already configured skip to step 3 and just over write the secret. 

2. Insure that you have a default cert directory set for the following variable DEFAULT_CERTIFICATE_DIR 

   # oc env dc/router --list

   DEFAULT_CERTIFICATE_DIR=/etc/pki/tls/private

2a. If not set set the variable to the following. 

   # oc env dc/router DEFAULT_CERTIFICATE_DIR=/etc/pki/tls/private

3. Overwrite or create a router certs secret. 

   # cat custom-router.crt custom-ca.crt > custom-router.pem 

   A- Overwrite 
   # oc secrets new router-certs tls.crt=custom-router.pem custom-tls.key=router.key \
       -o json --type='kubernetes.io/tls' --confirm | \
   oc replace -f -
   
   B- Create New 
    # oc secrets new router-certs tls.crt=custom-router.pem custom-tls.key=router.key \
      --type='kubernetes.io/tls' --confirm
    # oc volume dc/router --add --mount-path=/etc/pki/tls/private --secret-name='router-certs' --name router-certs

4. Deploy latest router. 

    # oc deploy router --latest

Comment 1 Michael Burke 2017-07-17 20:56:24 UTC
@ryan Can you look at the PR and see if I added the steps properly at: 
https://github.com/openshift/openshift-docs/pull/4801

Comment 2 zhaozhanqi 2017-07-25 02:20:07 UTC
hi, Added the comment in the PR 
https://github.com/openshift/openshift-docs/pull/4801

Comment 3 Michael Burke 2017-07-25 17:40:11 UTC
@Zhao -- I made the changes you suggested in the PR. Also, updated based on Ryan's comment in the PR that `oc deploy router --latest` is deprecated in 3.5 and changed to `oc rollout latest router`.

Comment 4 zhaozhanqi 2017-07-28 01:01:03 UTC
Verified this bug according to above PR 4801

Comment 5 Michael Burke 2017-07-28 04:04:08 UTC
Ryan, this defect is marked 3.5. can the changes roll back to 3.4 and 3.3 also?

Comment 6 openshift-github-bot 2017-07-31 14:45:29 UTC
Commit pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/182c45f164f4918f2ca243c3ddfbd299282086f8
Merge pull request #4801 from mburke5678/mburke-BZ-1469704

BUG 1469704 Add Steps to Manually Redeploy Certs

Comment 7 openshift-github-bot 2017-07-31 14:55:53 UTC
Commit pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/4e436e47bb2dade66c057156924d5a16a313b452
Merge pull request #4877 from mburke5678/mburke-BZ-1469704-2

BUG 1469704 changed router deploy command for 3.4 and 3.3

Comment 8 Michael Burke 2017-07-31 15:02:20 UTC
Merged changes into 3.3 and 3.4 in PR:
https://github.com/openshift/openshift-docs/pull/4877

Merged changes into 3.5 in PR:
https://github.com/openshift/openshift-docs/pull/4801


Note You need to log in before you can comment on or make changes to this bug.