Giter Site home page Giter Site logo

sap-commerce-tools / ccv1-ansible Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 2.0 14 KB

Ansible playbooks to deploy a CCv1 (aka. "Commerce Cloud on SAP infrastructure") package to "open" environments

License: Apache License 2.0

sap-hybris hybris hybris-commerce-suite hcs ansible-playbooks hcs-environment sap-commerce hybris-servers commerce-cloud sap

ccv1-ansible's Introduction

Archived on 2020-02-16
I recently switched jobs away from SAP Commerce development

Ansible Playbooks for Commerce Cloud v1

ko-fi

Here you can find Ansbile playbooks to install a hcs deployment package to open environments

It only supports stop-the-world deployments for now, with or without running hybris update.

Following optimizations are present:

Prerequisites

  • hcs VPN connection
  • hcs ssh access
    (use the file group_vars/all to define the default login user, or setup ~/.ssh/config)
  • hcs user has sudo rights (can change to root and hybris)

Tips and Tricks

  • keep a separate inventory file for every hcs environment, to minimize the possibility for errors
  • please use the same inventory structure as outlined in the file inventory_example

Usage

Step 1: Install new release on every hybris server

ansible-playbook -i <inventory> install-release.yaml --extra-vars "package=<package name>"

This command sets up a new version on every hybris server (target folder: /opt/{{package}}), with configurations, symlinks etc. as recommended by hcs

The package is validated before installation, as is the available disk sapce (Default: at least 2.5 GiB must be free, see variable minimal_available_space defined in group_vars/hybris)

The playbook assumes that the package (zip file and md5 checksum file, as defined in the package structure) is already available in your hcs environment (uploaded to /NFS_DATA/deployment/<package name>.{md5,zip})

If you want to automate the upload too, define the path where the new package files (zip, md5) are ready to upload using the variable hcs_artifact_folder
(see file group_vars/hybris for a commented example).

Parameter Description
<inventory> Which inventory to use, in other words, which environment to deploy to
package=<package name> Name of the package (filename without the .zip extension)

Example

ansible-playbook -i dev install-release.yaml --extra-vars "package=acme-ts_v1.0.0"

Step 2: Activate (new) release

ansible-playbook -i <inventory> activate-release.yaml --extra-vars "package=<package name> update=True|False"

Configures the specified version (available in folder /opt/{{package}}) as the new active installation on all hybris servers, and optionally performs a hybris update running system

Since activating a new release is separate from installing, you can easily roll back to a previous version in case something goes wrong.

Parameter Description
<inventory> Which inventory to use, in other words: which environment to deploy to
package=<package name> Name of the package (filename without the .zip extension)
update=True|False Run hybris update?

Example

ansible-playbook -i qa activate-release.yaml --extra-vars "package=acme-ts_v1.0.0 update=true"

Notes

If the file /opt/{{package}}/data/misc/update.json is available, the hybris update will use this file as configuration (using ant updatesystem -DconfigFile=...). Otherwise, a default hybris update (ant updatesystem without any parameters) is executed.

Delete old releases

ansible-playbook -i <inventory> delete-release.yaml --extra-vars "package=<package name>"

Deletes files in /NFS_DATA/deployment and /opt (on every node) related to a package.

Parameter Description
<inventory> Which inventory to use, in other words: which environment to deploy to
package=<package name> Name of the package (filename without the .zip extension)

Example

ansible-playbook -i qa delete-release.yaml --extra-vars "package=acme-ts_v1.0.0"

ccv1-ansible's People

Contributors

mpern avatar mpern-sap avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mikolayek bersanf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.