Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction

  • JS7 JOC Cockpit can be configured to connect to Git repositories to store its configuration objects such as workflows and jobs.
  • Configuration objects can be versioned (tagged) and can be rolled out to different JS7 instances via Git. This allows to create and to test workflows in a development environment and to perform a rollout to a production environment by use of a Git repository.
  • JOC Cockpit is the leading system to store configuration objects in its database. A connection to a Git repository is considered an additional option to manage versions and rollouts of JS7 configuration objects.

Object Mappings

Configuration Objects

JS7 configuration objects that can be added to a Git repository include

...

  • Job Resources
  • Calendars
  • Schedules

Configuration Mappings

The JS7 inventory is organized by folders.

...

JOC Cockpit maps folders to Git repositories and stores the respective Git repository URL for each folder in its inventory.

Git Access

User Access

Each user holds an individual set of credentials to connect to a Git server.

...

If repositories are used from a number of Git servers that require different sets of user credentials then separate user accounts in JOC Cockpit have to be used.

Repository Access

  • The JS7 - REST Web Service API executes a set of Git operations by use of the JGit implementation.
  • Any operations to add configuration objects to a repository, to commit, push, pull and merge objects are available from the JS7 REST Web Service API.
  • The JOC Cockpit offers the user interface for respective Git operations.
  • Users are free to use additional tools such as Git Extensions to manage repositories and branches.

Git Operations

Management

JS7 configuration objects are managed in a Git repository via the JS7 REST Web Service API.

...

  • git-add
    • adds (new) configuration objects from a working copy to a local repository
  • git-delete
    • removes an already added configuration object from the local repository
  • git-commit
    • commits newly added, updated or removed configuration objects to a local repository
  • git-push
    • pushes changes from the local repository to the remote repository

Versioning

Versioning of JS7 configuration objects is performed by use of the tagging capabilities of Git. 

...

  • git-tag
    • tags the current commit with a version label
  • git-push
    • see above

Rollout

Rollout between different JS7 instances can be performed by use of the Git functionality.

...

  • git-checkout
    • checks out a specific branch or tag from the repository
  • git-clone
    • initially clones a repository
  • git-pull
    • pulls the recent changes from the remote repository to the local repository

Force Overwrite

Forcefully overwrites a target configuration with the source configuration in use.

...

Info
titleNote

If merging of configuration objects between different Git repositories or between different branches of a single Git repository is required then additional tools such as Git Extensions can be used.

Use Cases

Single Client - Single Branch

Scenario

  • Architecture
    • A single JOC Cockpit instance is used with optionally different Controllers and Agents for rollout environments such as dev, test, prod.
    • The Git repository is used per folder to hold a copy of JS7 configuration objects and to create versions of JS7 configuration objects in a single branch.
  • Users
    • All users act in the same JOC Cockpit instance that is a single client to the Git server.
    • Changes to the Git repository are performed by the users' individual accounts to a single branch.
  • Rollout
    • Deployments are performed from a single source (JOC Cockpit) to a number of Controllers and Agents (dev, test, prod).
    • The Git repository can be used to fallback (pull) to previous versions of configuration objects, however, only one version is available with JOC Cockpit at a given point in time.

...

Flowchart
USER1a [label="   User: 1   ",fillcolor="lightskyblue"]
USER1b [label="   User: 2   ",fillcolor="lightskyblue"]
USER1c [label="   User: 3   ",fillcolor="lightskyblue"]
FOLDER1 [label="   Folder: 1   ",fillcolor="white"]
JOC1 [label="   JOC Cockpit   ",fillcolor="lightskyblue"]
DATABASE [shape="ellipse",label="     Database     ",fillcolor="lightskyblue"]
REPO [label="    Git Repository    ",fillcolor="orange"]
BRANCH1 [shape="ellipse",label="    Single Branch    ",fillcolor="orange"]

JOC1 -> FOLDER1 -> BRANCH1 [label="   Commit/Push\nPull   "]
# BRANCH1 -> JOC1 [label="   Pull   "]
BRANCH1 -> REPO

JOC1 -> DATABASE

USER1a -> JOC1
USER1b -> JOC1
USER1c -> JOC1

Repository Operations

  • management
  • versioning
  • rollout

Requirements

  • The JOC Cockpit database is the leading system holding the configuration objects.

Single Client - Multiple Branches (dev, test, prod)

Scenario

  • Architecture
    • A dedicated JOC Cockpit instance is used with each Controller and Agents for each rollout environment such as dev, test, prod.
    • The same Git repository is used per folder by all JOC Cockpit instances, however, each instance is acting on a specific branch per rollout environment.
    • The Git repository is used to hold a copy of JS7 configuration objects, to create versions of JS7 configuration objects and to merge branches such as dev => test, test => prod.
  • Users
    • All users act in the same JOC Cockpit instance of the respective rollout environment that is a single client to the Git server.
    • Changes to the Git repository are performed by the users' individual accounts to a each branch.
  • Rollout
    • Deployments are performed from a single source (JOC Cockpit) to the connected Controller and Agents per rollout environment (dev, test, prod).
    • The Git repository is used to merge branches and to rollout JS7 configuration objects to different Controllers and Agents, such as dev => test => prod.
    • The Git repository can be used to fallback (pull) to previous versions of configuration objects, however, only one version is available with a given JOC Cockpit instance at a given point in time.

...

Flowchart
USER1a [label="   User: 1a   ",fillcolor="lightskyblue"]
USER1b [label="   User: 1b   ",fillcolor="lightskyblue"]
USER2 [label="   User: 2   ",fillcolor="lightskyblue"]
USER3 [label="   User: 3   ",fillcolor="lightskyblue"]

JOC1 [label="   JOC Cockpit: dev   ",fillcolor="lightskyblue"]
JOC2 [label="   JOC Cockpit: test   ",fillcolor="lightskyblue"]
JOC3 [label="   JOC Cockpit: prod   ",fillcolor="lightskyblue"]

FOLDER1 [label="   Folder: 1 (dev)   ",fillcolor="white"]
FOLDER2 [label="   Folder: 1 (test)  ",fillcolor="white"]
FOLDER3 [label="   Folder: 1 (prod)   ",fillcolor="white"]

DATABASE1 [shape="ellipse",label="     Database: dev     ",fillcolor="lightskyblue"]
DATABASE2 [shape="ellipse",label="     Database: test     ",fillcolor="lightskyblue"]
DATABASE3 [shape="ellipse",label="     Database: prod     ",fillcolor="lightskyblue"]
REPO [label="    Git Repository    ",fillcolor="orange"]

BRANCH1 [shape="ellipse",label="    Branch: dev    ",fillcolor="orange"]
BRANCH2 [shape="ellipse",label="    Branch: test    ",fillcolor="orange"]
BRANCH3 [shape="ellipse",label="    Branch: prod    ",fillcolor="orange"]

JOC1 -> DATABASE1
JOC2 -> DATABASE2
JOC3 -> DATABASE3

JOC1 -> FOLDER1 -> BRANCH1 [label="   Commit/Push\nPull   "]
JOC2 -> FOLDER2 -> BRANCH2 [label="   Commit/Push\nPull   "]
JOC3 -> FOLDER3 -> BRANCH3 [label="   Commit/Push\nPull   "]

BRANCH1 -> BRANCH2 [label="  merge   "] 
BRANCH2 -> BRANCH3 [label="   merge   "]

BRANCH1 -> REPO
BRANCH2 -> REPO
BRANCH3 -> REPO

USER1a -> JOC1
USER1b -> JOC1
USER2 -> JOC2
USER3 -> JOC3

Repository Operations

  • management
  • versioning
  • rollout
  • force overwrite

Requirements

  • The JOC Cockpit database holds the configuration objects:
    • each JOC Cockpit instance is connected to its own database.
    • each Git branch is mapped to an individual JOC Cockpit instance.
    • the database can be updated from a Git branch.
  • each Git branch makes use of its own version of configuration objects.

Multiple Clients - Multiple Branches (dev, test, prod)

Scenario

  • Architecture
    • A dedicated JOC Cockpit instance is used with each Controller and Agents for each user in the dev rollout environment.
    • A dedicated JOC Cockpit instance is used with each Controller and Agents for all users in the test and prod rollout environments.
    • The same Git repository is used per folder by all JOC Cockpit instances, however, each instance is acting on a specific branch per rollout environment.
    • The Git repository is used to hold a copy of JS7 configuration objects, to create versions of JS7 configuration objects and to merge branches such as dev => test, test => prod.
  • Users
    • Users act in individual JOC Cockpit instances of the dev rollout environment as multiple clients to the Git server.
    • Users act in the same JOC Cockpit instance of the test and prod rollout environment as a single client to the Git server.
    • Changes to the Git repository are performed by the users' individual accounts to a each branch.
  • Rollout
    • Deployments are performed from a single source (JOC Cockpit) to the connected Controller and Agents per rollout environment (dev, test, prod).
    • The Git repository is used to merge branches and to rollout JS7 configuration objects to different Controllers and Agents, such as dev => test => prod.
    • The Git repository can be used to fallback (pull) to previous versions of configuration objects, however, only one version is available with a given JOC Cockpit instance at a given point in time.

...