Browse code

Install clients first

Install clients first to prevent them from being pulled in from Pypi

Change-Id: Ic6d39dd532ecc3400da510551156d7d036d0b83d

Dean Troyer authored on 2013/04/03 11:31:20
Showing 5 changed files
... ...
@@ -51,9 +51,6 @@ function cleanup_cinder() {
51 51
 
52 52
 # configure_cinder() - Set config files, create data dirs, etc
53 53
 function configure_cinder() {
54
-    setup_develop $CINDER_DIR
55
-    setup_develop $CINDERCLIENT_DIR
56
-
57 54
     if [[ ! -d $CINDER_CONF_DIR ]]; then
58 55
         sudo mkdir -p $CINDER_CONF_DIR
59 56
     fi
... ...
@@ -188,10 +185,16 @@ function init_cinder() {
188 188
     fi
189 189
 }
190 190
 
191
+# install_cinderclient() - Collect source and prepare
192
+function install_cinderclient() {
193
+    git_clone $CINDERCLIENT_REPO $CINDERCLIENT_DIR $CINDERCLIENT_BRANCH
194
+    setup_develop $CINDERCLIENT_DIR
195
+}
196
+
191 197
 # install_cinder() - Collect source and prepare
192 198
 function install_cinder() {
193 199
     git_clone $CINDER_REPO $CINDER_DIR $CINDER_BRANCH
194
-    git_clone $CINDERCLIENT_REPO $CINDERCLIENT_DIR $CINDERCLIENT_BRANCH
200
+    setup_develop $CINDER_DIR
195 201
 }
196 202
 
197 203
 # apply config.d approach (e.g. Oneiric does not have this)
... ...
@@ -63,11 +63,6 @@ function cleanup_glance() {
63 63
     :
64 64
 }
65 65
 
66
-# configure_glanceclient() - Set config files, create data dirs, etc
67
-function configure_glanceclient() {
68
-    setup_develop $GLANCECLIENT_DIR
69
-}
70
-
71 66
 # configure_glance() - Set config files, create data dirs, etc
72 67
 function configure_glance() {
73 68
     setup_develop $GLANCE_DIR
... ...
@@ -158,6 +153,7 @@ function init_glance() {
158 158
 # install_glanceclient() - Collect source and prepare
159 159
 function install_glanceclient() {
160 160
     git_clone $GLANCECLIENT_REPO $GLANCECLIENT_DIR $GLANCECLIENT_BRANCH
161
+    setup_develop $GLANCECLIENT_DIR
161 162
 }
162 163
 
163 164
 # install_glance() - Collect source and prepare
... ...
@@ -61,11 +61,6 @@ function cleanup_keystone() {
61 61
     :
62 62
 }
63 63
 
64
-# configure_keystoneclient() - Set config files, create data dirs, etc
65
-function configure_keystoneclient() {
66
-    setup_develop $KEYSTONECLIENT_DIR
67
-}
68
-
69 64
 # configure_keystone() - Set config files, create data dirs, etc
70 65
 function configure_keystone() {
71 66
     setup_develop $KEYSTONE_DIR
... ...
@@ -152,6 +147,7 @@ function init_keystone() {
152 152
 # install_keystoneclient() - Collect source and prepare
153 153
 function install_keystoneclient() {
154 154
     git_clone $KEYSTONECLIENT_REPO $KEYSTONECLIENT_DIR $KEYSTONECLIENT_BRANCH
155
+    setup_develop $KEYSTONECLIENT_DIR
155 156
 }
156 157
 
157 158
 # install_keystone() - Collect source and prepare
... ...
@@ -103,11 +103,6 @@ function cleanup_nova() {
103 103
     fi
104 104
 }
105 105
 
106
-# configure_novaclient() - Set config files, create data dirs, etc
107
-function configure_novaclient() {
108
-    setup_develop $NOVACLIENT_DIR
109
-}
110
-
111 106
 # configure_nova_rootwrap() - configure Nova's rootwrap
112 107
 function configure_nova_rootwrap() {
113 108
     # Deploy new rootwrap filters files (owned by root).
... ...
@@ -377,6 +372,7 @@ function init_nova() {
377 377
 # install_novaclient() - Collect source and prepare
378 378
 function install_novaclient() {
379 379
     git_clone $NOVACLIENT_REPO $NOVACLIENT_DIR $NOVACLIENT_BRANCH
380
+    setup_develop $NOVACLIENT_DIR
380 381
 }
381 382
 
382 383
 # install_nova() - Collect source and prepare
... ...
@@ -824,12 +824,24 @@ pip_install $(get_packages $FILES/pips | sort -u)
824 824
 
825 825
 echo_summary "Installing OpenStack project source"
826 826
 
827
+# Install clients libraries
827 828
 install_keystoneclient
828 829
 install_glanceclient
830
+install_cinderclient
829 831
 install_novaclient
832
+if is_service_enabled swift glance; then
833
+    # storage service client and and Library
834
+    git_clone $SWIFTCLIENT_REPO $SWIFTCLIENT_DIR $SWIFTCLIENT_BRANCH
835
+    setup_develop $SWIFTCLIENT_DIR
836
+fi
837
+if is_service_enabled quantum nova; then
838
+    git_clone $QUANTUM_CLIENT_REPO $QUANTUM_CLIENT_DIR $QUANTUM_CLIENT_BRANCH
839
+    setup_develop $QUANTUM_CLIENT_DIR
840
+fi
830 841
 
831 842
 # Check out the client libs that are used most
832 843
 git_clone $OPENSTACKCLIENT_REPO $OPENSTACKCLIENT_DIR $OPENSTACKCLIENT_BRANCH
844
+setup_develop $OPENSTACKCLIENT_DIR
833 845
 
834 846
 # glance, swift middleware and nova api needs keystone middleware
835 847
 if is_service_enabled key g-api n-api swift; then
... ...
@@ -839,8 +851,6 @@ fi
839 839
 if is_service_enabled swift; then
840 840
     # storage service
841 841
     git_clone $SWIFT_REPO $SWIFT_DIR $SWIFT_BRANCH
842
-    # storage service client and and Library
843
-    git_clone $SWIFTCLIENT_REPO $SWIFTCLIENT_DIR $SWIFTCLIENT_BRANCH
844 842
     if is_service_enabled swift3; then
845 843
         # swift3 middleware to provide S3 emulation to Swift
846 844
         git_clone $SWIFT3_REPO $SWIFT3_DIR $SWIFT3_BRANCH
... ...
@@ -863,9 +873,6 @@ if is_service_enabled horizon; then
863 863
     git_clone $HORIZON_REPO $HORIZON_DIR $HORIZON_BRANCH $HORIZON_TAG
864 864
 fi
865 865
 if is_service_enabled quantum; then
866
-    git_clone $QUANTUM_CLIENT_REPO $QUANTUM_CLIENT_DIR $QUANTUM_CLIENT_BRANCH
867
-fi
868
-if is_service_enabled quantum; then
869 866
     # quantum
870 867
     git_clone $QUANTUM_REPO $QUANTUM_DIR $QUANTUM_BRANCH
871 868
 fi
... ...
@@ -887,26 +894,22 @@ echo_summary "Configuring OpenStack projects"
887 887
 
888 888
 # Set up our checkouts so they are installed into python path
889 889
 # allowing ``import nova`` or ``import glance.client``
890
-configure_keystoneclient
891
-configure_novaclient
892
-setup_develop $OPENSTACKCLIENT_DIR
893 890
 if is_service_enabled key g-api n-api swift; then
894 891
     configure_keystone
895 892
 fi
896 893
 if is_service_enabled swift; then
897 894
     setup_develop $SWIFT_DIR
898
-    setup_develop $SWIFTCLIENT_DIR
899 895
 fi
900 896
 if is_service_enabled swift3; then
901 897
     setup_develop $SWIFT3_DIR
902 898
 fi
903 899
 if is_service_enabled g-api n-api; then
904 900
     configure_glance
905
-fi
906 901
 
907
-# Do this _after_ glance is installed to override the old binary
908
-# TODO(dtroyer): figure out when this is no longer necessary
909
-configure_glanceclient
902
+    # Do this again _after_ glance is installed to overwrite
903
+    # the old binary shipped in glance
904
+    setup_develop $GLANCECLIENT_DIR
905
+fi
910 906
 
911 907
 if is_service_enabled nova; then
912 908
     configure_nova
... ...
@@ -915,7 +918,6 @@ if is_service_enabled horizon; then
915 915
     setup_develop $HORIZON_DIR
916 916
 fi
917 917
 if is_service_enabled quantum; then
918
-    setup_develop $QUANTUM_CLIENT_DIR
919 918
     setup_develop $QUANTUM_DIR
920 919
 fi
921 920
 if is_service_enabled heat; then