support standard devstack plugin cloning
This change removes the non standard mechanism for specifying the cyborg repo and branch via CYBORG_REPO and CYBORG_BRANCH. in-tree devstack modules use the <PROJECT NAME>_REPO and <PROJECT NAME>_BRANCH convention for specifying revisions of project to clone however devstack plugins should only use that convention for cloning other git repos. A devstack plugin should never clone the repo that contains the plugin itself as doing so will replace the code while it is executing. This can lead to the code that is running and the code on disk being different if the plugin line and CYBORG_* options do not match. This change updates the devstack_setup docs with an example of testing an unmerged change. This change removes some commented out code and unneeded checks in devstack/lib/* Change-Id: I473ef276197ad6578f64a708f4b66562a2ff1d49
This commit is contained in:
parent
5e69508e97
commit
67099829fa
@ -19,11 +19,6 @@
|
||||
# - stop_cyborg
|
||||
# - cleanup_cyborg
|
||||
|
||||
# TODO(sean-k-mooney): this should not be required.
|
||||
# ensure we don't re-source this in the same environment
|
||||
[[ -z "$_CYBORG_DEVSTACK_LIB" ]] || return 0
|
||||
declare -r -g _CYBORG_DEVSTACK_LIB=1
|
||||
|
||||
function install_cyborg_in_controller {
|
||||
if is_service_enabled cyborg-api; then
|
||||
local req_services="key"
|
||||
@ -40,12 +35,6 @@ function install_cyborg_in_controller {
|
||||
function install_cyborg {
|
||||
# make sure all needed services are enabled
|
||||
install_cyborg_in_controller
|
||||
# TODO(sean-k-mooney): This is a bug and does not conform to
|
||||
# the devstack plugin interface. devstack plugins should not
|
||||
# reclone the repo they are packaged in over the directory
|
||||
# they are executing form.
|
||||
git_clone $CYBORG_REPO $CYBORG_DIR $CYBORG_BRANCH
|
||||
|
||||
setup_develop $CYBORG_DIR
|
||||
}
|
||||
|
||||
@ -97,13 +86,6 @@ function create_cyborg_accounts {
|
||||
"$CYBORG_API_URL/v2" \
|
||||
"$CYBORG_API_URL/v2" \
|
||||
"$CYBORG_API_URL/v2"
|
||||
# NOTE (Sundar): If you need v1 API, enable the section below.
|
||||
# get_or_create_service "cyborg_legacy" "accelerator_legacy" "Cyborg Legacy"
|
||||
# get_or_create_endpoint "cyborg_legacy" \
|
||||
# "$REGION_NAME" \
|
||||
# "$CYBORG_API_URL/v1" \
|
||||
# "$CYBORG_API_URL/v1" \
|
||||
# "$CYBORG_API_URL/v1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -6,11 +6,6 @@
|
||||
# Dependencies:
|
||||
#
|
||||
|
||||
# TODO(sean-k-mooney): this should not be required.
|
||||
# ensure we don't re-source this in the same environment
|
||||
[[ -z "$_OPAE_PKG_FNS" ]] || return 0
|
||||
declare -r -g _OPAE_PKG_FNS=1
|
||||
|
||||
function setup_distro_vars {
|
||||
PKG_EXT=""
|
||||
if is_fedora; then
|
||||
|
@ -3,15 +3,6 @@ enable_service cyborg cyborg-api cyborg-cond cyborg-agent
|
||||
# cyborg setting
|
||||
# Defaults
|
||||
# --------
|
||||
|
||||
# NOTE(sean-k-mooney): these should be removed in the future as
|
||||
# devstack plugins should not clone the repo they are packaged in.
|
||||
# Cloning the repo from within the plugin will result in the plugin
|
||||
# script replacing the directory it is executing form.
|
||||
# Set up default repos
|
||||
CYBORG_REPO=${CYBORG_REPO:-${GIT_BASE}/openstack/cyborg.git}
|
||||
CYBORG_BRANCH=${CYBORG_BRANCH:-master}
|
||||
|
||||
# Set up default directories
|
||||
# then name of the directory where cyborg is cloned is set by the first
|
||||
# argument to enable_plugin so we should not assume it will be cyborg
|
||||
|
@ -55,8 +55,6 @@ Host settings
|
||||
::
|
||||
|
||||
[[local|localrc]]
|
||||
# Multi-host settings
|
||||
MULTI_HOST=False
|
||||
HOST_IP=YOUR_IP_CONFIG
|
||||
SERVICE_HOST=$HOST_IP
|
||||
DATABASE_TYPE=mysql
|
||||
@ -64,8 +62,6 @@ Host settings
|
||||
RABBIT_HOST=$HOST_IP
|
||||
|
||||
- Replace YOUR_IP_CONFIG with your host IP (e.g. 10.0.0.72 or localhost).
|
||||
- If you are not configuring OpenStack env in multi-host settings, please set
|
||||
MULTI_HOST=False.
|
||||
|
||||
Password settings
|
||||
>>>>>>>>>>>>>>>>>
|
||||
@ -166,6 +162,23 @@ Compute Nodes
|
||||
- If you do not want to setup cyborg-agent on controller, you can disable it.
|
||||
- You do not need to enable cyborg-api and cyborg-cond on compute nodes.
|
||||
|
||||
Testing with unmerged changes
|
||||
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
|
||||
To test with changes that have not been merged, the enable_plugin
|
||||
line can be modifed to specify the branch/reference to be cloned.
|
||||
|
||||
::
|
||||
|
||||
enable_plugin cyborg https://review.opendev.org/openstack/cyborg refs/changes/28/708728/1
|
||||
|
||||
the format is
|
||||
|
||||
::
|
||||
|
||||
enable_plugin <directory name> <git repo url> <change/revision>
|
||||
|
||||
|
||||
Cell V2 Deployment
|
||||
>>>>>>>>>>>>>>>>>>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user