aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--INFO.yaml8
-rw-r--r--README.md2
-rw-r--r--app/install/calipso-installer.py35
-rw-r--r--docs/conf.py1
-rw-r--r--docs/conf.yaml3
-rw-r--r--docs/index.rst2
-rw-r--r--docs/requirements.txt2
-rw-r--r--tox.ini6
9 files changed, 39 insertions, 22 deletions
diff --git a/.gitignore b/.gitignore
index 0b8f528..9dd102d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,5 @@
mongo*.conf
mongo_access.log
.DS_Store
+.tox
+docs/_build/*
diff --git a/INFO.yaml b/INFO.yaml
index a7d3de4..84b06c8 100644
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -4,6 +4,10 @@ project_creation_date: 'March 21st 2017'
project_category: ''
lifecycle_state: ''
project_lead: &opnfv_calipso_ptl
+ name: 'Koren Lev'
+ email: 'korenlev@gmail.com'
+ company: 'gmail.com'
+ id: 'KorenLev'
primary_contact: *opnfv_calipso_ptl
issue_tracking:
type: 'jira'
@@ -33,10 +37,6 @@ committers:
email: 'fbrockne@cisco.com'
company: 'cisco.com'
id: 'brockners'
- - name: 'Koren Lev'
- email: 'korenlev@gmail.com'
- company: 'gmail.com'
- id: 'KorenLev'
- name: 'Yaron Yogev'
email: 'yaronyogev@gmail.com'
company: 'gmail.com'
diff --git a/README.md b/README.md
index 9336f86..7d39caa 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems)
+Copyright (c) 2018 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems)
and others
Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/app/install/calipso-installer.py b/app/install/calipso-installer.py
index b101907..008ff38 100644
--- a/app/install/calipso-installer.py
+++ b/app/install/calipso-installer.py
@@ -1,6 +1,6 @@
###############################################################################
-# Copyright (c) 2017 Koren Lev (Cisco Systems), Yaron Yogev (Cisco Systems) #
-# and others #
+# Copyright (c) 2017-2018 Koren Lev (Cisco Systems), #
+# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
# All rights reserved. This program and the accompanying materials #
# are made available under the terms of the Apache License, Version 2.0 #
@@ -25,13 +25,11 @@ dockerip = os.popen('ip addr show docker0 | grep "\<inet\>" | awk \'{ print $2 }
local_hostname = dockerip.read().replace("\n", "")
C_MONGO_CONFIG = "/local_dir/calipso_mongo_access.conf"
-H_MONGO_CONFIG = "/home/calipso/calipso_mongo_access.conf"
+H_MONGO_CONFIG = "calipso_mongo_access.conf"
PYTHONPATH = "/home/scan/calipso_prod/app"
C_LDAP_CONFIG = "/local_dir/ldap.conf"
-H_LDAP_CONFIG = "/home/calipso/ldap.conf"
-H_DIR="/home/calipso/"
+H_LDAP_CONFIG = "ldap.conf"
-calipso_volume = {'/home/calipso': {'bind': '/local_dir', 'mode': 'rw'}}
RESTART_POLICY = {"Name": "always"}
# environment variables definitions
@@ -290,7 +288,7 @@ def start_ui(host, dbuser, dbpassword, webport, dbport):
root_url = "ROOT_URL=http://{}:{}".format(host, str(webport))
mongo_url = "MONGO_URL=mongodb://{}:{}@{}:{}/calipso" \
.format(dbuser, dbpassword, host, str(dbport))
- ports = {'3000/tcp': webport}
+ ports = {'4000/tcp': webport}
DockerClient.containers.run(image_name,
detach=True,
name=name,
@@ -394,6 +392,12 @@ parser.add_argument("--dbpassword",
type=str,
default="calipso_default",
required=False)
+parser.add_argument("--home",
+ help="Home directory for configuration files "
+ "(default=/home/calipso)",
+ type=str,
+ default="/home/calipso",
+ required=False)
parser.add_argument("--command",
help="'start-all' or 'stop-all' the Calipso containers "
"(default=None)",
@@ -406,7 +410,9 @@ parser.add_argument("--copy",
type=str,
default=None,
required=False)
+
args = parser.parse_args()
+calipso_volume = {args.home: {'bind': '/local_dir', 'mode': 'rw'}}
print("\nrunning installer against host:", args.hostname, "\n")
@@ -435,15 +441,14 @@ while container != "all" and container not in container_names:
# create local directory on host, raise error if it doesn't exists
try:
- os.makedirs(H_DIR+'log/calipso')
+ os.makedirs(os.path.join(args.home, 'log/calipso'))
except OSError as e:
if e.errno != errno.EEXIST:
raise
# starting the containers per arguments:
if action == "start":
- # building /home/calipso/calipso_mongo_access.conf and
- # /home/calipso/ldap.conf files, per the arguments:
+ # building mongo.conf and ldap.conf files, per the arguments:
calipso_mongo_access_text = \
"server {}\n" \
"user {}\n" \
@@ -466,13 +471,15 @@ if action == "start":
"group_member_attribute member"
ldap_text = ldap_text.format(LDAP_PWD_ATTRIBUTE, args.hostname,
LDAP_USER_PWD_ATTRIBUTE)
- print("creating default", H_MONGO_CONFIG, "file...\n")
- calipso_mongo_access_file = open(H_MONGO_CONFIG, "w+")
+ mongo_file_path = os.path.join(args.home, H_MONGO_CONFIG)
+ print("creating default", mongo_file_path, "file...\n")
+ calipso_mongo_access_file = open(mongo_file_path, "w+")
time.sleep(1)
calipso_mongo_access_file.write(calipso_mongo_access_text)
calipso_mongo_access_file.close()
- print("creating default", H_LDAP_CONFIG, "file...\n")
- ldap_file = open(H_LDAP_CONFIG, "w+")
+ ldap_file_path = os.path.join(args.home, H_LDAP_CONFIG)
+ print("creating default", ldap_file_path, "file...\n")
+ ldap_file = open(ldap_file_path, "w+")
time.sleep(1)
ldap_file.write(ldap_text)
ldap_file.close()
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..86ab8c5
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1 @@
+from docs_conf.conf import * # flake8: noqa
diff --git a/docs/conf.yaml b/docs/conf.yaml
new file mode 100644
index 0000000..2a91f61
--- /dev/null
+++ b/docs/conf.yaml
@@ -0,0 +1,3 @@
+---
+project_cfg: opnfv
+project: calipso
diff --git a/docs/index.rst b/docs/index.rst
index 7e960d8..53018dc 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,3 +1,5 @@
+.. _calipso-release-guide:
+
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0
.. (c) OPNFV and others.
diff --git a/docs/requirements.txt b/docs/requirements.txt
new file mode 100644
index 0000000..9fde2df
--- /dev/null
+++ b/docs/requirements.txt
@@ -0,0 +1,2 @@
+lfdocs-conf
+sphinx_opnfv_theme
diff --git a/tox.ini b/tox.ini
index c1993d9..dd5076d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -4,12 +4,12 @@ envlist = docs,docs-linkcheck
skipsdist = true
[testenv:docs]
-deps = -r{toxinidir}/etc/requirements.txt
+deps = -rdocs/requirements.txt
commands =
sphinx-build -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
echo "Generated docs available in {toxinidir}/docs/_build/html"
whitelist_externals = echo
[testenv:docs-linkcheck]
-deps = -r{toxinidir}/etc/requirements.txt
-commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck \ No newline at end of file
+deps = -rdocs/requirements.txt
+commands = sphinx-build -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck