Skip to content

Commit 33ffe60

Browse files
committed
Merge remote-tracking branch 'origin/2.0-rc2' into doc-reorg
2 parents 3ec502e + b51978d commit 33ffe60

File tree

3 files changed

+35
-37
lines changed

3 files changed

+35
-37
lines changed

site/developer.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ If the operator's behavior or pod log is insufficient to diagnose and resolve fa
9393
The project includes integration tests that can be run against a Kubernetes cluster. If you want to use these tests, you will need to provide your own Kubernetes cluster. The Kubernetes cluster must meet the version number requirements and have Helm installed. Ensure that the operator Docker image is in a Docker registry visible to the Kubernetes cluster.
9494

9595

96-
You will need to obtain the `kube.config` file for an administrative user and make it available on the machine running the build. To run the tests, update the `KUBECONFIG` environment varaible to point to your config file and then execute:
96+
You will need to obtain the `kube.config` file for an administrative user and make it available on the machine running the build. To run the tests, update the `KUBECONFIG` environment variable to point to your config file and then execute:
9797

9898
```
9999
$ mvn clean verify -P java-integration-tests
100100
```
101+
**NOTE**: When you run the integrations tests, they do a cleanup of any operator or domains on that cluster.
101102

102103
## Coding standards
103104

site/quickstart.md

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ refer to the [User guide](user-guide.md).
1414
the API version in the data (weblogic.oracle/v2) does not match the expected API version (weblogic.oracle/v1`
1515

1616
## Prerequisites
17-
For this exercise, you’ll need a Kubernetes cluster. If you need help setting one up, check out our [cheat sheet](k8s_setup.md).
17+
For this exercise, you’ll need a Kubernetes cluster. If you need help setting one up, check out our [cheat sheet](k8s_setup.md). This guide assumes a single node cluster.
1818

1919
The operator uses Helm to create and deploy necessary resources and then run the operator in a Kubernetes cluster. For Helm installation and usage information, see [Install Helm and Tiller](install.md#install-helm-and-tiller).
2020

@@ -52,7 +52,26 @@ f. Then patch the WebLogic image according to the instructions [here](https://gi
5252

5353
g. Copy the image to all the nodes in your cluster, or put it in a Docker registry that your cluster can access.
5454

55-
## 2. Create a Traefik (Ingress-based) load balancer.
55+
## 2. Grant the Helm service account the `cluster-admin` role.
56+
57+
```
58+
$ cat <<EOF | kubectl apply -f -
59+
apiVersion: rbac.authorization.k8s.io/v1
60+
kind: ClusterRoleBinding
61+
metadata:
62+
name: helm-user-cluster-admin-role
63+
roleRef:
64+
apiGroup: rbac.authorization.k8s.io
65+
kind: ClusterRole
66+
name: cluster-admin
67+
subjects:
68+
- kind: ServiceAccount
69+
name: default
70+
namespace: kube-system
71+
EOF
72+
```
73+
74+
## 3. Create a Traefik (Ingress-based) load balancer.
5675

5776
Use `helm` to install the [Traefik](../kubernetes/samples/charts/traefik/README.md) load balancer. Use the [values.yaml](../kubernetes/samples/charts/traefik/values.yaml) in the sample but set `kubernetes.namespaces` specifically.
5877
```
@@ -64,7 +83,7 @@ $ helm install stable/traefik \
6483
--wait
6584
```
6685

67-
## 3. Install the operator.
86+
## 4. Install the operator.
6887

6988
a. Create a namespace for the operator:
7089
```
@@ -74,26 +93,7 @@ b. Create a service account for the operator in the operator's namespace:
7493
```
7594
$ kubectl create serviceaccount -n sample-weblogic-operator-ns sample-weblogic-operator-sa
7695
```
77-
c. Grant the Helm service account the `cluster-admin` role:
78-
79-
```
80-
$ cat <<EOF | kubectl apply -f -
81-
apiVersion: rbac.authorization.k8s.io/v1
82-
kind: ClusterRoleBinding
83-
metadata:
84-
name: helm-user-cluster-admin-role
85-
roleRef:
86-
apiGroup: rbac.authorization.k8s.io
87-
kind: ClusterRole
88-
name: cluster-admin
89-
subjects:
90-
- kind: ServiceAccount
91-
name: default
92-
namespace: kube-system
93-
EOF
94-
```
95-
96-
d. Use `helm` to install and start the operator from the directory you just cloned:
96+
c. Use `helm` to install and start the operator from the directory you just cloned:
9797

9898
```
9999
$ helm install kubernetes/charts/weblogic-operator \
@@ -105,18 +105,18 @@ $ helm install kubernetes/charts/weblogic-operator \
105105
--wait
106106
```
107107

108-
e. Verify that the operator's pod is running, by listing the pods in the operator's namespace. You should see one for the operator.
108+
d. Verify that the operator's pod is running, by listing the pods in the operator's namespace. You should see one for the operator.
109109
```
110110
$ kubectl get pods -n sample-weblogic-operator-ns
111111
```
112112

113-
f. Verify that the operator is up and running by viewing the operator pod's log:
113+
e. Verify that the operator is up and running by viewing the operator pod's log:
114114

115115
```
116116
$ kubectl logs -n sample-weblogic-operator-ns -c weblogic-operator deployments/weblogic-operator
117117
```
118118

119-
## 4. Prepare your environment for a domain.
119+
## 5. Prepare your environment for a domain.
120120

121121
a. Create a namespace that can host one or more domains:
122122

@@ -144,7 +144,7 @@ $ helm upgrade \
144144
stable/traefik
145145
```
146146

147-
## 5. Create a domain in the domain namespace.
147+
## 6. Create a domain in the domain namespace.
148148

149149
a. Create a Kubernetes secret containing the `username` and `password` for the domain using the [`create-weblogic-credentials`](../kubernetes/samples/scripts/create-weblogic-domain-credentials/create-weblogic-credentials.sh) script:
150150

@@ -161,14 +161,11 @@ b. Create a new image with a domain home by running the [`create-domain`](../kub
161161
Follow the directions in the [README](../kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/README.md) file,
162162
including:
163163

164-
* Copying the sample `create-domain-inputs.yaml` file and updating your copy with the `domainUID` (`sample-domain1`),
164+
* Copying the sample `kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml` file and updating your copy with the `domainUID` (`sample-domain1`),
165165
domain namespace (`sample-domain1-ns`), and the `domainHomeImageBase` (`oracle/weblogic:12213-patch-wls-for-k8s`).
166166

167167
* Setting `weblogicCredentialsSecretName` to the name of the secret containing the WebLogic credentials, in this case, `sample-domain1-weblogic-credentials`.
168168

169-
By convention, the secret will be named`domainUID-weblogic-credentials` (where `domainUID` is replaced with the
170-
actual `domainUID` value).
171-
172169
* Leaving the `image` empty unless you need to tag the new image that the script builds to a different name.
173170

174171
For example, assuming you named your copy `my-inputs.yaml`:
@@ -251,7 +248,7 @@ $ curl -v -H 'host: sample-domain1.org' http://your.server.com:30305/weblogic/
251248
**Note**: Depending on where your Kubernetes cluster is running, you may need to open firewall ports or
252249
update security lists to allow ingress to this port.
253250

254-
## 6. Remove the domain.
251+
## 7. Remove the domain.
255252

256253
a. Remove the domain's Ingress by using `helm`:
257254
```
@@ -267,7 +264,7 @@ $ kubectl get pods -n sample-domain1-ns
267264
$ kubectl get domains -n sample-domain1-ns
268265
```
269266

270-
## 7. Remove the domain namespace.
267+
## 8. Remove the domain namespace.
271268
a. Configure the Traefik load balancer to stop managing the Ingresses in the domain namespace:
272269

273270
```
@@ -295,7 +292,7 @@ c. Delete the domain namespace:
295292
$ kubectl delete namespace sample-domain1-ns
296293
```
297294

298-
## 8. Remove the operator.
295+
## 9. Remove the operator.
299296

300297
a. Remove the operator:
301298
```
@@ -306,7 +303,7 @@ b. Remove the operator's namespace:
306303
```
307304
$ kubectl delete namespace sample-weblogic-operator-ns
308305
```
309-
## 9. Remove the load balancer.
306+
## 10. Remove the load balancer.
310307
a. Remove the Traefik load balancer:
311308
```
312309
$ helm delete --purge traefik-operator

site/scaling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ When you POST to the `/scale` REST endpoint, you must send the following headers
7777
For example, when using `curl`:
7878

7979
```
80-
curl -v -k -H X-Requested-By:MyClient -H Content-Type:application/json -H Accept:application/json -H "Authorization:Bearer ..." -d { "managedServerCount": 3 } https:/.../scaling
80+
curl -v -k -H X-Requested-By:MyClient -H Content-Type:application/json -H Accept:application/json -H "Authorization:Bearer ..." -d '{ "managedServerCount": 3 }' https://.../scaling
8181
```
8282

8383
If you omit the header, you'll get a `400 (bad request)` response without any details explaining why the request was bad. If you omit the Bearer Authentication header, then you'll get a `401 (Unauthorized)` response.

0 commit comments

Comments
 (0)