Commit Graph

33 Commits

Author SHA1 Message Date
guilhermesteinmuller d3d28594b3 Drop mesos driver
The coe mesos has not been maitenaned for quite some
time and hasn't got much attetion from the community
in general. As discussed in the mailing list [1] we
are dropping for now.

In this patch, we start by removing the mesos driver
and its test cases. This part of the code has no impact
for other drivers. Then we can clean up mesos references
that affect the API.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-December/026230.html

Conflicts:
	lower-constraints.txt
	tox.ini

Change-Id: Ied76095f1f1c57c6af93d1a6094baa6c7cc31c9b
2022-11-11 23:01:43 +11:00
Feilong Wang 946c1d67c7 Add master_lb_enabled to cluster
Adding the master_lb_enabled option when creating a cluster,
which will benefit both the cloud provider side and the end
user side. For cloud prodiver, they don't have to maintain
separate cluster templates with or w/o master_lb_enabled enabled.
For end user, they can easily use one single template to create
different clusters with different configs.

Task: 39680
Story: 2007634

Change-Id: I0b586f05168ece84fd340ef7493a56688191053d
2020-07-21 11:07:33 +12:00
Spyros Trigazis 9f4c63a0df resize: Send only nodes_to_remove and node_count
When resizing a NG we should strictly send the
desired node_count and the nodes_to_remove.
Otherwise the stack update operation may replace/rebuild
nodes or other resources.

This was the functionality with:
Id84e5d878b21c908021e631514c2c58b3fe8b8b0
But it was reverted with:
I725413e77f5a7bdb48131e8a10e5dc884b5e066a

Story: 2005266
task: 39860

Change-Id: Ib31b6801e0e2d954c31ac91e77ae9d3ef1afebd2
Signed-off-by: Spyros Trigazis <strigazi@gmail.com>
2020-06-05 08:47:53 +00:00
Theodoros Tsioutsias 37c61fa2f8 Docker volume size from nodegroups
Docker volume size as well as volume env files should be fetched
based on the nodegroup and not the cluster.

story: 2006701
task: 37008

Change-Id: Ia9e7f4612f36f4e57626b2e931b84898523e9ccb
2019-10-23 11:08:27 +00:00
Theodoros Tsioutsias e52f77b299 ng-9: Driver for nodegroup operations
This adds the support for creating and deleting worker  nodegroups
using different stack per nodegroup. In order to be backwards
compatible, default nodegroups will remain in one stack.

Having this in mind cluster status is now calculated aggregating the
statuses of the underlying stacks.

Change-Id: I97839ab8495ed5d860785dff1f6e3cc59b6a9ff7
2019-09-26 08:45:57 +00:00
Theodoros Tsioutsias d4a52719f1 ng-7: Adapt parameter and output mappings
With this change parameter and output mappings can support multiple
stacks.

Change-Id: I45cf765977c7f5a92f28ae12c469b98435763163
2019-09-26 08:45:51 +00:00
Feilong Wang 32989b4f7b Allow setting network, subnet and FIP when creating cluster
When using a public cluster template, user still need the capability
to reuse their existing network/subnet, and they also need to be
able to turn of/off the floatingip to overwrite the setting in the
public template. This patch supports that by adding those three
items as parameters when creating cluster.

Story: 2006208
Task: 35797

Change-Id: I11579ff6b83d133c71c2cbf49ee4b20996dfb918
2019-07-31 20:41:20 +12:00
Theodoros Tsioutsias ea95b0dc5c ng-3: Adapt existing drivers
The existing drivers are adapted to get node_count and master_count
information from the cluster's nodegroups. At the same time the
output mappings were updated to reflect the changes in the stack to
the nodegroups.

story: 2005266

Change-Id: I725413e77f5a7bdb48131e8a10e5dc884b5e066a
2019-03-28 10:31:01 +00:00
Zuul 0cd35dbcca Merge "Support <ClusterID>/actions/resize API" 2019-03-19 22:16:15 +00:00
Feilong Wang 15ecdb8033 Support <ClusterID>/actions/resize API
Now an OpenStack driver for Kubernetes Cluster Autoscaler is being
proposed to support autoscaling when running k8s cluster on top of
OpenStack. However, currently there is no way in Magnum to let
the external consumer to control which node will be removed. The
alternative option is calling Heat API directly but obviously it
is not the best solution and it's confusing k8s community. So with
this patch, we're going to add a new API:

POST <ClusterID>/actions/resize

And the post body will be:

{
    "node_count": 3,
    "nodes_to_remove": ["dd9cc5ed-3a2b-11e9-9233-fa163e46bcc2"],
    "nodegroup": "production_group"
}

