|
1 | 1 | # Command Central Docker Builder |
2 | 2 |
|
3 | | -THIS IS NOT PUBLISHED YET !!! |
4 | | - |
5 | 3 | This project demonstrates how to build docker images using |
6 | | -Command Central 10.1 Docker Builder. |
| 4 | +Command Central Docker Builder. |
7 | 5 |
|
8 | 6 | ## Overview |
9 | 7 |
|
10 | | -Command Central Docker Builder is an offical tool provided by Software AG |
11 | | -on Docker Store (link to store). It leverages Command Central templates to run |
12 | | -provisioning operations during Docker image build driven from a standard |
13 | | -Dockerfile. |
| 8 | +Command Central Docker Builder is an tool provided by Software AG |
| 9 | +on [Docker Store](https://store.docker.com/). It leverages Command Central templates to run |
| 10 | +provisioning operations during Docker image build, driven from a standard Dockerfile. |
| 11 | + |
| 12 | +## Configuration |
14 | 13 |
|
15 | | -## Quick Start |
| 14 | +Modify [init.yaml](init.yaml) to configure product and fix repositories, poiting to Master 10.1 repostories on Empower using your Empower credentials or point to your local 10.1 mirrors |
16 | 15 |
|
17 | | -Requirements: |
| 16 | +```yaml |
| 17 | + product: |
| 18 | + products: |
| 19 | + location: http://sdc.softwareag.com/dataservewebM101/repository/ |
| 20 | + username: you@company.com |
| 21 | + password: yourpass |
| 22 | + fix: |
| 23 | + Empower: |
| 24 | + username: you@company.com |
| 25 | + password: yourpass |
| 26 | +``` |
18 | 27 |
|
19 | | -* Docker Engine 17.09.0-ce |
20 | | -* Software AG Empower credentials for software download center |
| 28 | +## Building images |
21 | 29 |
|
22 | | -Get project source and provide your Empower credentials |
23 | | -using environment variables: |
| 30 | +To build images using Command Central composite template run |
24 | 31 |
|
25 | 32 | ```bash |
26 | | -git clone ... |
27 | | -export EMPOWER_USR=yourempoweruser@youcompany.com |
28 | | -export EMPOWER_PWD=yourempowerpassword |
| 33 | +docker-compose build |
29 | 34 | ``` |
30 | 35 |
|
31 | | -Below are examples of how to build different flavours of webMethods Microservices Container images. |
| 36 | +See [template.yaml](template.yaml) for basic webMethods Microservices Container (MSC) runtime instance definition. |
32 | 37 |
|
33 | | -## Building and testing simple base image |
| 38 | +There are 3 flavors of images: |
34 | 39 |
|
35 | | -See [template.yaml] for basic webMethods Microservices Container (MSC) runtime instance definition. |
| 40 | +* [Simple](Dockerfile.simple) - easy way to build images |
| 41 | +* [Unmanaged](Dockerfile.unmanaged) - customized image without SPM management agent |
| 42 | +* [Managed](Dockerfile.managed) - customized image with SPM management agent |
| 43 | + |
| 44 | +Check image sizes: |
36 | 45 |
|
37 | 46 | ```bash |
38 | | -export COMPOSE_PROJECT_NAME=sagdevopsccdockerbuilder |
39 | | -export COMPOSE_FILE=simple.yml |
40 | | -docker-compose build |
41 | | -docker images sagdevopsccdockerbuilder_simple |
42 | | -docker-compose up -d |
| 47 | +docker images |
43 | 48 | ``` |
44 | 49 |
|
45 | | -Wait 30 seconds and open [http://localhost:5551/] and login as Administrator/manage |
46 | | - |
47 | | -## Building and testing unmanaged image |
| 50 | +## Running containers |
48 | 51 |
|
49 | | -IMPORTANT: build the simple image first. |
50 | | - |
51 | | -Unmanaged image does not include Command Central agent (SPM) and thus cannot be managed |
52 | | -by Command Central, but can be managed by an orchestration tool of your choice. |
| 52 | +Run all 3 types of containers: |
53 | 53 |
|
54 | 54 | ```bash |
55 | | -export COMPOSE_FILE=unmanaged.yml |
56 | | -docker-compose build |
57 | | -docker images sagdevopsccdockerbuilder_unmanaged |
58 | | -docker-compose up -d |
| 55 | +docker-compose up -d simple unmanaged managed |
59 | 56 | ``` |
60 | 57 |
|
61 | | -Wait 30 seconds and open [http://localhost:5552/] and login as Administrator/manage |
| 58 | +Wait up to 1 minute and access them as: |
| 59 | + |
| 60 | +* Simple - [http://0.0.0.0:5551/](http://0.0.0.0:5551/) |
| 61 | +* Unmanaged - [http://0.0.0.0:5552/](http://0.0.0.0:5552/) |
| 62 | +* Managed - [http://0.0.0.0:5553/](http://0.0.0.0:5553/) |
| 63 | + |
| 64 | +Login as Administrator/manage |
| 65 | + |
| 66 | +## Simple image |
62 | 67 |
|
63 | | -## Buiding and testing managed image |
| 68 | +There is no size optimization for this image but it is the easiest to build. |
| 69 | +Suitable for ad-hoc testing. |
64 | 70 |
|
65 | | -IMPORTANT: build the simple image first. |
| 71 | +Simple image comes with SPM and thus can be managed in Command Central. |
| 72 | + |
| 73 | +## Unmanaged image |
| 74 | + |
| 75 | +Unmanaged image does not include management agent (SPM) and thus cannot be managed |
| 76 | +by Command Central, but can be managed by an orchestration tool of your choice. |
| 77 | + |
| 78 | +## Managed image |
66 | 79 |
|
67 | 80 | Managed image includes Command Central agent (SPM) and thus: |
68 | 81 |
|
69 | 82 | * You can monitor, administer and even configure it in Command Central |
70 | 83 | * And still managed by an orchestration tool of your choice |
71 | 84 |
|
72 | | -Bring up Command Central first |
73 | | - |
74 | | -```bash |
75 | | -export COMPOSE_FILE=managed.yml |
76 | | -docker-compose run --rm init |
77 | | -``` |
78 | | - |
79 | | -When the above command completes successfully |
80 | | -open [https://localhost:8091/] and login as Administrator/manage to Command Central. |
| 85 | +Open [Command Central](https://0.0.0.0:8091/) to see simple and managed containers in |
| 86 | +the maganed landscape. |
81 | 87 |
|
82 | | -Build and run managed container |
| 88 | +You can run tests against them using Command Central API: |
83 | 89 |
|
84 | 90 | ```bash |
85 | | -docker-compose build |
86 | | -docker images sagdevopsccdockerbuilder_managed |
87 | 91 | docker-compose run --rm test |
88 | 92 | ``` |
89 | 93 |
|
90 | | -When the above command completes successfully |
91 | | -open [http://localhost:5553/] and login as Administrator/manage |
92 | | - |
93 | | -Also check out the containter and managed runtime in Command Central. |
94 | | - |
95 | 94 | Tail the logs if you need to |
96 | 95 |
|
97 | 96 | ```bash |
98 | 97 | docker-compose logs -f |
99 | 98 | ``` |
100 | 99 |
|
101 | | -Cleanup |
| 100 | +## Cleanup |
102 | 101 |
|
103 | 102 | ```bash |
104 | 103 | docker-compose down |
105 | 104 | ``` |
| 105 | + |
| 106 | +_______________ |
| 107 | +Contact us at [TECHcommunity](mailto:technologycommunity@softwareag.com?subject=Github/SoftwareAG) if you have any questions. |
| 108 | +_______________ |
| 109 | +DISCLAIMER |
| 110 | +These tools are provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project. |
0 commit comments