Versions Compared

Key

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

...

  • JS7 JOC Cockpit can be configured to interface with Git repositories to store and to rollout its configuration objects such as workflows and jobs.
  • Configuration objects can be versioned (tagged) with Git and can be rolled out to different JS7 environments via Git. This allows to create and to test workflows in a development environment and to perform rollouts to a production environment by use of a Git repository.
  • A connection to a Git repository is considered an additional option to manage versions and rollouts of JS7 configuration objects.
  • The Git Repository Interface is made available in two steps:
    • Display feature availability
      StartingFromRelease2.3.0
       
    • Release 2.3.0: Make JS7 objects available from the file system to allow use of Git tools.
      • Jira
        serverSOS JIRA
        columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
        serverId6dc67751-9d67-34cd-985b-194a8cdc9602
        keyJOC-1144
    • Release 2.4.0: Offer the GUI functionality from JOC Cockpit to manage JS7 objects with Git.
    Display feature availabilityStartingFromRelease2.3.0

Object Mappings

Configuration Objects

...

  • The JS7 - REST Web Service API executes a set of Git operations by use of the GitLab REST APIGit Command Line Client.
  • Any operations to add configuration objects to a repository, to commit, push, pull and to 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.

...

JS7 configuration objects are transparently managed in a Git repository via the JS7 REST Web Service API. In addition, tools such as Git Extensions and Git command line clients can be used for repository operations.

JOC Cockpit holds a local repository per user in number of local repositories inside the JETTY_BASE/resources/joc/reporepositories folder. For each user with Git access a sub-directory is created from the name of the user account that holds the local repository.Each root-level folder in the JS7 Configuration view can be mapped to a Git repository. 

  • The local repository for a JS7 root-level folder The local user repository is created when a user performs the checkout/clone operations operation for a the Git repository via JOC Cockpit.
  • The local user repository is persistent and is updated from the JOC Cockpit database (commit operation) and from the remote Git repository (pull operation).
  • The Git repository is updated from the local user repository by use of the push operation.
  • The JS7 - Cleanup Service removes any local user repositories if the user profile JS7 root-level folder no longer exists, i.e. if a user root-level folder is dropped from JOC Cockpit.

...

  • git-checkout
    • checks out a specific branch or tag from the Git repository to the local user repository
  • git-clone
    • initially clones a Git repository to a local user repository
  • git-add
    • adds (new) configuration objects from the JOC Cockpit database to the local user repository
  • git-delete
    • removes an already added configuration object from the local user repository
  • git-commit
    • commits newly added, updated or removed configuration objects to a local user repository
  • git-push
    • pushes changes from the local user repository to the remote Git repository

...

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

Force Overwrite

...

  • JS7 JOC Cockpit instance => Git repository
    • git-add
      • adds (new) configuration objects from the JOC Cockpit database to the local user repository
    • git-delete
      • removes an already added configuration object from the local user repository
    • git-commit
      • commits newly added, changed or removed configuration objects to a local user repository
    • git-push
      • pushes changes from the local user repository to the Git repository
  • Git repository => JS7 JOC Cockpit instance
    • git-checkout
      • checks out a specific branch or tag from the Git repository to the local user repository
    • git-clone
      • initially clones a Git repository to a local user repository
    • git-pull
      • pulls recent changes from the Git repository to the local user repository

Use Cases

Show If
userap

Single Client - Single Repository

Scenario

  • Architecture
    • A single JOC Cockpit instance is used with a single Controller or optionally with separate 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 branches of JS7 configuration objects such as dev,, test, prod in a single repository.
  • 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 and are added to branches in a single repository.
  • 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.

Branches marked as "env" are specific for an environment and are excluded from rollout. Branches marked as "rollout" are environment-independent and are forwarded across scheduling environments.


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"]
# GIT [label="Git Server",fillcolor="orange"]
REPO [label="Repository",fillcolor="orange"]

BRANCH1R [shape="ellipse",label="Branch: env dev",fillcolor="darkolivegreen1"]
BRANCH1I [shape="ellipse",label="Branch: rollout dev",fillcolor="darkolivegreen1"]
BRANCH2R [shape="ellipse",label="Branch: env test",fillcolor="darkolivegreen2"]
BRANCH2I [shape="ellipse",label="Branch: rollout test",fillcolor="darkolivegreen2"]
BRANCH3R [shape="ellipse",label="Branch: env prod",fillcolor="darkolivegreen3"]
BRANCH3I [shape="ellipse",label="Branch: rollout prod",fillcolor="darkolivegreen3"]

JOC1 -> FOLDER1
JOC1 -> DATABASE

FOLDER1 -> BRANCH1R [label="Commit/Push\nPull"]
FOLDER1 -> BRANCH1I [label="Commit/Push\nPull"]
FOLDER1 -> BRANCH2R [label="Commit/Push\nPull"]
FOLDER1 -> BRANCH3R [label="Commit/Push\nPull"]

BRANCH1R -> REPO
BRANCH2R -> REPO
BRANCH3R -> REPO
BRANCH1I -> BRANCH2I -> BRANCH3I -> REPO

# REPO -> GIT

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

Repository Operations

  • management
  • versioning
  • rollout

Requirements

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

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

...

  • Architecture
    • A dedicated JOC Cockpit instance is used with Controller and Agents for each rollout environment such as dev, test, prod.
    • A Git repository is used per folder and per rollout environment (dev, test, prod), each JOC Cockpit instance is acting on a specific repository and 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 repositories are performed by the users' individual accounts and are added to each repository and branch such as dev, test, prod.
  • Rollout
    • Deployments are performed from a single source (JOC Cockpit) to each Controller and Agents per rollout environment (dev, test, prod).
    • The Git repositories are used to checkout and to clone 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.

...