GithubHelp home page GithubHelp logo

nandulaperera / git-artifact-synchronizer Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 15 KB

WSO2 API Manager Artifact Synchronization with Git

License: Apache License 2.0

Java 100.00%
artifact-synchronizer wso2 wso2-api-manager

git-artifact-synchronizer's Introduction

WSO2 API Manager Artifact Synchronization with Git

Git Artifact Synchronizer is an implementation of WSO2 API Manager Gateway Artifact Synchronizer to store API artifacts in a Git repository.

Artifact Synchronization enables synchronization of runtime artifacts in an Active-Active Deployment of WSO2 API Manager.

Git Artifact Synchronizer is supported by WSO2 API Manager 4.1.0 and above.

Getting Started

The pre-built JAR file can also be downloaded from Releases

mvn clean install
  • Once the build is successful, copy the JAR file git-1.0.0.jar to <API-M_HOME>/repository/components/dropins directory.
  • Start the API Manager instance(s) with the following System properties
    • -DGitRepoURL - The URL of the Git repository (Eg: https://github.com/<git-username>/<repository-name>)

    • -DGitUsername - The Git username

    • -DGitAccessToken - The Personal Access Token generated above.

    • -DGitRepoBranch - The branch used to store the artifacts (Eg: main) (optional)

      If the branch is kept empty, the default branch of the repository will be used to store the artifacts.

Navigate to the <API-M_HOME>/bin directory and execute the following command to start the API Manager instance.

  • For Windows

    api-manager.bat --run -DGitRepoURL="https://github.com/<git-username>/<repository-name>" -DGitUsername="<git-username>" -DGitAccessToken="<git-access-token>" -DGitRepoBranch="<branch-name>"
  • For Linux

    sh api-manager.sh -DGitRepoURL="https://github.com/<git-username>/<repository-name>" -DGitUsername="<git-username>" -DGitAccessToken="<git-access-token>" -DGitRepoBranch="<branch-name>"
  • The Artifact Directory Structure section explains how the directory structure is created when API revisions and deployments are made.

Artifact Directory Structure

When adding, removing, deploying or undeploying the directory structure will be as follows.

  • When an API revision is added/deleted, the ZIP artifact will be added/deleted to/from the inactive/<api_name-version> directory in the repository. (Eg: inactive/PizzaShackAPI-1.0.0)

  • When an API revision is deployed/undeployed, the ZIP artifact will be added/removed to/from the active-<gateway_name> directory. (Eg: active/Default)

Sample Directory Structure

 active-Gateway1
 ├── 1a2b3c4d-SwaggerPetstore-1.0.0-abcd1234-carbon.super.zip
 ├── 2b3c4d5e-SwaggerPetstore-2.0.0-pqrs1234-carbon.super.zip
 active-Gateway2
 ├── 2b3c4d5e-SwaggerPetstore-2.0.0-wxyz3456-carbon.super.zip
 inactive
 ├── SwaggerPetstore-1.0.0
 │   └── 1a2b3c4d-SwaggerPetstore-1.0.0-abcd1234-carbon.super.zip
 │   └── 1a2b3c4d-SwaggerPetstore-1.0.0-cdef6789-carbon.super.zip
 ├── SwaggerPetstore-2.0.0
     └── 2b3c4d5e-SwaggerPetstore-2.0.0-wxyz3456-carbon.super.zip
 

git-artifact-synchronizer's People

Contributors

nandulaperera avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.