Skip to content

ironic: Install deploy image with ironic#2100

Merged
toabctl merged 1 commit into
crowbar:masterfrom
skazi0:ironic-image
Jun 3, 2019
Merged

ironic: Install deploy image with ironic#2100
toabctl merged 1 commit into
crowbar:masterfrom
skazi0:ironic-image

Conversation

@skazi0

@skazi0 skazi0 commented Apr 10, 2019

Copy link
Copy Markdown
Member

The official SUSE deploy image package will be installed by default
together with ironic-server role. Kernel and ramdisk images will be
uploaded to glance.

Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
ramdisk_image_prefix = "ir-deploy-ramdisk"
image_path = "/srv/tftpboot/openstack-ironic-image"

image_version_env = "IMAGE_VERSION=$(readlink #{image_path}/vmlinux | egrep -o '[0-9]+\\.[0-9]+\\.[0-9]+' | head -n1)"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metrics/LineLength: Line is too long. [118/100] (https://github.com/SUSE/style-guides/blob/master/Ruby.md#metricslinelength)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would work so as long as the file naming convention stayed the same.

@skazi0

skazi0 commented May 6, 2019

Copy link
Copy Markdown
Member Author

Versioning of images in glance added.

Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
guangyee
guangyee previously approved these changes May 6, 2019
ramdisk_image_prefix = "ir-deploy-ramdisk"
image_path = "/srv/tftpboot/openstack-ironic-image"

image_version_env = "IMAGE_VERSION=$(readlink #{image_path}/vmlinux | egrep -o '[0-9]+\\.[0-9]+\\.[0-9]+' | head -n1)"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would work so as long as the file naming convention stayed the same.

env << "OS_PROJECT_NAME='#{keystone_settings["service_tenant"]}' "
env << "OS_AUTH_URL='#{keystone_settings["internal_auth_url"]}' "
env << "OS_INTERFACE=internal "
env << "OS_IDENTITY_API_VERSION=3 "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need the domain as well? Like OS_DEFAULT_DOMAIN=#{keystone_settings["admin_domain"]}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure. There are at least a couple of places which didn't set this (e.g. glance/recipes/setup.rb).

Comment thread chef/cookbooks/ironic/recipes/post_install.rb Outdated
env << "OS_INTERFACE=internal "
env << "OS_IDENTITY_API_VERSION=3 "

kernel_image_prefix = "ir-deploy-kernel"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we name this ironic-deploy-kernel ? ir might be a bit cryptic. Or is there some length limitation?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was changed based on Ardana naming.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think we should keep the names consistent with Ardana to avoid further confusion.

env << "OS_IDENTITY_API_VERSION=3 "

kernel_image_prefix = "ir-deploy-kernel"
ramdisk_image_prefix = "ir-deploy-ramdisk"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

The official SUSE deploy image package will be installed by default
together with ironic-server role. Kernel and ramdisk images will be
uploaded to glance.
Comment thread chef/cookbooks/ironic/recipes/post_install.rb
Comment thread chef/cookbooks/ironic/recipes/post_install.rb
Comment thread chef/cookbooks/ironic/recipes/post_install.rb
@skazi0 skazi0 requested a review from toabctl May 31, 2019 20:37

@guangyee guangyee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

# This is to trigger the above resource to run :delayed, so that they run at
# the end of the chef-client run, after the ironic services have been restarted
# (in case of a config change)
execute "trigger-ironic-post-commands" do

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this tested with HA? What if 3 cluster nodes want to upload the image at the same time?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current ironic barclamp doesn't support HA (i.e. you can't assign role to cluster, only to single node).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants