Commit Graph

17 Commits

Author SHA1 Message Date
Sergiy Markin d00eaf0303 Drydock focal related upgrades
This PS implements the following changes:
- switches freeze approach to requirements-direct.txt and
  requirements-frozen.txt files
- adjusts code tabulation style according to  yapf recommendations
- replaces deprecated usage of responce.body attribute with
  responce.text
- fixes integration tests in controlled by Makefile + tox
- uplifts Helm to v3.9.4

Change-Id: I751db72eb8f670825382f11a36657112faeb169a
2023-04-26 22:32:49 +00:00
Roman Gorshunov ec17405606 Fix: various documentation and URL fixes
1) UCP -> Airship
2) readthedocs.org -> readthedocs.io (there is redirect)
3) http -> https
4) attcomdev -> airshipit (repo on quay.io)
5) att-comdev -> openstack/airship-* (repo on github/openstack git)
6) many URLs have been verified and adjusted to be current
7) no need for 'en/latest/' path in URL of the RTD
8) added more info to some setup.cfg and setup.py files
9) ucp-integration docs are now in airship-in-a-bottle
10) various other minor fixes

Change-Id: I64fb508a3ff72258d82c795193e918f2945deb29
2018-09-26 08:21:14 +00:00
Scott Hussey cd9770a979 Zuul: Initial Airship-Drydock checks
This PS adds the skeleton for a set of zuul checks and gates for
Airship, using the framework from OpenStack-Helm.

[Fix] Zuul lint fix

- Fix whitespace linting errors
- Update docuemtation errors
- Remove dead tests

Change-Id: Id1ed3aa2321d518ed15fcbb3b698b49709bed287
Signed-off-by: Pete Birley <pete@port.direct>
2018-05-24 16:59:12 -05:00
Scott Hussey d12ef71f9f Refactor orchestrator
Refactor orchestrator to break large
monolithic functions into small functions
per action.

- Update orchestrator to match new statemgmt API
- Pull most code out of __init__.py files
- Create action classes for Orchestrator actions
- Create action classes for Driver actions
- Orchestrator consumes tasks from database queue
- Additional encapsulation of task functionality into Task class
- Create shared integration test fixtures
- Fix Sphinx entrypoint so package install works
- Disable bootdata API until BootAction implementation
- Bring codebase into PEP8 compliance
- Update documentation reflect code changes
- Mark SQL #nosec for bandit

Change-Id: Id9a7bdedcdd5bbf07aeabbdb52db0f0b71f1e4a4
2017-10-26 15:00:39 -05:00
Scott Hussey 4ae627be44 Add config generation to tox.ini
Move sample config to etc/drydock
Update docs to generate a config with tox

Update configuration for Keystone

- Add config generation to tox.ini
- Fix default in bootdata config
- Add keystone dependencies
- Add config generator config
- Move sample config to a skeleton etc/drydock tree

Use PasteDeploy for WSGI integration

Using keystonemiddleware outside of a PasteDeploy
pipeline is deprecated. Move Drydock to use PasteDeploy
and integrate with keystonemiddleware

Update Falcon context object

Add keystone identity fields to context object
Clean up context marker field

Fix AuthMiddleware for keystone

Update falcon middleware to harvest headers injected
by keystonemiddleware

Fix context middleware

Update context middleware to enforce
a UUID-formatted external context marker

Lock keystonemiddleware version

Lock keystonemiddleware version to the Newton release

Sample drydock.conf with keystone

This drydock.conf file is known to integrate successfully
with Keystone via keystonemiddleware and the password plugin

Add .dockerignore

Stop adding .tox environment to docker images

Integrate with oslo.policy

Add oslo.policy 1.9.0 to requirements (Newton release)
Add tox job to generate sample policy.yaml
Create DrydockPolicy as facade for RBAC

Inject policy engine into API init

Create a DrydockPolicy instance and inject it into
the Drydock API resources.

Remove per-resource authorization

Update Drydock context and auth middleware

Update Drydock context to use keystone IDs instead of names as required
by oslo.policy
Update AuthMiddleware to capture headers when request provides
a service token

Add RBAC for /designs API

Add RBAC enforcement for GET and POST of
/api/v1.0/designs endpoint

Refactor check_policy

Refactor check_policy into the base class

Enforce RBAC for /designs/id endpoint

Enforce RBAC on /designs/id/parts endpoint

Enforce RBAC on /designs/id/parts/kind

Enforce RBAC on /designs/id/parts/kinds/

Enforce RBAC on /tasks/ endpoints

