Skip to content

Commit 8752ddd

Browse files
rosemarymaranorjeberhard
authored andcommitted
review and edit, jenkins-ignore
1 parent ee8f892 commit 8752ddd

File tree

7 files changed

+254
-257
lines changed

7 files changed

+254
-257
lines changed

docs-source/content/userguide/cicd/_index.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2,63 +2,63 @@
22
title: "CI/CD"
33
date: 2019-04-11T13:01:55-04:00
44
weight: 5
5-
description: "Learn about managing Domain images with CI/CD."
5+
description: "Learn about managing domain images with CI/CD."
66
draft: false
77
---
88

9-
### Overview
9+
### Overview
1010

11-
In this section, we will discuss recommended techniques for managing the evolution
11+
In this section, we will discuss the recommended techniques for managing the evolution
1212
and mutation of Docker images to run WebLogic in Kubernetes. There are several
13-
approaches and techniques available, and the choice of which to use depends very
14-
much on your particular requirements. We will start with a review of the "problem
15-
space," and then talk about the considerations that would lead us to choose various
16-
approaches. We will provide details about several approaches to implementing
13+
approaches and techniques available, and the choice of which to use depends very
14+
much on your particular requirements. We will start with a review of the "problem
15+
space," and then talk about the considerations that would lead us to choose various
16+
approaches. We will provide details about several approaches to implementing
1717
CI/CD and links to examples.
1818

19-
### Review of the problem space
19+
### Review of the problem space
2020

21-
Kubernetes makes a fundamental assumption that Docker images are immutable,
22-
that they contain no state, and that updating them is as simple as throwing
23-
away a pod/container and replacing it with a new one that uses a newer version
24-
of the Docker image. These assumptions work very well for microservices
25-
applications, but for more traditional workloads, we need to do some extra
26-
thinking and some extra work to get the behavior we want.
21+
Kubernetes makes a fundamental assumption that Docker images are immutable,
22+
that they contain no state, and that updating them is as simple as throwing
23+
away a pod/container and replacing it with a new one that uses a newer version
24+
of the Docker image. These assumptions work very well for microservices
25+
applications, but for more traditional workloads, we need to do some extra
26+
thinking and some extra work to get the behavior we want.
2727

28-
CI/CD is an area where the standard assumptions don't always suit. In the
29-
microservices architecture, you typically minimize dependencies and build
30-
images from scratch with all of the dependencies in them. You also typically
31-
keep all of the configuration outside the image, for example in Kubernetes config
32-
maps or secrets, and all of the state outside of the image too. This makes
33-
it very easy to update running pods with a new image.
28+
CI/CD is an area where the standard assumptions aren't always suitable. In the
29+
microservices architecture, you typically minimize dependencies and build
30+
images from scratch with all of the dependencies in them. You also typically
31+
keep all of the configuration outside of the image, for example, in Kubernetes config
32+
maps or secrets, and all of the state outside of the image too. This makes
33+
it very easy to update running pods with a new image.
3434

