101 Commits

Author SHA1 Message Date
Tyler Smith
79843e0d24 Zero Touch Provisioning changes for subcloud configuration
- Modifying permissions to prevent non-root users from seeing passwords
  in the /opt/dc/ansible folder

Change-Id: I90cad757c116b2d4b8b355c3cfe81d0c4e357138
Story: 2004766
Task: 35756
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-11-04 14:36:51 -05:00
Tyler Smith
9e1beb9478 Zero Touch Provisioning changes for subcloud configuration
- Adding the /opt/dc/ansible folder to store inventory and override
  files for configuring subclouds

Change-Id: I8231937e13c2fdb033b0e31879705053aff193ee
Story: 2004766
Task: 35756
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-11-04 14:36:50 -05:00
Tao Liu
fd7e61fa9b Update keystone-api-proxy container dependencies
This update changes pycrypto to cryptography in
keystone-api-proxy image directives file.

In addition, syinv and cgtsclient are added as dependencies
as they are now required by keystone-api-proxy.

Change-Id: Iff2765d371b28e991a6dd127fcec36d44472952d
Story: 2004766
Task: 30454
Depends-On: https://review.opendev.org/#/c/663764/
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2019-11-04 14:36:50 -05:00
Andy Ning
7589f962b5 Keystone DB sync - service build instructions
This update contains the build instructions for the newly introduced
DB record synchronization service. This new service provides REST
APIs to read/write/update identity database. The REST APIs is
intended to be used internally by DC Orchestrator to synchronize
identity resources between central cloud and subclouds.

(cherry picked from commit e628cc02d0dc8573f5dd59893a5c080a653063b4)

Conflicts:
	distributedcloud/centos/distributedcloud.spec

Story: 2002842
Task: 22787
Depends-On: https://review.opendev.org/#/c/655727
Change-Id: Iebb0dc0d26c2b4088889946d48bb15ca94cab252
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-11-04 14:36:50 -05:00
Tao Liu
5d7870d7e9 OpenStack-Keystone Proxy Containerization
Add keystone-api-proxy image directives files

Story: 2004766
Task: 30449

Depends-On: https://review.openstack.org/#/c/651558/

Change-Id: I3d541cdc996405f2b35008532249afad2cb2db6b
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2019-11-04 14:36:50 -05:00
Tao Liu
d69ed53208 Integrate Distributed Cloud with containerized services
Remove nova, cinder and neutron api proxy service files
from the distributedcloud package

Story: 2004766
Task: 30021

Change-Id: I477b35e8b5b5079f54f8ac3686f666dab5694148
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2019-11-04 14:36:50 -05:00
Don Penney
8355cde28e Add hooks for python wheel generation
This update adds hooks to the spec files for the following packages
to generate wheels for the python modules:
- distributedcloud-client-wheels
- distributedcloud-wheels
- gnocchi-wheels
- openstack-ceilometer-wheels
- openstack-cinder-wheels
- openstack-glance-wheels
- openstack-heat-wheels
- openstack-ironic-wheels
- openstack-keystone-wheels
- openstack-magnum-ui-wheels
- openstack-magnum-wheels
- openstack-murano-ui-wheels
- openstack-murano-wheels
- openstack-neutron-wheels
- openstack-nova-wheels
- python-ceilometerclient-wheels
- python-cinderclient-wheels
- python-django-horizon-wheels
- python-glanceclient-wheels
- python-gnocchiclient-wheels
- python-ironicclient-wheels
- python-magnumclient-wheels
- python-muranoclient-wheels
- python-networking-bgpvpn-wheels
- python-networking-odl-wheels
- python-networking-sfc-wheels
- python-neutronclient-wheels
- python-neutron-dynamic-routing-wheels
- python-neutron-lib-wheels
- python-novaclient-wheels
- python-openstacksdk-wheels

Change-Id: I35ac2c82ea32c516488dc3ea2a86d9a4ca57051e
Story: 2003907
Task: 27530
Signed-off-by: Don Penney <don.penney@windriver.com>
2019-11-04 14:36:50 -05:00
Scott Little
1eda2ca8f3 Move Distributed Cloud OCF scripts out of openstack-ras
StarlingX specific OCF scripts (ie: OCF scripts that are not from the
OpenStack foundation) should be packaged in the StarlingX repos and
not in the stx-staging repos.

The following 9 Distributed Cloud OCF scripts should be moved into the
distributedcloud-dcorch rpm built from the openstack/stx-distcloud repo:

