Oneflow dynamic parameters


I have reading about OneFlow and OneGate but I´m not able to find anything about a way to send the IP from a machine deployed in the service to the next one to be deployed. For example, a service could be formed by a Database virtual machine and a web server virtual machine. If I deployed the database as a parent and then the web server, you would need a way to configure the web server to connect to the database without asking the user to input the value.

I´m looking for a way to send dynamic values (such as IP) to another machine in the service template, the same way as Openstack does with Heat templates. Is it possible to do it now? I´m using latest stable version (4.14).



You can perform a GET ${ONEGATE_ENDPOINT}/service from the web server when it boots.
The response will include all the services roles, and each VM inside the role. The VM information includes the IPs assigned.

If you need to push information from the parent VM, use the PUT ${ONEGATE_ENDPOINT}/vm call. That information will be available in the /service response. In this case you probably want to use ready_status_gate=true to wait for the parent VMs to push the necessary information before the child roles are deployed.

Thank you very much. That was what I needed.