Bin files
This commit is contained in:
parent
4ff4b8c4b0
commit
e7dcae9f40
@ -74,6 +74,8 @@ def run_migrations_online():
|
|||||||
target_metadata=target_metadata
|
target_metadata=target_metadata
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print target_metadata
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with context.begin_transaction():
|
with context.begin_transaction():
|
||||||
context.run_migrations(options=build_options())
|
context.run_migrations(options=build_options())
|
||||||
|
55
bin/billingstack-api
Normal file
55
bin/billingstack-api
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- encoding: utf-8 -*-
|
||||||
|
#
|
||||||
|
# Copyright © 2012 New Dream Network, LLC (DreamHost)
|
||||||
|
#
|
||||||
|
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
"""Set up the development API server.
|
||||||
|
"""
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
from wsgiref import simple_server
|
||||||
|
|
||||||
|
from ceilometer.api import app
|
||||||
|
from ceilometer import service
|
||||||
|
from ceilometer.openstack.common import cfg
|
||||||
|
from ceilometer.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
# Parse OpenStack config file and command line options, then
|
||||||
|
# configure logging.
|
||||||
|
service.prepare_service(sys.argv)
|
||||||
|
|
||||||
|
# Build the WSGI app
|
||||||
|
root = app.setup_app()
|
||||||
|
|
||||||
|
# Create the WSGI server and start it
|
||||||
|
host, port = '0.0.0.0', int(cfg.CONF.metering_api_port)
|
||||||
|
srv = simple_server.make_server(host, port, root)
|
||||||
|
|
||||||
|
print 'Starting server in PID %s' % os.getpid()
|
||||||
|
|
||||||
|
if host == '0.0.0.0':
|
||||||
|
print 'serving on 0.0.0.0:%s, view at http://127.0.0.1:%s' % \
|
||||||
|
(port, port)
|
||||||
|
else:
|
||||||
|
print "serving on http://%s:%s" % (host, port)
|
||||||
|
|
||||||
|
try:
|
||||||
|
srv.serve_forever()
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
# allow CTRL+C to shutdown without an error
|
||||||
|
pass
|
26
bin/billingstack-db-manage
Normal file
26
bin/billingstack-db-manage
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
|
|
||||||
|
# Copyright 2012 New Dream Network, LLC (DreamHost)
|
||||||
|
# All Rights Reserved.
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
# Copied: Quantum
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
sys.path.insert(0, os.getcwd())
|
||||||
|
|
||||||
|
from billingstack.storage.impl_sqlalchemy.migration.cli import main
|
||||||
|
|
||||||
|
|
||||||
|
main()
|
@ -31,7 +31,7 @@ debug = True
|
|||||||
[storage:sqlalchemy]
|
[storage:sqlalchemy]
|
||||||
# Database connection string - to configure options for a given implementation
|
# Database connection string - to configure options for a given implementation
|
||||||
# like sqlalchemy or other see below
|
# like sqlalchemy or other see below
|
||||||
#database_connection = mysql://billingstack:billingstack@localhost:3306/billingstack
|
database_connection = mysql+oursql://billingstack:billingstack@mysql:3306/billingstack
|
||||||
#connection_debug = 100
|
#connection_debug = 100
|
||||||
#connection_trace = False
|
#connection_trace = False
|
||||||
#sqlite_synchronous = True
|
#sqlite_synchronous = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user