dcmanager-api
dcmanager-manager
dcorch-cinder-api-proxy
dcorch-engine
dcorch-neutron-api-proxy
dcorch-nova-api-proxy
dcorch-patch-api-proxy
dcorch-snmp
dcorch-sysinv-api-proxy

Depends-On: Ic7b040733e8df66bdd79d45675d63e58abbd85e1
Change-Id: I080b6e893d5f6ccff04951879eed71e8ccbe0b52
Story: 2003715
Task:  26374
Signed-off-by: Scott Little <scott.little@windriver.com>
2019-11-04 14:36:50 -05:00
Scott Little
3ee4e5cdd8 Add distributed cloud repos to StarlingX
Depends-On: https://review.openstack.org/589565
Change-Id: Ibc7d66eeb5000834cc6bb89a1248323f91d0c337
Story: 2002834
Task: 22753
Signed-off-by: Scott Little <scott.little@windriver.com>
2019-11-04 14:36:49 -05:00
Kam Nasim
5c7dec11f3 Add service file for dorch-identity-api-proxy
This is part of Distributed Keystone for Distributed Cloud feature.

Story: 2002842
Task: 22785

Change-Id: Ia8d2e3371e74ce8994a8c23ff926e5b6816b4f51
Signed-off-by: Jack Ding <jack.ding@windriver.com>
2019-11-04 14:36:49 -05:00
Dean Troyer
3562849ebe StarlingX open source release updates
Change-Id: I691023685ad4e5acda2f3cff38a4cec5aa10507a
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-11-04 14:35:49 -05:00
Don Penney
9531b76af1 Move content to subdir to support relocated packaging
Change-Id: Id4f645de23b9f0aec1914edbaef11cdb6e6dc0af
Story: 2006166
Task: 37337
Depends-On: https://review.opendev.org/692861
Signed-off-by: Don Penney <don.penney@windriver.com>
2019-11-04 13:57:02 -05:00
Zuul
7fb781c7b5 Merge "Allow subcloud to use central-cloud's local registry" 2019-10-30 17:22:36 +00:00
Tao Liu
20a06bded7 Allow subcloud to use central-cloud's local registry
To address a requirement change that exposes the 'registry.central'
on the OAM interface, it must add the system controller OAM
subnet to the subcloud override file in the dcmanager.

Depends-On: https://review.opendev.org/#/c/690082/
Change-Id: I9ee6f0f99a940d5d2cc2f245977ffb9f207916c5
Partial-Bug: 1846799
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2019-10-27 15:04:38 -04:00
Tyler Smith
c0e54ee4de Request forwarding and version matching in dcorch proxy
Need to pass in the application to be the forwarder so when
the version doesn't match the request can continue down the
pipeline.  It was 'mostly' working before since the version
matching was registering all get requests as version requests
and just forwarding them, this commit also restricts that
version regex so that is no longer the case.

Change-Id: I887027a043e2a686770d4ece0ae511e00814be61
Closes-Bug: 1849831
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-10-25 17:45:02 -04:00
Andy Ning
eb572c47f8 Check ids instead of names for DC assignment synchronization
In distributed cloud, subcloud's user ids, project ids and role ids
are synced with System Controller. But project role assignment
functions still use names to check if master resources and subcloud
resources has the same id, and if user, project and role exist before
POST call to grant project role to user. This will cause an assignment
PUT job created and identity sync status flip from "in-sync" to
"out-of-sync" and back to "in-sync" again for every audit cycle.

A more detailed explanation, at the very first audit, roles are queued
for sync but the job doesn't run and their ids don't changed at the
subcloud yet. At the same audit dcorch finds the project role assignment
actually exist (since it check names in has_same_ids()), so it maps the
the assginment of center cloud to the assignment of the subcloud with
the current ids. Once the roles sync job queued get executed, roles ids
are changed. At this point the assignment mappings becomes invalid. The
next audit can no longer find the mapped assignment from subcloud so the
logic falls into audit_discrepancy() where the has_same_ids() return
TRUE again and a PUT job is queued for the assignment. The sync endpoint
type becomes "out-of-sync" since there is a job for it. Once the PUT
function return, its status returns to "in-sync" again.

This change updated project role assignment functions to use ids
instead of names.

