zato-connection-registry: Load, Backup and Restore your Zato connection definitions
utopian-io·@emrebeyler·
0.000 HBDzato-connection-registry: Load, Backup and Restore your Zato connection definitions
# Zato [Zato](https://zato.io/) is an open-source **e**nterprise **s**ervice **b**us solution for SOA. It's built with Python2. And have amazing features if you need an ESB, in python ecosystem. We have been experimenting with Zato, mainly, using it as an API gateway on our internal services. (REST APIs.) That process requires to define all our internal services. A simple connection definition holds these kind of data: - Service Name - Url/Path - Data Format (JSON, etc.) - Content Type - Security Definition (RBAC, Basic Auth, etc.) - ... <center><img src="https://cdn.steemitimages.com/DQmWQqE4SUKQ1vcucbZ4tkKFLjeQHJzqmd3AktEyyZJnwjZ/Screen%20Shot%202018-12-25%20at%203.10.05%20PM.png"></center> <center><sup>A simple pub-sub service definition on my local Zato setup</sup></center> If you maintain lots of REST API service definitions and experiment Zato at the same time (spinning up new Zato instances for development, or having multiple Zato instances without sharing the database) then it may be a pain to migrate these services. Of course, it's possible to do that migration with the internal Zato database. However, it's not much practical. That brought the idea of having a backup/restore tool for Zato connection definitions. # zato-connection-registry [zato-connection-registry](https://github.com/emre/zato-connection-registry) is a command line application/library to load, backup, restore REST connection definitions in Zato servers. (It can also serve as a python library.) <center><img src="https://cdn.steemitimages.com/DQmTypMnqeuwRXsPWuUWVtQmFtVkPh37e8McfDjwDzeJ6qR/Screen%20Shot%202018-12-25%20at%202.38.33%20PM.png"></center> <center><sup>Pro tip: ```alias zct='zato_connection_registry'```</sup></center> This tool uses Zato's [internal services](https://zato.io/blog/posts/public-api.html) to fetch and pull service definitions, and uses [zato-client](https://zato.io/docs/progguide/clients/python.html) package. Backup files are stored in the JSON format. Note: Since ```zato-client``` package is a requirement for this tool, and python2 only, zato-connection-registry is also a python2 project. # Installation ``` $ pip install zato-connection-registry ``` # Commands - Backup connection definitions ``` $ zato_connection_registry http://172.31.52.2:11223 pubapi:123 /tmp/foo.json ``` - Restore connection definitions ``` $ zato_connection_registry restore http://172.31.52.2:11223 pubapi:123 /tmp/foo.json ``` # Using zato-connection-registry as a library After the installation, you can also use the package as a Python library: ``` from zato_connection_registry.registry import Registry r = Registry( "http://localhost:11223", "pubapi", "123", ) r.load_rest_channels() print(r.rest_channels) ``` # Limitations - Only REST channel definitions (including incoming and outcoing) are supported. # Running tests ``` python tests.py ... ---------------------------------------------------------------------- Ran 3 tests in 0.049s OK ``` # Commits - [zato-connection-registry/commits/master](https://github.com/emre/zato-connection-registry/commits/master)
👍 ahmeterbay, raoul.poenar, bulent1976, victorcovrig, frankdanger, whitebot, evilest-fiend, muratkbesiroglu, bilimkurgu, espoem, steemtaker, reazuliqbal, jacekw.dev, adamantino, leir, holger80, khairulmuammar, emrebeyler, jacekw, tahirozgen, amosbastian, jaff8, asaj, bluesniper, steemtank, codingdefined, crokkon, gentmartin, akifane, neokuduk, literaturk, elchin, sereze, beemtutorials, isnochys, tyramisoux, baycan, rasit, maveraunnehr, hakancelik, tinowhale, chorock, tdogvoid, backinblackdevil, zcool, ali.yuce, gokos, aydant, onursa, portugalcoin, samedb, jumbot, ozgurcinarli, scipio, steembasicincome, meowcliver, yuriy4, mcfarhat, toninux, smafey, jacobkaled, nudgent, enjoyy, lukecreed, fromhell2sky, evansbankx, gjones15, ruh, carment, kryptorero, bahagia9, sbd-fairy, rightscomet, coinmeria, ucmuharfli, embesilikat, gulumserunver, nagaclub, kemalyokus, firster78, alisari, gydronium, sutter, hayirhah, rainbowlord, ahmetchef, canku, mozer, bboyabluka, varolleng, n1hal1, pablorg94, berniesanders, thecyclist, ngc, unforgettable, parakazan, intelligencer, channeljaytv, hahajin, berkerpeksag, sauronbey, feronio, firatozbek, lastozgur, sjomeath, qurator-tier-0, muradovv, tipitip, sulwati, upvoteguild, ewq, ruel.cedeno, forkonti, googletr, canburaksimsek, ahmetmertugrul, ceruleanblue, alvinvoo, mrmaracucho, hyroniz, hellowhale, turkolog, ataturk, giftbox, decebal2dac, senseofhumor, habercitr, airdroptr1, uzerebru, whiterabb1t, bluerobo, tentalavera, blaqboyikott, steeman220, femseen, semihbalkanli, tugbaerdem, uzercanan, steven-patrick, hafizullah, oliverschmid, teamcr, tolgahanuzun, helo, fatihgul, loshcat, greenorange, steem-ua, erensonmez, bburak30, partiko, bejust, tdre, ryuna.siege, jjay, utopian-io, jga, nata13, voteengine, yeungpingchi, etp, airswap, grzesiekb, liuyifei, michelem15, sambillingham, bukiland, mgranja,