Skip to content

Commit 37a15ad

Browse files
Pogrebnyak, SergeiPogrebnyak, Sergei
authored andcommitted
Cleanup and tests
1 parent 830e52b commit 37a15ad

File tree

11 files changed

+304
-130
lines changed

11 files changed

+304
-130
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
RELEASE=10.1

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
sudo: required
2+
3+
services:
4+
- docker
5+
6+
matrix:
7+
- RELEASE=10.1
8+
# - RELEASE=10.2
9+
10+
before_install:
11+
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
12+
# EMPOWER_USERNAME and EMPOWER_PASSWORD must be set in the project settings
13+
- envsubst < init-$RELEASE.yaml.template > init.yaml
14+
15+
script:
16+
- docker-compose build simple
17+
- docker-compose build unmanaged managed
18+
- docker images | grep msc
19+
- docker-compose run --rm init
20+
- docker-compose up -d managed
21+
- docker-compose run --rm test
22+
- docker-compose logs
23+
- docker-compose down

Dockerfile.managed

Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,14 @@
1-
# MUST start with builder image to run provisioning using template.yaml
1+
ARG RELEASE=10.1
2+
FROM simple/msc:$RELEASE as builder
3+
FROM unmanaged/msc:$RELEASE as base
24

3-
#FROM store/softwareag/commandcentral:10.1.0.1-builder as builder
4-
FROM sagdevopsccdockerbuilder_simple as builder
5-
6-
# ADOPTED from docker file created by running /opt/softwareag/IntegrationServer/docker/is_container.sh createDockerfile
7-
FROM centos:7
8-
9-
ENV SAG_HOME=/opt/softwareag
10-
ENV JAVA_HOME $SAG_HOME/jvm/jvm/
11-
ENV JRE_HOME $SAG_HOME/jvm/jvm/jre/
12-
ENV INSTANCE_NAME=default
13-
14-
WORKDIR $SAG_HOME
15-
16-
COPY --from=builder $SAG_HOME/jvm/jvm/ $SAG_HOME/jvm/jvm/
17-
18-
COPY --from=builder $SAG_HOME/install/jars/ $SAG_HOME/install/jars/
19-
COPY --from=builder $SAG_HOME/install/profile/ $SAG_HOME/install/profile/
20-
COPY --from=builder $SAG_HOME/install/products/ $SAG_HOME/install/products/
21-
22-
COPY --from=builder $SAG_HOME/Licenses/sagosch $SAG_HOME/Licenses/sagosch
23-
24-
COPY --from=builder $SAG_HOME/common/bin/ $SAG_HOME/common/bin/
25-
COPY --from=builder $SAG_HOME/common/conf/ $SAG_HOME/common/conf/
26-
COPY --from=builder $SAG_HOME/common/db/ $SAG_HOME/common/db/
27-
COPY --from=builder $SAG_HOME/common/lib/ $SAG_HOME/common/lib/
28-
COPY --from=builder $SAG_HOME/common/runtime/ $SAG_HOME/common/runtime/
29-
30-
COPY --from=builder $SAG_HOME/WS-Stack/ $SAG_HOME/WS-Stack/
31-
32-
COPY --from=builder $SAG_HOME/IntegrationServer/bin/ $SAG_HOME/IntegrationServer/bin/
33-
COPY --from=builder $SAG_HOME/IntegrationServer/lib/ $SAG_HOME/IntegrationServer/lib/
34-
COPY --from=builder $SAG_HOME/IntegrationServer/updates/ $SAG_HOME/IntegrationServer/updates/
35-
COPY --from=builder $SAG_HOME/IntegrationServer/.tc.dev.log4j.properties $SAG_HOME/IntegrationServer/.tc.dev.log4j.properties
36-
37-
# instances
38-
COPY --from=builder $SAG_HOME/IntegrationServer/instances/ $SAG_HOME/IntegrationServer/instances/
39-
# profile
40-
COPY --from=builder $SAG_HOME/profiles/IS_${INSTANCE_NAME}/ $SAG_HOME/profiles/IS_${INSTANCE_NAME}/
41-
42-
EXPOSE 5555 9999
43-
44-
LABEL com.softwareag.product="IntegrationServer" \com.softwareag.product.version="10.1.0.0" \com.softwareag.webmethodscloud.primaryPort="5555"
45-
46-
ADD *.sh $SAG_HOME/profiles/IS_$INSTANCE_NAME/bin/
47-
48-
ENTRYPOINT $SAG_HOME/profiles/IS_$INSTANCE_NAME/bin/entrypoint.sh
5+
# add SPM and CLI binaries
6+
COPY --from=builder $SAG_HOME/profiles/SPM/ $SAG_HOME/profiles/SPM/
7+
COPY --from=builder $SAG_HOME/CommandCentral/client/ $SAG_HOME/CommandCentral/client/
498

