Rename nimble to mogan (4)

This changes devstack plugin some other related things

Change-Id: I60913691a89b767f34a04192244eee7ce4af7996
This commit is contained in:
Zhenguo Niu 2017-01-05 00:49:39 +08:00
parent 4fd1aab5b3
commit 7575d1b96e
13 changed files with 159 additions and 159 deletions

View File

@ -14,4 +14,4 @@ Pull requests submitted through GitHub will be ignored.
Bugs should be filed on Launchpad, not GitHub: Bugs should be filed on Launchpad, not GitHub:
https://bugs.launchpad.net/nimble https://bugs.launchpad.net/mogan

View File

@ -1,4 +1,4 @@
nimble Style Commandments Mogan Style Commandments
=============================================== ===============================================
Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/ Read the OpenStack Style Commandments http://docs.openstack.org/developer/hacking/

View File

@ -197,7 +197,7 @@ except Exception:
# html_file_suffix = '' # html_file_suffix = ''
# Output file base name for HTML help builder. # Output file base name for HTML help builder.
htmlhelp_basename = 'nimbledoc' htmlhelp_basename = 'mogandoc'
# -- Options for LaTeX output ------------------------------------------------- # -- Options for LaTeX output -------------------------------------------------

View File

@ -11,6 +11,6 @@ Enabling in Devstack
> cat local.conf > cat local.conf
[[local|localrc]] [[local|localrc]]
enable_plugin mogan https://git.openstack.org/openstack/mogan enable_plugin nimble https://git.openstack.org/openstack/nimble
3. run ``stack.sh`` 3. run ``stack.sh``

View File

