ZX: Create and Host a Realm

For projects where code must be available internally, but not necessarily visible externally, hosting a private realm is a very useful and easy way to combine internal code with globally available FOSS packages without requiring any further deployment infrastructure or setup on the target systems than installing ZX on them.

The steps are:

  1. Generate the realm information and sysop user
    zx create realm
  2. Export the realm data so you can import it to the machine that will host the realm's "prime node" and any other machines that need to run code from the new realm
    zx export realm
  3. Import the realm file (.zrf) to the prime node's machine
    zx import realm [path/to/realmname.zrf]
  4. Tell the prime node to "takeover" the realm
    zx takeover [realm name]
  5. Start Zomp on the prime node
    zx run zomp
  6. Import the realm file to whatever systems need to run packages hosted there
    zx import realm [path/to/realmname.zrf]

That's all there is to it.

If your prime node is not visible to the outside world (a very common case behind NAT for internal projects hosted in a single data center or organization's firewall) but is able to contact the "otpr" realm then it will automatically act as an internal index mirror and package cache for the "otpr" realm as well as the prime node for the new realm you just created. This means the first time any system inside your organization pulls a package from outside it will be cached on your internal Zomp node and from that point on served internally.

See the "Add a package to your realm" page to see how to add packages to your realm. Remember, you can mix dependencies in your projects across realms as long as the systems that need to execute the code have all the necessary realms configured -- ZX will figure out where to get the code and build it the first time a particular version of a project is executed and cache it all from that point (the initial execution is code deployment).

For proprietary code that must be visible to client systems some additional operational and licensing considerations come into play. Contact the author if that happens to be your case (closed-source licensing, authenticated package access and object-package versions of ZX and Zomp are available).