Fix config file and apache setup
Change-Id: Ie17d7afe563d845fa75abae281da9eaaff9b4a27
This commit is contained in:
parent
3ad4ddfca8
commit
ee9bbf42b6
@ -1,33 +1,67 @@
|
|||||||
import os
|
orm_protocal = 'http'
|
||||||
orm_host = '0.0.0.0'
|
orm_host = '127.0.0.1'
|
||||||
log_location = '{}'
|
log_location = '{}'
|
||||||
ranger_base = os.path.dirname(os.path.abspath('orm'))
|
ranger_base = '/opt/stack/upstream_ranger/ranger'
|
||||||
log_location = ranger_base + '/logs/{}'
|
log_location = ranger_base + '/logs/{}'
|
||||||
|
db_user = 'root'
|
||||||
|
db_pass = 'stack'
|
||||||
|
db_host = '127.0.0.1'
|
||||||
|
ssl_verify = False
|
||||||
|
token_auth_enabled = True
|
||||||
|
token_auth_user = 'admin'
|
||||||
|
token_auth_pass = 'nova'
|
||||||
|
token_auth_tenant = 'admin'
|
||||||
|
token_auth_user_role = 'admin'
|
||||||
|
uuid_port = 7001
|
||||||
|
audit_port = 7002
|
||||||
|
rms_port = 7003
|
||||||
|
rds_port = 8777
|
||||||
|
cms_port = 7080
|
||||||
|
fms_port = 8082
|
||||||
|
ims_port = 8084
|
||||||
|
|
||||||
|
db_url = 'mysql://' + db_user + ':' + db_pass + '@' + db_host + ':3306/'
|
||||||
|
|
||||||
uuid = {
|
uuid = {
|
||||||
'port': '7001',
|
'port': uuid_port,
|
||||||
|
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, uuid_port),
|
||||||
'log': log_location.format('uuidgen.log')
|
'log': log_location.format('uuidgen.log')
|
||||||
}
|
}
|
||||||
cms = {
|
cms = {
|
||||||
'port': '7080',
|
'port': cms_port,
|
||||||
|
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, cms_port),
|
||||||
|
'policy_file': ranger_base + '/orm/services/customer_manager/cms_rest/etc/policy.json',
|
||||||
'log': log_location.format('cms.log')
|
'log': log_location.format('cms.log')
|
||||||
}
|
}
|
||||||
fms = {
|
fms = {
|
||||||
'port': '8082',
|
'port': fms_port,
|
||||||
|
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, fms_port),
|
||||||
|
'policy_file': ranger_base + '/orm/services/flavor_manager/fms_rest/etc/policy.json',
|
||||||
'log': log_location.format('fms.log')
|
'log': log_location.format('fms.log')
|
||||||
}
|
}
|
||||||
audit_server = {
|
audit_server = {
|
||||||
'port': '8776',
|
'port': audit_port,
|
||||||
|
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, audit_port),
|
||||||
'log': log_location.format('audit_server.log')
|
'log': log_location.format('audit_server.log')
|
||||||
}
|
}
|
||||||
ims = {
|
ims = {
|
||||||
'port': '8084',
|
'port': ims_port,
|
||||||
|
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, ims_port),
|
||||||
|
'policy_file': ranger_base + '/orm/services/image_manager/ims/etc/policy.json',
|
||||||
'log': log_location.format('ims.log')
|
'log': log_location.format('ims.log')
|
||||||
}
|
}
|
||||||
rms = {
|
rms = {
|
||||||
'port': '8080',
|
'port': rms_port,
|
||||||
|
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, rms_port),
|
||||||
|
'policy_file': ranger_base + '/orm/services/region_manager/rms/etc/policy.json',
|
||||||
'log': log_location.format('rms.log')
|
'log': log_location.format('rms.log')
|
||||||
}
|
}
|
||||||
rds = {
|
rds = {
|
||||||
'port': '8778',
|
'port': rds_port,
|
||||||
|
'repo_local_location': '/opt/app/orm/ORM',
|
||||||
|
'repo_user': 'orm',
|
||||||
|
'repo_email': 'orm@test.com',
|
||||||
|
'repo_remote_location': 'git@127.0.0.1:/home/repo/ORM.git',
|
||||||
|
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, rds_port),
|
||||||
'log': log_location.format('rds.log')
|
'log': log_location.format('rds.log')
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import cli_common
|
import cli_common
|
||||||
import config
|
import config
|
||||||
|
import orm.base_config as base_config
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@ -357,7 +358,7 @@ def get_token(timeout, args, host):
|
|||||||
print message
|
print message
|
||||||
raise cli_common.MissingArgumentError(message)
|
raise cli_common.MissingArgumentError(message)
|
||||||
|
|
||||||
keystone_ep = cli_common.get_keystone_ep('{}:8080'.format(host),
|
keystone_ep = cli_common.get_keystone_ep('{}:{}'.format(host, base_config.rms['port']),
|
||||||
auth_region)
|
auth_region)
|
||||||
if keystone_ep is None:
|
if keystone_ep is None:
|
||||||
raise ConnectionError(
|
raise ConnectionError(
|
||||||
@ -393,7 +394,7 @@ def get_environment_variable(argument):
|
|||||||
|
|
||||||
def run(args):
|
def run(args):
|
||||||
host = args.orm_base_url if args.orm_base_url else config.orm_base_url
|
host = args.orm_base_url if args.orm_base_url else config.orm_base_url
|
||||||
port = args.port if args.port else 7080
|
port = args.port if args.port else base_config.cms['port']
|
||||||
data = args.datafile.read() if 'datafile' in args else '{}'
|
data = args.datafile.read() if 'datafile' in args else '{}'
|
||||||
timeout = args.timeout if args.timeout else 10
|
timeout = args.timeout if args.timeout else 10
|
||||||
|
|
||||||
@ -428,7 +429,7 @@ def run(args):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
resp = rest_cmd(url, timeout=timeout, data=data, headers=headers,
|
resp = rest_cmd(url, timeout=timeout, data=data, headers=headers,
|
||||||
verify=config.verify)
|
verify=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print e
|
print e
|
||||||
exit(1)
|
exit(1)
|
||||||
|
0
orm/orm_client/ormcli/config.py
Normal file → Executable file
0
orm/orm_client/ormcli/config.py
Normal file → Executable file
@ -2,6 +2,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import cli_common
|
import cli_common
|
||||||
import config
|
import config
|
||||||
|
import orm.base_config as base_config
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@ -304,7 +305,7 @@ def get_token(timeout, args, host):
|
|||||||
print message
|
print message
|
||||||
raise cli_common.MissingArgumentError(message)
|
raise cli_common.MissingArgumentError(message)
|
||||||
|
|
||||||
keystone_ep = cli_common.get_keystone_ep('{}:8080'.format(host),
|
keystone_ep = cli_common.get_keystone_ep('{}:{}'.format(host, base_config.rms['port']),
|
||||||
auth_region)
|
auth_region)
|
||||||
if keystone_ep is None:
|
if keystone_ep is None:
|
||||||
raise ConnectionError(
|
raise ConnectionError(
|
||||||
@ -340,7 +341,7 @@ def get_environment_variable(argument):
|
|||||||
|
|
||||||
def run(args):
|
def run(args):
|
||||||
host = args.orm_base_url if args.orm_base_url else config.orm_base_url
|
host = args.orm_base_url if args.orm_base_url else config.orm_base_url
|
||||||
port = args.port if args.port else 8082
|
port = args.port if args.port else base_config.fms['port']
|
||||||
data = args.datafile.read() if 'datafile' in args else '{}'
|
data = args.datafile.read() if 'datafile' in args else '{}'
|
||||||
timeout = args.timeout if args.timeout else 10
|
timeout = args.timeout if args.timeout else 10
|
||||||
|
|
||||||
@ -374,7 +375,7 @@ def run(args):
|
|||||||
timeout, data, headers, rest_cmd.__name__, url))
|
timeout, data, headers, rest_cmd.__name__, url))
|
||||||
try:
|
try:
|
||||||
resp = rest_cmd(url, timeout=timeout, data=data, headers=headers,
|
resp = rest_cmd(url, timeout=timeout, data=data, headers=headers,
|
||||||
verify=config.verify)
|
verify=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print e
|
print e
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import cli_common
|
import cli_common
|
||||||
import config
|
import config
|
||||||
|
import orm.base_config as base_config
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@ -204,7 +205,7 @@ def get_token(timeout, args, host):
|
|||||||
print message
|
print message
|
||||||
raise cli_common.MissingArgumentError(message)
|
raise cli_common.MissingArgumentError(message)
|
||||||
|
|
||||||
keystone_ep = cli_common.get_keystone_ep('{}:8080'.format(host),
|
keystone_ep = cli_common.get_keystone_ep('{}:{}'.format(host, base_config.rms['port']),
|
||||||
auth_region)
|
auth_region)
|
||||||
if keystone_ep is None:
|
if keystone_ep is None:
|
||||||
raise ConnectionError(
|
raise ConnectionError(
|
||||||
@ -307,7 +308,7 @@ def get_environment_variable(argument):
|
|||||||
|
|
||||||
def run(args):
|
def run(args):
|
||||||
host = args.orm_base_url if args.orm_base_url else config.orm_base_url
|
host = args.orm_base_url if args.orm_base_url else config.orm_base_url
|
||||||
port = args.port if args.port else 8084
|
port = args.port if args.port else base_config.ims['port']
|
||||||
timeout = args.timeout if args.timeout else 10
|
timeout = args.timeout if args.timeout else 10
|
||||||
|
|
||||||
rest_cmd, cmd_url, data = cmd_details(args)
|
rest_cmd, cmd_url, data = cmd_details(args)
|
||||||
@ -342,7 +343,7 @@ def run(args):
|
|||||||
url))
|
url))
|
||||||
try:
|
try:
|
||||||
resp = rest_cmd(url, timeout=timeout, data=data, headers=headers,
|
resp = rest_cmd(url, timeout=timeout, data=data, headers=headers,
|
||||||
verify=config.verify)
|
verify=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print e
|
print e
|
||||||
exit(1)
|
exit(1)
|
||||||
|
0
orm/orm_client/ormcli/orm
Normal file → Executable file
0
orm/orm_client/ormcli/orm
Normal file → Executable file
@ -2,6 +2,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import cli_common
|
import cli_common
|
||||||
import config
|
import config
|
||||||
|
import orm.base_config as base_config
|
||||||
import os
|
import os
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@ -202,7 +203,7 @@ def get_token(timeout, args, host):
|
|||||||
print message
|
print message
|
||||||
raise cli_common.MissingArgumentError(message)
|
raise cli_common.MissingArgumentError(message)
|
||||||
|
|
||||||
keystone_ep = cli_common.get_keystone_ep('{}:8080'.format(host),
|
keystone_ep = cli_common.get_keystone_ep('{}:{}'.format(host, base_config.rms['port']),
|
||||||
auth_region)
|
auth_region)
|
||||||
if keystone_ep is None:
|
if keystone_ep is None:
|
||||||
raise ConnectionError(
|
raise ConnectionError(
|
||||||
@ -314,7 +315,7 @@ def get_environment_variable(argument):
|
|||||||
def run(args):
|
def run(args):
|
||||||
url_path = get_path(args)
|
url_path = get_path(args)
|
||||||
host = args.orm_base_url if args.orm_base_url else config.orm_base_url
|
host = args.orm_base_url if args.orm_base_url else config.orm_base_url
|
||||||
port = args.port if args.port else 8080
|
port = args.port if args.port else base_config.rms['port']
|
||||||
data = args.datafile.read() if 'datafile' in args else '{}'
|
data = args.datafile.read() if 'datafile' in args else '{}'
|
||||||
timeout = args.timeout if args.timeout else 10
|
timeout = args.timeout if args.timeout else 10
|
||||||
rest_cmd, cmd_url = cmd_details(args)
|
rest_cmd, cmd_url = cmd_details(args)
|
||||||
@ -360,7 +361,7 @@ def run(args):
|
|||||||
url))
|
url))
|
||||||
try:
|
try:
|
||||||
resp = rest_cmd(url, data=data, timeout=timeout, headers=headers,
|
resp = rest_cmd(url, data=data, timeout=timeout, headers=headers,
|
||||||
verify=config.verify)
|
verify=False)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print e
|
print e
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -8,15 +8,15 @@ server = {
|
|||||||
|
|
||||||
# DB configurations
|
# DB configurations
|
||||||
database = {
|
database = {
|
||||||
'url': 'mysql://root:stack@127.0.0.1/orm_audit?charset=utf8',
|
'url': config.db_url + 'orm_audit?charset=utf8',
|
||||||
# 'url': 'mysql://root:root@127.0.0.1/orm_audit?charset=utf8',
|
# 'url': 'mysql://root:root@127.0.0.1/orm_audit?charset=utf8',
|
||||||
'echo_statements': True
|
'echo_statements': True
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pecan Application Configurations
|
# Pecan Application Configurations
|
||||||
app = {
|
app = {
|
||||||
'root': 'audit_server.controllers.root.RootController',
|
'root': 'orm.services.audit_trail_manager.audit_server.controllers.root.RootController',
|
||||||
'modules': ['audit_server'],
|
'modules': ['orm.services.audit_trail_manager.audit_server'],
|
||||||
'static_root': '%(confdir)s/public',
|
'static_root': '%(confdir)s/public',
|
||||||
'template_path': '%(confdir)s/audit_server/templates',
|
'template_path': '%(confdir)s/audit_server/templates',
|
||||||
'debug': True,
|
'debug': True,
|
||||||
@ -63,7 +63,7 @@ logging = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
verify = False
|
verify = config.ssl_verify
|
||||||
|
|
||||||
# Custom Configurations must be in Python dictionary format::
|
# Custom Configurations must be in Python dictionary format::
|
||||||
#
|
#
|
||||||
|
@ -11,14 +11,14 @@ server = {
|
|||||||
'port': config.cms['port'],
|
'port': config.cms['port'],
|
||||||
'host': config.orm_host,
|
'host': config.orm_host,
|
||||||
'name': 'cms',
|
'name': 'cms',
|
||||||
'host_ip': '0.0.0.0'
|
'host_ip': config.orm_host
|
||||||
}
|
}
|
||||||
|
|
||||||
# Pecan Application Configurations
|
# Pecan Application Configurations
|
||||||
|
|
||||||
app = {
|
app = {
|
||||||
'root': 'cms_rest.controllers.root.RootController',
|
'root': 'orm.services.customer_manager.cms_rest.controllers.root.RootController',
|
||||||
'modules': ['cms_rest'],
|
'modules': ['orm.services.customer_manager.cms_rest'],
|
||||||
'static_root': '%(confdir)s/public',
|
'static_root': '%(confdir)s/public',
|
||||||
'template_path': '%(confdir)s/cms_rest/templates',
|
'template_path': '%(confdir)s/cms_rest/templates',
|
||||||
'debug': True,
|
'debug': True,
|
||||||
@ -80,45 +80,45 @@ quotas_default_values = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
database = {
|
database = {
|
||||||
'connection_string': 'mysql://root:stack@localhost:3306/orm_cms_db'
|
'connection_string': config.db_url + 'orm_cms_db'
|
||||||
}
|
}
|
||||||
|
|
||||||
api = {
|
api = {
|
||||||
'uuid_server': {
|
'uuid_server': {
|
||||||
'base': 'http://127.0.0.1:8090/',
|
'base': config.uuid['base_url'],
|
||||||
'uuids': 'v1/uuids'
|
'uuids': 'v1/uuids'
|
||||||
},
|
},
|
||||||
'rds_server': {
|
'rds_server': {
|
||||||
'base': 'http://127.0.0.1:8777/',
|
'base': config.rds['base_url'],
|
||||||
'resources': 'v1/rds/resources',
|
'resources': 'v1/rds/resources',
|
||||||
'status': 'v1/rds/status/resource/'
|
'status': 'v1/rds/status/resource/'
|
||||||
},
|
},
|
||||||
'rms_server': {
|
'rms_server': {
|
||||||
'base': 'http://127.0.0.1:8080/',
|
'base': config.rms['base_url'],
|
||||||
'regions': 'v2/orm/regions',
|
'regions': 'v2/orm/regions',
|
||||||
'groups': 'v2/orm/groups',
|
'groups': 'v2/orm/groups',
|
||||||
'cache_seconds': 30
|
'cache_seconds': 30
|
||||||
},
|
},
|
||||||
'audit_server': {
|
'audit_server': {
|
||||||
'base': 'http://127.0.0.1:8776/',
|
'base': config.audit_server['base_url'],
|
||||||
'trans': 'v1/audit/transaction'
|
'trans': 'v1/audit/transaction'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
verify = False
|
verify = config.ssl_verify
|
||||||
|
|
||||||
authentication = {
|
authentication = {
|
||||||
"enabled": True,
|
"enabled": config.token_auth_enabled,
|
||||||
"mech_id": "admin",
|
"mech_id": config.token_auth_user,
|
||||||
"mech_pass": "stack",
|
"mech_pass": config.token_auth_pass,
|
||||||
"rms_url": "http://127.0.0.1:8080",
|
"rms_url": config.rms['base_url'],
|
||||||
"tenant_name": "admin",
|
"tenant_name": config.token_auth_tenant,
|
||||||
"token_role": "admin",
|
"token_role": config.token_auth_user_role,
|
||||||
# The Keystone collection under which the role was granted.
|
# The Keystone collection under which the role was granted.
|
||||||
# The key can be either "tenant" (for Keystone v2.0) or "domain"
|
# The key can be either "tenant" (for Keystone v2.0) or "domain"
|
||||||
# (for Keystone v3) and the value is the tenant/domain name.
|
# (for Keystone v3) and the value is the tenant/domain name.
|
||||||
"role_location": {"tenant": "admin"},
|
"role_location": {"tenant": "admin"},
|
||||||
# The Keystone version currently in use. Can be either "2.0" or "3".
|
# The Keystone version currently in use. Can be either "2.0" or "3".
|
||||||
"keystone_version": "2.0",
|
"keystone_version": "2.0",
|
||||||
"policy_file": "/opt/stack/ranger/orm/services/customer_manager/cms_rest/etc/policy.json"
|
"policy_file": config.cms['policy_file']
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,8 @@ cache_seconds = 0
|
|||||||
|
|
||||||
# Pecan Application Configurations
|
# Pecan Application Configurations
|
||||||
app = {
|
app = {
|
||||||
'root': 'fms_rest.controllers.root.RootController',
|
'root': 'orm.services.flavor_manager.fms_rest.controllers.root.RootController',
|
||||||
'modules': ['fms_rest'],
|
'modules': ['orm.services.flavor_manager.fms_rest'],
|
||||||
'static_root': '%(confdir)s/public',
|
'static_root': '%(confdir)s/public',
|
||||||
'template_path': '%(confdir)s/fms_rest/templates',
|
'template_path': '%(confdir)s/fms_rest/templates',
|
||||||
'debug': True,
|
'debug': True,
|
||||||
@ -69,9 +69,9 @@ logging = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
database = {
|
database = {
|
||||||
'host': 'localhost',
|
'host': config.db_host,
|
||||||
'username': 'root',
|
'username': config.db_user,
|
||||||
'password': 'stack',
|
'password': config.db_pass,
|
||||||
'db_name': 'orm_fms_db',
|
'db_name': 'orm_fms_db',
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -124,39 +124,37 @@ application_root = 'http://localhost:{0}'.format(server['port'])
|
|||||||
|
|
||||||
api = {
|
api = {
|
||||||
'uuid_server': {
|
'uuid_server': {
|
||||||
'base': 'http://127.0.0.1:8090/',
|
'base': config.uuid['base_url'],
|
||||||
'uuids': 'v1/uuids'
|
'uuids': 'v1/uuids'
|
||||||
},
|
},
|
||||||
'rds_server': {
|
'rds_server': {
|
||||||
'base': 'http://127.0.0.1:8777/',
|
'base': config.rds['base_url'],
|
||||||
# 'base': 'http://127.0.0.1:8777/',
|
|
||||||
'resources': 'v1/rds/resources',
|
'resources': 'v1/rds/resources',
|
||||||
'status': 'v1/rds/status/resource/'
|
'status': 'v1/rds/status/resource/'
|
||||||
},
|
},
|
||||||
'rms_server': {
|
'rms_server': {
|
||||||
'base': 'http://127.0.0.1:8080/',
|
'base': config.rms['base_url'],
|
||||||
'groups': 'v2/orm/groups',
|
'groups': 'v2/orm/groups',
|
||||||
'regions': 'v2/orm/regions',
|
'regions': 'v2/orm/regions',
|
||||||
'cache_seconds': 60
|
'cache_seconds': 60
|
||||||
},
|
},
|
||||||
'audit_server': {
|
'audit_server': {
|
||||||
'base': 'http://127.0.0.1:8776/',
|
'base': config.audit_server['base_url'],
|
||||||
'trans': 'v1/audit/transaction'
|
'trans': 'v1/audit/transaction'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
verify = False
|
verify = config.ssl_verify
|
||||||
|
|
||||||
authentication = {
|
authentication = {
|
||||||
"enabled": False,
|
"enabled": config.token_auth_enabled,
|
||||||
"mech_id": "admin",
|
"mech_id": config.token_auth_user,
|
||||||
"mech_pass": "stack",
|
"mech_pass": config.token_auth_pass,
|
||||||
"rms_url": "http://127.0.0.1:8080",
|
"rms_url": config.rms['base_url'],
|
||||||
# "rms_url": "http://127.0.0.1:8080",
|
"tenant_name": config.token_auth_tenant,
|
||||||
"tenant_name": "admin",
|
"token_role": config.token_auth_user_role,
|
||||||
"token_role": "admin",
|
|
||||||
# The Keystone version currently in use. Can be either "2.0" or "3"
|
# The Keystone version currently in use. Can be either "2.0" or "3"
|
||||||
"keystone_version": "2.0",
|
"keystone_version": "2.0",
|
||||||
"policy_file": "fms_rest/etc/policy.json",
|
"policy_file": config.fms['policy_file'],
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,8 @@ server = {
|
|||||||
}
|
}
|
||||||
# Pecan Application Configurations
|
# Pecan Application Configurations
|
||||||
app = {
|
app = {
|
||||||
'root': 'uuidgen.controllers.root.RootController',
|
'root': 'orm.services.id_generator.uuidgen.controllers.root.RootController',
|
||||||
'modules': ['uuidgen'],
|
'modules': ['orm.services.id_generator.uuidgen'],
|
||||||
'static_root': '%(confdir)s/public',
|
'static_root': '%(confdir)s/public',
|
||||||
'template_path': '%(confdir)s/uuidgen/templates',
|
'template_path': '%(confdir)s/uuidgen/templates',
|
||||||
'debug': True,
|
'debug': True,
|
||||||
@ -56,10 +56,10 @@ logging = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
verify = False
|
verify = config.ssl_verify
|
||||||
|
|
||||||
database = {
|
database = {
|
||||||
'connection_string': 'mysql://root:stack@localhost:3306/orm'
|
'connection_string': config.db_url + 'orm'
|
||||||
}
|
}
|
||||||
# Custom Configurations must be in Python dictionary format::
|
# Custom Configurations must be in Python dictionary format::
|
||||||
#
|
#
|
||||||
|
@ -15,8 +15,8 @@ server = {
|
|||||||
|
|
||||||
# Pecan Application Configurations
|
# Pecan Application Configurations
|
||||||
app = {
|
app = {
|
||||||
'root': 'ims.controllers.root.RootController',
|
'root': 'orm.services.image_manager.ims.controllers.root.RootController',
|
||||||
'modules': ['ims'],
|
'modules': ['orm.services.image_manager.ims'],
|
||||||
'static_root': '%(confdir)s/public',
|
'static_root': '%(confdir)s/public',
|
||||||
'template_path': '%(confdir)s/ims/templates',
|
'template_path': '%(confdir)s/ims/templates',
|
||||||
'debug': True,
|
'debug': True,
|
||||||
@ -70,52 +70,51 @@ logging = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
database = {
|
database = {
|
||||||
'host': 'localhost',
|
'host': config.db_host,
|
||||||
'username': 'root',
|
'username': config.db_user,
|
||||||
'password': 'stack',
|
'password': config.db_pass,
|
||||||
'db_name': 'orm_ims_db',
|
'db_name': 'orm_ims_db',
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
verify = False
|
|
||||||
|
|
||||||
database['connection_string'] = 'mysql://{0}:{1}@{2}:3306/{3}'.format(database['username'],
|
database['connection_string'] = 'mysql://{0}:{1}@{2}:3306/{3}'.format(database['username'],
|
||||||
database['password'],
|
database['password'],
|
||||||
database['host'],
|
database['host'],
|
||||||
database['db_name'])
|
database['db_name'])
|
||||||
|
|
||||||
application_root = 'http://localhost:{0}'.format(server['port'])
|
application_root = config.ims['base_url']
|
||||||
|
|
||||||
api = {
|
api = {
|
||||||
'uuid_server': {
|
'uuid_server': {
|
||||||
'base': 'http://127.0.0.1:8090/',
|
'base': config.uuid['base_url'],
|
||||||
'uuids': 'v1/uuids'
|
'uuids': 'v1/uuids'
|
||||||
},
|
},
|
||||||
'rds_server': {
|
'rds_server': {
|
||||||
'base': 'http://127.0.0.1:8777/',
|
'base': config.rds['base_url'],
|
||||||
'resources': 'v1/rds/resources',
|
'resources': 'v1/rds/resources',
|
||||||
'status': 'v1/rds/status/resource/'
|
'status': 'v1/rds/status/resource/'
|
||||||
},
|
},
|
||||||
'rms_server': {
|
'rms_server': {
|
||||||
'base': 'http://127.0.0.1:8080/',
|
'base': config.rms['base_url'],
|
||||||
'groups': 'v2/orm/groups',
|
'groups': 'v2/orm/groups',
|
||||||
'regions': 'v2/orm/regions',
|
'regions': 'v2/orm/regions',
|
||||||
'cache_seconds': 60
|
'cache_seconds': 60
|
||||||
},
|
},
|
||||||
'audit_server': {
|
'audit_server': {
|
||||||
'base': 'http://127.0.0.1:8776/',
|
'base': config.audit_server['base_url'],
|
||||||
'trans': 'v1/audit/transaction'
|
'trans': 'v1/audit/transaction'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
verify = config.ssl_verify
|
||||||
|
|
||||||
authentication = {
|
authentication = {
|
||||||
"enabled": True,
|
"enabled": config.token_auth_enabled,
|
||||||
"mech_id": "admin",
|
"mech_id": config.token_auth_user,
|
||||||
"mech_pass": "stack",
|
"mech_pass": config.token_auth_pass,
|
||||||
"rms_url": "http://127.0.0.1:8080",
|
"rms_url": config.rms['base_url'],
|
||||||
"tenant_name": "admin",
|
"tenant_name": config.token_auth_tenant,
|
||||||
"token_role": "admin",
|
"token_role": config.token_auth_user_role,
|
||||||
"keystone_version": "2.0",
|
"keystone_version": "2.0",
|
||||||
"policy_file": "ims/etc/policy.json"
|
"policy_file": config.ims['policy_file']
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,8 @@ server = {
|
|||||||
|
|
||||||
# Pecan Application Configurations
|
# Pecan Application Configurations
|
||||||
app = {
|
app = {
|
||||||
'root': 'rms.controllers.root.RootController',
|
'root': 'orm.services.region_manager.rms.controllers.root.RootController',
|
||||||
'modules': ['rms'],
|
'modules': ['orm.services.region_manager.rms'],
|
||||||
'static_root': '%(confdir)s/public',
|
'static_root': '%(confdir)s/public',
|
||||||
'template_path': '%(confdir)s/rms/templates',
|
'template_path': '%(confdir)s/rms/templates',
|
||||||
'debug': True,
|
'debug': True,
|
||||||
@ -86,34 +86,34 @@ region_options = {
|
|||||||
|
|
||||||
# DB configurations
|
# DB configurations
|
||||||
database = {
|
database = {
|
||||||
'url': 'mysql://root:stack@127.0.0.1/orm_rms_db?charset=utf8',
|
'url': config.db_url + 'orm_rms_db?charset=utf8',
|
||||||
'max_retries': 3,
|
'max_retries': 3,
|
||||||
'retries_interval': 10
|
'retries_interval': 10
|
||||||
}
|
}
|
||||||
|
|
||||||
endpoints = {
|
endpoints = {
|
||||||
'lcp': 'http://127.0.0.1:8082/lcp'
|
'lcp': config.rms['base_url'] + 'lcp'
|
||||||
}
|
}
|
||||||
|
|
||||||
api = {
|
api = {
|
||||||
'uuid_server': {
|
'uuid_server': {
|
||||||
'base': 'http://127.0.0.1:8090/',
|
'base': config.uuid['base_url'],
|
||||||
'uuids': 'v1/uuids'
|
'uuids': 'v1/uuids'
|
||||||
},
|
},
|
||||||
'audit_server': {
|
'audit_server': {
|
||||||
'base': 'http://127.0.0.1:8776/',
|
'base': config.audit_server['base_url'],
|
||||||
'trans': 'v1/audit/transaction'
|
'trans': 'v1/audit/transaction'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
verify = False
|
verify = config.ssl_verify
|
||||||
|
|
||||||
authentication = {
|
authentication = {
|
||||||
"enabled": True,
|
"enabled": config.token_auth_enabled,
|
||||||
"mech_id": "admin",
|
"mech_id": config.token_auth_user,
|
||||||
"mech_pass": "stack",
|
"mech_pass": config.token_auth_pass,
|
||||||
"tenant_name": "admin",
|
"tenant_name": config.token_auth_tenant,
|
||||||
# The Keystone version currently in use. Can be either "2.0" or "3"
|
# The Keystone version currently in use. Can be either "2.0" or "3"
|
||||||
"keystone_version": "2.0",
|
"keystone_version": "2.0",
|
||||||
"policy_file": "/stack/orm/services/region_manager/rms/etc/policy.json"
|
"policy_file": config.rms['policy_file']
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import orm.base_config as config
|
import orm.base_config as config
|
||||||
# Pecan Application configurations
|
# Pecan Application configurations
|
||||||
app = {
|
app = {
|
||||||
'root': 'rds.controllers.root.RootController',
|
'root': 'orm.services.resource_distributor.rds.controllers.root.RootController',
|
||||||
'modules': ['rds'],
|
'modules': ['orm.services.resource_distributor.rds'],
|
||||||
'service_name': 'RDS'
|
'service_name': 'RDS'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ server = {
|
|||||||
|
|
||||||
# DB configurations
|
# DB configurations
|
||||||
database = {
|
database = {
|
||||||
'url': 'mysql://root:stack@127.0.0.1/orm_rds?charset=utf8'
|
'url': config.db_url + 'orm_rds?charset=utf8'
|
||||||
}
|
}
|
||||||
|
|
||||||
sot = {
|
sot = {
|
||||||
@ -23,35 +23,35 @@ sot = {
|
|||||||
git = {
|
git = {
|
||||||
# possible values : 'native', 'gittle'
|
# possible values : 'native', 'gittle'
|
||||||
'type': 'native',
|
'type': 'native',
|
||||||
'local_repository_path': '/opt/app/orm/ORM',
|
'local_repository_path': config.rds['repo_local_location'],
|
||||||
'file_name_format': 's_{}.yml',
|
'file_name_format': 's_{}.yml',
|
||||||
'relative_path_format': '/{}/hot/{}/{}',
|
'relative_path_format': '/{}/hot/{}/{}',
|
||||||
'commit_message_format': 'File was added to repository: {}',
|
'commit_message_format': 'File was added to repository: {}',
|
||||||
'commit_user': 'orm_rds',
|
'commit_user': config.rds['repo_user'],
|
||||||
'commit_email': 'orm_rds@att.com',
|
'commit_email': config.rds['repo_email'],
|
||||||
'git_server_url': 'orm_rds@127.0.0.1:~/SoT/ORM.git',
|
'git_server_url': config.rds['repo_remote_location'],
|
||||||
'git_cmd_timeout': 45
|
'git_cmd_timeout': 45
|
||||||
}
|
}
|
||||||
|
|
||||||
audit = {
|
audit = {
|
||||||
'audit_server_url': 'http://127.0.0.1:8776/v1/audit/transaction',
|
'audit_server_url': config.audit_server['base_url'] + 'v1/audit/transaction',
|
||||||
'num_of_send_retries': 3,
|
'num_of_send_retries': 3,
|
||||||
'time_wait_between_retries': 1
|
'time_wait_between_retries': 1
|
||||||
}
|
}
|
||||||
|
|
||||||
ims = {
|
ims = {
|
||||||
'base_url': 'http://127.0.0.1:8084/',
|
'base_url': config.ims['base_url'],
|
||||||
'metadata_path': 'v1/orm/images/{0}/regions/{1}/metadata'
|
'metadata_path': 'v1/orm/images/{0}/regions/{1}/metadata'
|
||||||
}
|
}
|
||||||
|
|
||||||
rms = {
|
rms = {
|
||||||
'base_url': 'http://127.0.0.1:8080/',
|
'base_url': config.rms['base_url'],
|
||||||
'all_regions_path': 'v2/orm/regions'
|
'all_regions_path': 'v2/orm/regions'
|
||||||
}
|
}
|
||||||
|
|
||||||
ordupdate = {
|
ordupdate = {
|
||||||
'discovery_url': 'http://127.0.0.1',
|
'discovery_url': 'http://127.0.0.1',
|
||||||
'discovery_port': 8080,
|
'discovery_port': config.rms['port'],
|
||||||
'template_type': 'hot',
|
'template_type': 'hot',
|
||||||
# This flag should be false only in case the ord does not support https.
|
# This flag should be false only in case the ord does not support https.
|
||||||
'https_enabled': True,
|
'https_enabled': True,
|
||||||
@ -59,9 +59,7 @@ ordupdate = {
|
|||||||
'cert_path': '../resources/ord.crt'
|
'cert_path': '../resources/ord.crt'
|
||||||
}
|
}
|
||||||
|
|
||||||
verify = False
|
UUID_URL = config.uuid['base_url'] + 'uuids'
|
||||||
|
|
||||||
UUID_URL = 'http://127.0.0.1:8090/v1/uuids'
|
|
||||||
|
|
||||||
# yaml configurations
|
# yaml configurations
|
||||||
yaml_configs = {
|
yaml_configs = {
|
||||||
@ -167,11 +165,14 @@ logging = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
verify = config.ssl_verify
|
||||||
|
|
||||||
authentication = {
|
authentication = {
|
||||||
"enabled": True,
|
"enabled": config.token_auth_enabled,
|
||||||
"mech_id": "admin",
|
"mech_id": config.token_auth_user,
|
||||||
"mech_pass": "stack",
|
"mech_pass": config.token_auth_pass,
|
||||||
"tenant_name": "admin",
|
"tenant_name": config.token_auth_tenant,
|
||||||
|
"token_role": config.token_auth_user_role,
|
||||||
# The Keystone version currently in use. Can be either "2.0" or "3"
|
# The Keystone version currently in use. Can be either "2.0" or "3"
|
||||||
"keystone_version": "2.0"
|
"keystone_version": "2.0"
|
||||||
}
|
}
|
||||||
|
3
tools/setenv.sh
Executable file
3
tools/setenv.sh
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
export RANGER_BASE='/opt/stack/ranger'
|
||||||
|
export HTTP_PROXY=''
|
||||||
|
export MYSQL_PASSWORD=stack
|
@ -1,4 +1,6 @@
|
|||||||
root_dir=/opt/stack/upstream_ranger/ranger
|
source ./setenv.sh
|
||||||
|
|
||||||
|
root_dir=$RANGER_BASE
|
||||||
|
|
||||||
audit_dir=$root_dir/orm/services/audit_trail_manager
|
audit_dir=$root_dir/orm/services/audit_trail_manager
|
||||||
customer_dir=$root_dir/orm/services/customer_manager
|
customer_dir=$root_dir/orm/services/customer_manager
|
||||||
@ -7,19 +9,6 @@ id_dir=$root_dir/orm/services/id_generator
|
|||||||
image_dir=$root_dir/orm/services/image_manager
|
image_dir=$root_dir/orm/services/image_manager
|
||||||
region_dir=$root_dir/orm/services/region_manager
|
region_dir=$root_dir/orm/services/region_manager
|
||||||
resource_dir=$root_dir/orm/services/resource_distributor
|
resource_dir=$root_dir/orm/services/resource_distributor
|
||||||
cd $root_dir
|
|
||||||
sudo pip install -r requirements.txt --proxy $HTTP_PROXY
|
|
||||||
cd $root_dir/orm/services
|
|
||||||
list_dirs=`ls -d */ | xargs`
|
|
||||||
for dir in $list_dirs; do
|
|
||||||
cd $dir
|
|
||||||
echo "-------------"
|
|
||||||
echo `pwd`
|
|
||||||
echo "-------------"
|
|
||||||
sudo python setup.py develop 2>&1 | tee ~/${dir}.log
|
|
||||||
cd $root_dir
|
|
||||||
done
|
|
||||||
mkdir $root_dir/logs
|
|
||||||
|
|
||||||
sudo ln -s $audit_dir/audit_server.conf /etc/apache2/sites-enabled/audit_server.conf
|
sudo ln -s $audit_dir/audit_server.conf /etc/apache2/sites-enabled/audit_server.conf
|
||||||
sudo ln -s $customer_dir/cms_rest.conf /etc/apache2/sites-enabled/cms_rest.conf
|
sudo ln -s $customer_dir/cms_rest.conf /etc/apache2/sites-enabled/cms_rest.conf
|
||||||
@ -28,3 +17,4 @@ sudo ln -s $id_dir/uuidgen.conf /etc/apache2/sites-enabled/uuidgen.conf
|
|||||||
sudo ln -s $image_dir/ims.conf /etc/apache2/sites-enabled/ims.conf
|
sudo ln -s $image_dir/ims.conf /etc/apache2/sites-enabled/ims.conf
|
||||||
sudo ln -s $region_dir/rms.conf /etc/apache2/sites-enabled/rms.conf
|
sudo ln -s $region_dir/rms.conf /etc/apache2/sites-enabled/rms.conf
|
||||||
sudo ln -s $resource_dir/rds.conf /etc/apache2/sites-enabled/rds.conf
|
sudo ln -s $resource_dir/rds.conf /etc/apache2/sites-enabled/rds.conf
|
||||||
|
|
11
tools/stack_orm.sh
Executable file
11
tools/stack_orm.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
source ./setenv.sh
|
||||||
|
|
||||||
|
root_dir=$RANGER_BASE
|
||||||
|
|
||||||
|
cd $root_dir
|
||||||
|
mkdir $root_dir/logs
|
||||||
|
sudo pip install -r requirements.txt --proxy $HTTP_PROXY
|
||||||
|
echo "-------------"
|
||||||
|
sudo python setup.py develop 2>&1 | tee $root_dir/tools/install.log
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user