Change-Id: I024f2c2f97aaf9670d7b2c5c70a2dae7d6d08d38
Closes-Bug: 1847661
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-10-25 14:36:19 -04:00
Zuul
b2d8cfd1ac Merge "Fix the error links for distcloud docs" 2019-10-22 18:58:02 +00:00
Tyler Smith
96db1d7ee0 Distributed Cloud enhancements for Horizon
- Adding endpoints for the subcloud's platform services to the central
  keystone.  This was done so horizon can reach all subclouds
- Allowing version requests to bypass the authtoken validator in the
  dcorch proxy.  version requests do not require authentication and
  they are required by horizon to work in the SystemController region

Change-Id: I508e0168e77d1f46b8f5720fd16047177b4920c2
Partial-Bug: 1846239
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-10-18 16:57:16 -04:00
Zuul
b020fc86c8 Merge "keystone-api-proxy for containerized openstack services - service" 2019-10-17 15:08:45 +00:00
Zuul
8a940e5c14 Merge "dcmanager for containerized openstack services - service" 2019-10-11 13:02:18 +00:00
Andy Ning
28aa599715 dcmanager for containerized openstack services - service
This update enhanced dcmanager to be able to manage containerized
openstack services of subclouds that have openstack application
deployed.

dcmanager audit query subcloud periodically to check whether
stx-openstack application is installed or not. If it's installed from
previous uninstalled, the subcloud's "openstack_installed" field will be
updated from "False" to "True", openstack sync endpoint types will be
added into subcloud sync endpoint type list, and notify dcorch to update
its sync threads. If it's uninstalled from previous installed, the
subcloud's "openstack_installed" field will be updated from "True" back
to "False", openstack sync endpoint types will be removed from subcloud
sync endpoint type list, and notify dcorch to update its sync threads.

The endpoint type sync status of openstack services will be available
to dcmanager commands such as "dcmanager subcloud list".

Change-Id: I651bebbef0f0a4dd39ec2371a7397c066c747622
Story: 2004766
Task: 36261
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-10-10 09:29:29 -04:00
Zuul
56e3284c57 Merge "dcdbsync for containerized openstack services - service" 2019-10-06 14:32:54 +00:00
Zuul
4c12ab1113 Merge "Moved eventlet monkey_patch before app is imported" 2019-10-03 20:43:51 +00:00
Andy Ning
3e2eccea4a Moved eventlet monkey_patch before app is imported
In cmd/api.py the eventlet monkey_patch has been moved to be before api
app import. This is because if it's called too late, the api app and
db api module will be loaded without awareness of eventlet, the
threading local context in db api won't be eventlet compatible, causing
DB parallel operation errors.

Change-Id: I294657fc910c6a4696f91308d60697d005dc53b0
Closes-Bug: 1846411
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-10-03 13:29:30 -04:00
Andy Ning
145544343b Add timeout to dcdbsync REST API calls
This update added timeout to dcdbsync REST API calls in dcdbsync
client. If no timeout is specified explicitly, the requests do not
timeout. This will cause dcorch audit (which makes the REST calls)
to hang forever and stop auditing when the REST requests failed
for whatever reasons.

Change-Id: I2d471365565df6cd3b0ae720cd81bc17610a0272
Closes-Bug: 1845701
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-10-03 11:32:32 -04:00
Andy Ning
95eac8c932 keystone-api-proxy for containerized openstack services - service
This update enhanced keystone-api-proxy to take a sync_endpoint
parameter from its configuration file and enqueue job for dcorch with
that sync_endpoint type. If sync_endpoint doesn't present in its
configuration file, it will use the default endpoint type to enqueue
job.

Change-Id: I85698638cee2598955c4deb41a6b8033b0ace9fd
Story: 2004766
Task: 36156
Depends-On: https://review.opendev.org/#/c/682062/
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-09-26 15:12:19 -04:00
Andy Ning
94f52f8f8a dcdbsync for containerized openstack services - service
This updates dcdbsync service to be able to sync both platform keystone
and containerized openstack keystone database.

Special note: In cmd/api.py the eventlet monkey_patch has been moved to
be before api app import. This is because if it's patched too late, the
api app and db api module will be loaded without awareness of eventlet,
the threading local context in db api won't be eventlet compatible,
causing DB parallel operation errors.

Story: 2004766
Task: 36108
Change-Id: I448af0aae1f39186ca342bd26d8b263b06065312
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-09-26 14:16:05 -04:00
Tyler Smith
36702d225c Adding arbitrary deploy playbook execution to subcloud add command
This commit introduces the ability to pass a playbook and playbook
values file to the dcmanager subcloud add command.  The deployment
is now split into two phases: bootstrapping, where the bootstrap
ansible playbook is run with the supplied bootstrap values yaml file,
and deploying, where the specified ansible playbook is executed with
the given yaml values file pointing to the subcloud.

