Code Monkey home page Code Monkey logo

apigee-migrate-tool's People

Contributors

deboraelkin2 avatar giteshk avatar jerrylawson avatar kurtkanaskie avatar ntiss avatar richarst avatar shahbagdadi avatar stevetraut avatar swilliams11 avatar vinit4u16 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apigee-migrate-tool's Issues

[Enhancement] API rate limiting

Hi! Thanks for maintaining this tool!

I'm currently trying to use this tool to migrate data between some corporate Apigee installations, I've ran into an issue I've mostly been able to address which is that most of the tasks here will fire off asynchronous javascript requests as fast as possible without waiting for a callback. This was a problem for me because I didn't want to install grunt and NPM on my production servers, and was forced to use this tool over an SSH tunnel; which then gets overwhelmed with requests and dies whenever I try to migrate ~6000 developers or ~7000 something keys.

Now for the most part (and having no javascript experience), I was able to substitute out the request library in each of the tasks for the request-promise library which returns a promise for the callback of the async function, and then use the recent javascript 'async/await' functionality to make those tasks execute synchronously. (Awaiting on any request to callback before proceeding with the loop) However I've found the key.js task quite tricky to get to execute synchronously and is what I'm stuck on now.

Anyway, what I'm getting at is a rate limiting feature would be nice!

exportEnvKVM task is not working independently

Hi,

When I am running exportAll, it is not downloading all KVMs. In my enironment, I have 19 but it's downloading only 16. What could be the reason?

Then I thought of running exportEnvKVM task individually, but it is just creating env folder under kvm folder of data, but there is nothing in the folder.

Not sure if I am missing something or there is really any issue.

Could someone please help?

Thanks in advance!!
Vivek Chikane

All data is not getting imported

Hi,
I have used "grunt exportAll -v" all data is not getting imported to target environment. So is there any singe command to import all the exported data to local drive.?
image

Can all the data be imported using single command.?

Or
we need to run all the below commands manually one by one:
grunt importTargetServers
grunt importProxies
grunt importSharedFlows
grunt importDevs
grunt importProducts
grunt importApps
grunt importKeys
grunt importProxyKVM
grunt importEnvKVM
grunt importOrgKVM

Provide test suite

Please provide unit tests, e.g. mocha, so that further commits can be vetted to ensure the continual success of the software.

ImportDevs fails if the target org differs from the source org.

If you export the developers from an organization A and try to import them to organization B the target organization is not set during import but the organization of the source.

Workround: The import works if you manually change the value of the property

"organizationName" : "A",

to

"organizationName" : "B",

in every developer export file.

deployProxies fails

The task "deployProxies" fails with these traces :

Running "deployProxies" task
Warning: proxy_url is not defined Use --force to continue.
Aborted due to warnings.

This is cool!

Hey, I'd like to present this to LLBean, do you think it's possible to make this repo public? LLBean understands these tools are all in beta, but they'd rather tweaking it and perhaps send fixes.

WDYT?

Error in "tasks/proxy.js"