50-
### ADD management support
9+
# CLI support
5110
ENV CC_CLI_HOME=$SAG_HOME/CommandCentral/client
5211
ENV PATH=$PATH:$CC_CLI_HOME/bin
53-
COPY --from=builder $SAG_HOME/profiles/SPM/ $SAG_HOME/profiles/SPM/
54-
COPY --from=builder $SAG_HOME/CommandCentral/client/ $SAG_HOME/CommandCentral/client/
12+
13+
# SPM ports
5514
EXPOSE 8092 8093
56-
### end manage

Dockerfile.simple

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# MUST start with builder image to provision using template.yaml
2-
FROM store/softwareag/commandcentral:10.1.0.1-builder as builder
2+
ARG RELEASE=10.1
3+
FROM store/softwareag/commandcentral:$RELEASE-builder as builder
34

45
# this is default/lazy option for building images
56

Dockerfile.unmanaged

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# MUST start with builder image to run provisioning using template.yaml
2-
# FROM store/softwareag/commandcentral:10.1.0.1-builder as builder
3-
FROM sagdevopsccdockerbuilder_simple as builder
1+
ARG RELEASE=10.1
2+
FROM simple/msc:$RELEASE as builder
43

5-
# ADOPTED from docker file created by running /opt/softwareag/IntegrationServer/docker/is_container.sh createDockerfile
4+
# ADAPTED from docker file created by running /opt/softwareag/IntegrationServer/docker/is_container.sh createDockerfile
65
FROM centos:7
76

87
ENV SAG_HOME=/opt/softwareag
@@ -35,13 +34,12 @@ COPY --from=builder $SAG_HOME/IntegrationServer/.tc.dev.log4j.properties $SAG_HO
3534

3635
# instances
3736
COPY --from=builder $SAG_HOME/IntegrationServer/instances/ $SAG_HOME/IntegrationServer/instances/
38-
# profile
3937
COPY --from=builder $SAG_HOME/profiles/IS_${INSTANCE_NAME}/ $SAG_HOME/profiles/IS_${INSTANCE_NAME}/
4038

4139
EXPOSE 5555 9999
4240

4341
LABEL com.softwareag.product="IntegrationServer" \com.softwareag.product.version="10.1.0.0" \com.softwareag.webmethodscloud.primaryPort="5555"
4442

45-
ADD *.sh $SAG_HOME/profiles/IS_$INSTANCE_NAME/bin/
43+
ADD *.sh $SAG_HOME/
4644

47-
ENTRYPOINT $SAG_HOME/profiles/IS_$INSTANCE_NAME/bin/entrypoint.sh
45+
ENTRYPOINT $SAG_HOME/entrypoint.sh

README.md

Lines changed: 132 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ Login to Docker with your Docker ID from your console and verify you can downloa
1818

1919
```bash
2020
docker login
21-
docker pull store/softwareag/commandcentral:10.1.0.1-server
21+
docker pull store/softwareag/commandcentral:10.1-server
2222
```
2323

24-
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
24+
Copy [init-10.1.yaml.template](init.yaml.template) into init.yaml files and modify it
25+
with your Empower credentials (email and password):
2526

2627
```yaml
2728
product:
@@ -36,93 +37,190 @@ Modify [init.yaml](init.yaml) to configure product and fix repositories, poiting
3637
password: yourpass
3738
```
3839
39-
Add your 10.1 webMethods Microservices Container license file to the current folder as ```licenseKey.xml``` file.
40+
For CI you can use the following method:
41+
42+
```bash
43+
export RELEASE=10.1
44+
export EMPOWER_USERNAME=you@company.com
45+
export EMPOWER_PASSWORD=youpass
46+
envsubst < init-$RELEASE.yaml.template > init.yaml
47+
```
4048

