]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Update docker resource python script location 01/2801/1
authorIgor Yozhikov <iyozhikov@mirantis.com>
Fri, 30 Jan 2015 14:35:15 +0000 (17:35 +0300)
committerIgor Yozhikov <iyozhikov@mirantis.com>
Fri, 30 Jan 2015 14:36:14 +0000 (17:36 +0300)
* add python-docker as runtime requirement
* docker resource add as additional package heat-docker
* add tests for heat-docker
* update requirements to requirements.txt versions

Change-Id: Ifc1be30531e89c478f7c84d16c77dc2b8fbb2660
Related-Bug: #1404911

debian/changelog
debian/control
debian/heat-docker.dirs [new file with mode: 0644]
debian/heat-docker.install [new file with mode: 0644]
tests/runtests.sh

index ad81001adcb579be50aa66f0258ddeb26c6047b1..24d90c64253fd75cf3930624502dd054adc56906 100644 (file)
@@ -1,3 +1,11 @@
+heat (2015.1.b0) trusty; urgency=medium
+
+  * update from global requirements
+  * add heat-docker package
+
+ -- Igor Yozhikov <iyozhikov@mirantis.com>  Fri, 30 Jan 2015 17:33:23 +0300
+
+
 heat (2014.2.1) trusty; urgency=medium
 
   Update from global requirements