Hi,
There is an error in the file "tasks/proxy.js", line 91: the method " grunt.verbose.log(err); " does not exist. This should be replaced with something like " grunt.verbose.writeln(err); "

                   var req = request.post(url+name, function (err, resp, body) {
                      if (err) {
                        grunt.verbose.log(err);
                      } else {

Migrate tool issues

  1. The exportProxy feature downloads zero byte proxies. This was noted when we had to rerun the exports. We had to run the export using export all feature.
  2. The tool does not clean up the artifacts properly with the delete options. We tried deleting apps and developers using the utility that ended up with orphaned relationships in the cassandra database.
  3. The tool did not produce the same results when we cleaned up all the folders and re-ran the exports. This was noted when we were were debugging the zero byte proxy issue.
  4. When you run the exportAll feature it downloads the proxies, products and devs only.

exportApps fails on developer without apps

i am trying to export all apps, but get an error. i looked at logs and i think last retrieved developer does have any applications registered..

--
Running "exportApps" task

Retrieved 6 developers
Retrieved 6 developers
Fatal error: Cannot read properties of undefined (reading 'length')
TypeError: Cannot read properties of undefined (reading 'length')
at Request._callback (/Users/santos/src/apigee-migrate-tool/tasks/app.js:55:27)
at Request.self.callback (/Users/santos/src/apigee-migrate-tool/node_modules/request/request.js:185:22)
at Request.emit (node:events:527:28)
at Request. (/Users/santos/src/apigee-migrate-tool/node_modules/request/request.js:1154:10)
at Request.emit (node:events:527:28)
at IncomingMessage. (/Users/santos/src/apigee-migrate-tool/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:641:28)
at IncomingMessage.emit (node:events:539:35)
at endReadableNT (node:internal/streams/readable:1345:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21)

Issue when running API Migration Tool

When running this tool I am getting below error.


Running tasks: exportAll

Running "exportAll" task

Running "exportProxies" task
========================= export Proxies ===========================
getting proxies...https://xxxxxxxxxxxxxxxx

Error: write EPROTO C4370000:error:0A000152:SSL routines:final_renegotiate:unsafe legacy renegotiation disabled:c:\ws\deps\openssl\openssl\ssl\statem\extensions.c:922:

Would appreciate help here?

Add Targets

Would you consider adding targets under the environmental configuration as well? You have all of the other state handled within Apigee already. Thanks!

ExportAllSpecs task error

While trying to exportAllSpecs I get an error
“.Cannot read properly ‘length’ of undefined.

Bearer Auth support

Orgs with SAML federation or Orgs with Mandatory 2FA can not use this tool any longer.
Can we support Bearer tokens as an alternative to Basic Auth?

Executing only 4 tasks from starting

When I run grunt exportAll -v command, it executes only starting 4 tasks from register task. I tried this by changing the sequence.

grunt.registerTask('exportAll', ['exportDevs','exportProducts','exportApps', 'exportEnvKVM', 'exportProxies', 'exportOrgKVM', 'exportProxyKVM']);

Kindly suggest if I am going somewhere wrong.

grunt exportProxies - Its not export the environment wise.

when running "grunt exportProxies" from my prod environment , but its exporting from latest version the proxy not the proxies deployed to prod environment . My requirement is to export all the prod environment api and import to new org. Please suggest how to make this using this tool.

Import App is not working as expected.

I am having a issue in the "import app". I have 140 Apps and exported all Apps in the data folder. While running "grunt importApps",

only 70 Apps imported . rest of the Apps not imported .
Also "Credential" section is empty for all import Apps. I want credential section also import.
EX- data/apps/[email protected]/AMEX-DEV-MANAGER-API-700_REGISTERED_NOT_VERIFIED this kind of not import . Any issue here ?
Please help me to fix these TWO issues.

Tool completely broken, JSON responses not parsed properly

almost all scripts are parsing json responses incorrectly leading to the full tool to fail.
Nothing gets exported.

I fixed one or 2 scripts manually to confirm it was a parsing issue. appending a child element usually does the trick, but all scripts needs to be reviewed

Also export of revision is badly implemented. Last revision from json response is taken, rather than the revision with highest number.

Issues with running API Migration Tool

  1. We are migrating from on premises version to public cloud. How to provide "to": version information for edge public cloud. This information need to be set into config.js
    https://github.com/apigeecs/apigee-migrate-tool/blob/master/config.js

  2. When running this tool I am getting below error. I am guessing it is due to cert issue. We are using our company signed ssl certificate for management server. Please let us know workaround for this.


Running tasks: exportAll

Running "exportAll" task

Running "exportProxies" task
========================= export Proxies ===========================
getting proxies...https://:/

Error: unable to verify the first certificate

sharedFlow export/import

while tryingto export import sharedflow, i noticed sharedflow export is creating file size of 0 size and hence import gives the following error. Tried extracting the zip file of exported shared flow and that errors out as well.

"code" : "messaging.config.beans.InvalidBundle",
"message" : "Bundle is invalid. Empty bundle",
"contexts" : [ ]

[ sharedflows]# ls -rtl
total 0
-rw-r--r-- 1 root root 0 Jun 17 12:54 LoggingPreProxyFlowHookSharedFlow.zip

[ sharedflows]# unzip LoggingPreProxyFlowHookSharedFlow.zip
Archive: LoggingPreProxyFlowHookSharedFlow.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of LoggingPreProxyFlowHookSharedFlow.zip or
LoggingPreProxyFlowHookSharedFlow.zip.zip, and cannot find LoggingPreProxyFlowHookSharedFlow.zip.ZIP, period.

Export of environment specific resources should use env specific directories.

Target Servers place results in ./data/targetservers regardless of env.
Should create sub-directory for each env (e.g. /data/targetservers/test, /data/targetservers/prod)

Flow Hooks place results in ./data/flowhooks regardless of env.
Should create sub-directory for each env (e.g. /data/flowhooks/test, /data/flowhooks/prod)

KVMs follow this pattern.

data
└── kvm
    └── env
        ├── prod
        │   └── GetLogValues
        └── test
            └── GetLogValues

importAll exits prematurely when sub-dirs are missing

Using importAll, if the data source is sparsely populated (e.g. missing targetservers) the tool exits prematurely. Happens for all entities.
Workaround is to use the individual commands in that case. See all_import_tasks.sh for the order.

how to get all the revisions of proxies

with i am able to export only latest proxy and imported to new servers.
How i can export and import all the revisions of proxies and import them into now APIGEE system

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.