Tag: openstack.

  • OpenStack Ironic: Manual Node Tagging and Mapping

    RedHat-Openstack-Logo

    Some of the OpenStack director guides that I have seen and read suggest using ACH Tools to perform role matching, which matches Ironic nodes to the most appropriate roles (flavors) bases on their CPU, Memory, and Disk configurations.

    However if you prefer to manually assign a role to a node follow the steps outlined below.

    Creating Flavors

    Before we can manually assign a role to a flavor, we must first create the flavor. In this example we are going to create 4 flavors.

    First lets create the flavor that will be used for our OpenStack Overcloud Controllers.

    # openstack flavor create –id auto –ram 8192 –disk 26 –vcpus 4 control
    +—————————-+————————————–+
    | Field | Value |
    +—————————-+————————————–+
    | OS-FLV-DISABLED:disabled | False |
    | OS-FLV-EXT-DATA:ephemeral | 0 |
    | disk | 26 |
    | id | 4007f8a4-6ea9-400e-9142-6926f0538b29 |
    | name | control |
    | os-flavor-access:is_public | True |
    | ram | 8192 |
    | rxtx_factor | 1.0 |
    | swap | |
    | vcpus | 4 |
    +—————————-+————————————–+

    Now lets create the flavor that will be used for our OpenStack Overcloud Compute Nodes.

    # openstack flavor create –id auto –ram 6144 –disk 18 –vcpus 2 compute
    +—————————-+————————————–+
    | Field | Value |
    +—————————-+————————————–+
    | OS-FLV-DISABLED:disabled | False |
    | OS-FLV-EXT-DATA:ephemeral | 0 |
    | disk | 18 |
    | id | 60d05417-d2ba-4f62-a37c-1bafbfaec30a |
    | name | compute |
    | os-flavor-access:is_public | True |
    | ram | 6144 |
    | rxtx_factor | 1.0 |
    | swap | |
    | vcpus | 2 |
    +—————————-+————————————–+

    Since our POC deployment will also include CEPH nodes, we need to also create a CEPH role.

    # openstack flavor create –id auto –ram 4096 –disk 18 –vcpus 2 ceph
    +—————————-+————————————–+
    | Field | Value |
    +—————————-+————————————–+
    | OS-FLV-DISABLED:disabled | False |
    | OS-FLV-EXT-DATA:ephemeral | 0 |
    | disk | 18 |
    | id | 5480e8e6-f895-4870-b4dc-e5fff5a32911 |
    | name | ceph |
    | os-flavor-access:is_public | True |
    | ram | 4096 |
    | rxtx_factor | 1.0 |
    | swap | |
    | vcpus | 2 |
    +—————————-+————————————–+

    Important Note: You need to have a baremetal role created otherwise your deployment will fail, use the command below to create it.

    # openstack flavor create –id auto –ram 8192 –disk 58 –vcpus 4 baremetal

    Now let’s check our work with the command below. You should see your 4 roles listed (Baremetal, Ceph, Control, and Compute).

    #openstack flavor list

    (more…)

  • OpenStack director Overcloud Image Build Using the RHN Portal

    a17f5-6a00e551c39e1c8834015436149671970c-pi

    Most of the documentation that I see on the subject of building your own Overcloud images use repos that are not available to most users. Today, I am going to document two additional scenarios. One, using a local Satellite server, and the other using the Red Hat (RHN) Portal.

    RHEL Portal Registration

    Here are the steps to use if you want your overcloud machines to register to the RHEL portal.

    First export a bunch of ENV variables.

    export NODE_DIST=rhel7
    export DIB_LOCAL_IMAGE=rhel7-guest.qcow2
    export USE_DELOREAN_TRUNK=0
    export REG_METHOD=portal
    export REG_USER=”RHN-USERID”
    export REG_PASSWORD='<RHN-PASSWORD!’
    # Find this with `sudo subscription-manager list –available`
    export REG_POOL_ID=”[pool id]”
    export REG_REPOS=”rhel-7-server-rpms \
    rhel-7-server-extras-rpms \
    rhel-ha-for-rhel-7-server-rpms \
    rhel-7-server-optional-rpms \
    rhel-7-server-openstack-7.0-rpms”

    Now start your build. Should take about 30 minutes, so be patient.

    #time openstack overcloud image build –all 2>&1 | tee openstack_image_build.log

     

    RHEL Satellite Registration

    When registering to a local satellite server, use the format below. Note that you must use an activation key, as using id and password authentication is not supported for security reasons.

    export REG_METHOD=satellite
    # REG_SAT_URL should be in the format of:
    # http://<satellite-hostname
    export REG_SAT_URL=”[satellite url]”
    export REG_ORG=”[satellite org]”
    # Activation key must enable these repos:
    # rhel-7-server-rpms
    # rhel-7-server-optional-rpms
    # rhel-7-server-extras-rpms
    # rhel-7-server-openstack-7.0-rpms
    export REG_ACTIVATION_KEY=”[activation key]”

    Now start your build. Remember to be patient.

    time openstack overcloud image build –all 2>&1 | tee openstack_image_build.log

  • OpenStack Ironic – CLI Cheat Sheet

    home-iron

    Ironic is the baremetal provisioning component of OpenStack. Ironic interacts with hardware through a set of plug-ins. Technologies leveraged are PXE and IPMI as well as a few vendor specific plug-ins.

    Here are a few OpenStack Ironic commands that I have found useful when troubleshooting.

    List nodes registered with Ironic.

    $ ironic node-list

     

    Show details of a specific node using the node UUID – your node UUID will differ.

    $ ironic node-show 5492ee96-218f-4e0e-b5b3-4931ba2c9ede

     

    Disable maintenance mode for a specific node.

    $ ironic node-set-maintenance 5492ee96-218f-4e0e-b5b3-4931ba2c9ede off

     

    The command below is useful for watching logs. Note…

    • -u is used to specify the unit
    • -f is used to tail logs

    $sudo journalctl -u openstack-ironic-conductor -u openstack-ironic-api -f

     

    Make a node available for scheduling by nova. Below is an example using a UUID in my environment.

    $ ironic node-set-provision-state 5492ee96-218f-4e0e-b5b3-4931ba2c9ede provide

     

    Show Mac address for a particular ironic node – uses UUID.

    $ ironic node-port-list 5492ee96-218f-4e0e-b5b3-4931ba2c9ede

    More examples to come.

    Delete a node – using UUID

    $ironic node-set-provision-state f7f58a13-1ac8-4d3a-b1b8-e7a02a07a323 deleted

    Force Delete a Node from the Database – Use this option when your node is stuck in the “deleting” Provisioning State.

    Log into mysql database

    [stack@undercloud] # sudo mysql -u root

    Switch to the ironic database

    MariaDB [(none)]> use ironic;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Force state change using UUID of Ironic Node.

    MariaDB [ironic]> UPDATE nodes SET provision_state=”available”, target_provision_state=NULL WHERE uuid=”f7f58a13-1ac8-4d3a-b1b8-e7a02a07a323″;
    Query OK, 1 row affected (0.01 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    MariaDB [ironic]> exit
    Bye

     

  • OpenStack Ironic : JSON Validator

    12340anvil

    This handy tool, developed by an engineer at Red Hat, checks your Ironic JSON file for errors such as missing passwords, or non-unique MAC addresses. The script also tests connections to your bare metal (or virtual nodes in my test lab) to ensure that they are accessible.

    Learn more via the link below:

    https://github.com/rthallisey/clapper

    Or download the script directly via this link.

    Usage, at least in my case, is shown below. Here, I am running the script against my instackenv.json file.

    [code language=”css”]
    # python instackenv-validator.py -f instackenv.json
    INFO:__main__:Checking node 192.168.122.1
    DEBUG:__main__:Identified virtual node
    INFO:__main__:Checking node 192.168.122.1
    DEBUG:__main__:Identified virtual node
    INFO:__main__:Checking node 192.168.122.1
    DEBUG:__main__:Identified virtual node
    INFO:__main__:Checking node 192.168.122.1
    DEBUG:__main__:Identified virtual node
    INFO:__main__:Checking node 192.168.122.1
    DEBUG:__main__:Identified virtual node
    DEBUG:__main__:Baremetal IPs are all unique.
    DEBUG:__main__:MAC addresses are all unique.

    ——————–
    SUCCESS: instackenv validator found 0 errors
    [/code]

  • Getting Started with Red Hat OpenStack director

    OpenStack-logo

    Previously,  I wrote a short blog post on OpenStack director, the new Red Hat installer for Openstack 7 (kilo). That post can be found here, and includes a short video introduction and demo of the new installer – RHEL OSP director.

    OpenStack director introduces the concepts of an undercloud and an overcloud. These concepts derived from TripleO, AKA, OpenStack on OpenStack. It’s a bit tricky at first viewing, but once you have worked through an install or two, it makes much more sense.

    That being said… In this post, I am going to provide a few helpful links that can be used to help you get started with installing OpenStack director and your OpenStack overcloud.

    First, below is the link to the official installation documentation. I have been following along with this guide, in addition to my internal notes, and have found the official documentation to be very useful.

    Red Hat OpenStack Director Installation Guide

    In addition to the link above, I am including the link below which directs you to the download page of the images used to build your overcloud. You are going to need these to get started, as the above guide will tell you. I figured I would provide that link as well to help move the process along. Download all three tar files.

     

    Overcloud Image Download

    Enjoy !!

    PS. Note that there are some users experiencing issues with the 7.2 images. See link below. 

    https://bugzilla.redhat.com/show_bug.cgi?id=1296330

    As of today 7.3 (2/18/2016) 7.3 images are available via the link download link above.

     

  • Enable Nested Virtualization on RHEL 7

    empty birds nest

    Follow the steps shown below if you want to be able to run nested virtual machines on RHEL 7 via KVM.

    In this particular situation I have a physical Supermicro server that I want to use to host OpenStack.

    Note that my home server has Intel Xeon processors, so I first enable nested virtualization via the KVM intel module.  AMD procs use a different module.

    [code language=”css”]
    cat << EOF > /etc/modprobe.d/kvm_intel.conf
    options kvm-intel nested=1
    options kvm-intel enable_shadow_vmcs=1
    options kvm-intel enable_apicv=1
    options kvm-intel ept=1
    EOF
    [/code]

    Also, in order to communicate with your nested VMs you will need to disable reverse path filtering, otherwise RHEL will discard any network packets in order to prevent asymmetric routing. See below.

    [code language=”css”]
    cat << EOF > /etc/sysctl.d/98-rp-filter.conf
    net.ipv4.conf.default.rp_filter = 0
    net.ipv4.conf.all.rp_filter = 0
    EOF
    [/code]

    The simplest way to enable these changes is via a reboot of the physical host.