Change file names from inventory to craton-api
- Since its not just inventory, and the service now includes everything craton the file names should reflect the same. Fixes Bug: 1630784 Change-Id: I0fb77942a92bbf2aacbf2c4a7d0c3104ed8bebfe
This commit is contained in:
parent
33349891a7
commit
393c7452f0
|
@ -12,8 +12,8 @@
|
|||
|
||||
############################################################################
|
||||
# Usage:
|
||||
# docker build -t craton-inventory:latest .
|
||||
# docker run --name craton-inventory -p 127.0.0.1:8080:8080 -d craton-inventory:latest
|
||||
# docker build -t craton-api:latest .
|
||||
# docker run --name craton-api -p 127.0.0.1:8080:8080 -d craton-api:latest
|
||||
# python tools/generate_fake_data.py --url http://127.0.0.1:8080/v1 --user demo --project 1 --key demo
|
||||
# curl http://127.0.0.1:8080/v1/regions -H "Content-Type: application/json" -H "X-Auth-Token: demo" -H "X-Auth-User: demo" -H "X-Auth-Project: 1"
|
||||
#############################################################################
|
||||
|
|
|
@ -15,9 +15,9 @@ CONF = cfg.CONF
|
|||
def main():
|
||||
logging.register_options(CONF)
|
||||
CONF(sys.argv[1:],
|
||||
project='craton-inventory',
|
||||
project='craton-api',
|
||||
default_config_files=[])
|
||||
logging.setup(CONF, 'craton-inventory')
|
||||
logging.setup(CONF, 'craton-api')
|
||||
|
||||
app = api.load_app()
|
||||
host, port = cfg.CONF.api.host, cfg.CONF.api.port
|
|
@ -65,5 +65,5 @@ def main():
|
|||
handler=add_command_parsers)
|
||||
|
||||
CONF.register_cli_opt(command_opt)
|
||||
CONF(project='craton-inventory')
|
||||
CONF(project='craton-api')
|
||||
CONF.command.func()
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
Please see https://alembic.readthedocs.org/en/latest/index.html for general documentation
|
||||
|
||||
To create alembic migrations use:
|
||||
$ craton-inventory-dbsync --config-file=craton.conf revision --message "revision description" --autogenerate
|
||||
$ craton-dbsync --config-file=craton.conf revision --message "revision description" --autogenerate
|
||||
|
||||
Stamp db with most recent migration version, without actually running migrations
|
||||
$ craton-inventory-dbsync --config-file=crton.conf stamp head
|
||||
$ craton-dbsync --config-file=crton.conf stamp head
|
||||
|
||||
Upgrade can be performed by:
|
||||
$ craton-inventory-dbsync --config-file=craton.conf upgrade
|
||||
$ craton-inventory-dbsync --config-file=craton.conf upgrade head
|
||||
$ craton-dbsync --config-file=craton.conf upgrade
|
||||
$ craton-dbsync --config-file=craton.conf upgrade head
|
||||
|
|
|
@ -137,9 +137,9 @@ Run dbsync
|
|||
|
||||
* Make sure to run dbsync to get the db tables created::
|
||||
|
||||
# craton-inventory-dbsync --config-file=etc/inventory
|
||||
# craton-dbsync --config-file=etc/inventory
|
||||
-api-conf.sample version
|
||||
# craton-inventory-dbsync --config-file=etc/inventory
|
||||
# craton-dbsync --config-file=etc/inventory
|
||||
-api-conf.sample upgrade
|
||||
|
||||
-----------------------
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Set Debug level
|
||||
debug=True
|
||||
# Log file for craton inventory
|
||||
log_file=craton-inventory.log
|
||||
log_file=craton-api.log
|
||||
|
||||
[api]
|
||||
# Host IP to use for API service
|
||||
|
@ -10,7 +10,7 @@ host=0.0.0.0
|
|||
# Port to use for API service
|
||||
port=8080
|
||||
# Paste Config file to use
|
||||
api_paste_config=/craton/etc/inventory-api-paste.ini
|
||||
api_paste_config=/craton/etc/craton-api-paste.ini
|
||||
|
||||
|
||||
# Keystone Middlewre settings
|
|
@ -27,7 +27,7 @@ packages =
|
|||
[entry_points]
|
||||
console_scripts =
|
||||
craton-worker = craton.cmd.worker:main
|
||||
craton-inventory-dbsync = craton.cmd.dbsync:main
|
||||
craton-dbsync = craton.cmd.dbsync:main
|
||||
|
||||
craton.workflow =
|
||||
testflow = craton.workflow.testflow:TestFlow
|
||||
|
|
|
@ -17,7 +17,7 @@ mysqladmin flush-privileges
|
|||
###############
|
||||
# Run db-sync #
|
||||
##############
|
||||
/craton/bin/craton-inventory-dbsync --config-file=/craton/etc/inventory-api-conf.sample upgrade
|
||||
/craton/bin/craton-dbsync --config-file=/craton/etc/craton-api-conf.sample upgrade
|
||||
|
||||
###################################
|
||||
# Create initial project and user #
|
||||
|
@ -28,4 +28,4 @@ mysql -u root craton -e "INSERT into users (created_at, updated_at, project_id,
|
|||
#########################
|
||||
# Start the API service #
|
||||
#########################
|
||||
/craton/bin/python3.5 /craton/craton/cmd/inventory-api.py --config-file=/craton/etc/inventory-api-conf.sample
|
||||
/craton/bin/python3.5 /craton/craton/cmd/craton-api.py --config-file=/craton/etc/craton-api-conf.sample
|
||||
|
|
Loading…
Reference in New Issue