Change-Id: I2ff3034b1db88d9da89e634220a394ab9dfce64b
Story: 2004766
Task: 36712
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-09-23 11:01:11 -04:00
Zuul
c3241d0a41 Merge "DC remove firewallrules audit from dcorch" 2019-09-19 16:47:30 +00:00
Andy Ning
a7d91e2961 DC remove firewallrules audit from dcorch
OAM firewallrules are now managed by Calico GlobalNetworkPolicy configuration
via k8s API (not by sysinv anymore). This update removed firewallrules
audit from dcorch.

Change-Id: I9fab73c016bb4af760c7d78f0db18dcc8bb77057
Closes-Bug: 1844147
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-09-18 10:08:13 -04:00
Zuul
555e6fa95c Merge "IPv6 Distributed Cloud: update to bootstrap overrides formatting" 2019-09-17 21:14:25 +00:00
Tyler Smith
9c5727995f IPv6 Distributed Cloud: update to bootstrap overrides formatting
Some bootstrap overrides were being written to the subcloud yaml file
as unicode strings, including ipv6 dns addresses, which causes ansible to
fail when parsing the yaml during the subcloud bootstrapping

Change-Id: I43f1776a9f2d8a7d45221946e62dc31ac9f6d1d9
Partial-Bug: 1844190
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-09-17 14:59:08 -04:00
Andy Ning
4fc9543820 Fix dcorch audit_discrepancy() failure
In a Distributed Cloud system, when dcorch audit platform, it will
failed at audit_discrepancy() function call. This is because sysinv
audit_discrepancy() missed the 4th parameter. This update fixed this by
adding it in.

Change-Id: I72057b3406b4b362808d241fbc2e43bf07d7b677
Closes-Bug: 1843770
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-09-12 13:32:20 -04:00
Scott Little
2c538b9e52 tox.ini changes to reflect new location of tsconfig
Story: 2006166
Task: 35687
Depends-On: I6c62895f8dda5b8dc4ff56680c73c49f3f3d7935
Change-Id: I9ac723963b51f76168b76de2caf366e5678c765d
Signed-off-by: Scott Little <scott.little@windriver.com>
2019-09-05 14:52:14 -04:00
Zuul
1d5326c770 Merge "Use triple double-quoted strings for docstrings" 2019-08-28 14:09:37 +00:00
Tyler Smith
9217e03a62 Subcloud goes offline after managing
Formatting of the passwords was incorrect leading to
authentication issues

Change-Id: If181e38f07dc66b6e4b12bf0b5a7fb123d75fbb2
Closes-Bug: 1839377
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-08-23 10:54:23 -04:00
Andreas Jaeger
7e39c779ec Use Zuul templates
Use templates instead of individual jobs so that these
can be changed in one place.

Depends-On: https://review.opendev.org/677606
Change-Id: Ice80a94fe8c5d3634e729c888672ce698049f87a
2019-08-21 12:58:28 +00:00
Tyler Smith
8c2bd5fa14 Zero Touch Provisioning changes for subcloud configuration
- Adding logic to automatically deploy subclouds via ansible when
  they are added, as well as a 'deploy' field to subcloud entity to
  report status
- Converting subcloud fields to take underscored
  parameters instead of dashed to match ansible variable style
- Adding checks to OAM network parameters
- Removing generate subcloud config logic

Depends-On: https://review.opendev.org/#/c/670321/
Depends-On: https://review.opendev.org/#/c/670325/
Change-Id: Ib7fe2f4a42fffb7bd5082e6e851cb9136edf5a00
Story: 2004766
Task: 35756
Signed-off-by: Tyler Smith <tyler.smith@windriver.com>
2019-07-17 13:30:04 -04:00
Zuul
a3f595fe18 Merge "Fix dcmanager add subcloud exception" 2019-07-04 14:57:36 +00:00
Tao Liu
def5da6342 Fix dcmanager add subcloud exception
The sysinv API for retrieving the network interfaces has been
changed. This update makes changes in dcmanager to adapt the
sysinv changes.

Story: 2004766
Task: 35672
Change-Id: Ifaa510726c5029738e6b02f468a3a38f0682a351
Signed-off-by: Tao Liu <tao.liu@windriver.com>
2019-07-03 16:44:44 -04:00
junboli
d2d82d5660 Fix the error links for distcloud docs
The storyboard and gerrit doc link are error, and git library
redirect to the correct one, this change is to correct all them.

