Skip to content

Commit 40e7b6d

Browse files
incorporate Monica edits
1 parent 0cbb0af commit 40e7b6d

File tree

1 file changed

+110
-41
lines changed

1 file changed

+110
-41
lines changed

site/quickstart.md

Lines changed: 110 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,139 @@
11
# Quick Start Guide
22

33
Use this Quick Start Guide to create a WebLogic deployment in a Kubernetes cluster.
4-
(Maybe add what users would do with this set up.)
5-
6-
(Add link to page that describes a very specific deployment following our [samples flow](http://aseng-wiki.us.oracle.com/asengwiki/display/ASDevWLS/2.0+Samples+Flow) with a Traefik load balancer and just one domain. RM, I'm not sure that this is needed in the Quick Start Guide. **This is a tutorial. What we need are the actual commands for each step listed.**)
74

85
## 1. Get the images and put them into your local registry.
9-
Get all the necessary images: Operator, Traefik. (Need a complete list of the required images and pointers to their locations, including the commands for retrieving the images and where users should locate them on their systems.)
10-
6+
The Operator image:
7+
```
8+
$ docker pull oracle/weblogic-kubernetes-operator:2.0
9+
```
10+
The Traefik image:
11+
```
12+
$ docker pull traefik:latest
13+
```
1114
## 2. Create a Traefik (Ingress-based) load balancer.
12-
Use Helm to install a [Traefik](samples/charts/traefik/README.md) load balancer. (We can't just use a pointer to a script, we need to copy into this guide, the commands for each step.)
13-
15+
Use Helm to install the [Traefik](samples/charts/traefik/README.md) load balancer.
16+
```
17+
$ helm install --name traefik-operator --namespace traefik stable/traefik
18+
```
1419
## 3. Configure Kibana and Elasticsearch.
15-
Invoke the script to create these. (Again, list the commands here using an example.)
20+
21+
Use the YAML file under https://github.com/oracle/weblogic-kubernetes-operator/blob/develop/kubernetes/samples/scripts/elasticsearch_and_kibana.yaml.
22+
```
23+
$ kubectl apply -f kubernetes/samples/scripts/elasticsearch_and_kibana.yaml
24+
```
1625

1726
## 4. Install the operator.
18-
* Create a namespace and service account for the operator (point to sample script that does this.)
19-
* Invoke the script to generate the credentials for the operator and add it to the the operator YAML file (all the values can be left as default).
20-
* Create the operator using `helm install`, and passing in the namespace, service account, and location of Elasticsearch (Point to Helm.)
27+
* Create a namespace for the operator:
28+
```
29+
$ kubectl create namespace weblogic-operator
30+
```
31+
* Create a `serviceAccount` for the operator's namespace. If not specified, it defaults to `default` (for example, the namespace's default service account).
32+
* Invoke the script to generate the credentials for the operator and add it to the operator YAML file (all the values can be kept as default).
33+
* Create the operator using `helm install`, and passing in the namespace, service account, and location of Elasticsearch.
34+
* Helm is used to deploy the operator in a Kubernetes cluster.
35+
* Use the `helm install` command to install the operator Helm chart, passing in the `values.yaml`.
36+
* Edit the `values.yaml` file to update the information such as the operator's namespace and service account.
37+
```
38+
$ helm install kubernetes/charts/weblogic-operator --name my-operator --namespace weblogic-operator-ns --values values.yaml --wait
39+
```
2140

2241
## 5. Prepare your environment for a domain.
23-
* Create a domain namespace
24-
* Create the Kubernetes secrets for the Administration Server boot credentials
25-
* Create a PV & PVC domain; use script
26-
* Configure the operator to manage the domains in the domain namespace using `helm upgrade`
27-
* Configure the Traefik load balancer to manage the domains in the domain namespace.
28-
* Use `helm upgrade` to configure the load balancer to monitor the Ingresses in the domain namespace
29-
* Create the domain home
42+
* Optionally, create a domain namespace if you want to persist the domain home in a PV or the WebLogic server logs:
43+
```
44+
$ kubectl create namespace domain1-ns
45+
```
46+
* Create the Kubernetes secrets for the Administration Server boot credentials by invoking the script:
47+
```
48+
https://github.com/oracle/weblogic-kubernetes-operator/blob/develop/kubernetes/samples/scripts/create-weblogic-domain/create-weblogic-credentials.sh
49+
```
50+
* Create a PV & PVC for the domain:
51+
* Find the `create_pv_pvc.sh script` and the YAML file you'll need to edit to create the PV and PVC, in the https://github.com/oracle/weblogic-kubernetes-operator/tree/develop/kubernetes/samples/scripts/create-weblogic-domain-pv-pvc directory.
52+
* Edit the operator YAML file to add the domain namespace, then do a `helm upgrade`.
3053
* Create the Docker image for the domain home in the image or use the WebLogic binary image.
31-
* Run WLST to create the domain in PV (remember to apply patch).
54+
* Run WLST to create the domain in PV (remember to apply the patch).
3255

3356
## 6. Create a domain.
34-
* Edit the domain YAML file (can the defaults be used?)
35-
* Create the domain home for the domain
36-
* For a domain home on PV – as in sample
37-
* For a domain home in image, use the sample in the Docker GitHub project
57+
* Edit the domain YAML file (can the defaults be used?).
58+
* Create the domain home for the domain.
59+
* For a domain home on a PV, first pull the WebLogic 12.2.1.3 install image into a local repository:
60+
```
61+
$ docker pull store/oracle/weblogic:12.2.1.3-dev
62+
```
63+
* For reference, see https://github.com/oracle/weblogic-kubernetes-operator/blob/develop/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/README.md.
64+
* The `create-domain.sh` will:
65+
* Create a directory for the generated Kubernetes YAML files for this domain. The pathname is `/path/to/weblogic-operator-output-directory/weblogic-domains/`.
66+
* Create a Kubernetes job that will start up a utility WebLogic Server container and run offline WLST scripts, or WebLogic Deploy Tool (WDT) scripts, to create the domain on the shared storage.
67+
* Run and wait for the job to finish.
68+
* Create a Kubernetes domain custom resource YAML file, `domain-custom-resource.yaml`, in the directory that is created above. You can use this YAML file to create the Kubernetes resource using the `kubectl create -f` or `kubectl apply -f` command:
69+
```
70+
./create-domain.sh
71+
-i create-domain-inputs.yaml
72+
-o /path/to/output-directory
73+
```
74+
* For a domain home in image, use the sample in the Docker GitHub project.
3875
* Optionally, create a configuration overrides template and any additional Kubernetes secrets it needs (for example, to override the domain home configuration of a database URL, username, and password).
39-
* Create a domain resource in the domain namespace
76+
* Create a domain resource in the domain namespace.
4077
* Specify the following information: domain UID, service account, secret name, the domain home details, and optionally, the configuration overrides template name.
41-
* Configure the operator to know about the domain
78+
* Configure the operator to know about the domain.
79+
* Edit the operator `values.yaml` file to add the namespace of the domain:
80+
```
81+
$ helm update kubernetes/charts/weblogic-operator --name my-operator --namespace weblogic-operator-ns --values values.yaml --wait
82+
```
4283
* Configure the Traefik load balancer to manage the domain as follows:
43-
* Create an Ingress for the domain in the domain namespace (it contains the routing rules for the domain)
84+
* Create an Ingress for the domain in the domain namespace (it contains the routing rules for the domain):
85+
```
86+
$ cd kubernetes/samples/charts
87+
$ helm install ingress-per-domain --name domain1-ingress --value values.yaml
88+
```
4489

4590
(At this point, do they have a WebLogic Kubernetes deployment in a Kubernetes cluster? If so, we have to give them something to look at, to verify their results.)
4691

47-
(Removing the domain, operator, and such, isn't really needed in a quick start guide. We can point them to the user's instructions for how to remove the domain, operator, and all the other related resources.)
48-
4992
## 7. Remove a domain.
50-
* Remove the domain's Kubernetes resources (domain, secrets, ingress, ...)
51-
* If they are all tagged with a `weblogicUID` label, then the sample delete domain script will remove them all
52-
* The operator will notice that the domain's domain resource has been removed and will then kill the pods
53-
* Configure the Traefik load balancer to stop managing the domain
54-
* The delete script will have deleted the Ingress which will inform the load balancer to stop managing the domain
93+
* Remove the domain's Kubernetes resources (domain, secrets, ingress, and such)
94+
* To remove the domain and all the Kubernetes resources (labeled with the `domainUID`), invoke the script:
95+
```
96+
https://github.com/oracle/weblogic-kubernetes-operator/blob/develop/kubernetes/samples/scripts/delete-weblogic-domain-resources.sh
97+
```
98+
* The operator will notice that the domain's domain resource has been removed and will then kill the pods.
99+
* Configure the Traefik load balancer to stop managing the domain.
100+
* If you have configured Traefik to manage the domain's namespace (instead of the default: all namespaces), then edit the Traefik YAML file to remove the domain namespace and do a `helm update`:
101+
```
102+
helm update --name traefik-operator --namespace traefik (default values in yaml)
103+
or
104+
helm update --name traefik-operator --namespace traefik --values values.yaml stable/traefik
105+
```
106+
55107
* Remove the domain home if it's on a PV.
56108

57109
## 8. Remove the domain namespace.
58110
* Configure the Traefik load balancer to stop managing the domain namespace. Use `helm upgrade` to remove the domain namespace from the list of namespaces.
59-
* Configure the operator to stop managing the domain. Use `helm upgrade` to remove the domain namespace from the list of domain namespaces
60-
* Remove the PV & PVC for the domain namespace
61-
* Remove the domain namespace
111+
* Configure the operator to stop managing the domain. Use `helm upgrade` to remove the domain namespace from the list of domain namespaces.
112+
* Remove the PV & PVC for the domain namespace.
113+
* Remove the domain namespace:
114+
```
115+
$ kubectl delete namespaces domain1-ns
116+
```
62117

63118
## 9. Remove the operator.
64-
* `helm delete --purge`
65-
* Remove the operator namespace
119+
```
120+
helm delete --purge my-operator
121+
```
122+
* Remove the operator namespace:
123+
```
124+
$ kubectl delete namespaces weblogic-operator-ns
125+
```
66126

67127
## 10. Remove other resources.
68-
* Optionally, remove Kibana and Elasticsearch
69-
* Remove the Traefik load balancer, using `helm delete --purge`
70-
* Remove the Traefik namespace
128+
* Optionally, remove Kibana and Elasticsearch:
129+
```
130+
$ kubectl apply -f kubernetes/samples/scripts/elasticsearch_and_kibana.yaml
131+
```
132+
* Remove the Traefik load balancer:
133+
```
134+
helm delete --purge
135+
```
136+
* Remove the Traefik namespace:
137+
```
138+
$ kubectl delete namespaces traefik
139+
```

0 commit comments

Comments
 (0)