@@ -41,7 +49,7 @@ heat (2014.1-0ubuntu1) trusty; urgency=medium
   [ Chuck Short ]
   * New upstream release. (LP: #1299055)
   * debian/heat-common.postinst: Create directory before changing
-    permissions. (LP: #1267557) 
+    permissions. (LP: #1267557)
 
   [ Corey Bryant ]
   * New upstream release (LP: #1299055).
@@ -50,7 +58,7 @@ heat (2014.1-0ubuntu1) trusty; urgency=medium
 
 heat (2014.1~rc2-0ubuntu3) trusty; urgency=medium
 
-  * debian/heat-common.postinst: Fix failing autopkg test. 
+  * debian/heat-common.postinst: Fix failing autopkg test.
 
  -- Chuck Short <zulcss@ubuntu.com>  Mon, 14 Apr 2014 13:36:05 -0400
 
@@ -116,7 +124,7 @@ heat (2014.1~b2-0ubuntu1) trusty; urgency=low
 heat (2014.1~b1-0ubuntu2) trusty; urgency=low
 
   * debian/patches/default-sqlite.patch: Update default sqlite path to
-    fix heat-engine install failures. 
+    fix heat-engine install failures.
 
  -- James Page <james.page@ubuntu.com>  Fri, 06 Dec 2013 11:26:25 +0000
 
@@ -179,14 +187,14 @@ heat (2013.2~b3-0ubuntu1) saucy; urgency=low
 heat (2013.2~b2.a186.g2b4b248-0ubuntu2) saucy; urgency=low
 
   * d/rules: Limit test execution concurrency to 1 to avoid test failures
-    in buildds. 
+    in buildds.
 
  -- James Page <james.page@ubuntu.com>  Thu, 08 Aug 2013 15:42:32 +0100
 
 heat (2013.2~b2.a186.g2b4b248-0ubuntu1) saucy; urgency=low
 
   [ Chuck Short ]
-  * debian/patches/rename-quantumclient.patch: Dropped no longer needed. 
+  * debian/patches/rename-quantumclient.patch: Dropped no longer needed.
   * debian/control: Add python-oslo.sphinx
 
   [ James Page ]
@@ -224,7 +232,7 @@ heat (2013.2~b2-0ubuntu3) saucy; urgency=low
   * Resynchronize with debian, remaining changes:
     - Add sqlite3 to heat-common depends to fix
       an autopkgtest failure.
-    - Add autopkg tests. 
+    - Add autopkg tests.
     - Pass the testsuite if it fails.
 
  -- Chuck Short <zulcss@ubuntu.com>  Wed, 07 Aug 2013 10:36:33 -0400
@@ -232,7 +240,7 @@ heat (2013.2~b2-0ubuntu3) saucy; urgency=low
 heat (2013.2~b2-0ubuntu2) saucy; urgency=low
 
   * debian/control: Add sqlite3 to heat-common depends to fix
-    an autopkgtest failure. 
+    an autopkgtest failure.
 
  -- Chuck Short <zulcss@ubuntu.com>  Tue, 06 Aug 2013 15:36:33 +0000
 
index 0ab5da08094d64427f34d9feec021e7a3b8c2bf9..b7e2c1b1037cf690fa297edec56c6dec0e967c55 100644 (file)
@@ -75,7 +75,7 @@ Architecture: all
 Depends:
  python-argparse,
  python-babel (>= 1.3),
- python-eventlet (>= 0.15.2),
+ python-eventlet (>= 0.16.1),
  python-greenlet (>= 0.3.2),
  python-httplib2 (>= 0.7.5),
  python-iso8601 (>= 0.1.9),
@@ -83,13 +83,14 @@ Depends:
  python-kombu (>= 2.5.0),
  python-lxml (>= 2.3),
  python-netaddr (>= 0.7.12),
- python-oslo.config (>= 1.4.0),
- python-oslo.i18n (>= 1.0.0),
+ python-oslo.config (>= 1.6.0),
+ python-oslo.context (>= 0.1.0),
+ python-oslo.i18n (>= 1.3.0),
  python-oslo.messaging (>= 1.4.0), python-oslo.messaging (<< 1.5.0) | python-oslo.messaging (>> 1.5.0),
- python-oslo.db (>= 1.1.0),
- python-oslo.middleware (>= 0.1.0),
- python-oslo.serialization (>= 1.0.0),
- python-oslo.utils (>= 1.0.0),
+ python-oslo.db (>= 1.4.0),
+ python-oslo.middleware (>= 0.3.0),
+ python-oslo.serialization (>= 1.2.0),
+ python-oslo.utils (>= 1.2.0),
  python-osprofiler (>= 0.3.0),
  python-pastedeploy (>= 1.5.0),
  python-pbr (>= 0.6), python-pbr (<< 0.7) | python-pbr (>> 0.7),
@@ -97,9 +98,9 @@ Depends:
  python-crypto (>= 2.6),
  python-ceilometerclient (>= 1.0.6),
  python-cinderclient (>= 1.1.0),
- python-glanceclient (>= 0.14.0),
+ python-glanceclient (>= 0.15.0),
  python-heatclient (>= 0.2.9),
- python-keystoneclient (>= 1:0.11.1),
+ python-keystoneclient (>= 1:1.0.0),
  python-neutronclient (>= 1:2.3.6),
  python-novaclient (>= 1:2.18.0),
  python-saharaclient (>= 0.7.6),
@@ -143,6 +144,21 @@ Description: OpenStack orchestration service - common files
  .
  This package contains the common files.
 
+Package: heat-docker
+Architecture: all
+Depends:
+ python-docker (>= 0.7.0),
+ heat-engine (=${binary:Version}),
+ ${misc:Depends},
+ ${ostack-lsb-base},
+ ${python:Depends}
+Description: OpenStack orchestration service docker resource
+ Heat is a service to orchestrate multiple composite cloud applications using
+ templates, through both an OpenStack-native ReST API and a
+ CloudFormation-compatible Query API.
+ .
+ This package contains the heat engine docker resource.
+
 Package: heat-engine
 Architecture: all
 Depends:
diff --git a/debian/heat-docker.dirs b/debian/heat-docker.dirs
new file mode 100644 (file)
index 0000000..aee7534
--- /dev/null
@@ -0,0 +1 @@
+/usr/lib/heat/docker
diff --git a/debian/heat-docker.install b/debian/heat-docker.install
new file mode 100644 (file)
index 0000000..16f8833
--- /dev/null
@@ -0,0 +1 @@
+contrib/heat_docker/heat_docker/* /usr/lib/heat/docker
index a44db8ba391fa6a04c14c237bb3b7720b9001d48..4831c9044b1ceca92042f3560048599489cc3661 100755 (executable)
@@ -108,6 +108,31 @@ case $package in
            fi
         fi
      ;;
+     heat-docker|openstack-heat-docker)
+     prepare_vm
+     screen -dmS heat-engine
+     sleep 2
+     echo "Starting Heat Engine with docker resource..."
+     screen -S heat-engine -p 0 -X stuff "heat-engine --config-file $conf_file -d --log-file /tmp/heat-engine.log 2>>/tmp/heat-engine.log
+"
+     sleep 5
+     cat /tmp/heat-engine.log
+     trace_count=$(grep -ic Traceback /tmp/heat-engine.log)
+     if [ "$trace_count" -ne "0" ]
+         then
+         echo "Something went wrong! Log file have trace errors! Check logs"
+         RES=1
+     else
+         docker_regitered=$(grep -c 'Registering DockerInc::Docker::Container' /tmp/heat-engine.log)
+         if [ "$docker_regitered" -eq "0" ]
+             then
+             echo "Heat Docker: engine can't load docker resource"
+             RES=1
+         else
+             echo "Heat Docker: engine loaded docker resource successfully"
+         fi
+     fi
+     ;;
      heat-api-cfn|openstack-heat-api-cfn)
         prepare_vm
         screen -dmS heat-api-cfn