For people using freezer it might be useful to retrieve api-paste
file with package rather then looking for it in the repo.
Change-Id: Ib18f00cd9c6aee4ab49f55a1f48f2388574b8fa4
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:
UserWarning: Usage of dash-separated 'description-file' will not be
supported in future versions. Please use the underscore name
'description_file' instead
[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb
Change-Id: I684486e308850c3cefef64314bea01f813d196f6
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:
1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.
2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.
Also replace policy.json to policy.yaml ref from doc.
[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html
Change-Id: I066488c47e1bb6502b27b8677988113f66b9b09b
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build. Remove extra build step
from docs build - api-ref is build separate.
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Remove install_command from tox.ini, the default is fine
Change-Id: I7bb95a8ebd7023046baae30595159254bac25690
There was a spelling mistake due to which the module couldn't be
located in the upgrade checkers command.
Change-Id: I215b0fd6afdf77727d3e84ff33008168250da8b1
This adds basic framework for freezer-manager-status upgrade
check commands. For now it has only "check_placeholder"
check implemented.
Real checks can be added to this tool in the future.
Change-Id: I21d4c7ff5e659b332d6692352d996b3216b56bc9
Story: 2003657
Task: 26129
The entry_point "service_v1" has changed to appv1 & appv2.
The extra code in files is cleaned up.
Change-Id: I1b907e3115c15f0fe82ecb2d54457209cfcf21e6
Id: I0d3d3982ea29bfb6a9af1c85dbd244025104c152
Add support to oslo.db to be used as a DB driver. The DB driver will be
used with API v2. When it's completely implemented, API V1 will be
deprecated and removed by the end of the cycle. Freezer-api will keep
supporting V2 with Elasticsearch, Sqlalchemy drivers.
This patch implements the follow:
* Abstract Base DB driver to be implemented by each driver
* Base driver; will return only access to the db engine, session
* SqlAlchemy driver;
* ElasticSearch driver;
* Implement both drivers in freezer-manage
Partially-Implements: blueprint oslo-db
Depends-On: I81e417155da48f46dd2113e5745fb3c21c96499f
Depends-On: I2e5724b1f1a75121952e2beb3844d2c489e4df68
Depends-On: Idb4ac050652d1d0107bf3fcd447d7cbedd811809
Depends-On: I81d46c89859752c0cbc21ef02de90db7f19f942c
Change-Id: I93ed1b909f538728a1a9bd5c8b07baf7aeddb705
* https://review.openstack.org/#/c/526905/ moves the intree bundled
freezer_api tempest plugin to its new home freezer-tempest-plugin.
Depends-On: I66cc2507b0bbd9dda9d6279f9b8d74c546d1b0a6
Change-Id: I9703758c7bdb9250686dabb376f82174abf74b63
This commit will prepare for implementing policies in code[1].
Once we completed moving all of policies into code base,
we can also change default policy rules via policy.yaml
instead of policy.json and generate policy.yaml by command:
$ tox -e genpolicy
[1]https://governance.openstack.org/tc/goals/queens/policy-in-code.html
Change-Id: I587ee663eff9632ec355cef8152c13e1ebfffeb5
Co-authored-By: Hieu LE <hieulq@vn.fujitsu.com>
Treat warnings as errors when building documents to early spot problems.
Fix api-ref set up:
* Add openstackdocstheme for api-ref building instead of oslosphinx and
configure it properly.
* Setup api-ref log-a-bug correctly for this project.
* Remove unneeded extra install command
Fix install-guide set up:
* Add tox environment
Fix releasenotes set up:
* Fix conf.py settings to build without errors, remove index, we don't
need it.
fix docs set up:
* Use Sphinx 1.5 warning-is-error option for normal build_sphinx.
* use oslo sphinx
* Remove wrong static path setting
Change-Id: I07ce9db9fdb526ab4b083c65afa99c38bb508146
After executing "freezer-scheduler register" we face problem that
all shards failed in elasticsearch (ES).
If we use number of replicas "0" according to ES documentation
for one node installation then this issue disappeared.
After "first use" of freezer tool cloud engineer can add
additional ES nodes to cluster and fine tune this value
in configuration file.
Change-Id: I4f2a6562358aefb6244f8d0590a9f138db19a925
Use freezer-manage instead of freezer-db-init to create/update/delete
elasticsearch mappings. freezer-manage will add couple of more
functionalities. freezer-manage reads from the same configuration
file like freezer-api and uses the same db info.
How to use:
To create the mappings::
freezer-manage db sync
To update the mappings::
freezer-manage db update
To remove the mappings::
freezer-manage db remove
To print the mappings::
freezer-manage db show
To update settings:
freezer-manage db update-settings
Change-Id: Ib1f8265b780c1e2300bcba45183309ea06c673d3
Implements: blueprint move-to-freezer-manage
Closes-Bug: #1587408
Start using Paste and Paste deploy for providing some flexability
to system administrator while deploying freezer-api.
Implements blueprint move-to-paste
Change-Id: I3f68a98ae7822495627791edb5be125556ff0b98
Switching freezer-api to oslo config opts and oslo logging opts to
follow Openstack standards and benfit from oslo libraries
Change-Id: I1b97db2e02087dccca3be25246c275d4e778094f
Implements: blueprint switch-api-to-oslo-config
Now requirements.txt and test-requirements.txt are
aligned to global-requirements.txt of stable/Liberty.
Testing requirements are now move to test-requirements.txt
from tox.ini
Also the author, author-email and home-page are now update to
reflect Freezer Team and openstack-dev ml.
Change-Id: I27f2ea875778f19d2ffb542b9b8fbf29d1a740fe
Now the package name is freezer-api instead of freezer_api.
This is consistent with the repo name and package name.
Also the README insttructions are updated
Add the ability to start the freezer-scheduler without any
OS identity variable when used with the parameter
--no-api
In that case the scheduler loads the configuration files for
the jobs from local files with the extension .conf located
in the directory
/etc/freezer/scheduler/conf.d
The default path can be changed using the parameter
--conf
Change-Id: I7787fa1af24a71600b3f483a770053226fec2191
Adds a script to initialize the mappings of the elasticsearch db
used by the api.
The location of the elasticsearch db server can be provided using
command-line arguments or guessed by the script looking at the
freezer-api configuration file.
The script asks confirmation prior to deleting each of the
elasticsearch types whose mapping needs to be updated,
but it can be instructed to always assume a confirmation to ease
the invocation by scripts or deployment tools.
Change-Id: I0938c7cfde9bae440bf85f536a56079429d772a9
Implements: blueprint freezer-api-db-init
The freezer scheduler is to be executed
as daemon process on the client machines
It has the following responsibilities:
* when using the api:
- register -if necessary- as a client in the api
- download the list of jobs from the api
- schedule the jobs for execution
- launch the freezer client at the scheduled time
- collect metadata and exit codes and upload them to the api
- periodically poll the api for new/updated jobs
- if a job is part of a session (a coordinated group of jobs)
it updates the session status when job starts/stops
* when not using the api
- load jobs configurations from files
- schedule the jobs for execution
- launch the freezer client at the scheduled time
The freezer scheduler can also be used to manage jobs
and sessions using the following positional parameters:
job-list
job-get
job-create
job-delete
job-start
job-stop
session-list
session-get
session-create
session-delete
session-list-job
session-add-job
session-remove-job
or to register the client in the api using the positional parameter:
register
Implements blueprint: freezer-scheduler-start
Change-Id: I06ae202a0f464f7240c137744a5b54d1177cabd9
First implementation of the freezer API.
Slightly more than a skeleton with basic functionality
Change-Id: Iae04affea3aa0f4a943599b528df49d9d4a5b845
Implements: blueprint freezer-api-first-rel