Commit Graph

71 Commits

Author SHA1 Message Date
Roman Gorshunov 785c4ca5f5 Set up publishing of docs
Set up publishing of docs to the readthedocs.

Change-Id: Idfafa228e9136de3cec72d9df82b537ebd8fc8d3
2018-09-14 21:32:41 +02:00
Bryan Strassner e0320c0197 Add documentation for safer redeploy_server
Includes guiding information to direct users of redeploy_server
through preparatory steps to minimize undesired impacts.

Change-Id: Idae8b0beab667af05b34acb2bf1be590627d911a
2018-09-10 15:27:48 -05:00
Zuul 7bd1b050bc Merge "Add redeploy_server processing" 2018-08-23 20:55:26 +00:00
Rick Bartra 2edd8e6531 Update Shipyard API docs and shipyard_api_client
The Shipyard API docs and shipyard_api_client incorrectly reference
the wrong API endpoints for some APIs. This commit updates the API
docs to reference the correct API endpoints for:

- getting action validation details
- triggering a control action against an activity

The following is updated in the shipyard_api_client.py:

- API endpoint for getting action validation details

Change-Id: I04b770acfd64f331efce6f83f51cb41d0818a6b2
2018-08-23 19:48:14 +00:00
Bryan Strassner f3749ca3f9 Add redeploy_server processing
Adds the functionality to redeploy a server in an unguarded fashion,
meaning that the server will not be pre-validated to be in a state that
workloads have been removed.

This is the first targeted action for Shipyard, so a refactoring of the
validators to support more flexibility has been done.

Also adds RBAC controls for specific actions being created, rather than
a binary create action privilege.

Change-Id: I39e3dab6595c5187affb9f2b6edadd0f5f925b0c
2018-08-21 09:42:40 -05:00
Zuul 18ed6674d2 Merge "Set ULID of action on DAG request" 2018-08-15 16:35:40 +00:00
Zuul 37caf4c36b Merge "Update Shipyard sampleconf.rst with correct name" 2018-08-15 05:26:39 +00:00
Rick Bartra 9cd4a18114 Update Shipyard sampleconf.rst with correct name
Update the Shipyard samepleconf.rst which incorrectly references
Patrole instead of Shipyard

Change-Id: I04142f92c7fd414c5ea78d9f59985f6d727917e9
2018-08-14 12:39:26 -04:00
Bryan Strassner e59fb314c1 Set ULID of action on DAG request
Sets the run_id for a DAG invoked in Airflow to the same ULID assigned
to it in Shipyard. While this was already happening as a parameter to
the DAG being invoked, by making it the run_id, further correlation is
possible, at a level that both Shipyard and the Airflow framework are
aware.

As part of making this change, fragility was uncovered in the
rest_api_plugin that expedited the need to switch to the built-in, but
experimental airflow API to trigger a dag (one of two API endpoints
provided - this is important later in this story). In any case, the 3rd
party rest_api_plugin was removed.

As a result of the rest_api_plugin being removed:
1) the simpleton helm test to check the api of airflow was also removed
(it used the version endpoint of this plugin). As the built-in api
provides no version endpoint or similarly accessible-without-being-stateful
endpoint, the helm test had no new place to look for something to call.
2) Some clean up of exclusions and documentation was possible - test
coverage, security exclusions, left over documentation remnants

Change-Id: I0b68496a8500408b776b4acc12888aa017c4c7d2
2018-08-10 10:23:30 -05:00
Bryan Strassner f32dc97272 [Trivial] catch up sample policy file
Regenerates the policy file to update it to include the new sample
policies that can be manipulated

Change-Id: I37f3319d2323d6bf24183b41f54f2e471d07cecd
2018-08-10 09:55:14 -05:00
Smruti Soumitra Khuntia f4c724fbf1 A new Shipyard site statuses API and CLI
A new Shipyard site statuses API and CLI supporting nodes
provisoning status and node power state. This API
can be further developed to support new status
requirements by expanding the filters option.