Create unit tests

- New unit tests for DrydockPolicy
- New unit tests for AuthMiddleware w/ Keystone integration

Address impacting keystonemiddleware bug

Use v4.9.1 to address https://bugs.launchpad.net/keystonemiddleware/+bug/1653646

Add oslo_config fixtures for unit testing

API base class fixes

Fix an import error in API resource base class

More graceful error handling in drydock_client

Create shared function for checking API response status codes

Create client errors for auth

Create specific Exceptions for Unauthorized
and Forbidden responses

Ignore generated sample configs

Lock iso8601 version

oslo.versionedobjects appears to be impcompatible with
iso8601 0.1.12 on Python 3.2+

Update docs for Keystone

Note Keystone as a external depdendency and
add notes on correctly configuring Drydock for
Keystone integration

Add keystoneauth1 to list_opts

Explicitly pull keystoneauth password plugin
options when generating a config template

Update reference config for keystone

Update the reference config template
for Keystone integration

Add keystoneauth1 to requirements

Need to directly include keystoneauth1 so that
oslo_config options can be pulled from it

Update config doc for keystoneauth1

Use the keystoneauth1 generated configuration options
for the configuration  docs

Remove auth options

Force dependence on Keystone as the only authentication
backend

Clean up imports

Fix how falcon modules are imported

Default to empty role list

Move param extraction

Enforce RBAC before starting to parse parameters

Implement DocumentedRuleDefault

Use DocumentedRuleDefault for policy defaults at request
of @tlam. Requires v 1.21.1 of oslo_policy, which is tied
to the Pike openstack release.

Change sample output filenames

Update filenames to follow Openstack convention

Fix tests to use hex formatted IDs

Openstack resource IDs are not hyphenated, so update
unit tests to reflect this

Fix formating and whitespace

Refactor a few small items for code review

Update keystone integration to be more
robust with Newton codebase

Centralize policy_engine reference to
support a decorator-based model

RBAC enforcement decorator

Add units tests for decorator-based
RBAC and the tasks API

Minor refactoring and format changes

Change-Id: I35f90b0c88ec577fda1077814f5eac5c0ffb41e9
2017-08-21 14:35:56 -05:00
Scott Hussey 48a1f54966 Create a base getting started guide
Update README

Add dependencies
Add link to Getting Started

Document format fixes

Change-Id: I768bee88bc4776c06b1c1dcc1435c41e899cbed2
2017-08-07 12:55:31 -05:00
Pete Birley 83d588b829 Initial Dockerfile cleanup
This PS removes some unused files from the repo, and fixes the
port definition in the dockerfile.
2017-07-18 22:41:08 -05:00
Scott Hussey eca07e47e4 Fix Dockerfile
Fix build issues in Dockerfile and
update dev environment instructions to use
Docker instead of virtualenv
2017-07-13 21:04:51 -05:00
Scott Hussey 25d55b0492 Rename helm_drydock to drydock_provisioner 2017-05-25 08:48:27 -05:00
Scott Hussey 9da3e93f62 Cleanup readme formatting 2017-05-25 08:18:49 -05:00
Scott Hussey 490cb84ba0 API service for /designs and /tasks endpoints
REST API using falcon library
Middleware for authentication (stubbed until Keystone is avail)
Middleware for context and logging
Request logging and initial error logging
README updates
2017-05-25 08:13:38 -05:00
Scott Hussey 839c83651f Last commit to push changes to master. Will use feature branches
going forward

Added readmes to submodules
Refactored model into multiple files
Standardized on 'node' for physical server
Pinned requirements.txt to versions
Began orchestration action outline in conjunction with DAG
2017-03-15 14:53:46 -05:00
Scott Hussey f1e2a3f343 Roll this into master after pull request was approved 2017-02-28 15:14:09 -06:00
Scott Hussey 238eba8966 Add methods to the model for computing inheritance
Skeleton design state client for the orchestrator

Tests for design inheritance
2017-02-28 08:52:52 -06:00
Scott Hussey 67b76b72a2 Updates to YAML schema for schema versioning
Add pseudonyms for drydock modular services
2017-02-17 09:31:22 -06:00
Scott Hussey 0085d4ca76 Significant updates to YAML examples to more fully
illustrate the proposed schema

Remove notes.md and open issues for items that need
continued collaboration

Update readme with the proposed service modules for
drydock
2017-02-16 11:03:37 -06:00
Brandon B. Jozsa 71ec14d492 Initial commit 2017-02-14 17:23:35 -05:00