diff --git a/Dockerfile b/Dockerfile index 1c2c870..05c5353 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,19 +45,23 @@ RUN pip install --default-timeout=100 -r requirements.txt RUN python setup.py install RUN cd ~/ \ - && rm -fr /tmp/ranger-agent \ + && rm -fr /tmp/ranger-agent \ && mkdir /var/log/ranger-agent # Create user aic-ord RUN useradd -ms /bin/bash aic-ord + + +COPY .ssh /home/aic-ord/.ssh # Change permissions RUN chown -R aic-ord: /home/aic-ord \ + && chmod 700 /home/aic-ord/.ssh \ && chown -R aic-ord: /etc/ord \ && chown -R aic-ord: /var/log/ranger-agent # Set work directory -USER aic-ord +USER aic-ord WORKDIR /home/aic-ord/ diff --git a/README b/README deleted file mode 100644 index 4601619..0000000 --- a/README +++ /dev/null @@ -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. diff --git a/README.rst b/README.rst index cfc29f6..0c41e77 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,13 @@ 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 --------------------- @@ -41,7 +47,7 @@ Manual: 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. @@ -51,7 +57,6 @@ Manual: 3. `sudo -H pip install -r requirements.txt` 4. `sudo python setup.py install` 5. `sudo nohup ord-dbsync > /dev/null 2>&1 &` - 6. `sudo nohup ord-dbsync > /dev/null 2>&1 &` - 7. `sudo nohup ord-engine > /dev/null 2>&1 &` + 6. `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. diff --git a/etc/ord.conf b/etc/ord.conf index bed68e4..14372bc 100755 --- a/etc/ord.conf +++ b/etc/ord.conf @@ -13,6 +13,7 @@ resource_creation_timeout_max = 14400 log_dir = /var/log/ranger-agent local_repo = ranger_repo resource_status_check_wait = 15 +transport_url = rabbit://stackrabbit:devstack@127.0.0.1:5672/ [api] # Address to bind the API server to @@ -23,7 +24,7 @@ port = 9010 [ord_credentials] auth_url = http://127.0.0.1:5000/v2.0 user_name = admin -password = ranger-agent +password = devstack tenant_name = admin openstack_client_http_timeout = 360 https_insecure = False diff --git a/ord/client/client.py b/ord/client/client.py index e1f62be..82a5297 100644 --- a/ord/client/client.py +++ b/ord/client/client.py @@ -23,7 +23,7 @@ from ord.common import exceptions as exc 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') SERVICE_OPTS = [ cfg.StrOpt('project_id', default='', diff --git a/ord/engine/workerfactory.py b/ord/engine/workerfactory.py index 0c68a0c..188939a 100755 --- a/ord/engine/workerfactory.py +++ b/ord/engine/workerfactory.py @@ -124,7 +124,7 @@ class WorkerFactory(object): template_type): 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 randCrypt = SystemRandom() threadID = randCrypt.randint(1, 99999999) @@ -137,7 +137,7 @@ class WorkerFactory(object): elif template_type == "ansible": threadID = -1 else: - # FIXME(db2242): too late for such check + # FIXME: too late for such check raise exc.UnsupportedTemplateTypeError(template=template_type) return threadID diff --git a/ord/tests/unit/engine/test_workerthread.py b/ord/tests/unit/engine/test_workerthread.py index e0bc00a..295a9de 100644 --- a/ord/tests/unit/engine/test_workerthread.py +++ b/ord/tests/unit/engine/test_workerthread.py @@ -26,7 +26,7 @@ from ord.tests import base CONF = cfg.CONF -# FIXME(db2242): pep8 compatible - camelcase attributes +# FIXME: pep8 compatible - camelcase attributes class TestWorkerThread(base.BaseTestCase): def setUp(self):