Change-Id: I620aefd82d4a17b616f3f253265605e519506257
2018-07-31 09:16:36 +00:00
Bryan Strassner 70eb1cef10 Add udpate_software action to Shipyard
Provides an action that can be invoked by a user to deploy only the
software portion of a design.

Change-Id: I880bdc245064364dfdd6a482a3cf2d2a293f6c0d
2018-07-06 16:57:42 -05:00
Bryan Strassner e72a83f03b Externalize database connection pool parameters
Updating to include the pre-flight check required an update to
sqlalchemy version.

Change-Id: I3da7c4e88f31ea5c2b9f4afa433bda54b16ba8eb
2018-06-29 09:54:44 -05:00
Bryan Strassner 648ce3f990 Docs supporting deployment groups
Adds documentation regarding the usage of deployment groups in shipyard.

Change-Id: I5554c93b428cdfa4cb28a8b9d8f7d37b4596ae8c
2018-06-08 15:11:29 -05:00
Bryan Strassner 7708ecbe64 Add Keystone options to registration of config
When registering options, the list_options was not returning the
appropriate options for keystone. This adds those options. Aslo changes
to use a more direct/generic adding of keystone options.

Related to this, a change was required to the service_endpoints module
to generate an auth object used to get a session.

In addition, the zuul gates for py35 were resolving to a non-existent
target. The changes to tox.ini files addresses making it so the unit
test gates are restored to functionality.

This change also uncovered a misconfigured unit test, and corrects that
test.

Change-Id: Ibc1c6c217ac7396390e7a881afbb9ef1c5ab7091
2018-06-06 14:50:54 -05:00
Zuul 37ec369c14 Merge "Update Deckhand commit" 2018-06-01 21:37:27 +00:00
Felipe Monteiro 0c9152d62e Update Deckhand commit
This patchset uplifts Deckhand commit to include fix
for document replacement.

This uplift is the same one used in Promenade [0].

The Shipyard README.md was renamed to README.rst for
2 reasons:

* To fix an issue with [1] breaking.
* To update content for OpenStack migration.

[0] I32d22110749b334d1fbf19f910e41ab0b7ff3a16
[1] http://logs.openstack.org/96/571296/1/check/airship-shipyard-pep8/76f6cb1/job-output.txt.gz#_2018-05-30_20_19_47_616403

Change-Id: Ie15f4234d504223e961c525339c87fca3a883ffc
2018-06-01 21:16:08 +01:00
Bryan Strassner c1539ae95d Move UCP to Airship documentation
Updates the Shipyard documentation to reflect changes related
to moving to OpenStack Airship. Adds some additional information.

Change-Id: I32a3aa24ce268cbc925a512aa2ae54eaf95acd2a
2018-05-31 10:24:39 -05:00
One-Fine-Day aca1b60f22 Promenade validateDesign for Shipyard
SHIPYARD-342: Shipyard Integration with Promenade to Validate Design

Calls Promenade validateDesign API to validate site design.

Change-Id: Ia763983ed9857d4e5b13cfb11d3654e75e6578a4
2018-05-15 14:39:37 +00:00
Anthony Lin afc2ea501d Update Configdoc Status
Allows comparison between Deckhand revisions with valid revision tags,
i.e. buffer, committed, last-site-action and successful-site-action.

This patch set updates the relevant Shipyard API, API client, CLI as
well as document.

Change-Id: Ia9a519d82fe8bf80f89945e678a0b02f6ec43baa
2018-05-08 15:08:55 +00:00
Krysta 3629245b0c Pass Drydock health failure
Bypass a failure due to the health of Drydock on update_site
or deploy_site if the continue-on-fail param is enetered.

Adds unit tests

Changed operator to be more easily testable

Removed the K8s Health Check for preflight checks. We will add
the functionalities back once we have a clearer view on what
should be checked and validated for the workflow.

Change-Id: Idd6d6b18d762a0284f2041248faa4040c78def3f
2018-05-02 15:47:06 +00:00
Anthony Lin c0f8fc4359 Add 'last-site-action' & 'successful-site-action' Option
Shipyard retrieval of configdocs and renderedconfigdocs to
support two new revisions, i.e. 'last-site-action' and
'successful-site-action'.

1) --last-site-action for the documents associated with the last
   'successful or failed site action

2) --successful-site-action for the documents associated with the
   last successful site action

This patch set updates the relevant Shipyard API, API client, CLI
as well as document for the new options.

Change-Id: I60fefa25147ad8e367bc3d1c8d45d4d08a5ee3f1
2018-05-02 15:22:14 +00:00
Bryan Strassner 5484e7e6fe [bugfix] Guards for configdocs creation API
Addresses a situation where a missing header or invalid message body
was accepted as a good request (but empty), resulting in subsequent
failures during a standard creation of configdocs use case.

Change-Id: I7287ec890666c7cbcb1791be13619580a1254e8f
2018-04-30 18:09:32 -05:00
Anthony Lin d3d3a0ecb7 Add 'allow-intermediate-commits' option for Site Action
Shipyard Create Action will stop user from executing a site
action when the current committed revision of documents has
other prior commits that have not been used as part of a
site action, e.g. update_site.

We can re-run the action with the 'allow-intermediate-commits'
option if we are aware of these other commits and if they are
intended.

This patch set updates the relevant Shipyard API, API client,
CLI as well as document for this new option.

It also made some small updates to the 'commit configdocs'
documentation.

Change-Id: I94a4cad313a69dd6fbc626ab923c6eae5cf3db7a
2018-04-28 00:05:25 +00:00
Bryan Strassner 769d0ded47 Refactor shipyard to UCP target layout
Refactor Shipyard to be better able to leverage common
packages and conform with the target UCP standard layout.

This change supports the same tox entrypoints at
the root level, but the preferred approach is to use make
targets defined in the Makefile such as 'make tests' and
'make lint'

