Versions Compared

Key

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

...

Flowchart
USER1 [label="   User: 1   ",fillcolor="lightskyblue"]
USER2 [label="   User: 2   ",fillcolor="lightskyblue"]
USER3 [label="   User: 3   ",fillcolor="lightskyblue"]

FOLDER1 [label="   Folder: 1   ",fillcolor="white"]
FOLDER1a [label="   Sub-folder: 1.1   ",fillcolor="white"]
FOLDER1b [label="   Sub-folder: 1.2   ",fillcolor="white"]
FOLDER2 [label="   Folder: 2   ",fillcolor="white"]
FOLDER3 [label="   Folder: 3   ",fillcolor="white"]

REPOSITORY1 [label="   Git Repository: 1   ",fillcolor="orange"]
REPOSITORY2 [label="   Git Repository: 2   ",fillcolor="orange"]
REPOSITORY3 [label="   Git Repository: 3   ",fillcolor="orange"]

USER1 -> FOLDER1 [label="  can access  "]
USER2 -> FOLDER1 [label="  can access  "]
USER2 -> FOLDER2 [label="  can access  "]
USER3 -> FOLDER3 [label="  can access  "]

FOLDER1 -> FOLDER1a [label="  includes  "]
FOLDER1 -> FOLDER1b [label="  includes  "]
FOLDER1a -> REPOSITORY1 [label="  maps to  "]
FOLDER1b
FOLDER1 -> REPOSITORY1 [label="  maps to  "]

FOLDER2 -> REPOSITORY2 [label="  maps to  "]
FOLDER3 -> REPOSITORY3 [label="  maps to  "]

...

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

Git Operations

Management

...

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

...

  • git-checkout
    • checks out a specific branch or tag from the Git repository to the local repository
  • git-clone
    • initially clones a Git repository to a local repository
  • git-add
    • adds or updates (stage) a new or modified configuration on the filesystem to the local repository
    • JOC REST API ./inventory/repository/store
      • adds or updates
      new)
      • configuration objects from the JOC Cockpit database to the local
      repository
      • repositories filesystem folder
  • git-reset
    • unstages a modification from the local repository, the modified file is still unchanged and contains the modification
  • git-delete
    • removes an already added configuration object from the local repository
  • git-commit
    • commits newly added, updated or removed staged configuration objects to a local repository
  • git-push
    • pushes changes from the local repository to the remote Git repository

...

The following operations are available:

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

...

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

Force Overwrite

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

Transfer of Configuration Objects between JOC and the Repositories

The transfer of configuration objects between the JOC Cockpit database and the repositories are manged by the JS7 JOC REST Web Service APIThe JS7 REST Web Service API manages to forcefully overwrite configuration objects in the Git repository.

The following operations are available depending on the force direction::

  • ./inventory/repository/read
    • reads file tree of the local repositories filesystem folder
  • ./inventory/repository/store
    • stores a set of
    JS7 JOC Cockpit instance => Git repository
    • git-addadds (new) configuration objects from the JOC Cockpit database to the filesystem folder of the local repositorygit-delete
  • ./inventory/repository/delete
    • deletes a set of configuration objects from the filesystem folder of removes an already added configuration object from the local repository
    • git-commit
      • commits newly added, changed or removed configuration objects to a local repository
    • git-push
      • pushes changes from the local repository to the Git repository
  • ./inventory/repository/update
    • adds or updates a set of configuration objects in the JOC Cockpit database with the configuration objects from the locale repositories filesystem
    Git repository => JS7 JOC Cockpit instance
    • git-checkout
      • checks out a specific branch or tag from the Git repository to the local repository
    • git-clone
      • initially clones a Git repository to a local repository
    • git-pullpulls recent changes from the Git repository to the local 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.

...