Change-Id: I58fb35cf4bd4edde173c5d7e55bc6ced1ee08d60
Partial-Bug: #1835207
Signed-off-by: junboli <junbo85.li@gmail.com>
2019-07-03 09:15:52 -04:00
fpxie
1f4769dafd Use triple double-quoted strings for docstrings
Change-Id: I1bc612866b9fc98be7e702565ba249bda4a54785
Story: 2006136
Task: 35632
2019-07-01 15:10:59 +08:00
Don Penney
ff13bcf60a Update tox.ini files to use stein constraints
This updates the upper-constraints.txt used by tox for
installing python modules to reference the stable/stein
constraints.

Change-Id: I5029186ae1ccee719da17f6a36665f81e207f882
Partial-Bug: 1834216
Signed-off-by: Don Penney <don.penney@windriver.com>
2019-06-25 13:00:50 -04:00
Zuul
fd498c843c Merge "Keystone DB sync - enhance dcorch first audit" 2019-05-08 01:25:48 +00:00
Zuul
5333e9c2f6 Merge "Keystone DB sync - update dcorch to use dcdbsync" 2019-05-08 01:17:08 +00:00
Andy Ning
6bd2372da7 Keystone DB sync - update sync service for Stein
This commit updates dcdbsync service to support Stein. Changes to the
service includes:
- Update system_assignment table when user id or role id is updated
- Update implied_role table when role id is updated
- Removed "password" field from local_user_table synchronization
- Added "description" field to role table synchronization
- Updated VERSION_ALIASES to Stein 1.0 in API controllers

Story: 2002842
Task: 22787

Change-Id: I40e64d4072201635c7b531575ab5df7cd7b5557d
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-05-01 12:08:20 -04:00
Andy Ning
828cdcf2bb Keystone DB sync - enhance dcorch first audit
This commit enhanced dcorch find_missing algorithm so that the first
audit after subcloud becomes managed won't try to create resources that
have matches in the subcloud (otherwise the creation will fail for DB
duplication error). This is neccessary for resources that are created
at deployment time and existing resources not yet tracked by dcorch.

Story: 2002842
Task: 22787

Change-Id: I60f94057caf71265942f3b37b400eeba4f368fed
Signed-off-by: Andy Ning <andy.ning@windriver.com>
2019-04-30 14:51:17 -04:00
Andy Ning
67215f30fe Keystone DB sync - update dcorch to use dcdbsync
This commit updates dcorch to use the newly introduced dbsync service
APIs to synchronize identity resources from central cloud to subclouds.
The following identity resources are synced:

- users (local users only)
- user passwords
- projects
- roles
- project role assignments
- token revocation events

Story: 2002842
Task: 22787

Signed-off-by: Andy Ning <andy.ning@windriver.com>
(cherry picked from commit e9096c7a23abeebc1119b5ba3ed1e7b3a357a2ed)

Depends-On: https://review.opendev.org/#/c/655921
Depends-On: https://review.opendev.org/#/c/655773
Depends-On: https://review.opendev.org/#/c/655776
Depends-On: https://review.opendev.org/#/c/655927
Change-Id: I77c2cc712a1c3dc8a228883c3fea1423e5207dea
2019-04-30 14:50:55 -04:00
Andy Ning
d19abe3594 Keystone DB sync - introduce DB sync service
This update introduces the DB record synchronization service. This new
service provides REST APIs to read/write/update identity database. The
REST APIs is intended to be used internally by DC Orchestrator to
synchronize identity resources between central cloud and subclouds.

This update also contains python client that wraps up the REST APIs
into functions. The client is to be used by DC Orchestrator.

This service supports the synchronization of the following identity
resources:
- users (local users only)
- user passwords
- projects
- roles
- project role assignments
- token revocation events

Story: 2002842
Task: 22787

Change-Id: Idb4aff5bac006fdd904b58c0c8b3d6a0916fbd4b
Signed-off-by: Andy Ning <andy.ning@windriver.com>
(cherry picked from commit 6cdd47b836b3618d2ec549fe0bab273bd23ce942)
2019-04-25 11:11:48 -04:00
Dean Troyer
042d172876 Followup opendev cleanup and test jobs
Change-Id: Ide29dfb0f650b5e53b43a9e06413c3c68dad9b3a
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-21 15:44:19 -05:00