Skip to content

Commit

Permalink
Merge pull request #4 from SoftwareAG/develop
Browse files Browse the repository at this point in the history
10.2 GA
  • Loading branch information
sergeipogrebnyak committed Apr 18, 2018
2 parents 3f0ba36 + d805269 commit 02dbcea
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 53 deletions.
21 changes: 14 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
sudo: required

env:
- RELEASE=10.1
global:
- TARGET_REGISTRY=sergeipogrebnyak
matrix:
- RELEASE=10.2 SOURCE_REGISTRY=store/softwareag
- RELEASE=10.1 SOURCE_REGISTRY=store/softwareag

services:
- docker

before_install:
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- docker pull store/softwareag/commandcentral:$RELEASE-server
- docker pull store/softwareag/commandcentral:$RELEASE-node
- docker pull $SOURCE_REGISTRY/commandcentral:$RELEASE-server
- docker pull $SOURCE_REGISTRY/commandcentral:$RELEASE-node
- docker network create ccnetwork

script:
- docker build -t sergeipogrebnyak/commandcentral:$RELEASE-server .
- docker run --name cc -d -p 127.0.0.1:8091:8091 --network ccnetwork sergeipogrebnyak/commandcentral:$RELEASE-server
- docker run --name n1 -d --network ccnetwork -e CC_AUTO_REGISTER=0 store/softwareag/commandcentral:$RELEASE-node
# - docker-compose run --rm init
# - docker-compose down
- docker build --build-arg SOURCE_REGISTRY=$SOURCE_REGISTRY --build-arg RELEASE=$RELEASE -t $TARGET_REGISTRY/commandcentral:$RELEASE-server .
- docker run --name cc -d -p 127.0.0.1:8091:8091 --network ccnetwork $TARGET_REGISTRY/commandcentral:$RELEASE-server
- docker run --name n1 -d --network ccnetwork -e CC_AUTO_REGISTER=0 $SOURCE_REGISTRY/commandcentral:$RELEASE-node
- docker exec cc sagcc list landscape nodes local -e ONLINE -w 180
- docker exec cc sagcc add landscape nodes alias=n1 url=http://n1:8092 -e OK
- docker exec cc sagcc list landscape nodes n1 -e ONLINE -w 180
- docker stop n1 cc && docker rm n1 cc

after_success:
# - if [ "$TRAVIS_BRANCH" == "master" ]; then
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD";
- docker push sergeipogrebnyak/commandcentral:$RELEASE-server;
- docker push $TARGET_REGISTRY/commandcentral:$RELEASE-server;
# fi
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM store/softwareag/commandcentral:10.1-server
ARG SOURCE_REGISTRY=store/softwareag
ARG RELEASE=10.2

FROM $SOURCE_REGISTRY/commandcentral:$RELEASE-server
# customize Command Central settings example
RUN echo com.softwareag.platform.management.client.template.composite.skip.restart.runtimes=true>>$SAG_HOME/profiles/CCE/configuration/config.ini
65 changes: 36 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ Login to Docker with your Docker ID from your console and verify you can downloa

```bash
docker login
docker pull store/softwareag/commandcentral:10.1-server
```
docker pull store/softwareag/commandcentral:10.2-server

## Starting a default Command Central server

Expand All @@ -23,7 +22,7 @@ docker network create ccnetwork
You can start new Command Central server by running the container:

```bash
docker run --name cc -d -p 8091 --network ccnetwork store/softwareag/commandcentral:10.1-server
docker run --name cc -d -p 8091 --network ccnetwork store/softwareag/commandcentral:10.2-server
```