4149
## Building images
4250

43-
To build images using Command Central composite template run
51+
To build simple image using Command Central composite template run:
4452

4553
```bash
46-
docker-compose build
54+
docker-compose build simple
55+
56+
...
57+
Successfully tagged managed/msc:10.1
4758
```
4859

49-
See [template.yaml](template.yaml) for basic webMethods Microservices Container (MSC) runtime instance definition.
60+
It may take up to 20 minutes to download the binaries and build the image.
61+
62+
While it is building, check out [template.yaml](template.yaml) that is used for building
63+
this image with basic webMethods Microservices Container (MSC) runtime instance definition.
5064

5165
There are 3 flavors of images:
5266

5367
* [Simple](Dockerfile.simple) - easy way to build images
5468
* [Unmanaged](Dockerfile.unmanaged) - customized image without SPM management agent
5569
* [Managed](Dockerfile.managed) - customized image with SPM management agent
5670

71+
Build the second and third by running:
72+
73+
```bash
74+
docker-compose build unmanaged managed
75+
...
76+
Successfully tagged managed/msc:10.1
77+
```
78+
5779
Check image sizes:
5880

5981
```bash
60-
docker images
82+
docker images | grep msc
83+
84+
managed/msc 10.1 195596d9c020 Less than a second ago 1.56GB
85+
unmanaged/msc 10.1 3009317db4a8 Less than a second ago 1.52GB
86+
simple/msc 10.1 cfe3a4674b31 6 minutes ago 2.5GB
6187
```
6288

89+
### Simple image
90+
91+
There is no size optimization for this image but it is the easiest to build.
92+
Suitable for ad-hoc testing.
93+
94+
Simple image comes with SPM and thus can be managed in Command Central.
95+
96+
### Unmanaged image
97+
98+
Unmanaged image does not include management agent (SPM) and thus cannot be managed
99+
by Command Central, but can be managed by an orchestration tool of your choice.
100+
101+
### Managed image
102+
103+
Managed image includes Command Central agent (SPM) and thus:
104+
105+
* You can monitor, administer and even configure it in Command Central
106+
* And still manage by an orchestration tool of your choice
107+
* Adds only a small overhead in terms of image size (~40mb) and a second process within the container
108+
63109
## Running containers
64110

65-
Start Command Central container first
111+
Let run containers from the images we just built.
66112

