|
2 | 2 | title: "CI/CD"
|
3 | 3 | date: 2019-04-11T13:01:55-04:00
|
4 | 4 | weight: 5
|
5 |
| -description: "Learn about managing Domain images with CI/CD." |
| 5 | +description: "Learn about managing domain images with CI/CD." |
6 | 6 | draft: false
|
7 | 7 | ---
|
8 | 8 |
|
9 |
| -### Overview |
| 9 | +### Overview |
10 | 10 |
|
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 |
12 | 12 | 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 |
17 | 17 | CI/CD and links to examples.
|
18 | 18 |
|
19 |
| -### Review of the problem space |
| 19 | +### Review of the problem space |
20 | 20 |
|
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. |
27 | 27 |
|
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. |
34 | 34 |
|
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 |
43 | 43 | you need your domain, that is the configuration.
|
44 | 44 |
|
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 |
49 | 49 | capabilities offered by a database server.
|
50 | 50 |
|
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 |
56 | 56 | valid (and fully supported) and they have various advantages and disadvantages.
|
57 | 57 |
|
58 | 58 | We have listed the [relative advantages of these two approaches here]({{< relref "/userguide/managing-domains/choosing-a-model/_index.md" >}}).
|
59 | 59 |
|
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. |
63 | 63 |
|
64 | 64 | {{% children style="h4" description="true" %}}
|
0 commit comments