Run ```docker port cc``` command to find out its published port
Expand All @@ -33,7 +32,15 @@ Run ```docker port cc``` command to find out its published port
```

This will start an empty Command Central with the HTTPS port exposed.
Open published port in the browser, for example https://0.0.0.0:32769/

To check the Command Central container logs run ```docker logs cc```.
The output should look similiar to this:

```bash
2018/04/17 23:00:42 INFO # Command Central version: 10.2.0.0001-0195
```

Open published port in the browser, for example https://0.0.0.0:32769/
to see Command Central login page.

Login with default credentials as Administrator/manage.
Expand Down Expand Up @@ -61,66 +68,66 @@ For development or testing purposes you can launch an empty Software AG managed
Run Command Central node container on the 'ccnetwork' network:

```bash
docker run --name n1 -d -P --network ccnetwork store/softwareag/commandcentral:10.1-node
docker run --name n102 -d -P --network ccnetwork store/softwareag/commandcentral:10.2-node
```

By default node container will auto register itself with Command Central using
container's internal id.
After a minute or so the managed node status will change to green (ONLINE).
NOTE that you can add launch and register older versions of Softwarte AG managed installation
for which a corresponding docker image is available. For example
```bash
docker run --name n101 -d -P --network ccnetwork store/softwareag/commandcentral:10.1-node
```
## Create custom Command Central image
You tune up certain aspects of Command Central by modifying its configuration files and creating a custom image with the changes.
You can tune up certain aspects of Command Central by modifying its configuration files and creating a custom image with the changes.
For example, you can optimize your local template development or CI process by instructing Command Central to skip restart of runtimes at the end of composite template application.
For example, you can optimize Command Central for template development or CI process by instructing Command Central to skip restart
of runtimes at the end of composite template application, register repositories and license files:
```dockerfile
FROM store/softwareag/commandcentral:10.1-server
FROM store/softwareag/commandcentral:10.2-server
# skip runtimes restart
RUN echo com.softwareag.platform.management.client.template.composite.skip.restart.runtimes=true>>$SAG_HOME/profiles/CCE/configuration/config.ini
```
Build the image and run the container:
```bash
docker build -t my/ccserver:10.1 .
docker run --name cc -d -p 8091 --network ccnetwork my/ccserver:10.1
docker build -t my/ccserver:10.2 .
docker run --name mycc -d -p 8091 --network ccnetwork my/ccserver:10.2
```
Use it in your DEV/CI pipeline:
```bash
docker exec cc sagcc exec composite templates apply mytemplate
docker exec mycc sagcc exec composite templates apply mytemplate
```
## Using docker-compose files for dev and test environments
Run example init service from ```docker-compose.yml``` file:
```bash
export EMPOWER_USERNAME=you@company.com
export EMPOWER_PASSWORD=****
export CC_PASSWORD=****
docker-compose run --rm init
```
The init service will bring up Command Central container and two
test managed nodes.

When it's done running open [Command Central Web UI](https://0.0.0.0:8091)

Command Central will show two nodes:

* one auto-registered with container id as node alias
* second one registered with as 'test2'
The init service will:
After a minute or so they both will come online.
* Create and start Command Central container
* Create, start and register a test managed node
* Register master product and fix repositories with provided Empower credentials
Install, patch, configure and use Software AG software on these
test nodes. Recycle them when no longer needed:

```bash
docker-compose stop test1 test2
docker-compose rm test1 test2
```
When it's done running open [Command Central Web UI](https://0.0.0.0:8091)

## Configuring Command Central

Expand All @@ -133,7 +140,7 @@ Please see [Command Central](https://github.com/SoftwareAG/sagdevops-cc-server)
## Building Docker images using Command Central Builder

You can build custom images with Software AG software using
softwareag/commandcentral:10.1-builder image and Command Central templates.
softwareag/commandcentral:10.2-builder image and Command Central templates.

Please see [Command Central Docker builder](https://github.com/SoftwareAG/sagdevops-cc-docker-builder) project.

Expand Down
31 changes: 15 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,38 @@ version: "3"

services:
cc:
image: store/softwareag/commandcentral:10.1-server
image: store/softwareag/commandcentral:10.2-server
ports:
- "8090:8090"
- "8091:8091"
environment:
- CC_PASSWORD

test1:
image: store/softwareag/commandcentral:10.1-node
image: store/softwareag/commandcentral:10.2-node
ports:
- "5555:5555" # IS
- "9000:9000" # UM
- "8585:8585" # MWS
- "8072:8072" # Applatform
environment:
- CC_AUTO_REGISTER=1 # auto-registration
depends_on:
- cc

test2:
image: store/softwareag/commandcentral:10.1-node
environment:
- CC_AUTO_REGISTER=0 # no auto-registration
- CC_SERVER=cc
- CC_PASSWORD
depends_on:
- cc

init:
image: store/softwareag/commandcentral:10.1-server
image: store/softwareag/commandcentral:10.2-server
environment:
- CC_SERVER=cc
command: # any client command againt a remote server
sagcc add landscape nodes alias=test2 url=https://test2:8093 -e 200
- CC_PASSWORD
- EMPOWER_USERNAME
- EMPOWER_PASSWORD
depends_on:
- test1
- test2
- cc
- test1
command: >
bash -c "
sagcc list landscape nodes --wait-for-cc &&
sagcc add repository products name=webMethods-10.2 location=http://sdc.softwareag.com/dataservewebM102/repository username=$EMPOWER_USERNAME password=$EMPOWER_PASSWORD &&
sagcc add repository fixes name=Empower location=http://sdc.softwareag.com/updatges/prodRepo username=$EMPOWER_USERNAME password=$EMPOWER_PASSWORD
"

0 comments on commit 02dbcea

Please sign in to comment.