The API will be working in a declarative way. For example, there
are 3 nodes in the cluser now, user can propose an API request
like above. Magnum will call Heat to remove the node
dd9cc5ed-3a2b-11e9-9233-fa163e46bcc2 firstly, then bring the node
count back to 3 again.

Task: 29563
Story: 2005052

Change-Id: I7e36ce82c3f442976cc498153950b19c56a1759f
2019-03-19 20:13:17 +00:00
Guang Yee a47f5a3994 make sure to set node_affinity_policy for Mesos template definition
Fixes the problem with Mesos cluster creation where the
nodes_affinity_policy was not properly conveyed as it is required
in order to create the corresponding server group in Nova.

Change-Id: Ie8d73247ba95f20e24d6cae27963d18b35f8715a
story: 2005116
2019-03-01 15:49:06 -08:00
Spyros Trigazis 3f773f1fd0 Use existing templates for cluster-update command
Cluster update was used for scaling operations only,
but if the heat-temaplates where changed for any reason
(eg upgrade of the magnum server), the stack update command
was destructive.

This patch uses the existing parameter in the stack update call.

story: 1722573
task: 21583

Change-Id: Id84e5d878b21c908021e631514c2c58b3fe8b8b0
2018-09-24 11:17:02 +02:00
Ricardo Rocha c57bc86384 Deprecate usage of tenant and user in context
Update usage of tenant to project_id and user to user_id when handling context
fields. This drops deprecation warnings.

Change-Id: I8001be34bcc25678ed99b6b6717ad170ae6d2d77
2018-02-06 14:00:43 +00:00
Ricardo Rocha 84006f63d7 Allow flavor_id on cluster create
Add flavor_id as an option during cluster create. If not given,
the default is taken from the cluster template.

Add flavor_id in the Cluster object and use that instead
of the one from ClusterTemplate.

Update both magnum and magnum cli documentation to reflect the above changes.

Partial-Bug: #1699245
Change-Id: Ib60c05cce1cf2639ca4740abdd264403033433f9
2017-12-15 16:32:40 +00:00
Ricardo Rocha 446b159349 Allow master_flavor_id on cluster create
Add master_flavor_id as an option during cluster create. If not given,
the default is taken from the cluster template.

Add master_flavor_id in the Cluster object and use that instead
of the one from ClusterTemplate.

Update both magnum and magnum cli documentation to reflect the above changes.

Partial-Bug: #1699247
Change-Id: Id1d973167b381538121583a0a9691304b39e98de
2017-09-27 09:30:18 +00:00
Ricardo Rocha 3d04ed4cbb Allow labels on cluster create
Add labels as an option during cluster create. If not given,
the default is taken from the cluster template.

Add labels in the Cluster object and use that instead
of the one from ClusterTemplate.

Update both magnum and magnum cli documentation to reflect the above changes.

Partial-Bug: #1697651
Implements: blueprint flatten-attributes
Change-Id: I8990c78433dcbbca5bc4aa121678b02636346802
2017-08-21 12:27:52 +00:00
Ricardo Rocha 79039bb419 Allow docker_volume_size on cluster create
Add docker_volume_size as an option during cluster create. If not given,
the default is taken from the cluster template.

Add docker_volume_size in the Cluster object and use that instead
of the one from ClusterTemplate.

Update both magnum and magnum cli documentation to reflect the above changes.

Partial-Bug: #1697648
Implements: blueprint flatten-attributes
Change-Id: Ic6d77e6fdf5b068fa5319b238f4fd98b4d499be4
2017-06-23 11:31:27 +00:00
Mathieu Velten 22fb89a6e1 Make private network optional
If a fixed_network and fixed_subnet is specified no private network
is created by the templates and the specified network is
used instead for VMs provisioning, like in the Ironic driver.

Currently missing is the code to handle the use case where you
specify a fixed_network but not a fixed_subnet, this will come
in a following patch.

Partially Implements: blueprint decouple-private-network
Change-Id: I2003eb709b22b905063d846eb71570fc5e033618
2017-01-09 20:14:44 +01:00
Randall Burt 7890725c52 Refactor driver interface (pt 1)
Refactor driver interface to encapsulate the orchestration
strategy. This first patch only refactors the main driver
operations. A follow-on will handle the state synchronization
and removing the poller from the conductor.

1. Make driver interface abstract
2. Move external cluster operations into driver interface
3. Make Heat-based driver abstract and update based on
   driver interface changes
4. Move Heat driver code into its own module
5. Update existing Heat drivers based on interface changes

Change-Id: Icfa72e27dc496862d950ac608885567c911f47f2
Partial-Blueprint: bp-driver-consolodation
2016-12-01 09:23:46 -06:00
murali allada 104501cfe6 Cluster Drivers
- Dynamically load drivers using stevedore
- Changed the entry points to reference drivers instead of
  template definitions
- Implement Create and update driver operations

