blob: 946872c3ad1c9144d3b79e9f067d28cc0c9270fe [file] [log] [blame]
Sean Dague3ed99c02017-06-20 14:09:30 -04001#!/bin/bash
2#
3# lib/oslo
4#
5# Functions to install **Oslo** libraries from git
6#
7# We need this to handle the fact that projects would like to use
8# pre-released versions of oslo libraries.
9
10# Dependencies:
11#
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)
20set +o xtrace
21
22
23# Defaults
24# --------
25GITDIR["automaton"]=$DEST/automaton
26GITDIR["castellan"]=$DEST/castellan
27GITDIR["cliff"]=$DEST/cliff
28GITDIR["cursive"]=$DEST/cursive
29GITDIR["debtcollector"]=$DEST/debtcollector
30GITDIR["futurist"]=$DEST/futurist
31GITDIR["os-client-config"]=$DEST/os-client-config
32GITDIR["osc-lib"]=$DEST/osc-lib
33GITDIR["oslo.cache"]=$DEST/oslo.cache
34GITDIR["oslo.concurrency"]=$DEST/oslo.concurrency
35GITDIR["oslo.config"]=$DEST/oslo.config
36GITDIR["oslo.context"]=$DEST/oslo.context
37GITDIR["oslo.db"]=$DEST/oslo.db
38GITDIR["oslo.i18n"]=$DEST/oslo.i18n
39GITDIR["oslo.log"]=$DEST/oslo.log
40GITDIR["oslo.messaging"]=$DEST/oslo.messaging
41GITDIR["oslo.middleware"]=$DEST/oslo.middleware
42GITDIR["oslo.policy"]=$DEST/oslo.policy
43GITDIR["oslo.privsep"]=$DEST/oslo.privsep
44GITDIR["oslo.reports"]=$DEST/oslo.reports
45GITDIR["oslo.rootwrap"]=$DEST/oslo.rootwrap
46GITDIR["oslo.serialization"]=$DEST/oslo.serialization
47GITDIR["oslo.service"]=$DEST/oslo.service
48GITDIR["oslo.utils"]=$DEST/oslo.utils
49GITDIR["oslo.versionedobjects"]=$DEST/oslo.versionedobjects
50GITDIR["oslo.vmware"]=$DEST/oslo.vmware
51GITDIR["osprofiler"]=$DEST/osprofiler
52GITDIR["pycadf"]=$DEST/pycadf
53GITDIR["python-openstacksdk"]=$DEST/python-openstacksdk
54GITDIR["stevedore"]=$DEST/stevedore
55GITDIR["taskflow"]=$DEST/taskflow
56GITDIR["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.
61GITDIR["os-traits"]=$DEST/os-traits
Sean Dague99a64772017-06-21 10:46:12 -040062GITDIR["os-brick"]=$DEST/os-brick
Sean Dague3ed99c02017-06-20 14:09:30 -040063
64# Support entry points installation of console scripts
65OSLO_BIN_DIR=$(get_python_exec_prefix)
66
67
68# Functions
69# ---------
70
71function _install_lib_from_source {
72 local name=$1
73 if use_library_from_git "$name"; then
74 git_clone_by_name "$name"
75 setup_dev_lib "$name"
76 fi
77}
78
79# install_oslo - install libraries that oslo needs
80function install_oslo {
81 install_libs
82}
83
84# install_libs() - Install additional libraries that we need and want
85# on all environments. Some will only install here if from source,
86# others will always install.
87function install_libs {
88 _install_lib_from_source "automaton"
89 _install_lib_from_source "castellan"
90 _install_lib_from_source "cliff"
91 _install_lib_from_source "cursive"
92 _install_lib_from_source "debtcollector"
93 _install_lib_from_source "futurist"
94 _install_lib_from_source "osc-lib"
95 _install_lib_from_source "os-client-config"
96 _install_lib_from_source "oslo.cache"
97 _install_lib_from_source "oslo.concurrency"
98 _install_lib_from_source "oslo.config"
99 _install_lib_from_source "oslo.context"
100 _install_lib_from_source "oslo.db"
101 _install_lib_from_source "oslo.i18n"
102 _install_lib_from_source "oslo.log"
103 _install_lib_from_source "oslo.messaging"
104 _install_lib_from_source "oslo.middleware"
105 _install_lib_from_source "oslo.policy"
106 _install_lib_from_source "oslo.privsep"
107 _install_lib_from_source "oslo.reports"
108 _install_lib_from_source "oslo.rootwrap"
109 _install_lib_from_source "oslo.serialization"
110 _install_lib_from_source "oslo.service"
111 _install_lib_from_source "oslo.utils"
112 _install_lib_from_source "oslo.versionedobjects"
113 _install_lib_from_source "oslo.vmware"
114 _install_lib_from_source "osprofiler"
115 _install_lib_from_source "pycadf"
116 _install_lib_from_source "python-openstacksdk"
117 _install_lib_from_source "stevedore"
118 _install_lib_from_source "taskflow"
119 _install_lib_from_source "tooz"
120 # installation of additional libraries
121 #
122 # os-traits for nova
123 _install_lib_from_source "os-traits"
Sean Dague99a64772017-06-21 10:46:12 -0400124 # os-brick for nova/cinder
125 _install_lib_from_source "os-brick"
126
Sean Dague3ed99c02017-06-20 14:09:30 -0400127
128 # etcd (because tooz does not have a hard dependency on these)
129 pip_install etcd3
130 pip_install etcd3gw
131}
132
133# Restore xtrace
134$_XTRACE_LIB_OSLO
135
136# Tell emacs to use shell-script-mode
137## Local variables:
138## mode: shell-script
139## End: