Monday, 2022-02-14

*** ysandeep|out is now known as ysandeep05:30
palauebhello07:53
*** ysandeep is now known as ysandeep|lunch07:53
palauebI 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 confused07:57
palauebor both are accepted?07:57
*** ysandeep|lunch is now known as ysandeep09:11
palauebI'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
bshepharpalaueb: 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_groups09:33
bshepharThere 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-hot09:34
bshepharSo you would put it all in your templates, then just openstack stack create -t your_template my-heat-stack09:35
palaueband I create a new stack for every "instance" I create from heat?09:36
bshepharYou 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-hot09:37
palauebOk, thanks, I will check that in detail.09:37
palauebNow I have executed correctly a stack template, but while creating it is driving me crazy from the OS::Cinder::Volume resource09:37
palauebIf I set the availability_zone on the volume creation, it give me error 400 -> Availability zone 'nvme' is invalid 09:39
bshepharThe 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-openstack09:39
bshepharpalaueb: So that error would be coming back from Cinder. You would need to check the Cinder logs and verify that the Availability Zone nvme exists09:40
palauebit exists, if I check openstack availability zones list it is there09:40
palaueband I have not access to openstack logs right now09:41
palauebIf I do not define the availzone, it says something worse09:42
palauebResource CREATE failed: ResourceInError: resources.bootable_volume: Went to status error due to "Unknown"09:42
bshepharFrom 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-hot09:45
bshepharBut it looks like the error is probably something that Cinder is returning09:45
palauebuhm... this is my current boot creation code https://pastebin.com/ZUfB6jNd I will check with our openstack admins09:47
bshepharYeah, 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 details09:47
bshepharhttps://github.com/openstack/cinder/blob/6643e3e62c9587e404b574c617bacc60ae180615/cinder/volume/flows/api/create_volume.py#L311-L32409:48
palauebI see ...09:50
palauebThanks, I will be working on this09:51
bshepharJust for my sanity. What do you see if you run: openstack availability zone list --volume  nvme definitely shows up in that output?09:54
palauebI got where i failed09:56
bshepharOh nice. 09:56
palaueblet me see if I'm on the right path09:56
palauebI gonna see that command09:56
bshepharNo worries. Good luck. :)09:57
palaueb openstack availability zone list: error: unrecognized arguments: nvme09:57
palauebyep, I'm not using the right parameters09:57
bshepharSorry, the command is just ` openstack availability zone list --volume `.. But does nvme show up in the list09:58
palauebI see... I watching what values openstack volume list gives me09:59
palauebvolume type list I mean10:00
palauebIt seems the right value is nvme_volume10:00
palauebnope openstack availability zone list: error: unrecognized arguments: nvme_volume10:00
bshephar$ openstack availability zone list --volume -f yaml10:01
bshephar- Zone Name: nova10:01
bshephar  Zone Status: available10:01
bshepharBut it doesn't matter if you already know the name is nvme_volume10:02
bshepharThat should be all the info you need to get passed the issue10:02
palauebmy admin is telling me I must use nova too10:02
bshepharhaha, doesn't want to use the expensive nvme disks. :) 10:03
palauebhahaha, everything is nvme10:05
palauebbut I don't know why it does not let me do it10:06
palauebwhat 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
bshepharpalaueb: 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 example10:12
bshepharThis 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-param10:13
bshepharSo 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-parameters10:14
bshepharSo 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.yaml10:16
bshepharopenstack stack create -t my_template.yaml STACK2 -e stack2_environment.yaml10:16
palauebI have variables on them, but when I do 'stack create' it tells me that there is already a stack with that  name10:16
bshepharYeah, so seperate stack names10:16
bshepharIf you want to add VM's to the same stack, you can add them into the template and do a stack update10:17
palaueboh, each deploy must have his own stack10:17
palauebohhh10:17
bshepharopenstack stack update STACK1 -t my_template.yaml -e stack1_environment.yaml10:17
bshepharI'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/UCUtjYRqBr7utrqsnUzMmdTw10:20
palauebok, insta subscriving10:28
palauebyup, I'm there!10:29
bshepharThanks! I'll work on it over the next couple of days and get it uploaded.10:30
palauebI'm not in a rush10:30
palauebI have readed the documentation and my biggest missunderstanding is related to the use and reuse of the templates10:30
bshepharOk, maybe I can improve our documentation around update Heat stacks as well then10:35
palauebjust adding another example on how to reuse the stack templates will be awesome10:37
palauebIf I can help you on that, I will do it pretty happy10:38
palauebdo you have Twitter?10:38
bshepharYep, like an example of adding another VM to an existing stack and using the openstack stack update command.10:38
palauebthat's an interesting one10:38
palaueband another to use same template to create different stacks of servers10:38
bshepharI have a twitter account for my YT channel, but it hasn't got a lot of attention: https://twitter.com/who_triple  10:39
palauebat least I can add to my network and keep contact if I can help on anything10:40
bshepharSure, 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
palauebnow you have your first follower :)10:40
bshepharhaha thanks!10:41
*** ysandeep is now known as ysandeep|break11:02
*** ysandeep|break is now known as ysandeep11:58
*** ysandeep is now known as ysandeep|afk13:09
*** ysandeep|afk is now known as ysandeep13:46
palauebIs 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
palauebI see AutoScalingGroup :)14:34
palauebMaybe this will fit in better OS::Heat::InstanceGroup¶14:39
palauebok, 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 on14:46
palauebDo you know what to use?14:46
palauebThis is what I'm searching for https://docs.openstack.org/heat/latest/template_guide/openstack.html#OS::Heat::ResourceGroup14:50
*** blarnath is now known as d34dh0r5314:56
palaueband 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
palauebthis will help again: http://hardysteven.blogspot.com/2014/09/using-heat-resourcegroup-resources.html15:11
*** ysandeep is now known as ysandeep|out15:59

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!