*** ysandeep|out is now known as ysandeep | 05:30 | |
palaueb | hello | 07:53 |
---|---|---|
*** ysandeep is now known as ysandeep|lunch | 07:53 | |
palaueb | I have a little question, when calling stack create with the params, the --parameter security_groups format is like --parameter security_groups=["sg-a","sg-b"] or --parameter security_groups="sg-a","sg-b", I'm a little confused | 07:57 |
palaueb | or both are accepted? | 07:57 |
*** ysandeep|lunch is now known as ysandeep | 09:11 | |
palaueb | I'm really lost, when I create a stack, it spawns me the server I want, great, what if I want to reuse the stack? how do I must call it again? I really lack the understanding of how it flows, the execution of templates and all of this things is a little obscure reading the documentation (it just says edit the template and then create the stack and it will work). | 09:28 |
bshephar | palaueb: So you have a OS::Nova::Server resource in your template. Do you have the security_group parameter defined? https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Nova::Server-prop-security_groups | 09:33 |
bshephar | There is an example of how it can look in the template here: https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Nova::Server-hot | 09:34 |
bshephar | So you would put it all in your templates, then just openstack stack create -t your_template my-heat-stack | 09:35 |
palaueb | and I create a new stack for every "instance" I create from heat? | 09:36 |
bshephar | You could define multiple VM's in your Heat template if you want multiple per stack. So just multiple instances of: https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Nova::Server-hot | 09:37 |
palaueb | Ok, thanks, I will check that in detail. | 09:37 |
palaueb | Now I have executed correctly a stack template, but while creating it is driving me crazy from the OS::Cinder::Volume resource | 09:37 |
palaueb | If I set the availability_zone on the volume creation, it give me error 400 -> Availability zone 'nvme' is invalid | 09:39 |
bshephar | The answer on this stack overflow thread has an example of a template with 2 VM's: https://stackoverflow.com/questions/50497003/deploying-multiple-virtual-machine-using-heat-template-on-openstack | 09:39 |
bshephar | palaueb: So that error would be coming back from Cinder. You would need to check the Cinder logs and verify that the Availability Zone nvme exists | 09:40 |
palaueb | it exists, if I check openstack availability zones list it is there | 09:40 |
palaueb | and I have not access to openstack logs right now | 09:41 |
palaueb | If I do not define the availzone, it says something worse | 09:42 |
palaueb | Resource CREATE failed: ResourceInError: resources.bootable_volume: Went to status error due to "Unknown" | 09:42 |
bshephar | From the Heat perspective, we just speak with the Cinder API. Just double check that the syntax of your OS::Cinder::Volume resource matches the example here: https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Cinder::Volume-hot | 09:45 |
bshephar | But it looks like the error is probably something that Cinder is returning | 09:45 |
palaueb | uhm... this is my current boot creation code https://pastebin.com/ZUfB6jNd I will check with our openstack admins | 09:47 |
bshephar | Yeah, it is indeed a Cinder error: https://github.com/openstack/cinder/blob/16c2d3b57da3a8ead72dd16a66a4166dde94099b/cinder/exception.py#L202-L203 Not much more I can tell you about that unfortunately. Other than the Cinder logs should be able to give you more details | 09:47 |
bshephar | https://github.com/openstack/cinder/blob/6643e3e62c9587e404b574c617bacc60ae180615/cinder/volume/flows/api/create_volume.py#L311-L324 | 09:48 |
palaueb | I see ... | 09:50 |
palaueb | Thanks, I will be working on this | 09:51 |
bshephar | Just for my sanity. What do you see if you run: openstack availability zone list --volume nvme definitely shows up in that output? | 09:54 |
palaueb | I got where i failed | 09:56 |
bshephar | Oh nice. | 09:56 |
palaueb | let me see if I'm on the right path | 09:56 |
palaueb | I gonna see that command | 09:56 |
bshephar | No worries. Good luck. :) | 09:57 |
palaueb | openstack availability zone list: error: unrecognized arguments: nvme | 09:57 |
palaueb | yep, I'm not using the right parameters | 09:57 |
bshephar | Sorry, the command is just ` openstack availability zone list --volume `.. But does nvme show up in the list | 09:58 |
palaueb | I see... I watching what values openstack volume list gives me | 09:59 |
palaueb | volume type list I mean | 10:00 |
palaueb | It seems the right value is nvme_volume | 10:00 |
palaueb | nope openstack availability zone list: error: unrecognized arguments: nvme_volume | 10:00 |
bshephar | $ openstack availability zone list --volume -f yaml | 10:01 |
bshephar | - Zone Name: nova | 10:01 |
bshephar | Zone Status: available | 10:01 |
bshephar | But it doesn't matter if you already know the name is nvme_volume | 10:02 |
bshephar | That should be all the info you need to get passed the issue | 10:02 |
palaueb | my admin is telling me I must use nova too | 10:02 |
bshephar | haha, doesn't want to use the expensive nvme disks. :) | 10:03 |
palaueb | hahaha, everything is nvme | 10:05 |
palaueb | but I don't know why it does not let me do it | 10:06 |
palaueb | what I don't get yet is: Can I reuse the templates? or are they oneshot? Can I define a set of properties for an instance creation and then use it as template to create new instances every now and then? | 10:09 |
bshephar | palaueb: You can re-use them, so you could set parameters in each template and define some parameters that will be variables. Then use { get_param: YourVariableName } in the template itself. I'll find you an example | 10:12 |
bshephar | This document talks about template structure: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#template-structure So check the parameters section. Then examples of using get_param are here: https://docs.openstack.org/heat/latest/template_guide/hot_spec.html#get-param | 10:13 |
bshephar | So once you have variables in your template, you can pass an environment file that starts with parameter_defaults: like this example here: https://docs.openstack.org/heat/latest/template_guide/environment.html#define-defaults-to-parameters | 10:14 |
bshephar | So have an environment file for each different stack you want to deploy. Like, stack1_environment.yaml, stack2_environment.yaml. List each of your variables relevant to each stack in them. Then, openstack stack create -t my_template.yaml STACK1 -e stack1_environment.yaml | 10:16 |
bshephar | openstack stack create -t my_template.yaml STACK2 -e stack2_environment.yaml | 10:16 |
palaueb | I have variables on them, but when I do 'stack create' it tells me that there is already a stack with that name | 10:16 |
bshephar | Yeah, so seperate stack names | 10:16 |
bshephar | If you want to add VM's to the same stack, you can add them into the template and do a stack update | 10:17 |
palaueb | oh, each deploy must have his own stack | 10:17 |
palaueb | ohhh | 10:17 |
bshephar | openstack stack update STACK1 -t my_template.yaml -e stack1_environment.yaml | 10:17 |
bshephar | I'll make a YouTube video with some examples for you. I'm sure other people have similar questions. Keep an eye out here over the next day or so: https://www.youtube.com/channel/UCUtjYRqBr7utrqsnUzMmdTw | 10:20 |
palaueb | ok, insta subscriving | 10:28 |
palaueb | yup, I'm there! | 10:29 |
bshephar | Thanks! I'll work on it over the next couple of days and get it uploaded. | 10:30 |
palaueb | I'm not in a rush | 10:30 |
palaueb | I have readed the documentation and my biggest missunderstanding is related to the use and reuse of the templates | 10:30 |
bshephar | Ok, maybe I can improve our documentation around update Heat stacks as well then | 10:35 |
palaueb | just adding another example on how to reuse the stack templates will be awesome | 10:37 |
palaueb | If I can help you on that, I will do it pretty happy | 10:38 |
palaueb | do you have Twitter? | 10:38 |
bshephar | Yep, like an example of adding another VM to an existing stack and using the openstack stack update command. | 10:38 |
palaueb | that's an interesting one | 10:38 |
palaueb | and another to use same template to create different stacks of servers | 10:38 |
bshephar | I have a twitter account for my YT channel, but it hasn't got a lot of attention: https://twitter.com/who_triple | 10:39 |
palaueb | at least I can add to my network and keep contact if I can help on anything | 10:40 |
bshephar | Sure, I'll include both of those in my video, and we can look at adding something for both of those to our documentation with examples. | 10:40 |
palaueb | now you have your first follower :) | 10:40 |
bshephar | haha thanks! | 10:41 |
*** ysandeep is now known as ysandeep|break | 11:02 | |
*** ysandeep|break is now known as ysandeep | 11:58 | |
*** ysandeep is now known as ysandeep|afk | 13:09 | |
*** ysandeep|afk is now known as ysandeep | 13:46 | |
palaueb | Is there a way to automate the creation of volume, floating IP asingnationd and server for a number of "same-kind" servers? Where can I find documentation about reusing ? thanks! | 14:25 |
palaueb | I see AutoScalingGroup :) | 14:34 |
palaueb | Maybe this will fit in better OS::Heat::InstanceGroup¶ | 14:39 |
palaueb | ok, I don't know if it's possible, how can I set a base name for the instances created with instancegroup? I want to have servers with names like: myserver01, myserver02, myserver03 and so on | 14:46 |
palaueb | Do you know what to use? | 14:46 |
palaueb | This is what I'm searching for https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Heat::ResourceGroup | 14:50 |
*** blarnath is now known as d34dh0r53 | 14:56 | |
palaueb | and obviously now I don't know how to link Volumes created with ResourceGroup to Servers created also sith another ResourceGroup, maybe by it's name? Any help please? | 15:02 |
palaueb | this will help again: http://hardysteven.blogspot.com/2014/09/using-heat-resourcegroup-resources.html | 15:11 |
*** ysandeep is now known as ysandeep|out | 15:59 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!