Last active
August 29, 2015 14:05
-
-
Save yeonki-choi/a9400549a684eaaf1c74 to your computer and use it in GitHub Desktop.
Openstack Ironic (Bare metal service) Installation script on controller node.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### Downloand and install ironic ########################################## | |
[root@controller01 ~]# yum install python-devel openssl-devel python-pip mysql-devel libxml2-devel libxslt-devel postgresql-devel git git-review libffi-devel gcc libgcc | |
[root@controller01 ~]# git clone https://github.com/openstack/ironic.git | |
[root@controller01 ~]# cd ironic | |
[root@controller01 ironic]# ls -al | |
total 68 | |
-rw-r--r-- 1 root root 17 Aug 8 10:53 babel.cfg | |
-rw-r--r-- 1 root root 521 Aug 8 10:53 CONTRIBUTING.rst | |
drwxr-xr-x 3 root root 4096 Aug 8 10:53 doc | |
drwxr-xr-x 4 root root 4096 Aug 8 10:53 etc | |
drwxr-xr-x 13 root root 4096 Aug 8 10:53 ironic | |
-rw-r--r-- 1 root root 10143 Aug 8 10:53 LICENSE | |
-rw-r--r-- 1 root root 94 Aug 8 10:53 MANIFEST.in | |
-rw-r--r-- 1 root root 586 Aug 8 10:53 openstack-common.conf | |
-rw-r--r-- 1 root root 1108 Aug 8 10:53 README.rst | |
-rw-r--r-- 1 root root 697 Aug 8 10:53 requirements.txt | |
-rw-r--r-- 1 root root 2290 Aug 8 10:53 setup.cfg | |
-rwxr-xr-x 1 root root 1045 Aug 8 10:53 setup.py | |
-rw-r--r-- 1 root root 468 Aug 8 10:53 test-requirements.txt | |
drwxr-xr-x 3 root root 4096 Aug 8 10:53 tools | |
-rw-r--r-- 1 root root 1618 Aug 8 10:53 tox.ini | |
[root@controller01 ironic]# ./setup.py | |
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...] | |
or: setup.py --help [cmd1 cmd2 ...] | |
or: setup.py --help-commands | |
or: setup.py cmd --help | |
error: no commands supplied | |
# Try to install | |
[root@controller01 ironic]# ./setup.py install | |
running install | |
Requirement already satisfied (use --upgrade to upgrade): pbr>=0.6,!=0.7,<1.0 in /usr/lib/python2.6/site-packages | |
Requirement already satisfied (use --upgrade to upgrade): SQLAlchemy>=0.8.4,<=0.8.99,>=0.9.7,<=0.9.99 in /usr/lib64/python2.6/site-packages | |
Downloading/unpacking alembic>=0.6.4 | |
Downloading alembic-0.6.6.tar.gz (466kB): 466kB downloaded | |
Running setup.py egg_info for package alembic | |
warning: no files found matching '*.jpg' under directory 'docs' | |
warning: no files found matching '*.sty' under directory 'docs' | |
warning: no files found matching '*.dat' under directory 'tests' | |
warning: no files found matching 'distribute_setup.py' | |
no previously-included directories found matching 'docs/build/output' | |
Requirement already satisfied (use --upgrade to upgrade): anyjson>=0.3.3 in /usr/lib/python2.6/site-packages | |
Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.6/site-packages | |
Requirement already satisfied (use --upgrade to upgrade): eventlet>=0.13.0 in /usr/lib/python2.6/site-packages | |
Downloading/unpacking kombu>=2.4.8 | |
Downloading kombu-3.0.21.tar.gz (343kB): 343kB downloaded | |
Running setup.py egg_info for package kombu | |
warning: no files found matching 'README' | |
Requirement already satisfied (use --upgrade to upgrade): lockfile>=0.8 in /usr/lib/python2.6/site-packages | |
Downloading/unpacking lxml>=2.3 | |
Downloading lxml-3.3.5.tar.gz (3.5MB): 3.5MB downloaded | |
Running setup.py egg_info for package lxml | |
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'bugtrack_url' | |
warnings.warn(msg) | |
Building lxml version 3.3.5. | |
Building without Cython. | |
ERROR: /bin/sh: xslt-config: command not found | |
** make sure the development packages of libxml2 and libxslt are installed ** | |
Using build configuration of libxslt | |
warning: no previously-included files found matching '*.py' | |
Requirement already satisfied (use --upgrade to upgrade): WebOb>=1.2.3 in /usr/lib/python2.6/site-packages | |
Requirement already satisfied (use --upgrade to upgrade): greenlet>=0.3.2 in /usr/lib64/python2.6/site-packages | |
Requirement already satisfied (use --upgrade to upgrade): futures>=2.1.3 in /usr/lib/python2.6/site-packages | |
Downloading/unpacking sqlalchemy-migrate>=0.9.1 | |
Downloading sqlalchemy-migrate-0.9.1.tar.gz (123kB): 123kB downloaded | |
Running setup.py egg_info for package sqlalchemy-migrate | |
[pbr] Processing SOURCES.txt | |
warning: LocalManifestMaker: standard file '-c' not found | |
warning: no previously-included files found matching '.gitignore' | |
warning: no previously-included files found matching '.gitreview' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
warning: no files found matching 'README' | |
warning: no files found matching '*' under directory 'docs' | |
warning: no files found matching '*' under directory 'tests' | |
warning: no previously-included files matching '*pyc' found anywhere in distribution | |
warning: no previously-included files matching '*' found under directory 'docs/_build' | |
Downloading/unpacking netaddr>=0.7.6 | |
Downloading netaddr-0.7.12.tar.gz (1.5MB): 1.5MB downloaded | |
Running setup.py egg_info for package netaddr | |
warning: no previously-included files matching '*.svn*' found anywhere in distribution | |
warning: no previously-included files matching '*.git*' found anywhere in distribution | |
Downloading/unpacking paramiko>=1.13.0 | |
Downloading paramiko-1.14.0.tar.gz (1.1MB): 1.1MB downloaded | |
Running setup.py egg_info for package paramiko | |
Requirement already satisfied (use --upgrade to upgrade): iso8601>=0.1.9 in /usr/lib/python2.6/site-packages | |
Downloading/unpacking python-neutronclient>=2.3.6,<3 | |
Downloading python-neutronclient-2.3.6.tar.gz (123kB): 123kB downloaded | |
Running setup.py egg_info for package python-neutronclient | |
[pbr] Processing SOURCES.txt | |
warning: LocalManifestMaker: standard file '-c' not found | |
warning: no previously-included files found matching '.gitignore' | |
warning: no previously-included files found matching '.gitreview' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
warning: no files found matching '*' under directory 'tests' | |
Downloading/unpacking python-glanceclient>=0.13.1 | |
Downloading python-glanceclient-0.13.1.tar.gz (109kB): 109kB downloaded | |
Running setup.py egg_info for package python-glanceclient | |
[pbr] Processing SOURCES.txt | |
warning: LocalManifestMaker: standard file '-c' not found | |
warning: no previously-included files found matching '.gitignore' | |
warning: no previously-included files found matching '.gitreview' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
warning: no previously-included files found matching '.gitignore' | |
warning: no previously-included files found matching '.gitreview' | |
Downloading/unpacking python-keystoneclient>=0.10.0 | |
Downloading python-keystoneclient-0.10.1.tar.gz (321kB): 321kB downloaded | |
Running setup.py egg_info for package python-keystoneclient | |
[pbr] Processing SOURCES.txt | |
warning: LocalManifestMaker: standard file '-c' not found | |
warning: no previously-included files found matching '.gitignore' | |
warning: no previously-included files found matching '.gitreview' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
warning: no files found matching 'HACKING' | |
warning: no files found matching '*' under directory 'tests' | |
Downloading/unpacking python-swiftclient>=2.2.0 | |
Downloading python-swiftclient-2.2.0.tar.gz (67kB): 67kB downloaded | |
Running setup.py egg_info for package python-swiftclient | |
[pbr] Processing SOURCES.txt | |
warning: LocalManifestMaker: standard file '-c' not found | |
warning: no previously-included files found matching '.gitignore' | |
warning: no previously-included files found matching '.gitreview' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
warning: no files found matching '*' under directory 'tools' | |
Requirement already satisfied (use --upgrade to upgrade): stevedore>=0.14 in /usr/lib/python2.6/site-packages | |
Requirement already satisfied (use --upgrade to upgrade): pysendfile==2.0.0 in /usr/lib64/python2.6/site-packages | |
Requirement already satisfied (use --upgrade to upgrade): websockify>=0.5.1,<0.6 in /usr/lib/python2.6/site-packages | |
Downloading/unpacking oslo.config>=1.4.0.0a3 | |
Could not find a version that satisfies the requirement oslo.config>=1.4.0.0a3 (from versions: 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0) | |
No distributions matching the version for oslo.config>=1.4.0.0a3 | |
Storing complete log in /root/.pip/pip.log | |
error: ['/usr/bin/python', u'-m', u'pip.__init__', u'install', u'pbr>=0.6,!=0.7,<1.0', u'SQLAlchemy>=0.8.4,<=0.8.99,>=0.9.7,<=0.9.99', u'alembic>=0.6.4', u'anyjson>=0.3.3', u'argparse', u'eventlet>=0.13.0', u'kombu>=2.4.8', u'lockfile>=0.8', u'lxml>=2.3', u'WebOb>=1.2.3', u'greenlet>=0.3.2', u'futures>=2.1.3', u'sqlalchemy-migrate>=0.9.1', u'netaddr>=0.7.6', u'paramiko>=1.13.0', u'iso8601>=0.1.9', u'python-neutronclient>=2.3.6,<3', u'python-glanceclient>=0.13.1', u'python-keystoneclient>=0.10.0', u'python-swiftclient>=2.2.0', u'stevedore>=0.14', u'pysendfile==2.0.0', u'websockify>=0.5.1,<0.6', u'oslo.config>=1.4.0.0a3', u'oslo.db>=0.2.0 # Apache-2.0', u'oslo.rootwrap>=1.3.0.0a1', u'oslo.i18n>=0.1.0 # Apache-2.0', u'oslo.utils>=0.1.1 # Apache-2.0', u'pecan>=0.5.0', u'six>=1.7.0', u'jsonpatch>=1.1', u'WSME>=0.6', u'Jinja2', u'oslo.messaging>=1.4.0.0a3', u'retrying>=1.2.2 # Apache-2.0'] returned 1 | |
# Failed to install, because of dependency problem which was caused by oslo.config>=1.4.0.0a3 | |
# Download oslo.config 1.4.0.0a3 from git reposityr. | |
[root@controller01 ironic]# cd .. | |
[root@controller01 ~]# git clone https://github.com/openstack/oslo.config.git | |
Initialized empty Git repository in /root/oslo.config/.git/ | |
remote: Counting objects: 1763, done. | |
remote: Total 1763 (delta 0), reused 0 (delta 0) | |
Receiving objects: 100% (1763/1763), 687.12 KiB | 233 KiB/s, done. | |
Resolving deltas: 100% (761/761), done. | |
[root@controller01 ~]]# cd oslo.config | |
[root@controller01 oslo.config]# ./setup.py install | |
running install | |
Requirement already satisfied (use --upgrade to upgrade): argparse in /usr/lib/python2.6/site-packages | |
Downloading/unpacking netaddr>=0.7.6 | |
Running setup.py egg_info for package netaddr | |
warning: no previously-included files matching '*.svn*' found anywhere in distribution | |
warning: no previously-included files matching '*.git*' found anywhere in distribution | |
Downloading/unpacking six>=1.7.0 | |
Downloading six-1.7.3.tar.gz | |
Running setup.py egg_info for package six | |
no previously-included directories found matching 'documentation/_build' | |
Requirement already satisfied (use --upgrade to upgrade): stevedore>=0.14 in /usr/lib/python2.6/site-packages | |
Installing collected packages: netaddr, six | |
Found existing installation: netaddr 0.7.5 | |
Uninstalling netaddr: | |
Successfully uninstalled netaddr | |
Running setup.py install for netaddr | |
changing mode of build/scripts-2.6/netaddr from 644 to 755 | |
warning: no previously-included files matching '*.svn*' found anywhere in distribution | |
warning: no previously-included files matching '*.git*' found anywhere in distribution | |
changing mode of /usr/bin/netaddr to 755 | |
Found existing installation: six 1.6.1 | |
Uninstalling six: | |
Successfully uninstalled six | |
Running setup.py install for six | |
no previously-included directories found matching 'documentation/_build' | |
Successfully installed netaddr six | |
Cleaning up... | |
running build | |
running build_py | |
creating build | |
creating build/lib | |
creating build/lib/oslo | |
copying oslo/__init__.py -> build/lib/oslo | |
creating build/lib/oslo/config | |
copying oslo/config/__init__.py -> build/lib/oslo/config | |
copying oslo/config/cfg.py -> build/lib/oslo/config | |
copying oslo/config/cfgfilter.py -> build/lib/oslo/config | |
copying oslo/config/iniparser.py -> build/lib/oslo/config | |
copying oslo/config/fixture.py -> build/lib/oslo/config | |
copying oslo/config/generator.py -> build/lib/oslo/config | |
copying oslo/config/types.py -> build/lib/oslo/config | |
running egg_info | |
creating oslo.config.egg-info | |
writing requirements to oslo.config.egg-info/requires.txt | |
writing oslo.config.egg-info/PKG-INFO | |
writing namespace_packages to oslo.config.egg-info/namespace_packages.txt | |
writing top-level names to oslo.config.egg-info/top_level.txt | |
writing dependency_links to oslo.config.egg-info/dependency_links.txt | |
writing entry points to oslo.config.egg-info/entry_points.txt | |
[pbr] Processing SOURCES.txt | |
writing manifest file 'oslo.config.egg-info/SOURCES.txt' | |
[pbr] In git context, generating filelist from git | |
warning: no files found matching 'AUTHORS' | |
warning: no files found matching 'ChangeLog' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
reading manifest template 'MANIFEST.in' | |
warning: no files found matching 'AUTHORS' | |
warning: no files found matching 'ChangeLog' | |
warning: no previously-included files found matching '.gitignore' | |
warning: no previously-included files found matching '.gitreview' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
writing manifest file 'oslo.config.egg-info/SOURCES.txt' | |
running install_lib | |
copying build/lib/oslo/__init__.py -> /usr/lib/python2.6/site-packages/oslo | |
copying build/lib/oslo/config/__init__.py -> /usr/lib/python2.6/site-packages/oslo/config | |
copying build/lib/oslo/config/cfg.py -> /usr/lib/python2.6/site-packages/oslo/config | |
copying build/lib/oslo/config/cfgfilter.py -> /usr/lib/python2.6/site-packages/oslo/config | |
copying build/lib/oslo/config/iniparser.py -> /usr/lib/python2.6/site-packages/oslo/config | |
copying build/lib/oslo/config/fixture.py -> /usr/lib/python2.6/site-packages/oslo/config | |
copying build/lib/oslo/config/generator.py -> /usr/lib/python2.6/site-packages/oslo/config | |
copying build/lib/oslo/config/types.py -> /usr/lib/python2.6/site-packages/oslo/config | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/__init__.py to __init__.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/config/__init__.py to __init__.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/config/cfg.py to cfg.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/config/cfgfilter.py to cfgfilter.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/config/iniparser.py to iniparser.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/config/fixture.py to fixture.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/config/generator.py to generator.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/config/types.py to types.pyc | |
running install_egg_info | |
Copying oslo.config.egg-info to /usr/lib/python2.6/site-packages/oslo.config-1.4.0.0a3.5.gdc5081a-py2.6.egg-info | |
Installing /usr/lib/python2.6/site-packages/oslo.config-1.4.0.0a3.5.gdc5081a-py2.6-nspkg.pth | |
running install_scripts | |
Installing oslo-config-generator script to /usr/bin | |
# Install ironic again. | |
[root@controller01 oslo.config]# cd ../ironic/ | |
... | |
No distributions matching the version for oslo.rootwrap>=1.3.0.0a1 | |
Storing complete log in /root/.pip/pip.log | |
error: ['/usr/bin/python', u'-m', u'pip.__init__', u'install', u'pbr>=0.6,!=0.7,<1.0', u'SQLAlchemy>=0.8.4,<=0.8.99,>=0.9.7,<=0.9.99', u'alembic>=0.6.4', u'anyjson>=0.3.3', u'argparse', u'eventlet>=0.13.0', u'kombu>=2.4.8', u'lockfile>=0.8', u'lxml>=2.3', u'WebOb>=1.2.3', u'greenlet>=0.3.2', u'futures>=2.1.3', u'sqlalchemy-migrate>=0.9.1', u'netaddr>=0.7.6', u'paramiko>=1.13.0', u'iso8601>=0.1.9', u'python-neutronclient>=2.3.6,<3', u'python-glanceclient>=0.13.1', u'python-keystoneclient>=0.10.0', u'python-swiftclient>=2.2.0', u'stevedore>=0.14', u'pysendfile==2.0.0', u'websockify>=0.5.1,<0.6', u'oslo.config>=1.4.0.0a3', u'oslo.db>=0.2.0 # Apache-2.0', u'oslo.rootwrap>=1.3.0.0a1', u'oslo.i18n>=0.1.0 # Apache-2.0', u'oslo.utils>=0.1.1 # Apache-2.0', u'pecan>=0.5.0', u'six>=1.7.0', u'jsonpatch>=1.1', u'WSME>=0.6', u'Jinja2', u'oslo.messaging>=1.4.0.0a3', u'retrying>=1.2.2 # Apache-2.0'] returned 1 | |
# This time, an error was occured by oslo.rootwrap 1.3.0.0a1. | |
# Download oslo.rootwrap 1.3.0.0a1 from git reposityr. | |
[root@controller01 ironic]# cd .. | |
[root@controller01 ~]# git clone https://github.com/openstack/oslo.rootwrap.git | |
Initialized empty Git repository in /root/oslo.rootwrap/.git/ | |
remote: Counting objects: 420, done. | |
remote: Total 420 (delta 0), reused 0 (delta 0) | |
Receiving objects: 100% (420/420), 81.75 KiB, done. | |
Resolving deltas: 100% (182/182), done. | |
# Install oslo.rootwrap 1.3.0.0a1 | |
[root@controller01 ~]# cd oslo.rootwrap/ | |
[root@controller01 oslo.rootwrap]# ./setup.py install | |
running install | |
Requirement already satisfied (use --upgrade to upgrade): six>=1.4.1 in /usr/lib/python2.6/site-packages | |
Cleaning up... | |
running build | |
running build_py | |
creating build | |
creating build/lib | |
creating build/lib/oslo | |
creating build/lib/oslo/rootwrap | |
copying oslo/rootwrap/__init__.py -> build/lib/oslo/rootwrap | |
copying oslo/rootwrap/filters.py -> build/lib/oslo/rootwrap | |
copying oslo/rootwrap/wrapper.py -> build/lib/oslo/rootwrap | |
copying oslo/rootwrap/cmd.py -> build/lib/oslo/rootwrap | |
copying oslo/__init__.py -> build/lib/oslo | |
running egg_info | |
creating oslo.rootwrap.egg-info | |
writing requirements to oslo.rootwrap.egg-info/requires.txt | |
writing oslo.rootwrap.egg-info/PKG-INFO | |
writing namespace_packages to oslo.rootwrap.egg-info/namespace_packages.txt | |
writing top-level names to oslo.rootwrap.egg-info/top_level.txt | |
writing dependency_links to oslo.rootwrap.egg-info/dependency_links.txt | |
[pbr] Processing SOURCES.txt | |
writing manifest file 'oslo.rootwrap.egg-info/SOURCES.txt' | |
[pbr] In git context, generating filelist from git | |
warning: no files found matching 'AUTHORS' | |
warning: no files found matching 'ChangeLog' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
reading manifest template 'MANIFEST.in' | |
warning: no files found matching 'AUTHORS' | |
warning: no files found matching 'ChangeLog' | |
warning: no previously-included files found matching '.gitignore' | |
warning: no previously-included files found matching '.gitreview' | |
warning: no previously-included files matching '*.pyc' found anywhere in distribution | |
writing manifest file 'oslo.rootwrap.egg-info/SOURCES.txt' | |
running install_lib | |
copying build/lib/oslo/__init__.py -> /usr/lib/python2.6/site-packages/oslo | |
copying build/lib/oslo/rootwrap/__init__.py -> /usr/lib/python2.6/site-packages/oslo/rootwrap | |
copying build/lib/oslo/rootwrap/filters.py -> /usr/lib/python2.6/site-packages/oslo/rootwrap | |
copying build/lib/oslo/rootwrap/wrapper.py -> /usr/lib/python2.6/site-packages/oslo/rootwrap | |
copying build/lib/oslo/rootwrap/cmd.py -> /usr/lib/python2.6/site-packages/oslo/rootwrap | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/__init__.py to __init__.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/rootwrap/__init__.py to __init__.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/rootwrap/filters.py to filters.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/rootwrap/wrapper.py to wrapper.pyc | |
byte-compiling /usr/lib/python2.6/site-packages/oslo/rootwrap/cmd.py to cmd.pyc | |
running install_egg_info | |
Copying oslo.rootwrap.egg-info to /usr/lib/python2.6/site-packages/oslo.rootwrap-1.3.0.0a1.7.g8ca6446-py2.6.egg-info | |
Installing /usr/lib/python2.6/site-packages/oslo.rootwrap-1.3.0.0a1.7.g8ca6446-py2.6-nspkg.pth | |
running install_scripts | |
# Install ironic again (3rd time) | |
... | |
Downloading/unpacking oslo.messaging>=1.4.0.0a3 | |
Could not find a version that satisfies the requirement oslo.messaging>=1.4.0.0a3 (from versions: 1.3.0, 1.3.0a4, 1.3.0a5, 1.3.0a6, 1.3.0a7, 1.3.0a8, 1.3.0a9, 1.3.1) | |
No distributions matching the version for oslo.messaging>=1.4.0.0a3 | |
# It is able to download Openstack python modules which have name oslo.* from git repo. | |
# Moules that needed to download manually are following: | |
# oslo.config>=1.4.0.0a3 | |
# oslo.db>=0.2.0 | |
# oslo.rootwrap>=1.3.0.0a1 | |
# oslo.i18n>=0.1.0 | |
# oslo.utils>=0.1.1 | |
# oslo.messaging>=1.4.0.0a3 | |
# Download oslo modules. | |
[root@controller01 ~]# git clone https://github.com/openstack/oslo.db.git | |
Initialized empty Git repository in /root/oslo.db/.git/ | |
remote: Counting objects: 2681, done. | |
remote: Compressing objects: 100% (23/23), done. | |
remote: Total 2681 (delta 5), reused 2 (delta 0) | |
Receiving objects: 100% (2681/2681), 651.26 KiB | 210 KiB/s, done. | |
Resolving deltas: 100% (1408/1408), done. | |
[root@controller01 ~]# git clone https://github.com/openstack/oslo.i18n.git | |
Initialized empty Git repository in /root/oslo.i18n/.git/ | |
remote: Counting objects: 621, done. | |
remote: Total 621 (delta 0), reused 0 (delta 0) | |
Receiving objects: 100% (621/621), 120.09 KiB | 84 KiB/s, done. | |
Resolving deltas: 100% (240/240), done. | |
[root@controller01 ~]# git clone https://github.com/openstack/oslo.utils.git | |
Initialized empty Git repository in /root/oslo.utils/.git/ | |
remote: Counting objects: 902, done. | |
remote: Compressing objects: 100% (7/7), done. | |
remote: Total 902 (delta 3), reused 0 (delta 0) | |
Receiving objects: 100% (902/902), 141.32 KiB | 116 KiB/s, done. | |
Resolving deltas: 100% (388/388), done. | |
[root@controller01 ~]# git clone https://github.com/openstack/oslo.messaging.git | |
Initialized empty Git repository in /root/oslo.messaging/.git/ | |
remote: Counting objects: 3835, done. | |
remote: Compressing objects: 100% (4/4), done. | |
remote: Total 3835 (delta 0), reused 0 (delta 0) | |
Receiving objects: 100% (3835/3835), 1.03 MiB | 382 KiB/s, done. | |
Resolving deltas: 100% (2152/2152), done. | |
# Install ironic again (4th time) | |
[root@controller01 ironic]# ./setup.py install | |
... | |
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL>=0.11->python-glanceclient>=0.13.1) | |
Downloading cryptography-0.5.3.tar.gz (319kB): 319kB downloaded | |
Running setup.py egg_info for package cryptography | |
Package libffi was not found in the pkg-config search path. | |
Perhaps you should add the directory containing 'libffi.pc' | |
to the PKG_CONFIG_PATH environment variable | |
No package 'libffi' found | |
# Failed to dependancy of libffi-devel | |
[root@controller01 ironic]# yum install libffi-devel | |
# Install ironic again (5th time) | |
[root@controller01 ironic]# ./setup.py install | |
... | |
Building lxml version 3.3.5. | |
Building without Cython. | |
ERROR: /bin/sh: xslt-config: command not found | |
** make sure the development packages of libxml2 and libxslt are installed ** | |
[root@controller01 ironic]# yum install libxslt-devel libxml2-devel | |
# Finally, Installation was succeeded. | |
[root@controller01 ironic]# ./setup.py install | |
... | |
running install_egg_info | |
Copying ironic.egg-info to /usr/lib/python2.6/site-packages/ironic-2014.2.dev58.g55e2ea9-py2.6.egg-info | |
running install_scripts | |
Installing ironic-rootwrap script to /usr/bin | |
Installing ironic-dbsync script to /usr/bin | |
Installing ironic-conductor script to /usr/bin | |
Installing ironic-api script to /usr/bin | |
##### ironic client ################################################################ | |
# Download ironic client | |
[root@controller01 ~]# git clone https://github.com/openstack/python-ironicclient.git | |
[root@controller01 python-ironicclient]# ./setup.py install | |
[root@controller01 python-ironicclient]## cd .. | |
[root@controller01 ~]# cp ./ironic/etc/ironic/ironic.conf.sample ./ironic/etc/ironic/ironic.conf.local | |
###### Configure identity service for ironc ########################################## | |
[root@controller01 ~]# keystone user-create --name=ironic --pass=ironic_pass | |
+----------+----------------------------------+ | |
| Property | Value | | |
+----------+----------------------------------+ | |
| email | | | |
| enabled | True | | |
| id | 48dfadedb9914ab0aa231ba512348945 | | |
| name | ironic | | |
| username | ironic | | |
+----------+----------------------------------+ | |
[root@controller01 ~]# keystone user-role-add --user=ironic --tenant=service --role=admin | |
[root@controller01 ~]# keystone service-create --name=ironic --type=baremetal --description="Ironic bare metal provisioning service" | |
+-------------+----------------------------------------+ | |
| Property | Value | | |
+-------------+----------------------------------------+ | |
| description | Ironic bare metal provisioning service | | |
| enabled | True | | |
| id | 0de2febf39414e488b9a342852b7d30b | | |
| name | ironic | | |
| type | baremetal | | |
+-------------+----------------------------------------+ | |
[root@controller01 ~]# keystone endpoint-create --service-id=0de2febf39414e488b9a342852b7d30b --publicurl=http://192.168.56.30:6385 --internalurl=http://192.168.56.30:6385 --adminurl=http://192.168.56.30:6385 | |
+-------------+----------------------------------+ | |
| Property | Value | | |
+-------------+----------------------------------+ | |
| adminurl | http://192.168.56.30:6385 | | |
| id | 2e4dcb795ce04d18a250c8b358ba0fe1 | | |
| internalurl | http://192.168.56.30:6385 | | |
| publicurl | http://192.168.56.30:6385 | | |
| region | regionOne | | |
| service_id | 0de2febf39414e488b9a342852b7d30b | | |
+-------------+----------------------------------+ | |
##### Configure DB for ironc ########################################## | |
[root@controller01 ~]# mysql -u root -p | |
mysql> CREATE DATABASE ironic CHARACTER SET utf8; | |
mysql> GRANT ALL PRIVILEGES ON ironic.* TO 'ironic'@'localhost' IDENTIFIED BY 'ironic_dbpass'; | |
mysql> GRANT ALL PRIVILEGES ON ironic.* TO 'ironic'@'%' IDENTIFIED BY 'ironic_dbpass'; | |
###### Configure ironic.conf ########################################## | |
[root@controller01 ~]# useradd ironic | |
[root@controller01 ~]# mkdir /etc/ironic | |
[root@controller01 ~]# chown -R ironic:ironic /etc/ironic | |
[root@controller01 ~]# vim /etc/ironic/ironic.conf | |
... | |
[DEFAULT] | |
rabbit_host=127.0.0.1 | |
rabbit_port=5672 | |
rabbit_userid=mq_user | |
rabbit_password=mq_pass | |
auth_strategy=keystone | |
enabled_drivers=pxe_ipmitool | |
policy_file=/etc/ironic/policy.json | |
log_file=/var/log/ironic/api.log | |
[conductor] | |
sync_power_state_interval=60 | |
[database] | |
connection=mysql://ironic:[email protected]:3306/ironic?charset=utf8 | |
[glance] | |
glance_host=192.168.56.30 | |
glance_port=9292 | |
auth_strategy=keystone | |
[keystone_authtoken] | |
auth_uri = http://192.168.56.30:35357/v2.0 | |
auth_host = 192.168.56.30 | |
auth_port = 5000 | |
auth_protocol = http | |
admin_tenant_name = service | |
admin_user = ironic | |
admin_password = ironic_pass | |
[neutron] | |
url=http://127.0.0.1:9696 | |
auth_strategy=keystone | |
##### Create the Bare Metal Service tables ###################### | |
[root@controller01 ~]# ironic-dbsync --config-file /etc/ironic/ironic.conf | |
/usr/lib64/python2.6/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. | |
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) | |
2014-08-16 17:00:25.269 6322 CRITICAL ironic [-] ImportError: No module named posix_ipc | |
2014-08-16 17:00:25.269 6322 TRACE ironic Traceback (most recent call last): | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/bin/ironic-dbsync", line 10, in <module> | |
2014-08-16 17:00:25.269 6322 TRACE ironic sys.exit(main()) | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/cmd/dbsync.py", line 94, in main | |
2014-08-16 17:00:25.269 6322 TRACE ironic CONF.command.func() | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/cmd/dbsync.py", line 36, in upgrade | |
2014-08-16 17:00:25.269 6322 TRACE ironic migration.upgrade(CONF.command.revision) | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/db/migration.py", line 31, in upgrade | |
2014-08-16 17:00:25.269 6322 TRACE ironic return IMPL.upgrade(version) | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/common/utils.py", line 160, in __getattr__ | |
2014-08-16 17:00:25.269 6322 TRACE ironic backend = self.__get_backend() | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/common/utils.py", line 156, in __get_backend | |
2014-08-16 17:00:25.269 6322 TRACE ironic self.__backend = __import__(name, None, None, fromlist) | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/db/sqlalchemy/migration.py", line 23, in <module> | |
2014-08-16 17:00:25.269 6322 TRACE ironic from ironic.db.sqlalchemy import api as sqla_api | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/db/sqlalchemy/api.py", line 40, in <module> | |
2014-08-16 17:00:25.269 6322 TRACE ironic group='conductor') | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/oslo/config/cfg.py", line 1830, in import_opt | |
2014-08-16 17:00:25.269 6322 TRACE ironic __import__(module_str) | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/conductor/manager.py", line 55, in <module> | |
2014-08-16 17:00:25.269 6322 TRACE ironic from ironic.common import driver_factory | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/common/driver_factory.py", line 19, in <module> | |
2014-08-16 17:00:25.269 6322 TRACE ironic from ironic.openstack.common import lockutils | |
2014-08-16 17:00:25.269 6322 TRACE ironic File "/usr/lib/python2.6/site-packages/ironic/openstack/common/lockutils.py", line 200, in <module> | |
2014-08-16 17:00:25.269 6322 TRACE ironic import posix_ipc | |
2014-08-16 17:00:25.269 6322 TRACE ironic ImportError: No module named posix_ipc | |
2014-08-16 17:00:25.269 6322 TRACE ironic | |
# Install python-posix_ipc | |
[root@controller01 ~]# yum install python-posix_ipc | |
# Create tables for ironic | |
[root@controller01 ~]# ironic-dbsync --config-file /etc/ironic/ironic.conf | |
/usr/lib64/python2.6/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. | |
_warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) | |
INFO [alembic.migration] Context impl MySQLImpl. | |
INFO [alembic.migration] Will assume non-transactional DDL. | |
INFO [alembic.migration] Running upgrade None -> 2581ebaf0cb2, initial migration | |
INFO [alembic.migration] Running upgrade 2581ebaf0cb2 -> 21b331f883ef, Add provision_updated_at | |
INFO [alembic.migration] Running upgrade 21b331f883ef -> 3cb628139ea4, Nodes add console enabled | |
INFO [alembic.migration] Running upgrade 3cb628139ea4 -> 31baaf680d2b, Add Node instance info | |
INFO [alembic.migration] Running upgrade 31baaf680d2b -> 3bea56f25597, add unique constraint to instance_uuid | |
[root@controller01 ~]# mysql -uironic -pironic_dbpass ironic -e "show tables;" | |
+------------------+ | |
| Tables_in_ironic | | |
+------------------+ | |
| alembic_version | | |
| chassis | | |
| conductors | | |
| nodes | | |
| ports | | |
+------------------+ | |
##### Create openstack-ironic-api service ####################### | |
[root@controller01 ~]# cp /etc/init.d/openstack-cinder-api /etc/init.d/openstack-ironic-api | |
[root@controller01 ~]# sed -i "s/cinder/ironic/g" /etc/init.d/openstack-ironic-api | |
[root@controller01 ~]# mkdir /var/run/ironic | |
[root@controller01 ~]# chown ironic:ironic /var/run/ironic | |
[root@controller01 ~]# chown ironic:ironic /var/log/ironic | |
[root@controller01 ~]# service openstack-ironic-api start | |
[root@controller01 ~]# chkconfig openstack-ironic-api on | |
##### Test ironic ############################################### | |
# Create Chassis | |
[root@controller01 ~]# ironic chassis-create --description "ironic test" | |
+-------------+--------------------------------------+ | |
| Property | Value | | |
+-------------+--------------------------------------+ | |
| uuid | b0248af9-3171-48e4-a239-9708d6016375 | | |
| description | ironic test | | |
| extra | {} | | |
+-------------+--------------------------------------+ | |
[root@controller01 ~]# cha_id=$(ironic chassis-list | grep test | awk '{print $2}') | |
[root@controller01 ~]# ironic node-create --chassis_uuid $cha_id --driver fake | |
No valid host was found. Reason: No conductor service registered which supports driver fake. (HTTP 400) | |
##### Create openstack-ironic-conductor service on compute node ################### | |
# Try to start openstack-ironic-conductor | |
[root@compute01 ~]# service openstack-ironic-conductor start | |
Starting openstack-ironic-conductor: [ OK ] | |
# But failed. | |
[root@compute01 ~]# service openstack-ironic-conductor status | |
openstack-ironic-conductor dead but pid file exists | |
# Got following error when run ironic-conductor | |
[root@compute01 ~]# ironic-conductor | |
Traceback (most recent call last): | |
File "/usr/bin/ironic-conductor", line 6, in <module> | |
from ironic.cmd.conductor import main | |
File "/usr/lib/python2.6/site-packages/ironic/cmd/conductor.py", line 28, in <module> | |
from ironic.common import service as ironic_service | |
File "/usr/lib/python2.6/site-packages/ironic/common/service.py", line 27, in <module> | |
from ironic.objects import base as objects_base | |
File "/usr/lib/python2.6/site-packages/ironic/objects/__init__.py", line 17, in <module> | |
from ironic.objects import chassis | |
File "/usr/lib/python2.6/site-packages/ironic/objects/chassis.py", line 17, in <module> | |
from ironic.common import utils | |
File "/usr/lib/python2.6/site-packages/ironic/common/utils.py", line 33, in <module> | |
import paramiko | |
File "/usr/lib/python2.6/site-packages/paramiko/__init__.py", line 31, in <module> | |
from paramiko.transport import SecurityOptions, Transport | |
File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line 47, in <module> | |
from paramiko.dsskey import DSSKey | |
File "/usr/lib/python2.6/site-packages/paramiko/dsskey.py", line 26, in <module> | |
from Crypto.PublicKey import DSA | |
File "/usr/lib64/python2.6/site-packages/Crypto/PublicKey/DSA.py", line 88, in <module> | |
from Crypto.PublicKey import _DSA, _slowmath, pubkey | |
File "/usr/lib64/python2.6/site-packages/Crypto/PublicKey/_DSA.py", line 30, in <module> | |
from Crypto.PublicKey.pubkey import * | |
File "/usr/lib64/python2.6/site-packages/Crypto/PublicKey/pubkey.py", line 30, in <module> | |
from Crypto.Util.number import * | |
File "/usr/lib64/python2.6/site-packages/Crypto/Util/number.py", line 56, in <module> | |
if _fastmath is not None and not _fastmath.HAVE_DECL_MPZ_POWM_SEC: | |
AttributeError: 'module' object has no attribute 'HAVE_DECL_MPZ_POWM_SEC' | |
# Install pycrypto, a python module. | |
[root@compute01 ~]# yum install gmp-devel | |
[root@compute01 ~]# sudo pip uninstall ecdsa pycrypto paramiko fabric | |
# clear out the pip build dirs | |
[root@compute01 ~]# rm -rf /tmp/pip-* | |
# make sure the directory containing libgmp.so.3 is on the python path | |
[root@compute01 ~]# export LD_LIBRARY_PATH="/usr/lib64:$LD_LIBRARY_PATH" | |
[root@compute01 ~]# pip install fabric | |
... | |
Successfully installed fabric paramiko pycrypto ecdsa | |
# Start openstack-ironic-conductor | |
[root@compute01 ~]# service openstack-ironic-conductor start | |
Starting openstack-ironic-conductor: [ OK ] | |
# It worked. | |
[root@compute01 ~]# service openstack-ironic-conductor status | |
openstack-ironic-conductor (pid 5660) is running... | |
# Back to controller node, run the following. | |
[root@controller01 ~]# ironic driver-list | |
+--------------+-----------+ | |
| name | hosts | | |
+--------------+-----------+ | |
| pxe_ipmitool | compute01 | | |
+--------------+-----------+ | |
[root@controller01 ~]# ironic driver-show pxe_ipmitool | |
Failed to load driver pxe-ipmitool. (HTTP 404) | |
# Should install impitool on compute node. | |
[root@compute01 ~]# yum install OpenIPMI OpenIPMI-tools | |
[root@compute01 ~]# service openstack-ironic-conductor restart | |
[root@compute01 ~]# tail /var/log/ironic/conductor.log | |
... | |
2014-08-17 17:55:47.328 9425 INFO ironic.common.driver_factory [-] Loaded the following drivers: ['pxe_ipmitool'] | |
2014-08-17 17:55:47.431 9425 DEBUG oslo.db.sqlalchemy.session [-] MySQL server mode set to STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER _mysql_check_effective_sql_mode /usr/lib/python2.6/site-packages/oslo/db/sqlalchemy/session.py:583 | |
2014-08-17 17:55:47.437 9425 INFO ironic.conductor.manager [-] Successfuly started conductor with hostname compute01. | |
2014-08-17 17:55:47.438 9425 INFO oslo.messaging._drivers.impl_rabbit [-] Connecting to AMQP server on 192.168.56.30:5672 | |
2014-08-17 17:55:47.451 9425 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 192.168.56.30:5672 | |
2014-08-17 17:55:47.458 9425 INFO ironic.common.service [-] Created RPC server for service ironic.conductor_manager on host compute01. | |
################################################ | |
# Support VBox for the purpose of testing. | |
# Changed to use pxe_ssh driver on compute node | |
[root@compute01 ~]# vim /etc/ironic/ironic.conf | |
... | |
enabled_drivers=pxe_ssh | |
... | |
[root@compute01 ~]# service openstack-ironic-conductor restart | |
[root@controller01 ~]# ironic driver-list | |
+---------+-----------+ | |
| name | hosts | | |
+---------+-----------+ | |
| pxe_ssh | compute01 | | |
+---------+-----------+ | |
[root@controller01 ~]# ironic node-create --chassis_uuid $cha_id --driver pxe_ssh --driver_info ssh_virt_type=vbox --driver_info ssh_address=192.168.56.1 --driver_info ssh_username=yeonki | |
+--------------+-------------------------------------------------------------------------+ | |
| Property | Value | | |
+--------------+-------------------------------------------------------------------------+ | |
| uuid | c75750f3-bbb6-4aed-9acb-140a8dde9f9e | | |
| driver_info | {u'ssh_username': u'yeonki', u'ssh_virt_type': u'vbox', u'ssh_address': | | |
| | u'192.168.56.1'} | | |
| extra | {} | | |
| driver | pxe_ssh | | |
| chassis_uuid | b0248af9-3171-48e4-a239-9708d6016375 | | |
| properties | {} | | |
+--------------+-------------------------------------------------------------------------+ | |
[root@controller01 ~]# ironic port-create --address $mac --node_uuid $node_id | |
+-----------+--------------------------------------+ | |
| Property | Value | | |
+-----------+--------------------------------------+ | |
| node_uuid | c75750f3-bbb6-4aed-9acb-140a8dde9f9e | | |
| extra | {} | | |
| uuid | 5c96b137-035d-41e2-a584-0144358b8710 | | |
| address | 08:00:27:14:97:c4 | | |
+-----------+--------------------------------------+ | |
# Change Node ssh-type information | |
[root@controller01 ~]# node_id=$(ironic node-list | grep None | awk '{print $2}') | |
[root@controller01 ~]# ironic node-update $node_id replace driver_info/ssh_virt_type=virsh | |
+------------------------+--------------------------------------------------------------------------+ | |
| Property | Value | | |
+------------------------+--------------------------------------------------------------------------+ | |
| instance_uuid | None | | |
| target_power_state | None | | |
| properties | {} | | |
| maintenance | False | | |
| driver_info | {u'ssh_username': u'yeonki', u'ssh_virt_type': u'virsh', u'ssh_address': | | |
| | u'192.168.56.1'} | | |
| extra | {} | | |
| last_error | None | | |
| created_at | 2014-08-17T14:16:37+00:00 | | |
| target_provision_state | None | | |
| driver | pxe_ssh | | |
| updated_at | 2014-08-19T14:03:38+00:00 | | |
| instance_info | {} | | |
| chassis_uuid | b0248af9-3171-48e4-a239-9708d6016375 | | |
| provision_state | None | | |
| reservation | None | | |
| power_state | None | | |
| console_enabled | False | | |
| uuid | c75750f3-bbb6-4aed-9acb-140a8dde9f9e | | |
+------------------------+--------------------------------------------------------------------------+ | |
[root@controller01 ~]# ironic node-update $node_id replace driver_info/ssh_address=192.168.123.20 | |
+------------------------+--------------------------------------------------------------------------+ | |
| Property | Value | | |
+------------------------+--------------------------------------------------------------------------+ | |
| instance_uuid | None | | |
| target_power_state | None | | |
| properties | {} | | |
| maintenance | False | | |
| driver_info | {u'ssh_username': u'yeonki', u'ssh_virt_type': u'virsh', u'ssh_address': | | |
| | u'192.168.123.20'} | | |
| extra | {} | | |
| last_error | None | | |
| created_at | 2014-08-17T14:16:37+00:00 | | |
| target_provision_state | None | | |
| driver | pxe_ssh | | |
| updated_at | 2014-08-19T14:04:39+00:00 | | |
| instance_info | {} | | |
| chassis_uuid | b0248af9-3171-48e4-a239-9708d6016375 | | |
| provision_state | None | | |
| reservation | None | | |
| power_state | None | | |
| console_enabled | False | | |
| uuid | c75750f3-bbb6-4aed-9acb-140a8dde9f9e | | |
+------------------------+--------------------------------------------------------------------------+ | |
[root@controller01 ~]# ironic node-update $node_id add driver_info/ssh_password=***** | |
+------------------------+--------------------------------------------------------------------------+ | |
| Property | Value | | |
+------------------------+--------------------------------------------------------------------------+ | |
| instance_uuid | None | | |
| target_power_state | None | | |
| properties | {} | | |
| maintenance | False | | |
| driver_info | {u'ssh_username': u'yeonki', u'ssh_virt_type': u'virsh', u'ssh_address': | | |
| | u'192.168.123.20', u'ssh_password': u'*****'} | | |
| extra | | | |
| last_error | None | | |
| created_at | 2014-08-17T14:16:37+00:00 | | |
| target_provision_state | None | | |
| driver | pxe_ssh | | |
| updated_at | 2014-08-19T14:25:56+00:00 | | |
| instance_info | {} | | |
| chassis_uuid | b0248af9-3171-48e4-a239-9708d6016375 | | |
| provision_state | None | | |
| reservation | None | | |
| power_state | None | | |
| console_enabled | False | | |
| uuid | c75750f3-bbb6-4aed-9acb-140a8dde9f9e | | |
+------------------------+--------------------------------------------------------------------------+ | |
# Also, update MAC of the port. | |
[root@controller01 ~]# ironic port-update 5c96b137-035d-41e2-a584-0144358b8710 replace address=52:54:00:e4:17:3e | |
+------------+--------------------------------------+ | |
| Property | Value | | |
+------------+--------------------------------------+ | |
| node_uuid | c75750f3-bbb6-4aed-9acb-140a8dde9f9e | | |
| uuid | 5c96b137-035d-41e2-a584-0144358b8710 | | |
| extra | {} | | |
| created_at | 2014-08-18T02:33:23+00:00 | | |
| updated_at | None | | |
| address | 52:54:00:e4:17:3e | | |
+------------+--------------------------------------+ | |
# Make sure what the current boor order is. | |
[root@controller01 ~]# ironic node-get-boot-device $node_id | |
+-------------+-------+ | |
| Property | Value | | |
+-------------+-------+ | |
| boot_device | disk | | |
| persistent | None | | |
+-------------+-------+ | |
# And confirm auctual order of the node (VM). | |
yeonki@ubuntu:~$ virsh dumpxml baremetal_test | |
<domain type='kvm'> | |
<name>baremetal_test</name> | |
<uuid>fc012fa2-01df-91ef-3a46-b0a9c5e2d8a5</uuid> | |
<memory>524288</memory> | |
<currentMemory>524288</currentMemory> | |
<vcpu>1</vcpu> | |
<os> | |
<type arch='x86_64' machine='pc-1.0'>hvm</type> | |
<boot dev='hd'/> | |
</os> | |
<features> | |
<acpi/> | |
<apic/> | |
<pae/> | |
</features> | |
<clock offset='utc'/> | |
<on_poweroff>destroy</on_poweroff> | |
<on_reboot>restart</on_reboot> | |
<on_crash>restart</on_crash> | |
<devices> | |
<emulator>/usr/bin/kvm</emulator> | |
<disk type='file' device='disk'> | |
<driver name='qemu' type='raw'/> | |
<source file='/var/lib/libvirt/images/baremetal_test.img'/> | |
<target dev='vda' bus='virtio'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> | |
</disk> | |
<interface type='bridge'> | |
<mac address='52:54:00:e4:17:3e'/> | |
<source bridge='br0'/> | |
<model type='virtio'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> | |
</interface> | |
<serial type='pty'> | |
<target port='0'/> | |
</serial> | |
<console type='pty'> | |
<target type='serial' port='0'/> | |
</console> | |
<input type='tablet' bus='usb'/> | |
<input type='mouse' bus='ps2'/> | |
<graphics type='vnc' port='-1' autoport='yes'/> | |
<sound model='ich6'> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> | |
</sound> | |
<video> | |
<model type='cirrus' vram='9216' heads='1'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> | |
</video> | |
<memballoon model='virtio'> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> | |
</memballoon> | |
</devices> | |
</domain> | |
# Try to change the boor order. Supported boot devices: 'pxe', 'disk', 'cdrom', 'bios', 'safe' | |
[root@controller01 ~]# ironic node-set-boot-device $node_id pxe | |
# Check if the boot order is changed. | |
yeonki@ubuntu:~$ virsh dumpxml baremetal_test | |
<domain type='kvm'> | |
<name>baremetal_test</name> | |
<uuid>fc012fa2-01df-91ef-3a46-b0a9c5e2d8a5</uuid> | |
<memory>524288</memory> | |
<currentMemory>524288</currentMemory> | |
<vcpu>1</vcpu> | |
<os> | |
<type arch='x86_64' machine='pc-1.0'>hvm</type> | |
<boot dev='network'/> | |
</os> | |
<features> | |
<acpi/> | |
<apic/> | |
<pae/> | |
</features> | |
<clock offset='utc'/> | |
<on_poweroff>destroy</on_poweroff> | |
<on_reboot>restart</on_reboot> | |
<on_crash>restart</on_crash> | |
<devices> | |
<emulator>/usr/bin/kvm</emulator> | |
<disk type='file' device='disk'> | |
<driver name='qemu' type='raw'/> | |
<source file='/var/lib/libvirt/images/baremetal_test.img'/> | |
<target dev='vda' bus='virtio'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> | |
</disk> | |
<interface type='bridge'> | |
<mac address='52:54:00:e4:17:3e'/> | |
<source bridge='br0'/> | |
<model type='virtio'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> | |
</interface> | |
<serial type='pty'> | |
<target port='0'/> | |
</serial> | |
<console type='pty'> | |
<target type='serial' port='0'/> | |
</console> | |
<input type='tablet' bus='usb'/> | |
<input type='mouse' bus='ps2'/> | |
<graphics type='vnc' port='-1' autoport='yes'/> | |
<sound model='ich6'> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> | |
</sound> | |
<video> | |
<model type='cirrus' vram='9216' heads='1'/> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> | |
</video> | |
<memballoon model='virtio'> | |
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> | |
</memballoon> | |
</devices> | |
</domain> | |
# Powering on the node. Supported states: 'on' or 'off' or 'reboot' | |
[root@controller01 ~]# ironic node-set-power-state $node_id on | |
# 'power_state' of the node has changed. | |
[root@controller01 ~]# ironic node-show $node_id | |
+------------------------+--------------------------------------------------------------------------+ | |
| Property | Value | | |
+------------------------+--------------------------------------------------------------------------+ | |
| instance_uuid | None | | |
| target_power_state | None | | |
| properties | {} | | |
| maintenance | False | | |
| driver_info | {u'ssh_username': u'yeonki', u'ssh_virt_type': u'virsh', u'ssh_address': | | |
| | u'192.168.123.20', u'ssh_password': u'*****'} | | |
| extra | {} | | |
| last_error | None | | |
| created_at | 2014-08-17T14:16:37+00:00 | | |
| target_provision_state | None | | |
| driver | pxe_ssh | | |
| updated_at | 2014-08-19T14:58:41+00:00 | | |
| instance_info | {} | | |
| chassis_uuid | b0248af9-3171-48e4-a239-9708d6016375 | | |
| provision_state | None | | |
| reservation | None | | |
| power_state | power on | | |
| console_enabled | False | | |
| uuid | c75750f3-bbb6-4aed-9acb-140a8dde9f9e | | |
+------------------------+--------------------------------------------------------------------------+ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment