Add new applications using bundle to model

I have an openstack(base) already running but I want to add Ironic baremetal, I have a bundle configured with all required components . how I deploy over existing deployment with proper relations?

do I need to use overlay? here is my setup

#deploy ironic over existing openstack base 
series: focal
variables:
 openstack-origin: &openstack-origin cloud:focal-wallaby

machines:
  '0':
    series: focal
    constraints: tags=openstack-cloud
  '1':
    series: focal
    constraints: tags=openstack-cloud
  '2':
    series: focal
    constraints: tags=openstack-cloud


applications:
  nova-ironic:
    charm: cs:~openstack-charmers-next/nova-compute
    series: focal
    num_units: 1
    bindings:
      "": admin-space
    options:
      enable-live-migration: false
      enable-resize: false
      openstack-origin: openstack-origin
      virt-type: ironic
    to:
      - "lxd:2"


  ironic-api:
    charm: cs:~openstack-charmers-next/ironic-api
    num_units: 1
    series: focal
    options:
      openstack-origin: *openstack-origin
    bindings:
      "": admin-space
    to:
      - "lxd:1"
  ironic-conductor:
    charm: cs:~openstack-charmers-next/ironic-conductor
    num_units: 1
    series: focal
    options:
      openstack-origin: *openstack-origin
      max-tftp-block-size: 1418
      disable-secure-erase: true
      use-ipxe: true
      enabled-network-interfaces: "neutron"
      provisioning-network: "qts-bare" 
      cleaning-network: "qts-bare" 
    bindings:
      "": admin-space
    to:
      - "lxd:2"
  neutron-ironic-agent:
    charm: cs:~openstack-charmers-next/neutron-api-plugin-ironic
    num_units: 0
    series: focal
    options:
      openstack-origin: *openstack-origin
relations: 
- - nova-ironic
  - ironic-api
- - ironic-conductor
  - ironic-api
- - neutron-ironic-agent:identity-credentials
  - keystone
- - neutron-ironic-agent
  - neutron-api
- - ironic-api:amqp
  - rabbitmq-server:amqp
- - ironic-api
  - keystone
- - ironic-api:shared-db
  - mysql:shared-db
- - ironic-conductor:amqp
  - rabbitmq-server:amqp
- - ironic-conductor
  - keystone
- - ironic-conductor:shared-db
  - mysql:shared-db
- - nova-ironic:amqp
  - rabbitmq-server:amqp
- - nova-ironic
  - glance
- - nova-ironic
  - keystone
- - nova-ironic
  - nova-ironic:ceph
- - nova-ironic:ceph-access

thanks in advance.

Adding in @openstack-charmers as they might have more relevant knowledge.

I would suggest testing in a lab before performing in production, but a typical way to deploy an “add-on” or “overlay” bundle is to do the following:

juju export-bundle > current-bundle.yaml
juju deploy --dry-run --verbose ./current-bundle.yaml --overlay ironic-bundle.yaml
# checkoutput for sanity, then re-run without --dry-run flag.

You may also need to use the deploy flag --map-machines=existing if things look off from the --dry-run.

If it complains about applications not existing for the relations, like “keystone”, grab the lines:

  keystone:
    charm: cs:keystone-XYZ

from the current-bundle.yaml file and place those two lines to define a generic keystone charm for use with the relation, it’ll pick up that the keystone application already exists in the model and not deploy a new version.

1 Like

thanks @afreiberger, now I need to know how to use nova with kvm and ironic at same time .

I’ve just learned a good deal about that myself.

I’d suggest starting by looking into the openstack baremetal node * commands.

You’ll have to define the baremetal nodes that ironic is allowed to deploy, and what their resource_class will be. You can then target deploying a baremetal system by creating a host aggregate which points to the resource_class provided in the baremetal node create command, and then create specific flavors which targets that host aggregate.

This link may provide a good starting point in the middle of the ironic documentation, since the charms have likely configured all of the infrastructure and service bits covered in earlier parts of the ironic documentation:

https://docs.openstack.org/ironic/latest/install/enrollment.html#adding-scheduling-information