setup and install ranger
Change-Id: I20a1091eb052d7540440e32cc9c802272fd4ae5c
This commit is contained in:
parent
ccfeedf967
commit
50756599b5
3
.gitignore
vendored
3
.gitignore
vendored
@ -13,6 +13,7 @@ parts
|
||||
bin
|
||||
var
|
||||
sdist
|
||||
logs
|
||||
develop-eggs
|
||||
.installed.cfg
|
||||
lib
|
||||
@ -55,4 +56,4 @@ ChangeLog
|
||||
.*sw?
|
||||
|
||||
# Files created by releasenotes build
|
||||
releasenotes/build
|
||||
releasenotes/build
|
||||
|
10
orm/base_config.py
Normal file
10
orm/base_config.py
Normal file
@ -0,0 +1,10 @@
|
||||
import os
|
||||
orm_host = '0.0.0.0'
|
||||
log_location = '{}'
|
||||
ranger_base = os.path.dirname(os.path.abspath('orm'))
|
||||
log_location = ranger_base + '/logs/{}'
|
||||
|
||||
uuid = {
|
||||
'port': '7001',
|
||||
'log': log_location.format('uuidgen.log')
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
import orm.base_config as config
|
||||
# Server Specific Configurations
|
||||
server = {
|
||||
'port': '8090',
|
||||
'host': '0.0.0.0'
|
||||
'port': config.uuid['port'],
|
||||
'host': config.orm_host
|
||||
}
|
||||
|
||||
# Pecan Application Configurations
|
||||
app = {
|
||||
'root': 'uuidgen.controllers.root.RootController',
|
||||
@ -38,7 +38,7 @@ logging = {
|
||||
'class': 'logging.handlers.RotatingFileHandler',
|
||||
'maxBytes': 50000000,
|
||||
'backupCount': 10,
|
||||
'filename': '/opt/app/orm/uuidgen/uuidgen.log',
|
||||
'filename': config.uuid['log'],
|
||||
'formatter': 'simple'
|
||||
}
|
||||
},
|
||||
|
@ -1,9 +1,9 @@
|
||||
Listen 8090
|
||||
Listen ${UUID_PORT}
|
||||
|
||||
<VirtualHost *:8090>
|
||||
<VirtualHost *:${UUID_PORT}>
|
||||
|
||||
WSGIDaemonProcess uuidgen user=orm group=orm threads=5
|
||||
WSGIScriptAlias / /opt/app/orm/uuidgen/uuidgen.wsgi
|
||||
WSGIDaemonProcess uuidgen user=stack group=stack threads=5
|
||||
WSGIScriptAlias / ${ORM_BASE}/orm/services/id_generator/uuidgen.wsgi
|
||||
|
||||
<Location /v1/logs>
|
||||
Order deny,allow
|
||||
@ -17,7 +17,7 @@ Listen 8090
|
||||
Allow from localhost
|
||||
</Location>
|
||||
|
||||
<Directory /opt/app/orm/uuidgen/>
|
||||
<Directory ${ORM_BASE}/orm/services/id_generator/>
|
||||
WSGIProcessGroup uuidgen
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
Require all granted
|
||||
|
@ -1,2 +1,3 @@
|
||||
from pecan.deploy import deploy
|
||||
application = deploy('/opt/app/orm/uuidgen/config.py')
|
||||
from orm.base_config import ranger_base
|
||||
application = deploy(ranger_base+'/orm/services/id_generator/config.py')
|
||||
|
30
tools/setup_orm.sh
Executable file
30
tools/setup_orm.sh
Executable file
@ -0,0 +1,30 @@
|
||||
root_dir=/opt/stack/upstream_ranger/ranger
|
||||
|
||||
audit_dir=$root_dir/orm/services/audit_trail_manager
|
||||
customer_dir=$root_dir/orm/services/customer_manager
|
||||
flavor_dir=$root_dir/orm/services/flavor_manager
|
||||
id_dir=$root_dir/orm/services/id_generator
|
||||
image_dir=$root_dir/orm/services/image_manager
|
||||
region_dir=$root_dir/orm/services/region_manager
|
||||
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 $customer_dir/cms_rest.conf /etc/apache2/sites-enabled/cms_rest.conf
|
||||
sudo ln -s $flavor_dir/fms_rest.conf /etc/apache2/sites-enabled/fms_rest.conf
|
||||
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 $region_dir/rms.conf /etc/apache2/sites-enabled/rms.conf
|
||||
sudo ln -s $resource_dir/rds.conf /etc/apache2/sites-enabled/rds.conf
|
Loading…
x
Reference in New Issue
Block a user