The previous tox.ini has moved and been
tailored to the specifics of each subproject at
src/bin/*/tox.ini

Autotmatic generation of the policy and configuration
files has been removed from the sphinx build for now
but these files will be automatically generated locally
into the docs source by using a 'make docs' command.
This may need to be revisited later to re-enable the
automatic generation of these files such that readthedocs
would still support the project layout.

Change-Id: Ifdc1cd4cf35fb3c5923414c677b781a60a9bae42
2018-04-24 16:47:13 -05:00
Anthony Lin 80fc8095ae Shipyard Documentation for Logs Step
Documentation for Shipyard API and CLI that is used for retrieval
of logs for a particular Airflow workflow step.

Change-Id: I89c479b164bcbf72e971bb0fc756720b096989e6
2018-04-13 09:54:31 -04:00
Bryan Strassner a0a744fd88 Documentation for Shipyard deployment-configuration
Updates workflow documentation to include information explaining the
deployment configuration document used by Shipyard

Change-Id: I1062958f51b7d9a49711d40d4dc892e7f6bfc1af
2018-03-13 17:54:21 -05:00
Tin Lam 17e9053f59 Fix typos
This patch set fixes a handful of typographical errors in the documents.

Change-Id: I7b63539804becdc1d6ce7b76028eb7f09cba0b3c
2018-02-26 05:58:54 -05:00
One-Fine-Day 5335622671 Shipyard Documentation for Dryrun Option/Query
Shipyard API to retrieve validation status of a collection of configdocs

4 of 4 Commits (API, API Client, CLI are in separate commits)

Documentation
-Read the Docs documentation has been updated to include the CLI command,
 commit configdocs, option dryrun in docs/source/CLI.rst
-Read the Docs documentation has been updated to include the API,
 commitconfigdocs, query dryrun in docs/source/API.rst

Change-Id: I1dfea75cb2886aa57052c30362c2992051ef56a8
2018-01-12 16:07:20 -05:00
Krysta d8e72904ad Shipyard CLI for Create Configdocs directory options
Update the cli to accept multiple directories
Add option to recursivly go down into a directory
Unit test for multiple directories options and recursive option
Adds processed files to debug option

Change-Id: Iea4385bf370020e34657dfdb3314941cb0c36899
2018-01-09 14:18:54 -05:00
Mark Burnett 125861973d Merge "Update Shipyard Dockerfile" 2018-01-08 14:54:36 -05:00
Anthony Lin 13f9adfa53 Update Shipyard Dockerfile
This P.S. will allow user to execute Shipyard CLI using a
Shipyard docker container.

The updates made to the Dockerfile and entrypoint.sh are
aligned with those in Armada and Drydock.

Change-Id: I59ccd2d41fab19781f51334cb1a69b69a48d3c49
2018-01-07 23:31:38 -05:00
One-Fine-Day ab0cd0468d Shipyard Documentation for Configdocs Status
Shipyard API to discover buffered and committed collections of configdocs

4 of 4 Commits (API Client, CLI, Documentation are in separate commits)

Documentation
-Read the Docs documentation has been updated to include the CLI command in
 docs/source/CLI.rst
-Read the Docs documentation has been updated to include the API in
 docs/source/API.rst

Change-Id: Ia5404867796b283c65bc8f73cdaa100301e116ce
2018-01-05 18:34:08 -05:00
Bryan Strassner 295835cf2c Conform expected validation responses to status standard
Upon review of standard responses, the validation responses
were found to be using valid/invalid instead of success/failure.
This change changes the values used to be success/failure for the
status field in validations. Additionally, this also cleans up the
misuse of api version 'v1', making it v1.0 instead on the status
responses.

Change-Id: Ia10674158648ef0d0c42badc4bd19e1b48b255d9
2018-01-03 07:37:18 -06:00
Tin Lam 8384793307 Fix typos
This patch set fixes a number of typos in the shipyard document.

Change-Id: I891115a92fef8d33f30657ae5f4df4e591e31848
2017-12-26 21:20:51 -04:00
Anthony Lin dcc6c3fb6e Correct Formatting of Deployment Guide
The code blocks were in incorrect format due to wrong
alignment in the .rst file.

This patch set is meant to correct that.

Change-Id: I30378b5d970d4394db5309dd1d09e108b3a96343
2017-12-19 14:59:51 +00:00
Anthony Lin 77d962013f Move Shipyard Deployment Guide from .md to .rst
This patch set changes the shipyard deployment guide from
markdown to reStructuredText format. It also adds banners
to the other .rst document.

It seems that client set up using the current instructions with
Python 2.x was giving syntax errors when we try and execute the
Shipyard CLI. Hence, updates were also made to client_user_guide
to specify the usage of Python 3.x

Note that 'Drydock build' includes step that checks that the
nodes are deployed before starting 'Armada Build'. Hence we
are collapsing 'Drydock build' and 'Check deployed node status'
into a single step, i.e. 'Drydock build' instead.

Change-Id: Ie5f15b81d4dc89afb9c6800e7a181b02f2acabcc
2017-12-18 08:48:08 +00:00
Bryan Strassner d11af60e8f Add Shipyard Client user guide
Introduces documentation for basic usage patterns
of the Shipyard Client, including some setup
guidance and example uses.

Change-Id: I3f8803d378a8e22d45c3d6b81c6f3bd36f09424c
2017-12-05 13:52:11 -06:00
Bryan Strassner fde16f218e Move most Shipyard docs to .rst
This patchset moves most of the documentation for
shipyard from markdown to reStructuredText.
README.md remains as it is nice for Github consumption
and serves as a gateway to the rest of the generated
documentation.

Change-Id: I8cec38fe0e30e9a545cb6e79ae6de1934f7dfc4e
2017-12-04 13:36:26 -06:00
Anthony Lin 2af8f143bd Update Shipyard Deployment Guide
There has been significant changes in the way we deploy
Shipyard in a Dev environment in recent months.

This P.S. is meant to update the deployment guide with
the current approach.

Change-Id: I67ac0888bdb52f6036d741346d77cca23ff63eb1
2017-12-04 16:44:52 +00:00
Bryan Strassner 958e3b5fea Add samples to CLI command documentation
This change adds samples to the CLI commands documentation showing
the example output from the commands. Also included is a single
line fix for one of the CLI components that was not referencing the
correct json field in the processing.

Change-Id: Ic1e77009dd51ac39d8510c13cb508ab5f506b53e
2017-11-27 15:32:39 -06:00
Bryan Strassner 48f1b09268 Updates cli to include workflow commands
Also adds better test coverage for input checks
Changes some input checks to be less coupled to
invoking action/command.

Change-Id: I704b90bf39f4589f78d0253d99d28cf294c40d93
2017-11-16 18:17:05 -05:00
Bryan Strassner 32caf4f550 Update docs and CLI options to match
Updates the documentation of the CLI to match the options supported
Also adds some type checking to the CLI for input UUID, and sets some
default values for OS auth variables that can be reasonably defaulted
Sets up the options on input to the output format to use 'cli' as the
default instead of 'format', providing for a path to make more cli
friendly outputs for actions (instead of raw json/yaml as appropriate).
Fixes some markdown in html problems.

Change-Id: Ie0eaa34ad1106b5a963b69ffc7eb727c13ede244
2017-11-13 12:43:48 -04:00
Bryan Strassner 2168b3f00b Implement the inquiry API for Shipyard.
This allows for query and browsing of all items that have been
invoked via Airflow, whether through the Shipyard front door or not.

Processing for this set of endpoints has been placed in a subdirectory
of the control directory. A later refactoring will move the other API
resources and helpers to their own respective directories.

Change-Id: I7242fba80ad745ef5bcd41d7d07a320dfebb1dd7
2017-10-19 14:54:31 -04:00
Hassan Kaous 3ac47328c3 Document staging api
The purpose of the document staging api is to provide a client of
shipyard to ingest and manipulate documents within the UCP platform

In support of the need to reach out to other services, this change
also introduces the use of keystone for service discovery and connection
to other UCP services.

Change-Id: I6fa113f8786cad2884c0b791788a4ef40cd1a6b6
2017-10-18 18:39:24 -05:00
Anthony Lin 6bbcf49b74 Fix PEP8 Issues in Shipyard
This patch cleans up docs/*.py and update tox.ini's exclude target
as well as specifying pep8 to scan *.py files only.

Change-Id: Ic81cc81edd9da682581d9deb0a7a5404bb7aa4d9
2017-10-17 19:41:06 -05:00
Bryan Strassner 823df44501 Update shipyard CLI documentation for shipyard create configdocs command.
Change-Id: Iec215848c2a65d9d83d56a7aa293b24ea6a03d55
2017-10-12 20:57:16 -05:00
Felipe Monteiro 467358dcc2 Shipyard documentation via build_sphinx
This PS adds tooling and automation to automatically generate
Shipyard's documentation into feature-rich HTML pages that can
be hosted.

To run the documentation job, simply execute:

    tox -e docs

Shipyard's .md documentation will have to be changed to .rst
in a future PS for sphinx to be able to render them into HTML.

Change-Id: Iba8cfd68e4905d49cd5a1dfd39d556044efdabbd
2017-10-06 15:51:35 -04:00
Bryan Strassner 25c8adbe75 Update Action API documentation
This patchset aims to update the documentation for the action api of
shipyard to match the functionality being developed. Request and
response examples have been included for those known entities. The
representation of validations has not been finalized, and is therefore
missing from this patchset.

Other changes made include adding some notation explanation for the examples,
Duplicating the name of the API to the HTTP verb associated to make for
better readability, and some cleanup of existing verbiage to use more
precise terms.

Change-Id: Ibf80bd1f5782f346bdd628337167b5e64670d978
2017-09-25 18:26:42 -05:00
Scott Hussey e7c27d615c Merge "Add Action API" 2017-09-25 13:53:42 -04:00