Change-Id: I5c3259404c796e1935c872cf3109ffecae3cee02
Partially-Implements: blueprint bay-drivers
2016-10-06 08:57:52 -05:00
Jaycen Grant 729c2d0ab4 Rename Bay DB, Object, and internal usage to Cluster
This is patch 3 of 3 to change the internal usage of the terms
Bay and BayModel.  This patch updates Bay to Cluster in DB and
Object as well as all the usages.  No functionality should be
changed by this patch, just naming and db updates.

Change-Id: Ife04b0f944ded03ca932d70e09e6766d09cf5d9f
Implements: blueprint rename-bay-to-cluster
2016-09-08 13:01:12 -07:00
Stephen Watson 2c9378dbd4 Updates drivers from BayModel to ClusterTemplate
Moves magnum.drivers from using Baymodel to ClusterTemplate naming to align
with bay to cluster blueprint.
First part of the rest of magnum.drivers update, with the next part renaming
Bay to Cluster.

Change-Id: I34c5a8bb2b2617b9a057cf7063d4749fa5a39f58
Implements: blueprint rename-bay-to-cluster
2016-09-01 21:54:38 +00:00
Jenkins 5258fddf9d Merge "Include version info in bay/cluster show operation" 2016-08-31 19:15:49 +00:00
Jenkins e7413d102a Merge "Revert "Update mesos slave to mesos agent"" 2016-08-31 15:23:37 +00:00
Vijendar Komalla 50bc376c4d Include version info in bay/cluster show operation
Currently bay-show operation does not return bay/cluster
version information. This change contain changes to return
bay/cluster version and container version info.

Change-Id: Ie12b6583e6d85faa3607f87295c04d72698034a5
Closes-Bug: #1613413
2016-08-31 09:39:42 -05:00
yatin 272903ff9e Revert "Update mesos slave to mesos agent"
This reverts commit 15162ce33a.

Mesos services were not working, so reverted the patch
which renamed slave to agent.

Change-Id: I94a9a36e649f48f8e31386226226261ef459ce25
Closes-Bug: #1617407
2016-08-30 08:49:45 +05:30
OTSUKA, Yuanying b4b32267c6 Make templates env path be const variable
"../../common/templates/environments/" path seems to be redundant
in each drivers.
So it should be const variable.

Change-Id: I5cbd30e350c861b611b327a4dda3f92a6316e45b
Closes-Bug: #1616259
2016-08-24 10:00:40 +09:00
Jerome Caffet 802f137aee Revert "Use symlinks for common template files"
This reverts commit 748cf13182.
This commit breaks to setup.py install phase.

Closes-Bug: #1615026
Change-Id: Ie29a723319775e1becff5a6099cb58e3541e399c
2016-08-19 18:07:03 +00:00
Drago Rosson 748cf13182 Use symlinks for common template files
This patch establishes a convention of using a symlink named "common" in
drivers/{driver}/templates/ that points to drivers/common/templates/.
This has two benefits. First, it lowers the burden of forking a driver
by allowing drivers/common/templates/ to be copied over the symlink,
rather than having to update all of the paths in the templates and
driver code.  Second, it shortens the paths used, which makes things
cleaner.

Change-Id: I9176ec03905d0a87a43ba6bedf1f768b2b316125
Partially-implements: blueprint bay-drivers
2016-08-10 11:34:24 -05:00
Drago Rosson cff9ef524d De-duplicate the decouple-LBaaS-related files
The ApiGatewaySwitcher child template and the environment files that
enable/disable the master load balancer are identical across the bay
drivers that use them. This patch pulls them into the common directory.

Change-Id: I3c34df57f3c6487747ad896444075bf6a22725e5
Partially-Implements: blueprint decouple-lbaas
2016-07-26 23:11:47 +05:30
Rajiv Kumar 15162ce33a Update mesos slave to mesos agent
Mesos community has renamed slave to agent. This change reflect
this renaming in the code.

Change-Id: Ic97a827345b62f812ed63180cd1f5820e2200682
Closes-Bug: #1516188
2016-07-18 08:51:17 +05:30
Drago Rosson f71968f01d Allow mesos cluster without LBaaS
This patch modifies the mesos bay driver/templates to allow its LBaaS
resources to be conditionally enabled/disabled.

Change-Id: I99e3b4a549e23b15db99ad91b5bb084c34771834
Partially-Implements: blueprint decouple-lbaas
2016-07-13 16:36:14 +00:00
Spyros Trigazis 242cbe00da Mesos-Ubuntu bay driver implementation
Moves templates and template_definitions to the new
directory structure.

Change-Id: I42e4d2bd056f3d8082ef51ef599d917f2fe82960
Paritially-Implements: blueprint bay-drivers
2016-07-06 21:50:14 +02:00