OpenNebula attribute

Hello
I want to know the meaning of the ATT attribute. For example in this expression:
“Elasticity_policy” : [
{
“expression” : “ATT=60” ,
.
.
}
]

Hello @Said_Hassani

That attribute is set in the USER_TEMPLATE or TEMPLATE of the VM. ATT is just an example used in documentation, for example you can use real attributes like CPU in your elasticity rules.

You can also use OneGate service to update the USER_TEMPLATE from the VM to outside and the OneFlow can evaluate those attributes you set.

Best,
Álex.

Hello Alex.
Thanks for your assistance and for your receptivity…!

Hi. I would like to ask in continuation of the Elasticity_policy topic. Is it possible to set such a condition to add another virtual machine after a user has connected to the first one? Thank you in advance

Hello @Alan_Piterson

To do that you can create an script of first VM that execute a VM template update using OneGate when user logins. So when OneFlow detects that attribute, it will scale the service and deploy another VM.

Best,
Álex.

Thanks for the answer. I am just learning OneFlow. And if you have the opportunity, could you please write an example of such a script.

Hello @ahuertas
I have a problem to contextualize a vm and extract its disk.
I don’t know exactly how to extract the disk.
Thanks for your receptivity in advance!

Hello @Alan_Piterson

You have an example about how to update the VM template here.

Best,
Álex.

Hello @Said_Hassani

I have a problem to contextualize a vm

What kind of problem do you have?

I don’t know exactly how to extract the disk.

To extract a disk you have the detach operation.

Best,
Álex.

Hey @ahuertas. A couple more questions arose. Is it possible, after shutting down the OneFlow service virtual machine, to delete it and deploy a new one, and is it possible to connect to the OneGate server from the outside. Sorry if the questions seem silly, I’m just learning. Thank you in advance.

Hello
I want to know if it is possible to do auto-scaling with the same content in all vms.
For example, i can adjust manually the cardinality to 2 , i want that the new vm has the same content(file, documents, application) as the first vm.
Best,
Said.

Hello @Alan_Piterson

Is it possible, after shutting down the OneFlow service virtual machine, to delete it and deploy a new one

This has to be done manually, you delete it and then deploy a new one.

is it possible to connect to the OneGate server from the outside

OneGate server is listenning on IP and port you have configured on /etc/one/onegate-server.conf, check the variables :host and :port. So, if the IP is reachable from outside you can connect to it and make HTTP request.

Best,
Álex.

1 Like

Hello @Said_Hassani

No, the new VM will be created from the VM template the first one was created.

Best,
Álex.

@ahuertas Thank you very much for your answer. And the last question: how can I properly log in to the onegate if I make a request from the outside and I do not have a token?

Is there a way to do or simulate this scenario ?

Hello
Thanks for your assistance!
How to upload the contextualization scripts ( onegate_init.sh , onegate_publisher.sh ) to the OpenNebula “Files & Kernels” section?
I have a problem to run opennebula(version 5.12.x) with cloudvamp.
Thanks for your help!

Hello @Alan_Piterson

You can take the token from the VM, it’s on /var/run/one-context/one_env, in the attribute TOKENTXT. Then you can make an HTTP request with --header "X-ONEGATE-TOKEN: 5WBxKP7GS2ysf3WHeRAIaw==" this header.

Best,
Álex.

No, there is no way.

In sunstone go to files, click on + button and upload it as a context file.