-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1331 from eclipse/che-16764
Change docs according self-signed certificate flag automation
- Loading branch information
Showing
14 changed files
with
327 additions
and
292 deletions.
There are no files selected for viewing
This file contains 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 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
64 changes: 64 additions & 0 deletions
64
...n-guide/proc_deploying-che-with-self-signed-tls-certificates-on-kubernetes.adoc
This file contains 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 |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// installing-{prod-id-short}-in-tls-mode-with-self-signed-certificates | ||
|
||
[id="deploying-{prod-id-short}-with-self-signed-tls-certificates-on-kubernetes_{context}"] | ||
= Deploying {prod-short} with self-signed TLS certificates on Kubernetes | ||
|
||
This section describes how to deploy {prod-short} on Kubernetes (including Minikube) with self-signed TLS certificates. | ||
|
||
By default, {prod-short} is deployed on Kubernetes infratructures with a self-signed certificate that is generated automatically during the {prod-short} installation process. There are no additional prerequisites for the deployment. | ||
|
||
To deploy {prod-short} with a self-signed certificate generated by the user, create a namespace for {prod-short} before the deployment and two secrets in it: | ||
|
||
* The TLS secret: `che-tls`, which holds the server TLS certificate and key (using the `tls.crt` and `tls.key` files). This secret is signed by the self-signed CA certificate. `che-tls` is the default name of the {prod-short} server TLS secret. This can be changed in the configuration. | ||
|
||
* The public part of the self-signed CA certificate: `self-signed-certificate`, an opaque secret (based on the `ca.crt` key). | ||
|
||
To deploy {prod-short} with a commonly trusted TLS certificate, it is required to create a single `che-tls` secret in the corresponding namespace. | ||
|
||
WARNING: When intending to use a commonly trusted TLS certificate for the {prod-short} deployment, do not create the `self-signed-certificate` secret. {prod-short} detects that data from the `che-tls` secret does not match and replaces both secrets with autogenerated data. | ||
|
||
|
||
.Prerequisites | ||
|
||
* A running Kubernetes instance, version 1.9 or higher. | ||
* All required keys and certificates. See xref:generating-self-signed-tls-certificates_{context}[]. | ||
|
||
|
||
.Procedure | ||
|
||
. Pre-create a namespace for {prod-short}: | ||
+ | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ kubectl create namespace {prod-namespace} | ||
---- | ||
|
||
. Create a secret with the domain key and the certificate: | ||
+ | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ kubectl create secret tls che-tls --key=domain.key --cert=domain.crt -n {prod-namespace} | ||
---- | ||
|
||
. Create a secret from the CA certificate: | ||
+ | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ kubectl create secret generic self-signed-certificate --from-file=ca.crt -n {prod-namespace} | ||
---- | ||
|
||
. Deploy {prod-short} using `{prod-cli}`: | ||
+ | ||
[subs="+quotes,attributes"] | ||
---- | ||
$ {prod-cli} server:start --platform=k8s | ||
---- | ||
+ | ||
When using Minikube, substitute `k8s` in the above command with `minikube`. | ||
|
||
|
||
.Additional resources | ||
|
||
* xref:importing-self-signed-tls-certificates-to-browsers_{context}[] |
66 changes: 66 additions & 0 deletions
66
...n-guide/proc_deploying-che-with-self-signed-tls-certificates-on-openhift-3.adoc
This file contains 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// installing-{prod-id-short}-in-tls-mode-with-self-signed-certificates | ||
|
||
[id="deploying-{prod-id-short}-with-self-signed-tls-certificates-on-openshift-3_{context}"] | ||
= Deploying {prod-short} with self-signed TLS certificates on OpenShift 3 | ||
|
||
This section describes how to deploy {prod-short} with self-signed TLS certificates generated by the user on the OpenShift 3 platform. | ||
|
||
NOTE: This method involves reconfiguration of OpenShift router to use user-provided TLS certificates. | ||
|
||
|
||
.Prerequisites | ||
|
||
* A running OpenShift 3 instance, version 3.11 or higher. | ||
* All required keys and certificates. See xref:generating-self-signed-tls-certificates_{context}[]. | ||
|
||
|
||
.Procedure | ||
|
||
. Log in to the default OpenShift project: | ||
+ | ||
---- | ||
$ oc login -u system:admin --insecure-skip-tls-verify=true | ||
$ oc project default | ||
---- | ||
|
||
. Reconfigure the router with the generated certificate: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc delete secret router-certs | ||
$ cat domain.crt domain.key > openshift.crt | ||
$ oc create secret tls router-certs --key=domain.key --cert=openshift.crt | ||
$ oc rollout latest router | ||
---- | ||
|
||
. Create a namespace for {prod-short}: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc create namespace {prod-namespace} | ||
---- | ||
|
||
. Create a secret from the CA certificate: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ oc create secret generic self-signed-certificate --from-file=ca.crt -n={prod-namespace} | ||
---- | ||
|
||
. Deploy {prod-short} using `{prod-cli}`. {prod} is installed with TLS mode by default: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ {prod-cli} server:start --platform=openshift --installer=operator | ||
---- | ||
ifeval::["{project-context}" == "che"] | ||
+ | ||
When using Minishift, substitute `openshift` in the above command with `minishift`. | ||
endif::[] | ||
|
||
|
||
.Additional resources | ||
|
||
* xref:importing-self-signed-tls-certificates-to-browsers_{context}[] |
62 changes: 62 additions & 0 deletions
62
...n-guide/proc_deploying-che-with-self-signed-tls-certificates-on-openhift-4.adoc
This file contains 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Module included in the following assemblies: | ||
// | ||
// installing-{prod-id-short}-in-tls-mode-with-self-signed-certificates | ||
|
||
[id="deploying-{prod-id-short}-with-self-signed-tls-certificates-on-openshift-4_{context}"] | ||
= Deploying {prod-short} with self-signed TLS certificates on OpenShift 4 | ||
|
||
This section describes how to deploy {prod-short} with self-signed TLS certificates on a local OpenShift 4 cluster. | ||
|
||
{prod-short} uses a default router certificate to secure its endpoints. Therefore, it depends on the OpenShift cluster configuration whether a self-signed certificate is used or not. {prod-short} automatically detects if the OpenShift default router uses a self-signed certificate by analyzing its certificate chain. | ||
|
||
|
||
.Prerequisites | ||
|
||
* A running OpenShift 4 instance, version 4.2 or higher. | ||
* All required keys and certificates. See xref:generating-self-signed-tls-certificates_{context}[]. | ||
|
||
|
||
.Procedure | ||
|
||
. Log in to the default OpenShift project: | ||
+ | ||
[subs="+quotes"] | ||
---- | ||
$ oc login -u _<username> -p _<password>_ | ||
---- | ||
|
||
. Get the OpenShift 4 self-signed certificate: | ||
+ | ||
[subs="+quotes"] | ||
---- | ||
$ oc get secret router-ca -n openshift-ingress-operator -o jsonpath="{.data.tls\.crt}" | \ | ||
base64 -d > ca.crt | ||
---- | ||
|
||
. Pre-create a namespace for {prod-short}: | ||
+ | ||
[subs="+quotes"] | ||
---- | ||
$ oc create namespace {prod-namespace} | ||
---- | ||
|
||
. Create a secret from the CA certificate: | ||
+ | ||
[subs="+quotes"] | ||
---- | ||
$ oc create secret generic self-signed-certificate --from-file=ca.crt -n={prod-namespace} | ||
---- | ||
|
||
. Deploy {prod-short} using `{prod-cli}`: | ||
+ | ||
[subs="+quotes,+attributes"] | ||
---- | ||
$ {prod-cli} server:start --platform=openshift --installer=operator | ||
---- | ||
+ | ||
When using CodeReady Containers, substitute `openshift` in the above command with `crc`. | ||
|
||
|
||
.Additional resources | ||
|
||
* xref:importing-self-signed-tls-certificates-to-browsers_{context}[] |
45 changes: 0 additions & 45 deletions
45
...7/installation-guide/proc_deploying-che-with-self-signed-tls-on-kubernetes.adoc
This file was deleted.
Oops, something went wrong.
55 changes: 0 additions & 55 deletions
55
...-guide/proc_deploying-che-with-self-signed-tls-on-openhift3-using-operator.adoc
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.