ranger-agent cleanup
- Removed redundant README file - Used OS standard variables for ranger-agent config - Other misc cleanup Change-Id: I382260f13cf20e61daf1ed6d3143e101b9a37321
This commit is contained in:
parent
f7611c84c3
commit
2aec0ab4b7
@ -45,19 +45,23 @@ RUN pip install --default-timeout=100 -r requirements.txt
|
|||||||
RUN python setup.py install
|
RUN python setup.py install
|
||||||
|
|
||||||
RUN cd ~/ \
|
RUN cd ~/ \
|
||||||
&& rm -fr /tmp/ranger-agent \
|
&& rm -fr /tmp/ranger-agent \
|
||||||
&& mkdir /var/log/ranger-agent
|
&& mkdir /var/log/ranger-agent
|
||||||
|
|
||||||
# Create user aic-ord
|
# Create user aic-ord
|
||||||
RUN useradd -ms /bin/bash aic-ord
|
RUN useradd -ms /bin/bash aic-ord
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
COPY .ssh /home/aic-ord/.ssh
|
||||||
# Change permissions
|
# Change permissions
|
||||||
RUN chown -R aic-ord: /home/aic-ord \
|
RUN chown -R aic-ord: /home/aic-ord \
|
||||||
|
&& chmod 700 /home/aic-ord/.ssh \
|
||||||
&& chown -R aic-ord: /etc/ord \
|
&& chown -R aic-ord: /etc/ord \
|
||||||
&& chown -R aic-ord: /var/log/ranger-agent
|
&& chown -R aic-ord: /var/log/ranger-agent
|
||||||
|
|
||||||
# Set work directory
|
# Set work directory
|
||||||
USER aic-ord
|
USER aic-ord
|
||||||
WORKDIR /home/aic-ord/
|
WORKDIR /home/aic-ord/
|
||||||
|
|
||||||
|
|
||||||
|
7
README
7
README
@ -1,7 +0,0 @@
|
|||||||
This is the ranger-agent project. At the highest view, provides an API interface
|
|
||||||
for users to move OpenStack templates from CodeCloud into OS Heat.
|
|
||||||
|
|
||||||
This project is designed to show a recommended set of modules
|
|
||||||
for creating a simple API server and Engine, with a versioned API, clean separation
|
|
||||||
of modules, a standard way of structuring both unit and functional tests,
|
|
||||||
configuration files, and documentation.
|
|
13
README.rst
13
README.rst
@ -2,7 +2,13 @@
|
|||||||
Ranger-Agent
|
Ranger-Agent
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
This is used to connect and distribute resources from ranger to Openstack.
|
This is the ranger-agent project. At the highest view, provides an API interface
|
||||||
|
for users to move OpenStack templates from CodeCloud into OS Heat.
|
||||||
|
|
||||||
|
This project is designed to show a recommended set of modules
|
||||||
|
for creating a simple API server and Engine, with a versioned API, clean separation
|
||||||
|
of modules, a standard way of structuring both unit and functional tests,
|
||||||
|
configuration files, and documentation.
|
||||||
|
|
||||||
Devstack Installation
|
Devstack Installation
|
||||||
---------------------
|
---------------------
|
||||||
@ -41,7 +47,7 @@ Manual:
|
|||||||
|
|
||||||
2. Run `./ranger-agent-db.sh` for setting up the database.
|
2. Run `./ranger-agent-db.sh` for setting up the database.
|
||||||
|
|
||||||
3. Run `./withenv.sh`.
|
3. Run `./with_venv.sh`.
|
||||||
|
|
||||||
4. Run `./run_ranger_agent.sh` and it should have ranger-agent running.
|
4. Run `./run_ranger_agent.sh` and it should have ranger-agent running.
|
||||||
|
|
||||||
@ -51,7 +57,6 @@ Manual:
|
|||||||
3. `sudo -H pip install -r requirements.txt`
|
3. `sudo -H pip install -r requirements.txt`
|
||||||
4. `sudo python setup.py install`
|
4. `sudo python setup.py install`
|
||||||
5. `sudo nohup ord-dbsync > /dev/null 2>&1 &`
|
5. `sudo nohup ord-dbsync > /dev/null 2>&1 &`
|
||||||
6. `sudo nohup ord-dbsync > /dev/null 2>&1 &`
|
6. `sudo nohup ord-engine > /dev/null 2>&1 &`
|
||||||
7. `sudo nohup ord-engine > /dev/null 2>&1 &`
|
|
||||||
|
|
||||||
6. If you want to reinstall and run ranger-agent again, make sure you run `./clear_install_files.sh` to remove previous installation files.
|
6. If you want to reinstall and run ranger-agent again, make sure you run `./clear_install_files.sh` to remove previous installation files.
|
||||||
|
@ -13,6 +13,7 @@ resource_creation_timeout_max = 14400
|
|||||||
log_dir = /var/log/ranger-agent
|
log_dir = /var/log/ranger-agent
|
||||||
local_repo = ranger_repo
|
local_repo = ranger_repo
|
||||||
resource_status_check_wait = 15
|
resource_status_check_wait = 15
|
||||||
|
transport_url = rabbit://stackrabbit:devstack@127.0.0.1:5672/
|
||||||
|
|
||||||
[api]
|
[api]
|
||||||
# Address to bind the API server to
|
# Address to bind the API server to
|
||||||
@ -23,7 +24,7 @@ port = 9010
|
|||||||
[ord_credentials]
|
[ord_credentials]
|
||||||
auth_url = http://127.0.0.1:5000/v2.0
|
auth_url = http://127.0.0.1:5000/v2.0
|
||||||
user_name = admin
|
user_name = admin
|
||||||
password = ranger-agent
|
password = devstack
|
||||||
tenant_name = admin
|
tenant_name = admin
|
||||||
openstack_client_http_timeout = 360
|
openstack_client_http_timeout = 360
|
||||||
https_insecure = False
|
https_insecure = False
|
||||||
|
@ -23,7 +23,7 @@ from ord.common import exceptions as exc
|
|||||||
from ord.openstack.common import log as logging
|
from ord.openstack.common import log as logging
|
||||||
|
|
||||||
|
|
||||||
# FIXME(db2242): we definetly must change this group name. It very confusing.
|
# FIXME: we definetly must change this group name. It very confusing.
|
||||||
OPT_GROUP = cfg.OptGroup(name='ord_credentials', title='ORD Credentials')
|
OPT_GROUP = cfg.OptGroup(name='ord_credentials', title='ORD Credentials')
|
||||||
SERVICE_OPTS = [
|
SERVICE_OPTS = [
|
||||||
cfg.StrOpt('project_id', default='',
|
cfg.StrOpt('project_id', default='',
|
||||||
|
@ -124,7 +124,7 @@ class WorkerFactory(object):
|
|||||||
template_type):
|
template_type):
|
||||||
template_type = template_type.lower()
|
template_type = template_type.lower()
|
||||||
|
|
||||||
# FIXME(db2242): this code have a none zero to fail in very unexpected
|
# FIXME: this code have a none zero to fail in very unexpected
|
||||||
# way
|
# way
|
||||||
randCrypt = SystemRandom()
|
randCrypt = SystemRandom()
|
||||||
threadID = randCrypt.randint(1, 99999999)
|
threadID = randCrypt.randint(1, 99999999)
|
||||||
@ -137,7 +137,7 @@ class WorkerFactory(object):
|
|||||||
elif template_type == "ansible":
|
elif template_type == "ansible":
|
||||||
threadID = -1
|
threadID = -1
|
||||||
else:
|
else:
|
||||||
# FIXME(db2242): too late for such check
|
# FIXME: too late for such check
|
||||||
raise exc.UnsupportedTemplateTypeError(template=template_type)
|
raise exc.UnsupportedTemplateTypeError(template=template_type)
|
||||||
return threadID
|
return threadID
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ from ord.tests import base
|
|||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
# FIXME(db2242): pep8 compatible - camelcase attributes
|
# FIXME: pep8 compatible - camelcase attributes
|
||||||
class TestWorkerThread(base.BaseTestCase):
|
class TestWorkerThread(base.BaseTestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user