This update will break compatibility with the hash-lookup services currently running on SAVI, and anyone using the old hashlookup API. @t-lin @michaelweiyuzhao one of these next few days I will deploy the new registry-services to replace the the hash-lookups, and update the GetHash functions being used in service-manager.
API function names AddHash -> AddService, GetHash -> GetService, etc
Registry-service now decodes add requests which have a key (service name) and a value, where the value is json encoded string of a ServiceInfo struct, and directly stores this string. As opposed to hl-service which decoded an add request with multiple fields, created a struct from it, encoded the struct, and then stored the encoded struct string.
Previously had to update both hl-service and client api to add new fields to stored struct. Old hl-service would not recognize new fields.
Now, only have to update client api. Encoding/decoding of ServiceInfo already done client side. New or old fields can safely be ignored when unmarshalling json. Registry-service just stores whatever string it is given.
Specify service requirements in json config file. Resolves #8.
Soft and hard network requirements. Gets passed to proxy config.
CPU and memory requirements. Currently represented as int.
All 4 of these fields will be stored in registry-service
Can also specify FROM directive in generated dockerfile through json config file. Default ubuntu:16.04.
Registry-cli usage
<dir> changed from positional argument to flag
--use-existing-image flag for adding your own custom built image to registry-service, as opposed to building new image. Skips the docker build/push steps for new images. Just pulls this existing image form dockerhub, hashes it and adds to registry-service.
This update will break compatibility with the hash-lookup services currently running on SAVI, and anyone using the old hashlookup API. @t-lin @michaelweiyuzhao one of these next few days I will deploy the new registry-services to replace the the hash-lookups, and update the GetHash functions being used in service-manager.
Updates
<dir>
changed from positional argument to flag--use-existing-image
flag for adding your own custom built image to registry-service, as opposed to building new image. Skips the docker build/push steps for new images. Just pulls this existing image form dockerhub, hashes it and adds to registry-service.