MarouenMechtri / Docker-containers-deployment-with-OpenStack-Heat

How to Dockerize your applications with OpenStack Heat in simple steps
Apache License 2.0
25 stars 18 forks source link

Issue while creating a image using disk-image-builder #1

Open subashgandhiece opened 10 years ago

subashgandhiece commented 10 years ago

Hi, I have the followed the instructions as specified in the steps. while i creating image using disk-image-builder, it shows the following error.

LOG: [root@admin1 stack]#diskimage-builder/bin/disk-image-create vm \ fedora selinux-permissive \ heat-config \ os-collect-config \ os-refresh-config \ os-apply-config \ heat-config-cfn-init \ heat-config-puppet \ heat-config-salt \ heat-config-script \ -o fedora-software-config.qcow2 glance image-create --disk-format qcow2 --container-format bare --name fedora-software-config < \ fedora-software-config.qcow2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . Installing collected packages: os-collect-config, requests, iso8601, oslo.config, dogpile.cache, python-heatclient, python-keystoneclient, lxml, six, argparse, anyjson, eventlet, netaddr, stevedore, dogpile.core, PyYAML, PrettyTable, Babel, greenlet, pytz Running setup.py install for iso8601

Running setup.py install for dogpile.cache Skipping installation of /opt/stack/venvs/os-collect-config/lib/python2.7/site-packages/dogpile/init.py (namespace package)

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'
warning: no files found matching 'CHANGES*'
warning: no files found matching 'test.cfg'
no previously-included directories found matching 'docs/build/output'
Installing /opt/stack/venvs/os-collect-config/lib/python2.7/site-packages/dogpile.cache-0.5.4-py2.7-nspkg.pth

Running setup.py install for lxml /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url' warnings.warn(msg) Building lxml version 3.4.0. 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
building 'lxml.etree' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/opt/stack/venvs/os-collect-config/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1
Complete output from command /opt/stack/venvs/os-collect-config/bin/python -c "import setuptools, tokenize;__file__='/opt/stack/venvs/os-collect-config/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-a_5BK1-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/stack/venvs/os-collect-config/include/site/python2.7:
/usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'

warnings.warn(msg)

Building lxml version 3.4.0.

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

running install

running build

running build_py

creating build

creating build/lib.linux-x86_64-2.7

creating build/lib.linux-x86_64-2.7/lxml

copying src/lxml/doctestcompare.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/init.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/_elementpath.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/sax.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/ElementInclude.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/pyclasslookup.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/cssselect.py -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/builder.py -> build/lib.linux-x86_64-2.7/lxml

creating build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/init.py -> build/lib.linux-x86_64-2.7/lxml/includes

creating build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/diff.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/defs.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/init.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/ElementSoup.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/soupparser.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/_setmixin.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/usedoctest.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/formfill.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/clean.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/_diffcommand.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/html5parser.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/builder.py -> build/lib.linux-x86_64-2.7/lxml/html

copying src/lxml/html/_html5builder.py -> build/lib.linux-x86_64-2.7/lxml/html

creating build/lib.linux-x86_64-2.7/lxml/isoschematron

copying src/lxml/isoschematron/init.py -> build/lib.linux-x86_64-2.7/lxml/isoschematron

copying src/lxml/lxml.etree.h -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/lxml.etree_api.h -> build/lib.linux-x86_64-2.7/lxml

copying src/lxml/includes/xinclude.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/uri.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xmlschema.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/htmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xslt.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/tree.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xmlparser.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xpath.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/schematron.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/config.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/dtdvalid.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/c14n.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/etreepublic.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/xmlerror.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/relaxng.pxd -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/etree_defs.h -> build/lib.linux-x86_64-2.7/lxml/includes

copying src/lxml/includes/lxml-version.h -> build/lib.linux-x86_64-2.7/lxml/includes

creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources

creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng

copying src/lxml/isoschematron/resources/rng/iso-schematron.rng -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/rng

creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl

copying src/lxml/isoschematron/resources/xsl/RNG2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl

copying src/lxml/isoschematron/resources/xsl/XSD2Schtrn.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl

