Update README.rst and bump hacking
First update, we need do more changes in future for documentation. Change-Id: I0dbaab4e2c8462bf4b108c452929e3d16c310375
This commit is contained in:
72
README.rst
72
README.rst
@@ -12,81 +12,79 @@ Freezer - Horizon Dashboard
|
|||||||
===========================
|
===========================
|
||||||
|
|
||||||
freezer-web-ui is a horizon plugin based in django aimed at providing an interaction
|
freezer-web-ui is a horizon plugin based in django aimed at providing an interaction
|
||||||
with freezer
|
with freezer.
|
||||||
|
|
||||||
* Issue tracking and feature specifications: https://storyboard.openstack.org/#!/project/openstack/freezer-web-ui
|
* Issue tracking and feature specifications: https://launchpad.net/freezer
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
============
|
============
|
||||||
|
|
||||||
Freezer Dashboard requires a freezer API client to be installed in the same environment as horizon::
|
Before start, please install git and pip in your Operation System.
|
||||||
|
If your use Ubuntu:
|
||||||
|
|
||||||
git clone https://github.com/openstack/python-freezerclient
|
apt install git python3-pip
|
||||||
|
|
||||||
|
If your use RHEL/CentOS:
|
||||||
|
|
||||||
|
dnf install git python3-pip
|
||||||
|
|
||||||
|
Freezer Dashboard requires a freezer API client to be installed in the same
|
||||||
|
environment as Horizon:
|
||||||
|
|
||||||
|
git clone https://opendev.org/openstack/python-freezerclient
|
||||||
cd python-freezerclient
|
cd python-freezerclient
|
||||||
python setup.py install (is important that freezer API client is installed from source and not with pip and
|
python3 -m pip install .
|
||||||
is installed on horizon virtual environment)
|
|
||||||
|
|
||||||
Freezer Dashboard requires a freezer API endpoint which you can install following this steps:
|
Freezer Dashboard requires a freezer API endpoint which you can install
|
||||||
|
following this steps:
|
||||||
|
|
||||||
`https://github.com/openstack/freezer-api/blob/master/README.rst
|
`https://opendev.org/openstack/freezer-api
|
||||||
<https://github.com/openstack/freezer-api/blob/master/README.rst>`_
|
<https://opendev.org/openstack/freezer-api>`_
|
||||||
|
|
||||||
API registration
|
API registration
|
||||||
================
|
================
|
||||||
|
|
||||||
Register freezer api endpoint:
|
If keystone service-create and endpoint-create are not available you can
|
||||||
|
set as a fallback the following on:
|
||||||
|
|
||||||
`https://github.com/openstack/freezer-api/blob/master/README.rst#api-registration
|
vim /etc/horizon/openstack_dashboard/local/local_settings.py
|
||||||
<https://github.com/openstack/freezer-api/blob/master/README.rst#api-registration>`_
|
|
||||||
|
|
||||||
If keystone service-create and endpoint-create are not available you can set as a fallback the following on::
|
|
||||||
|
|
||||||
# vim /opt/stack/horizon/openstack_dashboard/local/local_settings.py
|
|
||||||
|
|
||||||
# add FREEZER_API_URL = http://<api_url>:<port>
|
|
||||||
|
|
||||||
|
add FREEZER_API_URL = http://<api_url>:<port>
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
============
|
============
|
||||||
|
|
||||||
In the installation procedure we'll assume your main Horizon dashboard
|
In the installation procedure we'll assume your main Horizon dashboard
|
||||||
directory is /opt/stack/horizon/openstack_dashboard/dashboards/.
|
directory is /etc/horizon/openstack_dashboard/dashboards/.
|
||||||
|
|
||||||
|
To install freezer dashboard for development you need to do the following:
|
||||||
|
|
||||||
To install freezer dashboard for development you need to do the following::
|
git clone https://opendev.org/openstack/freezer-web-ui
|
||||||
|
cd freezer-web-ui
|
||||||
|
cp freezer-web-ui/freezer_ui/enabled/_5050_freezer.py /etc/horizon/openstack_dashboard/enabled/_5050_freezer.py
|
||||||
|
|
||||||
# git clone https://github.com/openstack/freezer-web-ui
|
To disable the panel set `DISABLED = True` in /etc/horizon/openstack_dashboard/enabled/_5050_freezer.py
|
||||||
|
|
||||||
# cd freezer-web-ui
|
cd /etc/horizon/
|
||||||
|
python3 -m pip install -r requirements.txt
|
||||||
|
|
||||||
# cp freezer-web-ui/freezer_ui/enabled/_5050_freezer.py /opt/stack/horizon/openstack_dashboard/enabled/_5050_freezer.py
|
Make sure freezer is installed from source as detailed in the first step
|
||||||
|
|
||||||
# to disable the panel set `DISABLED = True` in /opt/stack/horizon/openstack_dashboard/enabled/_5050_freezer.py
|
|
||||||
|
|
||||||
# cd /opt/stack/horizon/
|
|
||||||
|
|
||||||
# pip install -r requirements.txt
|
|
||||||
|
|
||||||
# make sure freezer is installed from source as detailed in the first step
|
|
||||||
|
|
||||||
# ./run_tests.sh --runserver 0.0.0.0:8000
|
|
||||||
|
|
||||||
|
./run_tests.sh --runserver 0.0.0.0:8000
|
||||||
|
|
||||||
A new tab called "Disaster Recovery" will appear on your panels.
|
A new tab called "Disaster Recovery" will appear on your panels.
|
||||||
|
|
||||||
|
|
||||||
Tox
|
Tox
|
||||||
===
|
===
|
||||||
|
|
||||||
1. Run tox::
|
Run tox:
|
||||||
|
|
||||||
tox -v
|
tox -v
|
||||||
|
|
||||||
|
|
||||||
Development under proxy
|
Development under proxy
|
||||||
_______________________
|
_______________________
|
||||||
|
|
||||||
If you are developing or deploying under proxies remember to set no_proxies for::
|
If you are developing or deploying under proxies remember to set no_proxies for:
|
||||||
|
|
||||||
freezer-api endpoint
|
freezer-api endpoint
|
||||||
keystone endpoint
|
keystone endpoint
|
||||||
|
@@ -4,8 +4,9 @@ author = OpenStack
|
|||||||
author_email = openstack-discuss@lists.openstack.org
|
author_email = openstack-discuss@lists.openstack.org
|
||||||
summary = Freezer - Backup as a Service User Interface
|
summary = Freezer - Backup as a Service User Interface
|
||||||
description_file = README.rst
|
description_file = README.rst
|
||||||
home_page = https://github.com/openstack/freezer-web-ui
|
description-content-type = text/x-rst
|
||||||
license = Apache-2
|
license = Apache-2
|
||||||
|
url = https://docs.openstack.org/freezer/latest/
|
||||||
python_requires = >=3.8
|
python_requires = >=3.8
|
||||||
classifier =
|
classifier =
|
||||||
Development Status :: 5 - Production/Stable
|
Development Status :: 5 - Production/Stable
|
||||||
@@ -23,6 +24,9 @@ classifier =
|
|||||||
Programming Language :: Python :: 3
|
Programming Language :: Python :: 3
|
||||||
Programming Language :: Python :: 3.8
|
Programming Language :: Python :: 3.8
|
||||||
Programming Language :: Python :: 3.9
|
Programming Language :: Python :: 3.9
|
||||||
|
Programming Language :: Python :: 3.10
|
||||||
|
Programming Language :: Python :: 3.11
|
||||||
|
Programming Language :: Python :: 3.12
|
||||||
Topic :: Internet :: WWW/HTTP
|
Topic :: Internet :: WWW/HTTP
|
||||||
keywords =
|
keywords =
|
||||||
horizon
|
horizon
|
||||||
|
@@ -1,13 +1,8 @@
|
|||||||
# The order of packages is significant, because pip processes them in the order
|
hacking>=7.0.0,<7.1.0 # Apache-2.0
|
||||||
# of appearance. Changing the order has an impact on the overall integration
|
|
||||||
# process, which may cause wedges in the gate later.
|
|
||||||
|
|
||||||
hacking>=3.0.1,<3.1.0 # Apache-2.0
|
|
||||||
|
|
||||||
coverage!=4.4,>=4.0 # Apache-2.0
|
coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
oslo.config>=5.2.0 # Apache-2.0
|
oslo.config>=5.2.0 # Apache-2.0
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
sphinx>=2.0.0,!=2.1.0 # BSD
|
sphinx>=2.0.0,!=2.1.0 # BSD
|
||||||
pylint>=2.6.0 # GPLv2
|
pylint>=2.6.0 # GPLv2
|
||||||
|
|
||||||
|
@@ -41,8 +41,8 @@ class InstallVenv(object):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
def check_python_version(self):
|
def check_python_version(self):
|
||||||
if sys.version_info < (2, 6):
|
if sys.version_info[0] < 3:
|
||||||
self.die("Need Python Version >= 2.6")
|
raise Exception("Need Python Version 3")
|
||||||
|
|
||||||
def run_command_with_code(self, cmd, redirect_output=True,
|
def run_command_with_code(self, cmd, redirect_output=True,
|
||||||
check_exit_code=True):
|
check_exit_code=True):
|
||||||
@@ -158,6 +158,6 @@ class Fedora(Distro):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if not self.check_pkg('python-virtualenv'):
|
if not self.check_pkg('python-virtualenv'):
|
||||||
self.die("Please install 'python-virtualenv'.")
|
self.die("Please install 'python3-virtualenv'.")
|
||||||
|
|
||||||
super(Fedora, self).install_virtualenv()
|
super(Fedora, self).install_virtualenv()
|
||||||
|
23
tox.ini
23
tox.ini
@@ -1,10 +1,10 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py39,py311,py312,pep8,pylint,docs
|
minversion = 4.0
|
||||||
minversion = 2.0
|
envlist = py3,py311,py312,pep8,docs,pylint,cover
|
||||||
skipsdist = True
|
ignore_basepython_conflict = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = {env:TOX_PYTHON:python3}
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
NOSE_WITH_OPENSTACK=1
|
NOSE_WITH_OPENSTACK=1
|
||||||
@@ -16,10 +16,7 @@ deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/up
|
|||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
python manage.py test {posargs}
|
python3 manage.py test {posargs}
|
||||||
|
|
||||||
[testenv:py39]
|
|
||||||
basepython = python3.9
|
|
||||||
|
|
||||||
[testenv:py311]
|
[testenv:py311]
|
||||||
basepython = python3.11
|
basepython = python3.11
|
||||||
@@ -34,13 +31,21 @@ commands = flake8 {posargs}
|
|||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = python setup.py test --coverage --testr-args={posargs}
|
commands = python3 setup.py test --coverage --testr-args={posargs}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
setenv = DJANGO_SETTINGS_MODULE=freezer_ui.test.settings
|
setenv = DJANGO_SETTINGS_MODULE=freezer_ui.test.settings
|
||||||
commands = sphinx-build -W --keep-going -b html doc/source doc/build/html
|
commands = sphinx-build -W --keep-going -b html doc/source doc/build/html
|
||||||
|
|
||||||
|
[testenv:pdf-docs]
|
||||||
|
deps = {[testenv:docs]deps}
|
||||||
|
allowlist_externals =
|
||||||
|
make
|
||||||
|
commands =
|
||||||
|
sphinx-build -j auto -W -b latex doc/source doc/build/pdf
|
||||||
|
make -C doc/build/pdf
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
commands = pylint --rcfile .pylintrc freezer_ui
|
commands = pylint --rcfile .pylintrc freezer_ui
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user