Skip to content

Organize config in a large project

Madhan Sadasivam edited this page Nov 1, 2016 · 10 revisions

Organize config in a large project

Apigee Config like KVM, Cache, target servers etc., is better managed when it is automated and tracked in source control repository. Config needs to live close to the corresponding API, but with large projects config is typically shared between multiple API proxies.

API proxies can be usually grouped into "projects" or "features" that directly reflect the project, team or business structure in an enterprise. You can also find that config is shared within the proxies in a "project".

The file structure below reflects this hierarchical relationship (enterprise -> projects -> API proxies)

gateway
├── config
│   └── edge.json             # Config that is shared across projects
└── payments                  # Sample project containing a collection of related API proxies
    ├── config
    │   └── edge.json         # Config that is shared across proxies in project
    ├── proxyname1
    │   └── apiproxy
    │       ├── config.json
    │       ├── policies
    │       ├── proxies
    │       ├── proxyname1.xml
    │       ├── resources
    │       │   ├── java
    │       │   ├── jsc
    │       │   └── node
    │       └── targets
    └── proxyname2
        └── apiproxy
            ├── config.json
            ├── policies
            ├── proxies
            ├── proxyname2.xml
            ├── resources
            │   ├── java
            │   ├── jsc
            │   └── node
            └── targets

Further organization for even larger config files

When an Apigee instance has several environments, the edge.json can get longer. In such cases edge.json can be further broken reflect "env" in Apigee org.

Given below is a sample folder structure that uses env names for organization. (Note: the support for env_edge.json is a proposed feature and the plugin will support it in the future).

gateway
│   └── edge.json               # Global scoped config (Org KVM, API Products etc.,)
├── config
|   ├── dev_edge.json           # dev env config (KVM, Cache, Target server etc.,)
|   ├── test_edge.json          # test env config (KVM, Cache, Target server etc.,)
|   ├── uat_edge.json           # uat env config (KVM, Cache, Target server etc.,)
|   ├── svt_edge.json           # svt config (KVM, Cache, Target server etc.,)
|   ├── staging_edge.json       # staging env config (KVM, Cache, Target server etc.,)
│   └── prod_edge.json          # prod env config (KVM, Cache, Target server etc.,)
└── payments                    # Sample project containing a collection of related API proxies
    ├── config
    |   ├── dev_edge.json       # Project specific dev env config (KVM, Cache, Target server etc.,)
    |   ├── test_edge.json      # Project specific test env config (KVM, Cache, Target server etc.,)
    |   ├── uat_edge.json       # Project specific uat env config (KVM, Cache, Target server etc.,)
    |   ├── svt_edge.json       # Project specific svt env config (KVM, Cache, Target server etc.,)
    |   ├── staging_edge.json   # Project specific staging env config (KVM, Cache, Target server etc.,)
    │   └── prod_edge.json      # Project specific prod env config (KVM, Cache, Target server etc.,)
    ├── proxyname1
    │   └── apiproxy
    │       ├── config.json
    │       ├── policies
    │       ├── proxies
    │       ├── proxyname1.xml
    │       ├── resources
    │       │   ├── java
    │       │   ├── jsc
    │       │   └── node
    │       └── targets
    └── proxyname2
        └── apiproxy
            ├── config.json
            ├── policies
            ├── proxies
            ├── proxyname2.xml
            ├── resources
            │   ├── java
            │   ├── jsc
            │   └── node
            └── targets
Clone this wiki locally