35-
Let's consider how a WebLogic image is different. There will of course be a
36-
base layer with the operating system; let's assume it is
37-
[Oracle Linux "slim"](https://hub.docker.com/_/oraclelinux/). Then you need
38-
a JDK and this is very commonly in another layer. Many people will use
39-
official supported JDK images from the Docker Store, like the
40-
[Server JRE image](https://hub.docker.com/_/oracle-serverjre-8), for example. On
41-
top of this, you need the WebLogic Server binaries (the "Oracle Home"). On top
42-
of that, you may wish to have some patches or updates installed. And then
35+
Let's consider how a WebLogic image is different. There will, of course, be a
36+
base layer with the operating system; let's assume it is
37+
[Oracle Linux "slim"](https://hub.docker.com/_/oraclelinux/). Then you need
38+
a JDK and this is very commonly in another layer. Many people will use
39+
the officially supported JDK images from the Docker Store, like the
40+
[Server JRE image](https://hub.docker.com/_/oracle-serverjre-8), for example. On
41+
top of this, you need the WebLogic Server binaries (the "Oracle Home"). On top
42+
of that, you may wish to have some patches or updates installed. And then
4343
you need your domain, that is the configuration.
4444

45-
There is also other information associated with a domain that needs to live
46-
somewhere, for example leasing tables, message and transaction stores, and so
47-
on. We recommend that all of these be kept in a database so that they are
48-
separate from the Docker image and so that we get all of the management
45+
There is also other information associated with a domain that needs to live
46+
somewhere, for example leasing tables, message and transaction stores, and so
47+
on. We recommend that all of these be kept in a database so that they are
48+
separate from the Docker image and so that we get all of the management
4949
capabilities offered by a database server.
5050

51-
There are two common approaches on how to structure these components. The first,
52-
which we call "domain on persistent volume," places the JDK and WebLogic binaries
53-
in the Docker image, but the domain is kept on a separate persistent storage
54-
outside of the image. The second approach puts the JDK, WebLogic binaries
55-
and the domain all in the Docker image. Both of these approaches are perfectly
51+
There are two common approaches on how to structure these components. The first,
52+
which we call "domain on persistent volume," places the JDK and WebLogic binaries
53+
in the Docker image, but the domain is kept on a separate persistent storage
54+
outside of the image. The second approach puts the JDK, WebLogic binaries
55+
and the domain all in the Docker image. Both of these approaches are perfectly
5656
valid (and fully supported) and they have various advantages and disadvantages.
5757

5858
We have listed the [relative advantages of these two approaches here]({{< relref "/userguide/managing-domains/choosing-a-model/_index.md" >}}).
5959

60-
One of the key differences between these approaches is how many Docker images
61-
you have, and therefore, how you build and maintain them - your image CI/CD
62-
process. Let's take a short detour and talk about Docker image layering.
60+
One of the key differences between these approaches is how many Docker images
61+
you have, and therefore, how you build and maintain them - your image CI/CD
62+
process. Let's take a short detour and talk about Docker image layering.
6363

6464
{{% children style="h4" description="true" %}}
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
11
---
2-
title: "Choose an Approach"
2+
title: "Choose an approach"
33
date: 2019-04-11T13:36:57-04:00
44
draft: false
55
weight: 3
66
decsription: "How to choose an approach."
77
---
88

9-
Let's review what we have discussed and talk about when we might want to use
9+
Let's review what we have discussed and talk about when we might want to use
1010
various approaches. We can start by asking ourselves questions like these:
1111

1212

1313
- *Can you make the desired change with a configuration override?*
14-
The WebLogic Kubernetes Operator allows you to inject a number of [configuration
15-
overrides]({{< relref "/userguide/managing-domains/configoverrides/_index.md" >}})
16-
into your pods at startup time. This allows you to use the same image for multiple
17-
different configurations. A good example would be changing the settings for a data
18-
source, for example. You may wish to have a larger connection pool in your production
19-
environment than you do in your development/test environments. You probably also
20-
want to have different credentials. You may want to change the service name, and
14+
The WebLogic Kubernetes Operator allows you to inject a number of [configuration
15+
overrides]({{< relref "/userguide/managing-domains/configoverrides/_index.md" >}})
16+
into your pods at startup time. This allows you to use the same image for multiple
17+
different configurations. A good example would be changing the settings for a data
18+
source, for example. You may wish to have a larger connection pool in your production
19+
environment than you do in your development/test environments. You probably also
20+
want to have different credentials. You may want to change the service name, and
2121
so on. All of these kinds of updates can be made with configuration overrides.
22-
These are placed in a Kubernetes config map, i.e. they are outside the image, so
23-
they do not require rebuilding the Docker image. If all of your changes fit into
24-
this category, it is probably much better to just use the configuration overrides
22+
These are placed in a Kubernetes config map, that is, they are outside of the image, so
23+
they do not require rebuilding the Docker image. If all of your changes fit into
24+
this category, it is probably much better to just use configuration overrides
2525
instead of building a new image.
26-
- *Are you only changing the WebLogic configuration, i.e. deploying or updating an
27-
application, changing a resource configuration in a way that is not supported by
28-
configuration overrides, etc.?*
29-
If your changes fit into this category, and you have used the "domain-in-image"
30-
approach and the Docker layering model, then you only need to update the top layer
26+
- *Are you only changing the WebLogic configuration, for example, deploying or updating an
27+
application, changing a resource configuration in a way that is not supported by
28+
configuration overrides, and such?*
29+
If your changes fit into this category, and you have used the "domain-in-image"
30+
approach and the Docker layering model, then you only need to update the top layer
3131
of your image. This is relatively easy compared to making changes in lower layers.
32-
You could create a new layer with the changes, or your could rebuild/replace the
33-
existing top layer with a new one. Which approach you choose depends most on
32+
You could create a new layer with the changes, or your could rebuild/replace the
33+
existing top layer with a new one. Which approach you choose depends mainly on
3434
whether you need to maintain the same domain encryption keys or not.
3535
- *Do you need to be able to do a rolling restart?*
36-
If you need to do a rolling restart, for example to maintain the availability of
37-
your applications, then you need to make sure the new domain layer has the same
38-
domain encryption keys. You cannot perform a rolling restart of a domain if the
39-
new members have a different encryption key.
40-
- *Do you need to mutate something in a lower layer, i.e. patch WebLogic, the JDK or Linux?*
41-
If you need to make an update in a lower layer, then you will need to rebuild that
42-
layer and all of the layers above it. This means that you will need to rebuild the
36+
If you need to do a rolling restart, for example to maintain the availability of
37+
your applications, then you need to make sure the new domain layer has the same
38+
domain encryption keys. You cannot perform a rolling restart of a domain if the
39+
new members have a different encryption key.
40+
- *Do you need to mutate something in a lower layer, for example, patch WebLogic, the JDK, or Linux?*
41+
If you need to make an update in a lower layer, then you will need to rebuild that
42+
layer and all of the layers above it. This means that you will need to rebuild the
4343
domain layer. You will need to determine if you need to keep the same domain encryption keys.
4444

4545
The diagram below summarizes these concerns in a decision tree for the “domain in image” case:
4646

4747
![Decision model for the "domain in image" approach](/weblogic-kubernetes-operator/images/flowchart.png)
4848

49-
If you are using the "domain on persistent storage" approach, many of these concerns become
50-
moot, because you have an effective separation between your domain and the Docker image.
51-
There is still the possibility that an update in the Docker image could affect your domain,
52-
for example, if you updated the JDK, you may need to update some of your domain scripts
49+
If you are using the "domain on persistent storage" approach, many of these concerns become
50+
moot because you have an effective separation between your domain and the Docker image.
51+
There is still the possibility that an update in the Docker image could affect your domain;
52+
for example, if you updated the JDK, you may need to update some of your domain scripts
5353
to reflect the new JDK path.
5454

55-
However, in this scenario, your environment is much closer to what you are probably used
56-
to in a traditional (non-Kubernetes) environment, and you will probably find that all of
57-
the practices you used from that pre-Kubernetes environment are directly applicable here
58-
too, with just some small modifications. For example, applying a WebLogic patch would
59-
now involve building a new Docker image.
55+
However, in this scenario, your environment is much closer to what you are probably used
56+
to in a traditional (non-Kubernetes) environment, and you will probably find that all of
57+
the practices you used from that pre-Kubernetes environment are directly applicable here
58+
too, with just some small modifications. For example, applying a WebLogic patch would
59+
now involve building a new Docker image.
Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
---
2-
title: "How to Copy Domains"
2+
title: "How to copy domains"
33
date: 2019-04-11T13:48:15-04:00
44
draft: false
55
weight: 5
66
description: "How to copy domains."
77
---
88

9-
The recommended approach to save a copy of a domain is to simply zip (or tar)
10-
the domain directory. However there is a very important caveat with this
11-
recommendation - when you unzip the domain, it must go back into exactly
12-
the same location (Domain Home) in the (new) file system. Using this
9+
The recommended approach to save a copy of a domain is to simply ZIP (or tar)
10+
the domain directory. However, there is a very important caveat with this
11+
recommendation - when you unzip the domain, it must go back into exactly
12+
the same location (Domain Home) in the (new) file system. Using this
1313
approach will maintain the same domain encryption key.
1414

15-
The best practice/recommended approach is to create a "primordial domain"
16-
(as described above) which does not contain any applications or resources,
17-
and to create a zip file of this domain before starting any servers.
15+
The best practice/recommended approach is to create a "primordial domain"
16+
(as described previously) which does not contain any applications or resources,
17+
and to create a ZIP file of this domain before starting any servers.
1818

1919

20-
> The domain zip must be created before starting servers.
20+
> The domain ZIP must be created before starting servers.
2121
22-
When servers are started the first time they will encrypt various other data.
23-
Make sure you create the zip file before starting servers for the first time.
24-
The primordial domain zip file should be stored in a safe place where the CI/CD
25-
can get it when needed, for example in a secured Artifactory repository (or
26-
similar). Remember, anyone who gets access to this zip file can get access
22+
When servers are started the first time, they will encrypt various other data.
23+
Make sure you create the ZIP file before starting servers for the first time.
24+
The primordial domain ZIP file should be stored in a safe place where the CI/CD
25+
can get it when needed, for example in a secured Artifactory repository (or
26+
something similar). Remember, anyone who gets access to this ZIP file can get access
2727
to the domain encryption key, so it needs to be protected appropriately.
2828

29-
Every time you run your CI/CD pipeline to create a new mutation of the domain,
30-
it should retrieve and unzip the primordial domain first, and then apply changes
31-
to that domain using tools like WDT or WLST (see below).
29+
Every time you run your CI/CD pipeline to create a new mutation of the domain,
30+
it should retrieve and unzip the primordial domain first, and then apply changes
31+
to that domain using tools like WDT or WLST (see below).
3232

3333

3434
> Always use external state.
3535
36-
You should always keep state outside the Docker image. This means that you should
37-
use JDBC stores for leasing tables, JMS and Transaction stores, HTTP sessions,
38-
EJB timers, JMS queues, and so on. This ensures that data will not be lost when
39-
a container is destroyed.
36+
You should always keep state outside the Docker image. This means that you should
37+
use JDBC stores for leasing tables, JMS and Transaction stores, HTTP sessions,
38+
EJB timers, JMS queues, and so on. This ensures that data will not be lost when
39+
a container is destroyed.

0 commit comments

Comments
 (0)