@ -1,11 +1,11 @@
# ``stack.sh`` calls the entry points in this order: # ``stack.sh`` calls the entry points in this order:
# #
# install_nimble # install_mogan
# install_python_nimbleclient # install_python_moganclient
# configure_nimble # configure_mogan
# start_nimble # start_mogan
# stop_nimble # stop_mogan
# cleanup_nimble # cleanup_mogan
# Save trace setting # Save trace setting
XTRACE=$(set +o | grep xtrace) XTRACE=$(set +o | grep xtrace)
@ -15,25 +15,25 @@ set -o xtrace
# -------- # --------
# Support entry points installation of console scripts # Support entry points installation of console scripts
if [[ -d ${NIMBLE_DIR}/bin ]]; then if [[ -d ${MOGAN_DIR}/bin ]]; then
NIMBLE_BIN_DIR=${NIMBLE_DIR}/bin MOGAN_BIN_DIR=${MOGAN_DIR}/bin
else else
NIMBLE_BIN_DIR=$(get_python_exec_prefix) MOGAN_BIN_DIR=$(get_python_exec_prefix)
fi fi
# create_nimble_accounts - Set up common required nimble accounts # create_mogan_accounts - Set up common required mogan accounts
# #
# Project User Roles # Project User Roles
# ------------------------------ # ------------------------------
# service nimble admin # service mogan admin
function create_nimble_accounts { function create_mogan_accounts {
create_service_user "nimble" "admin" create_service_user "mogan" "admin"
get_or_create_service "nimble" "baremetal_compute" "Baremetal Compute" get_or_create_service "mogan" "baremetal_compute" "Baremetal Compute"
get_or_create_endpoint "baremetal_compute" \ get_or_create_endpoint "baremetal_compute" \
"$REGION_NAME" \ "$REGION_NAME" \
"${NIMBLE_SERVICE_PROTOCOL}://${NIMBLE_SERVICE_HOST}:${NIMBLE_SERVICE_PORT}/v1" \ "${MOGAN_SERVICE_PROTOCOL}://${MOGAN_SERVICE_HOST}:${MOGAN_SERVICE_PORT}/v1" \
"${NIMBLE_SERVICE_PROTOCOL}://${NIMBLE_SERVICE_HOST}:${NIMBLE_SERVICE_PORT}/v1" \ "${MOGAN_SERVICE_PROTOCOL}://${MOGAN_SERVICE_HOST}:${MOGAN_SERVICE_PORT}/v1" \
"${NIMBLE_SERVICE_PROTOCOL}://${NIMBLE_SERVICE_HOST}:${NIMBLE_SERVICE_PORT}/v1" "${MOGAN_SERVICE_PROTOCOL}://${MOGAN_SERVICE_HOST}:${MOGAN_SERVICE_PORT}/v1"
} }
@ -47,161 +47,161 @@ function mkdir_chown_stack {
# Entry points # Entry points
# ------------ # ------------
# configure_nimble - Set config files, create data dirs, etc # configure_mogan - Set config files, create data dirs, etc
function configure_nimble { function configure_mogan {
mkdir_chown_stack "${NIMBLE_CONF_DIR}" mkdir_chown_stack "${MOGAN_CONF_DIR}"
iniset ${NIMBLE_CONF_FILE} DEFAULT debug ${NIMBLE_DEBUG} iniset ${MOGAN_CONF_FILE} DEFAULT debug ${MOGAN_DEBUG}
NIMBLE_POLICY_FILE=${NIMBLE_CONF_DIR}/policy.json MOGAN_POLICY_FILE=${MOGAN_CONF_DIR}/policy.json
# Nimble Configuration # Mogan Configuration
#------------------------- #-------------------------
# Setup keystone_authtoken section # Setup keystone_authtoken section
iniset ${NIMBLE_CONF_FILE} keystone_authtoken auth_uri ${KEYSTONE_SERVICE_URI} iniset ${MOGAN_CONF_FILE} keystone_authtoken auth_uri ${KEYSTONE_SERVICE_URI}
iniset ${NIMBLE_CONF_FILE} keystone_authtoken project_domain_name ${SERVICE_DOMAIN_NAME} iniset ${MOGAN_CONF_FILE} keystone_authtoken project_domain_name ${SERVICE_DOMAIN_NAME}
iniset ${NIMBLE_CONF_FILE} keystone_authtoken project_name ${SERVICE_PROJECT_NAME} iniset ${MOGAN_CONF_FILE} keystone_authtoken project_name ${SERVICE_PROJECT_NAME}
iniset ${NIMBLE_CONF_FILE} keystone_authtoken user_domain_name ${SERVICE_DOMAIN_NAME} iniset ${MOGAN_CONF_FILE} keystone_authtoken user_domain_name ${SERVICE_DOMAIN_NAME}
iniset ${NIMBLE_CONF_FILE} keystone_authtoken username ${NIMBLE_ADMIN_USER} iniset ${MOGAN_CONF_FILE} keystone_authtoken username ${MOGAN_ADMIN_USER}
iniset ${NIMBLE_CONF_FILE} keystone_authtoken password ${SERVICE_PASSWORD} iniset ${MOGAN_CONF_FILE} keystone_authtoken password ${SERVICE_PASSWORD}
iniset ${NIMBLE_CONF_FILE} keystone_authtoken auth_url ${KEYSTONE_AUTH_URI} iniset ${MOGAN_CONF_FILE} keystone_authtoken auth_url ${KEYSTONE_AUTH_URI}
iniset ${NIMBLE_CONF_FILE} keystone_authtoken auth_type "password" iniset ${MOGAN_CONF_FILE} keystone_authtoken auth_type "password"
# Config the transport url # Config the transport url
iniset_rpc_backend nimble $NIMBLE_CONF_FILE iniset_rpc_backend mogan $MOGAN_CONF_FILE
# Configure the database. # Configure the database.
iniset ${NIMBLE_CONF_FILE} database connection `database_connection_url nimble` iniset ${MOGAN_CONF_FILE} database connection `database_connection_url mogan`
# Setup ironic section # Setup ironic section
iniset ${NIMBLE_CONF_FILE} ironic admin_tenant_name ${SERVICE_PROJECT_NAME} iniset ${MOGAN_CONF_FILE} ironic admin_tenant_name ${SERVICE_PROJECT_NAME}
iniset ${NIMBLE_CONF_FILE} ironic admin_username "ironic" iniset ${MOGAN_CONF_FILE} ironic admin_username "ironic"
iniset ${NIMBLE_CONF_FILE} ironic admin_password ${SERVICE_PASSWORD} iniset ${MOGAN_CONF_FILE} ironic admin_password ${SERVICE_PASSWORD}
iniset ${NIMBLE_CONF_FILE} ironic admin_url "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_AUTH_HOST}:${KEYSTONE_SERVICE_PORT}/v2.0" iniset ${MOGAN_CONF_FILE} ironic admin_url "${KEYSTONE_AUTH_PROTOCOL}://${KEYSTONE_AUTH_HOST}:${KEYSTONE_SERVICE_PORT}/v2.0"
iniset ${NIMBLE_CONF_FILE} ironic api_endpoint "${KEYSTONE_AUTH_PROTOCOL}://${SERVICE_HOST}:${IRONIC_SERVICE_PORT}" iniset ${MOGAN_CONF_FILE} ironic api_endpoint "${KEYSTONE_AUTH_PROTOCOL}://${SERVICE_HOST}:${IRONIC_SERVICE_PORT}"
# Setup neutron section # Setup neutron section
iniset ${NIMBLE_CONF_FILE} neutron url "${NEUTRON_SERVICE_PROTOCOL}://${SERVICE_HOST}:${NEUTRON_SERVICE_PORT}" iniset ${MOGAN_CONF_FILE} neutron url "${NEUTRON_SERVICE_PROTOCOL}://${SERVICE_HOST}:${NEUTRON_SERVICE_PORT}"
# Setup glance section # Setup glance section
iniset ${NIMBLE_CONF_FILE} glance glance_api_servers "${GLANCE_SERVICE_PROTOCOL}://${SERVICE_HOST}:${GLANCE_SERVICE_PORT}" iniset ${MOGAN_CONF_FILE} glance glance_api_servers "${GLANCE_SERVICE_PROTOCOL}://${SERVICE_HOST}:${GLANCE_SERVICE_PORT}"
# Setup keystone section # Setup keystone section
iniset ${NIMBLE_CONF_FILE} keystone region_name ${REGION_NAME} iniset ${MOGAN_CONF_FILE} keystone region_name ${REGION_NAME}
# Path of policy.json file. # Path of policy.json file.
iniset ${NIMBLE_CONF_FILE} oslo_policy policy_file ${NIMBLE_POLICY_FILE} iniset ${MOGAN_CONF_FILE} oslo_policy policy_file ${MOGAN_POLICY_FILE}
if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then
setup_colorized_logging ${NIMBLE_CONF_FILE} DEFAULT tenant user setup_colorized_logging ${MOGAN_CONF_FILE} DEFAULT tenant user
fi fi
} }
# init_nimble - Initialize the database # init_mogan - Initialize the database
function init_nimble { function init_mogan {
# (re)create Nimble database # (re)create Mogan database
recreate_database nimble utf8 recreate_database mogan utf8
${NIMBLE_BIN_DIR}/nimble-dbsync --config-file ${NIMBLE_CONF_FILE} upgrade ${MOGAN_BIN_DIR}/mogan-dbsync --config-file ${MOGAN_CONF_FILE} upgrade
} }
# install_nimble - Collect source and prepare # install_mogan - Collect source and prepare
function install_nimble { function install_mogan {
# make sure all needed service were enabled # make sure all needed service were enabled
local req_services="key glance neutron ironic" local req_services="key glance neutron ironic"
for srv in $req_services; do for srv in $req_services; do
if ! is_service_enabled "$srv"; then if ! is_service_enabled "$srv"; then
die $LINENO "$srv should be enabled for Nimble." die $LINENO "$srv should be enabled for Mogan."
fi fi
done done
setup_develop ${NIMBLE_DIR} setup_develop ${MOGAN_DIR}
if is_service_enabled horizon; then if is_service_enabled horizon; then
_install_nimble_dashboard _install_mogan_dashboard
fi fi
} }
function _install_nimble_dashboard { function _install_mogan_dashboard {
# add it when nimble dashboard is ready # add it when mogan dashboard is ready
: :
#git_clone ${NIMBLE_DASHBOARD_REPO} ${NIMBLE_DASHBOARD_DIR} ${NIMBLE_DASHBOARD_BRANCH} #git_clone ${MOGAN_DASHBOARD_REPO} ${MOGAN_DASHBOARD_DIR} ${MOGAN_DASHBOARD_BRANCH}
#setup_develop ${NIMBLE_DASHBOARD_DIR} #setup_develop ${MOGAN_DASHBOARD_DIR}
# add it when nimble dashboard is ready # add it when mogan dashboard is ready
#ln -fs ${NIMBLE_DASHBOARD_DIR}/_xx_nimble.py.example ${HORIZON_DIR}/openstack_dashboard/local/enabled/_xx_nimble.py #ln -fs ${MOGAN_DASHBOARD_DIR}/_xx_mogan.py.example ${HORIZON_DIR}/openstack_dashboard/local/enabled/_xx_mogan.py
} }
function install_nimble_pythonclient { function install_mogan_pythonclient {
echo_summary "Installing python-nimbleclient" echo_summary "Installing python-moganclient"
git_clone ${NIMBLE_PYTHONCLIENT_REPO} ${NIMBLE_PYTHONCLIENT_DIR} ${NIMBLE_PYTHONCLIENT_BRANCH} git_clone ${MOGAN_PYTHONCLIENT_REPO} ${MOGAN_PYTHONCLIENT_DIR} ${MOGAN_PYTHONCLIENT_BRANCH}
setup_develop ${NIMBLE_PYTHONCLIENT_DIR} setup_develop ${MOGAN_PYTHONCLIENT_DIR}
} }
# start_nimble - Start running processes, including screen # start_mogan - Start running processes, including screen
function start_nimble { function start_mogan {
if is_service_enabled nimble-api && is_service_enabled nimble-engine ; then if is_service_enabled mogan-api && is_service_enabled mogan-engine ; then
echo_summary "Installing all nimble services in separate processes" echo_summary "Installing all mogan services in separate processes"
run_process nimble-api "${NIMBLE_BIN_DIR}/nimble-api --config-file ${NIMBLE_CONF_DIR}/nimble.conf" run_process mogan-api "${MOGAN_BIN_DIR}/mogan-api --config-file ${MOGAN_CONF_DIR}/mogan.conf"
if ! wait_for_service ${SERVICE_TIMEOUT} ${NIMBLE_SERVICE_PROTOCOL}://${NIMBLE_SERVICE_HOST}:${NIMBLE_SERVICE_PORT}; then if ! wait_for_service ${SERVICE_TIMEOUT} ${MOGAN_SERVICE_PROTOCOL}://${MOGAN_SERVICE_HOST}:${MOGAN_SERVICE_PORT}; then
die $LINENO "nimble-api did not start" die $LINENO "mogan-api did not start"
fi fi
run_process nimble-engine "${NIMBLE_BIN_DIR}/nimble-engine --config-file ${NIMBLE_CONF_DIR}/nimble.conf" run_process mogan-engine "${MOGAN_BIN_DIR}/mogan-engine --config-file ${MOGAN_CONF_DIR}/mogan.conf"
fi fi
} }
# stop_nimble - Stop running processes # stop_mogan - Stop running processes
function stop_nimble { function stop_mogan {
# Kill the Nimble screen windows # Kill the Mogan screen windows
for serv in nimble-api nimble-engine; do for serv in mogan-api mogan-engine; do
stop_process $serv stop_process $serv
done done
} }
function cleanup_nimble { function cleanup_mogan {
if is_service_enabled horizon; then if is_service_enabled horizon; then
_nimble_cleanup_nimble_dashboard _mogan_cleanup_mogan_dashboard
fi fi
} }
function _nimble_cleanup_nimble_dashboard { function _mogan_cleanup_mogan_dashboard {
rm -f ${HORIZON_DIR}/openstack_dashboard/local/enabled/_xx_nimble.py rm -f ${HORIZON_DIR}/openstack_dashboard/local/enabled/_xx_mogan.py
} }
function create_instance_type { function create_instance_type {
openstack baremetal flavor create ${NIMBLE_DEFAULT_INSTANCE_TYPE} --description 'Nimble default instance type' openstack baremetal flavor create ${MOGAN_DEFAULT_INSTANCE_TYPE} --description 'Mogan default instance type'
} }
function update_ironic_node_type { function update_ironic_node_type {
ironic_nodes=$(openstack baremetal node list -c UUID -f value) ironic_nodes=$(openstack baremetal node list -c UUID -f value)
for node in ${ironic_nodes};do for node in ${ironic_nodes};do
openstack baremetal node set --property instance_type=${NIMBLE_DEFAULT_INSTANCE_TYPE} ${node} openstack baremetal node set --property instance_type=${MOGAN_DEFAULT_INSTANCE_TYPE} ${node}
done done
} }
if is_service_enabled nimble; then if is_service_enabled mogan; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing nimble" echo_summary "Installing mogan"
install_nimble install_mogan
install_nimble_pythonclient install_mogan_pythonclient
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring nimble" echo_summary "Configuring mogan"
configure_nimble configure_mogan
create_nimble_accounts create_mogan_accounts
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
echo_summary "Initializing nimble" echo_summary "Initializing mogan"
init_nimble init_mogan
start_nimble start_mogan
echo_summary "Creating instance type" echo_summary "Creating instance type"
create_instance_type create_instance_type
echo_summary "Updating ironic node properties" echo_summary "Updating ironic node properties"
@ -209,14 +209,14 @@ if is_service_enabled nimble; then
fi fi
if [[ "$1" == "unstack" ]]; then if [[ "$1" == "unstack" ]]; then
echo_summary "Shutting down nimble" echo_summary "Shutting down mogan"
stop_nimble stop_mogan
fi fi
if [[ "$1" == "clean" ]]; then if [[ "$1" == "clean" ]]; then
echo_summary "Cleaning nimble" echo_summary "Cleaning mogan"
#add it when nimble dashboard #add it when mogan dashboard
#cleanup_nimble #cleanup_mogan
fi fi
fi fi

View File

@ -1,30 +1,30 @@
# Devstack settings # Devstack settings
# We have to add Nimble to enabled services for run_process to work # We have to add Mogan to enabled services for run_process to work
# Now we just support to run services in separate processes and screens: # Now we just support to run services in separate processes and screens:
# enable_service nimble nimble-api nimble-engine # enable_service mogan mogan-api mogan-engine
enable_service nimble nimble-api nimble-engine enable_service mogan mogan-api mogan-engine
# Set up default repos # Set up default repos
NIMBLE_REPO=${NIMBLE_REPO:-${GIT_BASE}/openstack/nimble.git} MOGAN_REPO=${MOGAN_REPO:-${GIT_BASE}/openstack/nimble.git}
NIMBLE_BRANCH=${NIMBLE_BRANCH:-master} MOGAN_BRANCH=${MOGAN_BRANCH:-master}
#NIMBLE_DASHBOARD_REPO=${NIMBLE_DASHBOARD_REPO:-${GIT_BASE}/openstack/nimble-dashboard.git} #MOGAN_DASHBOARD_REPO=${MOGAN_DASHBOARD_REPO:-${GIT_BASE}/openstack/nimble-dashboard.git}
#NIMBLE_DASHBOARD_BRANCH=${NIMBLE_DASHBOARD_BRANCH:-${NIMBLE_BRANCH}} #MOGAN_DASHBOARD_BRANCH=${MOGAN_DASHBOARD_BRANCH:-${MOGAN_BRANCH}}
NIMBLE_PYTHONCLIENT_REPO=${NIMBLE_PYTHONCLIENT_REPO:-${GIT_BASE}/openstack/python-nimbleclient.git} MOGAN_PYTHONCLIENT_REPO=${MOGAN_PYTHONCLIENT_REPO:-${GIT_BASE}/openstack/python-nimbleclient.git}
NIMBLE_PYTHONCLIENT_BRANCH=${NIMBLE_PYTHONCLIENT_BRANCH:-master} MOGAN_PYTHONCLIENT_BRANCH=${MOGAN_PYTHONCLIENT_BRANCH:-master}
NIMBLE_PYTHONCLIENT_DIR=${DEST}/python-nimbleclient MOGAN_PYTHONCLIENT_DIR=${DEST}/python-nimbleclient
# Set up default directories # Set up default directories
NIMBLE_DIR=$DEST/nimble MOGAN_DIR=$DEST/nimble
NIMBLE_DASHBOARD_DIR=$DEST/nimble-dashboard MOGAN_DASHBOARD_DIR=$DEST/nimble-dashboard
NIMBLE_CONF_DIR=${NIMBLE_CONF_DIR:-/etc/nimble} MOGAN_CONF_DIR=${MOGAN_CONF_DIR:-/etc/mogan}
NIMBLE_CONF_FILE=${NIMBLE_CONF_DIR}/nimble.conf MOGAN_CONF_FILE=${MOGAN_CONF_DIR}/mogan.conf
NIMBLE_DEBUG=${NIMBLE_DEBUG:-True} MOGAN_DEBUG=${MOGAN_DEBUG:-True}
NIMBLE_SERVICE_HOST=${NIMBLE_SERVICE_HOST:-$SERVICE_HOST} MOGAN_SERVICE_HOST=${MOGAN_SERVICE_HOST:-$SERVICE_HOST}
NIMBLE_SERVICE_PORT=${NIMBLE_SERVICE_PORT:-6688} MOGAN_SERVICE_PORT=${MOGAN_SERVICE_PORT:-6688}
NIMBLE_SERVICE_PROTOCOL=${NIMBLE_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL} MOGAN_SERVICE_PROTOCOL=${MOGAN_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
NIMBLE_ADMIN_USER=${NIMBLE_ADMIN_USER:-nimble} MOGAN_ADMIN_USER=${MOGAN_ADMIN_USER:-mogan}
NIMBLE_DEFAULT_INSTANCE_TYPE=${NIMBLE_DEFAULT_INSTANCE_TYPE:-small} MOGAN_DEFAULT_INSTANCE_TYPE=${MOGAN_DEFAULT_INSTANCE_TYPE:-small}

View File

@ -4,7 +4,7 @@
Developer Quick-Start Developer Quick-Start
===================== =====================
This is a quick walkthrough to get you started developing code for Nimble. This is a quick walkthrough to get you started developing code for Mogan.
This assumes you are already familiar with submitting code reviews to This assumes you are already familiar with submitting code reviews to
an OpenStack project. an OpenStack project.
@ -139,7 +139,7 @@ upgrade it individually, if you need to::
Running Unit Tests Locally Running Unit Tests Locally
========================== ==========================
If you haven't already, Nimble source code should be pulled directly from git:: If you haven't already, Mogan source code should be pulled directly from git::
# from your home or source directory # from your home or source directory
cd ~ cd ~
@ -149,7 +149,7 @@ If you haven't already, Nimble source code should be pulled directly from git::
Running Unit and Style Tests Running Unit and Style Tests
---------------------------- ----------------------------
All unit tests should be run using tox. To run Nimble's entire test suite:: All unit tests should be run using tox. To run Mogan's entire test suite::
# to run the py27, py34, py35 unit tests, and the style tests # to run the py27, py34, py35 unit tests, and the style tests
tox tox
@ -211,14 +211,14 @@ the target name::
tox -egenconfig tox -egenconfig
Deploying Nimble with DevStack Deploying Mogan with DevStack
============================== =============================
DevStack may be configured to deploy Nimble, It is easy to develop Nimble DevStack may be configured to deploy Mogan, It is easy to develop Mogan
with the devstack environment. Nimble depends on Ironic, Neutron, and Glance with the devstack environment. Mogan depends on Ironic, Neutron, and Glance
to create and schedule virtual machines to simulate bare metal servers. to create and schedule virtual machines to simulate bare metal servers.
It is highly recommended to deploy on an expendable virtual machine and not It is highly recommended to deploy on an expendable virtual machine and not
on your personal work station. Deploying Nimble with DevStack requires a on your personal work station. Deploying Mogan with DevStack requires a
machine running Ubuntu 14.04 (or later) or Fedora 20 (or later). Make sure machine running Ubuntu 14.04 (or later) or Fedora 20 (or later). Make sure
your machine is fully up to date and has the latest packages installed before your machine is fully up to date and has the latest packages installed before
beginning this process. beginning this process.
@ -239,14 +239,14 @@ Switch to the stack user and clone DevStack::
sudo su - stack sudo su - stack
git clone https://git.openstack.org/openstack-dev/devstack.git devstack git clone https://git.openstack.org/openstack-dev/devstack.git devstack
Create devstack/local.conf with minimal settings required to enable Nimble Create devstack/local.conf with minimal settings required to enable Mogan
.. note:: .. note::
As Ironic tempest configuration depends on baremetal flavor, we have to As Ironic tempest configuration depends on baremetal flavor, we have to
temporarily disable tempest in the devstack config file to make it work temporarily disable tempest in the devstack config file to make it work
with Ironic. with Ironic.
It's ok to enable Horizon, Nova and Cinder services, they don't impact It's ok to enable Horizon, Nova and Cinder services, they don't impact
Nimble at all, disable them in the demo configuration to only deploy the Mogan at all, disable them in the demo configuration to only deploy the
dependent services dependent services
:: ::
@ -266,8 +266,8 @@ Create devstack/local.conf with minimal settings required to enable Nimble
# Enable Ironic plugin # Enable Ironic plugin
enable_plugin ironic git://git.openstack.org/openstack/ironic enable_plugin ironic git://git.openstack.org/openstack/ironic
# Enable Nimble plugin # Enable Mogan plugin
enable_plugin nimble git://git.openstack.org/openstack/nimble enable_plugin mogan git://git.openstack.org/openstack/nimble
# Enable Neutron which is required by Ironic and disable nova-network. # Enable Neutron which is required by Ironic and disable nova-network.
disable_service n-net disable_service n-net
@ -335,8 +335,8 @@ Create devstack/local.conf with minimal settings required to enable Nimble
GIT_BASE=https://git.openstack.org GIT_BASE=https://git.openstack.org
# Enable Nimble plugin # Enable Mogan plugin
enable_plugin nimble https://git.openstack.org/openstack/nimble enable_plugin mogan https://git.openstack.org/openstack/nimble
Run stack.sh:: Run stack.sh::
@ -350,7 +350,7 @@ Source credentials, and spawn an instance as the ``demo`` user::
image=$(openstack image show $DEFAULT_IMAGE_NAME -f value -c id) image=$(openstack image show $DEFAULT_IMAGE_NAME -f value -c id)
# spawn instance # spawn instance
As our nimbleclient is not ready now, will add this soon... As our moganclient is not ready now, will add this soon...
Building developer documentation Building developer documentation
================================ ================================
@ -368,19 +368,19 @@ commands to build the documentation set:
tox -edocs tox -edocs
#Now use your browser to open the top-level index.html located at: #Now use your browser to open the top-level index.html located at:
nimble/doc/build/html/index.html mogan/doc/build/html/index.html
- On a remote machine:: - On a remote machine::
# Go to the directory that contains the docs # Go to the directory that contains the docs
cd ~/nimble/doc/source/ cd ~/mogan/doc/source/
# Build the docs # Build the docs
tox -edocs tox -edocs
# Change directory to the newly built HTML files # Change directory to the newly built HTML files
cd ~/nimble/doc/build/html/ cd ~/mogan/doc/build/html/
# Create a server using python on port 8000 # Create a server using python on port 8000
python -m SimpleHTTPServer 8000 python -m SimpleHTTPServer 8000

View File

@ -9,7 +9,7 @@
# all access will be forbidden # all access will be forbidden
"deny": "!" "deny": "!"
# Full read/write API access # Full read/write API access
"is_admin": "rule:admin_api or (rule:is_member and role:nimble_admin)" "is_admin": "rule:admin_api or (rule:is_member and role:mogan_admin)"
# Admin or owner API access # Admin or owner API access
"admin_or_owner": "is_admin:True or project_id:%(project_id)s" "admin_or_owner": "is_admin:True or project_id:%(project_id)s"
# Admin or user API access # Admin or user API access

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = nimble name = mogan
summary = Standalone Baremetal Service with Ironic summary = Baremetal Compute Service
description-file = description-file =
README.rst README.rst
author = OpenStack author = OpenStack
@ -22,7 +22,7 @@ classifier =
[files] [files]
packages = packages =
nimble mogan
[entry_points] [entry_points]
mogan.engine.scheduler.filters = mogan.engine.scheduler.filters =
@ -32,21 +32,21 @@ mogan.engine.scheduler.filters =
JsonFilter = mogan.engine.scheduler.filters.json_filter:JsonFilter JsonFilter = mogan.engine.scheduler.filters.json_filter:JsonFilter
oslo.config.opts = oslo.config.opts =
nimble = mogan.conf.opts:list_opts mogan = mogan.conf.opts:list_opts
oslo.policy.policies = oslo.policy.policies =
nimble.api = mogan.common.policy:list_policies mogan.api = mogan.common.policy:list_policies
console_scripts = console_scripts =
nimble-api = mogan.cmd.api:main mogan-api = mogan.cmd.api:main
nimble-engine = mogan.cmd.engine:main mogan-engine = mogan.cmd.engine:main
nimble-dbsync = mogan.cmd.dbsync:main mogan-dbsync = mogan.cmd.dbsync:main
mogan.database.migration_backend = mogan.database.migration_backend =
sqlalchemy = mogan.db.sqlalchemy.migration sqlalchemy = mogan.db.sqlalchemy.migration
tempest.test_plugins = tempest.test_plugins =
nimble_tests = mogan.tests.tempest.plugin:MoganTempestPlugin mogan_tests = mogan.tests.tempest.plugin:MoganTempestPlugin
[build_sphinx] [build_sphinx]
source-dir = doc/source source-dir = doc/source
@ -57,18 +57,18 @@ all_files = 1
upload-dir = doc/build/html upload-dir = doc/build/html
[compile_catalog] [compile_catalog]
directory = nimble/locale directory = mogan/locale
domain = nimble domain = mogan
[update_catalog] [update_catalog]
domain = nimble domain = mogan
output_dir = nimble/locale output_dir = mogan/locale
input_file = nimble/locale/nimble.pot input_file = mogan/locale/mogan.pot
[extract_messages] [extract_messages]
keywords = _ gettext ngettext l_ lazy_gettext keywords = _ gettext ngettext l_ lazy_gettext
mapping_file = babel.cfg mapping_file = babel.cfg
output_file = nimble/locale/nimble.pot output_file = mogan/locale/mogan.pot
[build_releasenotes] [build_releasenotes]
all_files = 1 all_files = 1

View File

@ -1,7 +1,7 @@
[DEFAULT] [DEFAULT]
output_file = etc/nimble/nimble.conf.sample output_file = etc/mogan/mogan.conf.sample
wrap_width = 62 wrap_width = 62
namespace = nimble namespace = mogan
namespace = oslo.db namespace = oslo.db
namespace = oslo.messaging namespace = oslo.messaging
namespace = oslo.middleware.cors namespace = oslo.middleware.cors

View File

@ -41,7 +41,7 @@ commands = python setup.py test --coverage --testr-args='{posargs}'
[testenv:docs] [testenv:docs]
commands = commands =
python setup.py build_sphinx python setup.py build_sphinx
oslo-config-generator --config-file=tools/config/nimble-config-generator.conf oslo-config-generator --config-file=tools/config/mogan-config-generator.conf
[testenv:releasenotes] [testenv:releasenotes]
commands = commands =
@ -66,13 +66,13 @@ commands = oslo_debug_helper {posargs}
sitepackages = False sitepackages = False
envdir = {toxworkdir}/venv envdir = {toxworkdir}/venv
commands = commands =
oslo-config-generator --config-file=tools/config/nimble-config-generator.conf oslo-config-generator --config-file=tools/config/mogan-config-generator.conf
[testenv:genpolicy] [testenv:genpolicy]
sitepackages = False sitepackages = False
envdir = {toxworkdir}/venv envdir = {toxworkdir}/venv
commands = commands =
oslopolicy-sample-generator --namespace=nimble.api --output-file=etc/nimble/policy.json.sample oslopolicy-sample-generator --namespace=mogan.api --output-file=etc/mogan/policy.json.sample
[testenv:api-ref] [testenv:api-ref]
# This environment is called from CI scripts to test and publish # This environment is called from CI scripts to test and publish