SamirM-BE / cc-sagdevops

Automated product fixes and installation by using command central

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Command Central 10.1 server setup

This project automates Command Central 10.1 setup:

  • Downloads latest fix level bootstrap installer for your platform
  • Runs bootstrap installer
  • Configures HTTP/S proxy
  • Registers master repositories
  • Uploads license keys
  • Uploads product and fix images
  • Creates mirror repositories

You can also use this project to maintain your Command Central installation:

  • Pull the latest fixes and products into mirror repositories
  • Update Command Central to the latest patch level
  • Upgrade Command Central to a new release (from 9.x to 10.1)
  • Start/stop/restart Command Central
  • Check jobs status and tail the logs

Requirements

  • Git client
  • Internet access

To get started clone or fork this project (you will need to customize it) and run git submodule initialization procedure to pull antcc library

git clone --recursive https://github.com/SoftwareAG/sagdevops-cc-server
cd sagdevops-cc-server

Bootstrap Command Central client

TIP: If you have Java 1.8+ and Apache Ant 1.9+ you can skip this section.

If you don't have Java or Ant on your system you can download and bootstrap just the client that comes with Java and Ant distribution

For Linux:

curl -O http://empowersdc.softwareag.com/ccinstallers/cc-def-10.1-fix1-lnxamd64.sh
chmod +x cc-def-10.1-fix1-lnxamd64.sh
./cc-def-10.1-fix1-lnxamd64.sh -D CLI -d ~/.sag/cli
source ~/.bashrc

For Windows:

Verify by running in a new shell window:

sagccant -version # MUST be 1.9+

Bootstrap Command Central server using Ant wrapper

To use bootstrap Ant wrapper script you need:

Verify by running:

java -version # MUST be 1.8+
ant -version  # MUST be 1.9+

Bootstrap the latest version of Command Central 9.12:

ant boot -Daccept.license=true

IMPORTANT: By setting accept.license=true property you are accepting End User License Agreement

The command will download the bootstrap installer for your operating system and run it for you. This may take up to 30 minutes. Then the installer is executed and the output would look like this:

[exec] ####
[exec] #### You can logon to Command Central Web UI as Administrator/manage
[exec] ####
[exec] ####     https://localhost:8091/cce/web
[exec] ####
[exec] #### You can also explore Command Central CLI commands by running from a NEW shell:
[exec] ####
[exec] ####     sagcc --help
[exec] ####

Open Command Central Web UI using the URL printed above and login using the specified credentials.

Verify client connectivity to the Command Central server:

sagccant waitcc

The bootstrap process is complete.

Customizing bootstrap process

You can customize configuration for the bootstrap process.

Copy bootstrap/default.properties into a new YOUR_BOOT_NAME.properties file. Uncomment the following property to accept the license agreement:

accept.license=true

Review and modify any other properties as needed.

Run bootstrap process using the default properties file:

ant boot -Dbootstrap=YOUR_BOOT_NAME

NOTE: most of the properties are applicable only for a new boostrap session. If you already bootstraped Command Central they will NOT apply for this installation. You can re-bootstrap Command Central by running this command:

ant uninstall boot -Dbootstrap=YOUR_BOOT_NAME

The downloaded bootstrap installer file will be reused (not downloaded again).

Customizing Command Central configuration

Configure proxy connection

If you have direct connection to the Internet you can skip this step.

If you have a proxy server copy environments/default/env.properties into a new environments/YOUR_ENV_NAME/env.properties file and update it with your HTTP/S proxy configuration:

proxy.http.host=YOURPROXYHOST
proxy.http.port=8080
proxy.http.nonproxyhosts=localhost|.my.domain

Then run:

sagccant proxy -Denv=YOUR_ENV_NAME

Register master repositories for products and fixes

If this Command Central does not have access to the Internet you can skip this step.

IMPORTANT: Your gateway or development Command Central should have access to the Internet.

To register master repositories Command Central needs your Empower credentials with permissions to download products and fixes.

Run this command to enter the credentials and store them in Command Central:

sagccant credentials

IMPORTANT: If you run this setup on a CI server you can pass credentials via environment variables:

export EMPOWER_USR=you@company.com
export EMPOWER_PWD=empowerpassword
sagccant credentials

See Jenkinsfile for example.

Register all Software AG master repositories in Command Central:

sagccant masters

Verify successful master repositories setup:

sagccant test

Import license keys

If you can skip this step if you plan on adding your license keys for each individual project, however it is recommended to add all your license keys now.

Replace sample licenses/licenses.zip with your licenses.zip archive.

You can customize the location of the licenses archive in environments/YOUR_ENV_NAME/env.properties by setting this property:

licenses.zip.url=http://url/to/licenses.zip

IMPORTANT: the structure of the licenses.zip is not important. Command Central 10.1 will introspect the archive and import found licences with auto generated aliases.

Run this command to import license files:

sagccant licenses -Denv=YOUR_ENV_NAME

You can run this command again any time to add upload new license keys.

Add product and fix images

You can skip this step if you're planning to use only master and mirror repositories.

Use of image repositories is discouraged.

If you want to upload SAG Installer images to Command Central place the image .zip files under ./images/products folder.

If you want to upload SAG Update Manager images place the image .zip files under ./images/fixes folder.

You can customize the location of the images folder in environments/YOUR_ENV_NAME/env.properties by setting this property:

images.dir=/path/to/images/

IMPORTANT: the structure of the images.dir folder must be the following:

products\
    my-9.12-products-lnxamd64.zip
    my-9.12-products-w64.zip
fixes\
    my-9.12-fixes.zip
    my-9.10-fixes.zip

Run this command to upload image files:

sagccant images -Denv=YOUR_ENV_NAME

You can run this command again any time to add upload new images.

Create mirror repositories

You should create mirror repositories to improve provisioning performance.

NOTE: this process may take a long time and requires up to 10GB of space on average per release if you mirror all products.

You can customize which release and which products/fixes to mirror using environments/YOUR_ENV_NAME/env.properties by setting these properties:

release=10.1
# from
mirror.repo.product=webMethods-${release}
mirror.repo.fix=Empower
# which products
mirror.products=productId1,productId2,...
# which platforms
mirror.platforms=W64,LNXAMD64,OSX
# hosting spm URL
#mirror.spm=http://cc:8092

TIP: To find out product ids, open Command Central Web UI, webMethods-${release} repository content view and tick Show ID Column checkbox in the gear menu.

To start mirrors create or update process run:

sagccant mirrors -Denv=YOUR_ENV_NAME

NOTE: fix mirror will download fixes only for the products in your product mirror repository.

You can run this command again any time to pull the latest products/fixes from the upstream repos.

Commit your changes to version control system

IMPORTANT: To ensure your entire customized setup runs cleanly perform end-to-end run:

Adjust 'up' target in build.xml with the targets that are applicable to your setup and run:

sagccant uninstall boot up test -Dboostrap=YOUR_BOOT_NAME -Denv=YOUR_ENV_NAME

The succesful test run will end with something like this:

[au:antunit] Environment configuration: environments/test/env.properties
[au:antunit] ------------- ---------------- ---------------
[au:antunit] Target: test-repos-master-prods took 1.103 sec
[au:antunit] Target: test-repos-master-fixes took 1.092 sec
[au:antunit] Target: test-repos-master-fixes-listing took 10.117 sec
[au:antunit] Target: test-repos-master-prods-listing took 48.337 sec

BUILD SUCCESSFUL
Total time: 41 minutes 27 seconds

Commit your changes to your target version control system, e.g. forked project on github or internal git repo.

Now you can pull and run this project on any other host to perform identical fully automated setup of your customized Command Central server:

sagccant boot up -Dboostrap=YOUR_BOOT_NAME -Denv=YOUR_ENV_NAME

Cleanup

To uninstall Command Central run:

sagccant uninstall -Dboostrap=YOUR_BOOT_NAME

Contact us at TECHcommunity if you have any questions.


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.

About

Automated product fixes and installation by using command central

License:Apache License 2.0


Languages

Language:Groovy 100.0%