creating build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_skeleton_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_abstract_expand.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_svrl_for_xslt1.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_schematron_message.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/iso_dsdl_include.xsl -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

copying src/lxml/isoschematron/resources/xsl/iso-schematron-xslt1/readme.txt -> build/lib.linux-x86_64-2.7/lxml/isoschematron/resources/xsl/iso-schematron-xslt1

running build_ext

building 'lxml.etree' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/src

creating build/temp.linux-x86_64-2.7/src/lxml

gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/opt/stack/venvs/os-collect-config/build/lxml/src/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w

unable to execute gcc: No such file or directory

error: command 'gcc' failed with exit status 1


Cleaning up... Command /opt/stack/venvs/os-collect-config/bin/python -c "import setuptools, tokenize;file='/opt/stack/venvs/os-collect-config/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-a_5BK1-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/stack/venvs/os-collect-config/include/site/python2.7 failed with error code 1 in /opt/stack/venvs/os-collect-config/build/lxml Storing debug log for failure in /root/.pip/pip.log

Note: My host OS is Fedora20 and I have installed both libxml2 and libxslt in my Host OS.

Could you please help me how to solve this problem ?

Thanks, Subash Gandhi

subashgandhiece commented 10 years ago

Hi Marouen/Chaima, Could you please suggest me how to solve the above problem ?

Thanks

MarouenMechtri commented 10 years ago

Hi Subash,

As mentioned in our manual, we are based on the documentation provided in the heat-templates github. https://github.com/openstack/heat-templates/tree/master/hot/software-config/elements

Recently they change the fedora based image example. Please try with this command

git clone https://git.openstack.org/openstack/diskimage-builder.git git clone https://git.openstack.org/openstack/tripleo-image-elements.git git clone https://git.openstack.org/openstack/heat-templates.git git clone https://git.openstack.org/openstack/dib-utils.git export PATH="${PWD}/dib-utils/bin:$PATH" export ELEMENTS_PATH=tripleo-image-elements/elements:heat-templates/hot/software-config/elements diskimage-builder/bin/disk-image-create vm \ fedora selinux-permissive \ heat-config \ os-collect-config \ os-refresh-config \ os-apply-config \ heat-config-ansible \ heat-config-cfn-init \ heat-config-puppet \ heat-config-salt \ heat-config-script \ -o fedora-software-config.qcow2 glance image-create --disk-format qcow2 --container-format bare --name fedora-software-config < \ fedora-software-config.qcow2

Regards, Marouen

subashgandhiece commented 10 years ago

Hi Marouen, Thanks for your valuable inputs. I have the topology which has seperate neutron node.I have followed the same steps as specified in this blog. Now I have the VM which is turned up and running but I have got an error while creating docker-stack and gettting an error message like "ASSOCIATE FLOATING IP address is failed".

Could you please let me know how to solve this issue in my testbed environment(which has seperate neutron node).

Regards, Subash Gandhi

subashgandhiece commented 10 years ago

Hi Marouen, I have encountered the following error while the creating stack in the deployment module "HTTPUnauthorized: ERROR: Authentication failed. Please try again with option --include-password or export HEAT_INCLUDE_PASSWORD=1 Authentication required". I have also set the above lines in heat.conf and entered ./rejoin-stack.sh as well but still this error has occured.

Could you please let me know if you have any information to solve this issue.

Thanks, Subash Gandhi

MarouenMechtri commented 10 years ago

If you want to test Docker with Heat, we recommand you to deploy OpenStack using a flat networking model (see our guide). One issue we encountered when we considered a multi-node architecture with isolated neutron networks is that instances were not able to signal to Heat. So, stack creation fails because it depends on connectivity from VMs to the Heat engine.

sam-ah commented 7 years ago

Hi Marouen, I have followed you guide about creating docker container with Heat, I have this problem: diskimage-builder/bin/disk-image-create: No such file or directory Could you help me because I can't find any solution for it

MarouenMechtri commented 7 years ago

Please try this guide: https://github.com/openstack/heat-templates/blob/master/hot/software-config/elements/README.rst