There is confusion about where installation of new libraries should
end up, to prevent lots of little files being added make a
lib/libraries which is the old lib/oslo. Put compat functions and
includes in place to help with transition.
Change-Id: Ieeab605d187ef6aec571211ab235ea67fa95a607
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,135 @@ |
| 0 |
+#!/bin/bash |
|
| 1 |
+# |
|
| 2 |
+# lib/oslo |
|
| 3 |
+# |
|
| 4 |
+# Functions to install **Oslo** libraries from git |
|
| 5 |
+# |
|
| 6 |
+# We need this to handle the fact that projects would like to use |
|
| 7 |
+# pre-released versions of oslo libraries. |
|
| 8 |
+ |
|
| 9 |
+# Dependencies: |
|
| 10 |
+# |
|
| 11 |
+# - ``functions`` file |
|
| 12 |
+ |
|
| 13 |
+# ``stack.sh`` calls the entry points in this order: |
|
| 14 |
+# |
|
| 15 |
+# - install_oslo |
|
| 16 |
+ |
|
| 17 |
+# Save trace setting |
|
| 18 |
+_XTRACE_LIB_OSLO=$(set +o | grep xtrace) |
|
| 19 |
+set +o xtrace |
|
| 20 |
+ |
|
| 21 |
+ |
|
| 22 |
+# Defaults |
|
| 23 |
+# -------- |
|
| 24 |
+GITDIR["automaton"]=$DEST/automaton |
|
| 25 |
+GITDIR["castellan"]=$DEST/castellan |
|
| 26 |
+GITDIR["cliff"]=$DEST/cliff |
|
| 27 |
+GITDIR["cursive"]=$DEST/cursive |
|
| 28 |
+GITDIR["debtcollector"]=$DEST/debtcollector |
|
| 29 |
+GITDIR["futurist"]=$DEST/futurist |
|
| 30 |
+GITDIR["os-client-config"]=$DEST/os-client-config |
|
| 31 |
+GITDIR["osc-lib"]=$DEST/osc-lib |
|
| 32 |
+GITDIR["oslo.cache"]=$DEST/oslo.cache |
|
| 33 |
+GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency |
|
| 34 |
+GITDIR["oslo.config"]=$DEST/oslo.config |
|
| 35 |
+GITDIR["oslo.context"]=$DEST/oslo.context |
|
| 36 |
+GITDIR["oslo.db"]=$DEST/oslo.db |
|
| 37 |
+GITDIR["oslo.i18n"]=$DEST/oslo.i18n |
|
| 38 |
+GITDIR["oslo.log"]=$DEST/oslo.log |
|
| 39 |
+GITDIR["oslo.messaging"]=$DEST/oslo.messaging |
|
| 40 |
+GITDIR["oslo.middleware"]=$DEST/oslo.middleware |
|
| 41 |
+GITDIR["oslo.policy"]=$DEST/oslo.policy |
|
| 42 |
+GITDIR["oslo.privsep"]=$DEST/oslo.privsep |
|
| 43 |
+GITDIR["oslo.reports"]=$DEST/oslo.reports |
|
| 44 |
+GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap |
|
| 45 |
+GITDIR["oslo.serialization"]=$DEST/oslo.serialization |
|
| 46 |
+GITDIR["oslo.service"]=$DEST/oslo.service |
|
| 47 |
+GITDIR["oslo.utils"]=$DEST/oslo.utils |
|
| 48 |
+GITDIR["oslo.versionedobjects"]=$DEST/oslo.versionedobjects |
|
| 49 |
+GITDIR["oslo.vmware"]=$DEST/oslo.vmware |
|
| 50 |
+GITDIR["osprofiler"]=$DEST/osprofiler |
|
| 51 |
+GITDIR["pycadf"]=$DEST/pycadf |
|
| 52 |
+GITDIR["python-openstacksdk"]=$DEST/python-openstacksdk |
|
| 53 |
+GITDIR["stevedore"]=$DEST/stevedore |
|
| 54 |
+GITDIR["taskflow"]=$DEST/taskflow |
|
| 55 |
+GITDIR["tooz"]=$DEST/tooz |
|
| 56 |
+# TODO(mriedem): This is a common pattern so even though os-traits isn't |
|
| 57 |
+# officially an oslo library, it is nice to re-use this script for non-oslo |
|
| 58 |
+# things like os-traits. We should rename this script to be more generic |
|
| 59 |
+# and then fold os-brick into it also. |
|
| 60 |
+GITDIR["os-traits"]=$DEST/os-traits |
|
| 61 |
+ |
|
| 62 |
+# Support entry points installation of console scripts |
|
| 63 |
+OSLO_BIN_DIR=$(get_python_exec_prefix) |
|
| 64 |
+ |
|
| 65 |
+ |
|
| 66 |
+# Functions |
|
| 67 |
+# --------- |
|
| 68 |
+ |
|
| 69 |
+function _install_lib_from_source {
|
|
| 70 |
+ local name=$1 |
|
| 71 |
+ if use_library_from_git "$name"; then |
|
| 72 |
+ git_clone_by_name "$name" |
|
| 73 |
+ setup_dev_lib "$name" |
|
| 74 |
+ fi |
|
| 75 |
+} |
|
| 76 |
+ |
|
| 77 |
+# install_oslo - install libraries that oslo needs |
|
| 78 |
+function install_oslo {
|
|
| 79 |
+ install_libs |
|
| 80 |
+} |
|
| 81 |
+ |
|
| 82 |
+# install_libs() - Install additional libraries that we need and want |
|
| 83 |
+# on all environments. Some will only install here if from source, |
|
| 84 |
+# others will always install. |
|
| 85 |
+function install_libs {
|
|
| 86 |
+ _install_lib_from_source "automaton" |
|
| 87 |
+ _install_lib_from_source "castellan" |
|
| 88 |
+ _install_lib_from_source "cliff" |
|
| 89 |
+ _install_lib_from_source "cursive" |
|
| 90 |
+ _install_lib_from_source "debtcollector" |
|
| 91 |
+ _install_lib_from_source "futurist" |
|
| 92 |
+ _install_lib_from_source "osc-lib" |
|
| 93 |
+ _install_lib_from_source "os-client-config" |
|
| 94 |
+ _install_lib_from_source "oslo.cache" |
|
| 95 |
+ _install_lib_from_source "oslo.concurrency" |
|
| 96 |
+ _install_lib_from_source "oslo.config" |
|
| 97 |
+ _install_lib_from_source "oslo.context" |
|
| 98 |
+ _install_lib_from_source "oslo.db" |
|
| 99 |
+ _install_lib_from_source "oslo.i18n" |
|
| 100 |
+ _install_lib_from_source "oslo.log" |
|
| 101 |
+ _install_lib_from_source "oslo.messaging" |
|
| 102 |
+ _install_lib_from_source "oslo.middleware" |
|
| 103 |
+ _install_lib_from_source "oslo.policy" |
|
| 104 |
+ _install_lib_from_source "oslo.privsep" |
|
| 105 |
+ _install_lib_from_source "oslo.reports" |
|
| 106 |
+ _install_lib_from_source "oslo.rootwrap" |
|
| 107 |
+ _install_lib_from_source "oslo.serialization" |
|
| 108 |
+ _install_lib_from_source "oslo.service" |
|
| 109 |
+ _install_lib_from_source "oslo.utils" |
|
| 110 |
+ _install_lib_from_source "oslo.versionedobjects" |
|
| 111 |
+ _install_lib_from_source "oslo.vmware" |
|
| 112 |
+ _install_lib_from_source "osprofiler" |
|
| 113 |
+ _install_lib_from_source "pycadf" |
|
| 114 |
+ _install_lib_from_source "python-openstacksdk" |
|
| 115 |
+ _install_lib_from_source "stevedore" |
|
| 116 |
+ _install_lib_from_source "taskflow" |
|
| 117 |
+ _install_lib_from_source "tooz" |
|
| 118 |
+ # installation of additional libraries |
|
| 119 |
+ # |
|
| 120 |
+ # os-traits for nova |
|
| 121 |
+ _install_lib_from_source "os-traits" |
|
| 122 |
+ |
|
| 123 |
+ # etcd (because tooz does not have a hard dependency on these) |
|
| 124 |
+ pip_install etcd3 |
|
| 125 |
+ pip_install etcd3gw |
|
| 126 |
+} |
|
| 127 |
+ |
|
| 128 |
+# Restore xtrace |
|
| 129 |
+$_XTRACE_LIB_OSLO |
|
| 130 |
+ |
|
| 131 |
+# Tell emacs to use shell-script-mode |
|
| 132 |
+## Local variables: |
|
| 133 |
+## mode: shell-script |
|
| 134 |
+## End: |
| ... | ... |
@@ -6,123 +6,6 @@ |
| 6 | 6 |
# |
| 7 | 7 |
# We need this to handle the fact that projects would like to use |
| 8 | 8 |
# pre-released versions of oslo libraries. |
| 9 |
- |
|
| 10 |
-# Dependencies: |
|
| 11 | 9 |
# |
| 12 |
-# - ``functions`` file |
|
| 13 |
- |
|
| 14 |
-# ``stack.sh`` calls the entry points in this order: |
|
| 15 |
-# |
|
| 16 |
-# - install_oslo |
|
| 17 |
- |
|
| 18 |
-# Save trace setting |
|
| 19 |
-_XTRACE_LIB_OSLO=$(set +o | grep xtrace) |
|
| 20 |
-set +o xtrace |
|
| 21 |
- |
|
| 22 |
- |
|
| 23 |
-# Defaults |
|
| 24 |
-# -------- |
|
| 25 |
-GITDIR["automaton"]=$DEST/automaton |
|
| 26 |
-GITDIR["castellan"]=$DEST/castellan |
|
| 27 |
-GITDIR["cliff"]=$DEST/cliff |
|
| 28 |
-GITDIR["cursive"]=$DEST/cursive |
|
| 29 |
-GITDIR["debtcollector"]=$DEST/debtcollector |
|
| 30 |
-GITDIR["futurist"]=$DEST/futurist |
|
| 31 |
-GITDIR["os-client-config"]=$DEST/os-client-config |
|
| 32 |
-GITDIR["osc-lib"]=$DEST/osc-lib |
|
| 33 |
-GITDIR["oslo.cache"]=$DEST/oslo.cache |
|
| 34 |
-GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency |
|
| 35 |
-GITDIR["oslo.config"]=$DEST/oslo.config |
|
| 36 |
-GITDIR["oslo.context"]=$DEST/oslo.context |
|
| 37 |
-GITDIR["oslo.db"]=$DEST/oslo.db |
|
| 38 |
-GITDIR["oslo.i18n"]=$DEST/oslo.i18n |
|
| 39 |
-GITDIR["oslo.log"]=$DEST/oslo.log |
|
| 40 |
-GITDIR["oslo.messaging"]=$DEST/oslo.messaging |
|
| 41 |
-GITDIR["oslo.middleware"]=$DEST/oslo.middleware |
|
| 42 |
-GITDIR["oslo.policy"]=$DEST/oslo.policy |
|
| 43 |
-GITDIR["oslo.privsep"]=$DEST/oslo.privsep |
|
| 44 |
-GITDIR["oslo.reports"]=$DEST/oslo.reports |
|
| 45 |
-GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap |
|
| 46 |
-GITDIR["oslo.serialization"]=$DEST/oslo.serialization |
|
| 47 |
-GITDIR["oslo.service"]=$DEST/oslo.service |
|
| 48 |
-GITDIR["oslo.utils"]=$DEST/oslo.utils |
|
| 49 |
-GITDIR["oslo.versionedobjects"]=$DEST/oslo.versionedobjects |
|
| 50 |
-GITDIR["oslo.vmware"]=$DEST/oslo.vmware |
|
| 51 |
-GITDIR["osprofiler"]=$DEST/osprofiler |
|
| 52 |
-GITDIR["pycadf"]=$DEST/pycadf |
|
| 53 |
-GITDIR["python-openstacksdk"]=$DEST/python-openstacksdk |
|
| 54 |
-GITDIR["stevedore"]=$DEST/stevedore |
|
| 55 |
-GITDIR["taskflow"]=$DEST/taskflow |
|
| 56 |
-GITDIR["tooz"]=$DEST/tooz |
|
| 57 |
-# TODO(mriedem): This is a common pattern so even though os-traits isn't |
|
| 58 |
-# officially an oslo library, it is nice to re-use this script for non-oslo |
|
| 59 |
-# things like os-traits. We should rename this script to be more generic |
|
| 60 |
-# and then fold os-brick into it also. |
|
| 61 |
-GITDIR["os-traits"]=$DEST/os-traits |
|
| 62 |
- |
|
| 63 |
-# Support entry points installation of console scripts |
|
| 64 |
-OSLO_BIN_DIR=$(get_python_exec_prefix) |
|
| 65 |
- |
|
| 66 |
- |
|
| 67 |
-# Functions |
|
| 68 |
-# --------- |
|
| 69 |
- |
|
| 70 |
-function _do_install_oslo_lib {
|
|
| 71 |
- local name=$1 |
|
| 72 |
- if use_library_from_git "$name"; then |
|
| 73 |
- git_clone_by_name "$name" |
|
| 74 |
- setup_dev_lib "$name" |
|
| 75 |
- fi |
|
| 76 |
-} |
|
| 77 |
- |
|
| 78 |
-# install_oslo() - Collect source and prepare |
|
| 79 |
-function install_oslo {
|
|
| 80 |
- _do_install_oslo_lib "automaton" |
|
| 81 |
- _do_install_oslo_lib "castellan" |
|
| 82 |
- _do_install_oslo_lib "cliff" |
|
| 83 |
- _do_install_oslo_lib "cursive" |
|
| 84 |
- _do_install_oslo_lib "debtcollector" |
|
| 85 |
- _do_install_oslo_lib "futurist" |
|
| 86 |
- _do_install_oslo_lib "osc-lib" |
|
| 87 |
- _do_install_oslo_lib "os-client-config" |
|
| 88 |
- _do_install_oslo_lib "oslo.cache" |
|
| 89 |
- _do_install_oslo_lib "oslo.concurrency" |
|
| 90 |
- _do_install_oslo_lib "oslo.config" |
|
| 91 |
- _do_install_oslo_lib "oslo.context" |
|
| 92 |
- _do_install_oslo_lib "oslo.db" |
|
| 93 |
- _do_install_oslo_lib "oslo.i18n" |
|
| 94 |
- _do_install_oslo_lib "oslo.log" |
|
| 95 |
- _do_install_oslo_lib "oslo.messaging" |
|
| 96 |
- _do_install_oslo_lib "oslo.middleware" |
|
| 97 |
- _do_install_oslo_lib "oslo.policy" |
|
| 98 |
- _do_install_oslo_lib "oslo.privsep" |
|
| 99 |
- _do_install_oslo_lib "oslo.reports" |
|
| 100 |
- _do_install_oslo_lib "oslo.rootwrap" |
|
| 101 |
- _do_install_oslo_lib "oslo.serialization" |
|
| 102 |
- _do_install_oslo_lib "oslo.service" |
|
| 103 |
- _do_install_oslo_lib "oslo.utils" |
|
| 104 |
- _do_install_oslo_lib "oslo.versionedobjects" |
|
| 105 |
- _do_install_oslo_lib "oslo.vmware" |
|
| 106 |
- _do_install_oslo_lib "osprofiler" |
|
| 107 |
- _do_install_oslo_lib "pycadf" |
|
| 108 |
- _do_install_oslo_lib "python-openstacksdk" |
|
| 109 |
- _do_install_oslo_lib "stevedore" |
|
| 110 |
- _do_install_oslo_lib "taskflow" |
|
| 111 |
- _do_install_oslo_lib "tooz" |
|
| 112 |
- # installation of additional libraries |
|
| 113 |
- # |
|
| 114 |
- # os-traits for nova |
|
| 115 |
- _do_install_oslo_lib "os-traits" |
|
| 116 |
- |
|
| 117 |
- # etcd (because tooz does not have a hard dependency on these) |
|
| 118 |
- pip_install etcd3 |
|
| 119 |
- pip_install etcd3gw |
|
| 120 |
-} |
|
| 121 |
- |
|
| 122 |
-# Restore xtrace |
|
| 123 |
-$_XTRACE_LIB_OSLO |
|
| 124 |
- |
|
| 125 |
-# Tell emacs to use shell-script-mode |
|
| 126 |
-## Local variables: |
|
| 127 |
-## mode: shell-script |
|
| 128 |
-## End: |
|
| 10 |
+# Included for compatibility with grenade, remove in Queens |
|
| 11 |
+source $TOP_DIR/lib/libraries |
| ... | ... |
@@ -592,7 +592,7 @@ source $TOP_DIR/lib/tls |
| 592 | 592 |
|
| 593 | 593 |
# Source project function libraries |
| 594 | 594 |
source $TOP_DIR/lib/infra |
| 595 |
-source $TOP_DIR/lib/oslo |
|
| 595 |
+source $TOP_DIR/lib/libraries |
|
| 596 | 596 |
source $TOP_DIR/lib/lvm |
| 597 | 597 |
source $TOP_DIR/lib/horizon |
| 598 | 598 |
source $TOP_DIR/lib/keystone |
| ... | ... |
@@ -822,8 +822,8 @@ fi |
| 822 | 822 |
|
| 823 | 823 |
echo_summary "Installing OpenStack project source" |
| 824 | 824 |
|
| 825 |
-# Install Oslo libraries |
|
| 826 |
-install_oslo |
|
| 825 |
+# Install additional libraries |
|
| 826 |
+install_libs |
|
| 827 | 827 |
|
| 828 | 828 |
# Install uwsgi |
| 829 | 829 |
install_apache_uwsgi |