67-
```bash
68-
docker-compose run --rm init
113+
### Providing license file
114+
115+
If you want the containers to run for more than 30 minutes, provide a valid Software AG license file:
116+
117+
* Copy 10.x webMethods Microservices Container or Integration Server license to the current folder and save it as ```licenseKey.xml``` file.
118+
* Uncomment volume mappings for the license file in docker-compose.yml:
119+
120+
```yaml
121+
volumes:
122+
- ./licenseKey.xml:/opt/softwareag/IntegrationServer/instances/default/config/licenseKey.xml
69123
```
70124
71-
Start all 3 types of containers we just built:
125+
If you don't have your license handy, just skip this step.
126+
127+
### Running unmanaged containers
128+
129+
Start unmanaged container by simply running this command:
72130
73131
```bash
74-
docker-compose up -d
132+
docker-compose up -d unmanaged
133+
134+
...
135+
sagdevops-cc-docker-builder_cc_1 is up-to-date
136+
Creating sagdevops-cc-docker-builder_unmanaged_1 ... done
75137
```
76138

77-
Wait up to 2 minutes and access them as:
139+
Wait until container comes up.
140+
You can monitor the log using this command until you this ONLINE statement:
141+
142+
```bash
143+
docker-compose logs -f unmanaged
144+
145+
...
146+
unmanaged_1 | Integration Server is ONLINE at ...
147+
```
78148

79-
* Simple - [http://0.0.0.0:5551/](http://0.0.0.0:5551/)
80-
* Unmanaged - [http://0.0.0.0:5552/](http://0.0.0.0:5552/)
81-
* Managed - [http://0.0.0.0:5553/](http://0.0.0.0:5553/)
149+
Stop tailing the log by pressing Ctrl+C.
82150

151+
Open Integration Server Admin UI at [http://0.0.0.0:5552/](http://0.0.0.0:5552/)
83152
Login as Administrator/manage
84153

85-
## Simple image
154+
Congratuations!
86155

87-
There is no size optimization for this image but it is the easiest to build.
88-
Suitable for ad-hoc testing.
156+
This is your custom-built webMethods Microservices Runtime container for 10.1 with the latest fixes
157+
and basic configuration.
89158

90-
Simple image comes with SPM and thus can be managed in Command Central.
159+
### Running managed containers
91160

92-
## Unmanaged image
161+
To take advantage of the management capabilities privided by Command Central
162+
we can run managed containers.
93163

94-
Unmanaged image does not include management agent (SPM) and thus cannot be managed
95-
by Command Central, but can be managed by an orchestration tool of your choice.
164+
Start Command Central container first:
165+
166+
```bash
167+
docker-compose run --rm init
168+
...
169+
Alias Name Status Url Host Url Port Location Id Installation Type
170+
local Local ONLINE localhost 8092
171+
The expected values were successfully retrieved after 13 calls within 181 seconds.
172+
```
96173

97-
## Managed image
174+
Wait until the command completes.
98175

99-
Managed image includes Command Central agent (SPM) and thus:
176+
Open [Command Central](https://0.0.0.0:8091/) and login as Administrator/manage.
100177

101-
* You can monitor, administer and even configure it in Command Central
102-
* And still manage by an orchestration tool of your choice
178+
> NOTE that Command Central images comes from Docker Store. We did not build or customize it anyhow.
179+
180+
Click on the Installations tab and notice that the list of managed installations includes only 'local' node.
103181

104-
Open [Command Central](https://0.0.0.0:8091/) to see simple and managed containers in
182+
to see simple and managed containers in
105183
the maganed landscape.
106184

107-
You can run tests against them using Command Central API:
185+
Start managed container by running:
108186

109187
```bash
110-
docker-compose run --rm test
188+
docker-compose up -d managed
189+
docker-compose logs -f managed
190+
191+
...
192+
managed_1 | Registering 'msc' with Command Central server 'cc' ...
193+
managed_1 | 200 OK
194+
195+
managed_1 | 2018-05-04 17:04:55 UTC [ISP.0046.0012I] Enabling HTTP Listener on port 5555
196+
...
197+
managed_1 | Integration Server is ONLINE at http://9eef625c9410:5555/
111198
```
112199

113-
Tail the logs if you need to
200+
Stop tailing the log by pressing Ctrl+C.
201+
202+
Check Command Central Web UI Installations and Instances tabs and notice
203+
Integration Server runtime instance is automatialy discovered and registred
204+
within Command Central managed landscape.
205+
206+
Open Integration Server Admin UI at [http://0.0.0.0:5553/](http://0.0.0.0:5553/)
207+
Login as Administrator/manage
208+
209+
Run simple smoke tests against managed containers using Command Central API:
114210

115211
```bash
116-
docker-compose logs -f
212+
docker-compose run --rm test
117213
```
118214

215+
See 'test' container command in docker-compose.yml for details.
216+
119217
## Cleanup
120218

121219
```bash
122220
docker-compose down
123221
```
124222

125-
## Adoping templates to work with Command Central Docker Builder 10.1
223+
## Adapting templates to work with Command Central Docker Builder 10.1
126224

127225
> Command Central Docker Builder 10.1 has the following requirements for the template.yaml:
128226
@@ -133,7 +231,7 @@ docker-compose down
133231

134232
See the difference between [adopted template.yaml](template.yaml) and [original template.yaml](https://github.com/SoftwareAG/sagdevops-templates/blob/master/templates/sag-msc-server/template.yaml) for MSC basic template.
135233

136-
> The above limitations are planned to be removed in the upcoming Command Central Builder release to allow seamless use of the same templates for VMs and containers
234+
> The above limitations will be removed removed in the upcoming releases of Command Central Builder 10.2 to allow seamless use of the same templates for VMs and containers
137235
138236
## Troubleshooting
139237

0 commit comments

Comments
 (0)