Merging two Apigee Orgs

 We are looking at merging two similar orgs into one.  Org A has reached several Edge limits:  KVMs, proxies, etc and Org B is close to their KVM limit.  Has anyone ever gone through the process of merging orgs?  I'm looking for guidance / recommendations on best practices on this topic.

 

1 1 91
1 REPLY 1

You have two problems. Orgs that have reached their limits, and merging orgs. The first issue complicates the second task.

Tackle the first one, first. You didn't say what you mean by "KVM limits" . The documentation for Apigee Edge lists a number of different limits that apply to KVMs.

  • If you simply have too many KVM maps, then, there are two possible approaches I can imagine:

    1. re-organize the existing maps so that you do not need so many. One way to do this is to use an "uber map", and then move entries from other maps into that uber map. To do this you would need to use the "old" mapname as the first part (Fragment) of the Key in the new uber map.

      An illustration:
      Suppose you have existing maps A, B and C. In map A you have 2 entries, with keys "key1" and "key2". In map B you have 2 entries, with similarly named keys. But obviously these are different entries. Likewise in map C. You can migrate all size of those KVM entries to one "uber map". The keys in the new map will be "A--key1", "A--key2", "B--key1", "B--key2" and so on.

      Where in the "many maps" configuration your KVM Get policy might be:

      <KeyValueMapOperations name='KVM-Get-A' mapIdentifier='A'>
        <Scope>environment</Scope>
        <ExpiryTimeInSecs>300</ExpiryTimeInSecs>
        <Get assignTo='variable-to-set'>
          <Key>
            <Parameter ref='variable-containing-key'/>
          </Key>
        </Get>
      </KeyValueMapOperations>
      

      In the new "single map" configuration the modified policy would be:

      <KeyValueMapOperations name='KVM-Get-A' mapIdentifier='Uber'>
        <Scope>environment</Scope>
        <ExpiryTimeInSecs>300</ExpiryTimeInSecs>
        <Get assignTo='variable-to-set'>
          <Key>
            <Parameter>A</Parameter>
            <Parameter ref='variable-containing-key'/>
          </Key>
        </Get>
      </KeyValueMapOperations>
      
    2. Move the data out to some external store, like a database. In this case retrieving the data might be through a ServiceCallout or similar.

  • If you have too many values within a single KVM map (more than 5 million), then, you have other options:

    1. refactor the map into multiple maps. This will probably get you only so far, if you have 5 million entries.

    2. consolidate related entries, so that small values get combined into one. Then you can do a secondary lookup via a JavaScript policy, etc.

    3. move the data into an external store, like a database. And connect to it via ServiceCallout or similar.

After you get your KVM capacity issue sorted out, then you can think about "merging" organizations. But, be aware: that isn't really a thing. There's no "merge" action in Apigee.  What you would be doing is "migrating" your configuration from one existing organization to another.  To do that sort of thing you can export the configuration, and then re-import it.  There are tools like sackmesser that can help you do the export/import thing.  (Google for it)