Skip to content

Commit

Permalink
v1.9.0 release branch and qualifications (#379)
Browse files Browse the repository at this point in the history
* fix bug#349 (#357)

* fix bug#349

* fix

---------

Co-authored-by: alaa-bish <[email protected]>

* Fetch available IPs for network profiles in NDB (#346)

* Add available IPs in network profiles response as per flag

* doc fix

* isort fix

* sanity fix

* Fix mismatch of virtual switch in subnet creation (#341)

* Fix mismatch of virtual switch in subnet creation

* fix isort issues

* fix for etcd min disk size (#356)

* fix for etcd min disk size

* fix doc and tests

---------

Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1>
Co-authored-by: alaa-bish <[email protected]>

* Support multi-tiers target in application network security rule (#342)

* Change apptier to have multiple app tiers in app security policy

* Doc changes

* Doc changes

* flake8 fixes

* sanity fixes

* Fix setting some configuration for cluster in foundation (#343)

* Fix  cluster fields configuration issues

* lint fix

* fix filters combination expression (#353)

* Feat/karbon clusters update (#351)

* create and delete node pools

* separate node pools entity

* update functionality for nodes count and labels

* sanity fix

* functionality to get subnet by name

* fix defaults

* fix arguments

* fix for etcd min disk size

* Add integration tests

* fix bug#349

* sanity fix

* Revert "fix for etcd min disk size"

This reverts commit fb30a68.

* Revert "fix bug#349"

This reverts commit 9a30aa3.

* fixes

* fixes

* doc fix

* fixes to wait tasks completion

* fix tests

* fixes for update labels failure

* fix for black issue

* add tests

* fix

---------

Co-authored-by: Gevorg-Khachatryaan <Gevorg1050.1>
Co-authored-by: alaa-bish <[email protected]>

* fix tests

* NDB tags info module (#348)

* NDB tags info module with docs and tests

* Doc fix

* tags info doc fix

* Minor spelling changes

* Add nutanix open source support info in read me

* Enable karbon tests

* Enable PC setup

* Disable NDB tests

* set   validate_certs

* Delete user group post projects test for cleanup. Skip IDP tests

* fix tests

* Minor test fix

* Fix sanity

* Add docs and release notes. Add sanity tests for NDB and Foundation and enable their tests

* sanity fixes

* Add docs for karbon new module and minor fixes

* sanity fixes

* fix sanity

* Disable netwoek segmentation in foundation sanity tests

* Skip Liquid syntax checks for conflicting ansible playbook code

* Update release dates

---------

Co-authored-by: Gevorg Khachatryan <[email protected]>
Co-authored-by: alaa-bish <[email protected]>
  • Loading branch information
3 people authored Jul 11, 2023
1 parent 67013f5 commit 923e9c7
Show file tree
Hide file tree
Showing 129 changed files with 2,913 additions and 664 deletions.
25 changes: 24 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
## v1.8.0 (28 Feb 2022)
## v1.9.0 (11 July 2023)


**Improvements:**

- ntnx_profiles_info - [Impr] Develop ansible module for getting available IPs for given network profiles in NDB [\#345](https://github.com/nutanix/nutanix.ansible/issues/345)
- ntnx_security_rules - [Imprv] Flow Network Security Multi-Tier support in Security Policy definition [\#319](https://github.com/nutanix/nutanix.ansible/issues/319)

**Bugs:**

- info modules - [Bug] Multiple filters params are not considered for fetching entities in PC based info modules [[\#352](https://github.com/nutanix/nutanix.ansible/issues/352)]
- ntnx_foundation - [Bug] clusters parameters not being passed to Foundation Server in module nutanix.ncp.ntnx_foundation [[\#307](https://github.com/nutanix/nutanix.ansible/issues/307)]
- ntnx_karbon_clusters - [Bug] error in sample karbon/create_k8s_cluster.yml [[\#349](https://github.com/nutanix/nutanix.ansible/issues/349)]
- ntnx_karbon_clusters - [Bug] impossible to deploy NKE cluster with etcd using disk smaller than 120GB [[\#350](https://github.com/nutanix/nutanix.ansible/issues/350)]
- ntnx_subnets - [Bug] wrong virtual_switch selected in module ntnx_subnets [\#328](https://github.com/nutanix/nutanix.ansible/issues/328)

**New Modules:**

- ntnx_karbon_clusters_node_pools - Create,Update and Delete worker node pools with the provided configuration.
- ntnx_ndb_tags_info - info module for ndb tags info



## v1.8.0 (28 Feb 2023)

**Features**

Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,35 @@ Nutanix.Ncp Release Notes
.. contents:: Topics


v1.9.0
======

Minor Changes
-------------

- ntnx_profiles_info - [Impr] Develop ansible module for getting available IPs for given network profiles in NDB [\#345](https://github.com/nutanix/nutanix.ansible/issues/345)
- ntnx_security_rules - [Imprv] Flow Network Security Multi-Tier support in Security Policy definition [\#319](https://github.com/nutanix/nutanix.ansible/issues/319)

Deprecated Features
-------------------

- ntnx_security_rules - The ``apptier`` option in target group has been removed. New option called ``apptiers`` has been added to support multi tier policy.

Bugfixes
--------

- info modules - [Bug] Multiple filters params are not considered for fetching entities in PC based info modules [[\#352](https://github.com/nutanix/nutanix.ansible/issues/352)]
- ntnx_foundation - [Bug] clusters parameters not being passed to Foundation Server in module nutanix.ncp.ntnx_foundation [[\#307](https://github.com/nutanix/nutanix.ansible/issues/307)]
- ntnx_karbon_clusters - [Bug] error in sample karbon/create_k8s_cluster.yml [[\#349](https://github.com/nutanix/nutanix.ansible/issues/349)]
- ntnx_karbon_clusters - [Bug] impossible to deploy NKE cluster with etcd using disk smaller than 120GB [[\#350](https://github.com/nutanix/nutanix.ansible/issues/350)]
- ntnx_subnets - [Bug] wrong virtual_switch selected in module ntnx_subnets [\#328](https://github.com/nutanix/nutanix.ansible/issues/328)

New Modules
-----------

- ntnx_karbon_clusters_node_pools - Create,Update and Delete a worker node pools with the provided configuration.
- ntnx_ndb_tags_info - info module for ndb tags info

v1.8.0
======

Expand Down
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ It is designed keeping simplicity as the core value. Hence it is

Checkout this [blog](https://www.nutanix.dev/2022/08/05/getting-started-with-the-nutanix-ansible-module/) for getting started with nutanix ansible module.

## Support

Ansible Nutanix Provider leverages the community-supported model. See [Open Source Support](https://portal.nutanix.com/page/documents/kbs/details?targetId=kA07V000000LdWPSA0) for more information about its support policy.

# Version compatibility

## Ansible
Expand All @@ -33,14 +37,19 @@ This collection requires Python 2.7 or greater
> For the 1.7.0 release of the ansible plugin it will have N-2 compatibility with the Prism Central APIs. This release was tested against Prism Central versions pc.2022.6, pc.2022.4 and pc2022.1.0.2.
> For the 1.8.0-beta.1 release of the ansible plugin it will have N compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2022.6 .
> For the 1.8.0 release of the ansible plugin it will have N compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2022.6 .
> For the 1.9.0 release of the ansible plugin it will have N-1 compatibility with the Prism Central APIs. This release was tested against Prism Central version pc.2023.1 and pc.2023.1.0.1 .
### Notes:
1. Static routes module (ntnx_static_routes) is supported for PC versions >= pc.2022.1

2. Adding cluster references in projects module (ntnx_projects) is supported for PC versions >= pc.2022.1

3. For Users and User Groups modules (ntnx_users and ntnx_user_groups), adding Identity Provider (IdP) & Organizational Unit (OU) based users/groups are supported for PC versions >= pc.2022.1

4. ntnx_security_rules - The ``apptier`` option in target group has been removed. New option called ``apptiers`` has been added to support multi tier policy.

Prism Central based examples: https://github.com/nutanix/nutanix.ansible/tree/main/examples/

## Foundation
Expand All @@ -56,12 +65,15 @@ Foundation Central based examples : https://github.com/nutanix/nutanix.ansible/t
## Karbon
> For the 1.6.0 release of the ansible plugin, it will have N-2 compatibility with the Karbon. This release was tested against Karbon versions v2.3.0, v2.4.0 and v2.5.0
> For the 1.9.0 release of the ansible plugin, it was tested against Karbon versions v2.6.0, v2.7.0 and v2.8.0
Karbon based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/karbon

## Nutanix Database Service (ERA)
> For the 1.8.0-beta.1 release of the ansible plugin, it will have N-1 compatibility with the Nutanix Database Service (ERA). This release was tested against era versions v2.4.1 and v2.4.0

> For the 1.8.0 release of the ansible plugin, it will have N-1 compatibility with the Nutanix Database Service (ERA). This release was tested against era versions v2.5.0 and v2.5.1
> For the 1.8.0 release of the ansible plugin, it will have N-1 compatibility with the Nutanix Database Service (ERA). This release was tested against NDB versions v2.5.0 and v2.5.1
> For the 1.9.0 release of the ansible plugin, it was tested against NDB versions v2.5.0.2
NDB based examples : https://github.com/nutanix/nutanix.ansible/tree/main/examples/ndb

Expand Down Expand Up @@ -150,6 +162,7 @@ ansible-playbook examples/iaas/iaas.yml
| ntnx_image_placement_policies_info | List existing image placement policies. |
| ntnx_karbon_clusters | Create, Delete k8s clusters |
| ntnx_karbon_clusters_info | Get clusters info. |
| ntnx_karbon_clusters_node_pools | Update node pools of kubernetes cluster |
| ntnx_karbon_registries | Create, Delete a karbon private registry entry |
| ntnx_karbon_registries_info | Get karbon private registry registry info. |
| ntnx_pbrs | Create or delete a PBR. |
Expand Down Expand Up @@ -211,6 +224,7 @@ ansible-playbook examples/iaas/iaas.yml
| ntnx_ndb_stretched_vlans | Get stretched vlans inf in NDB |
| ntnx_ndb_time_machine_clusters | Manage clusters in NDB time machines |
| ntnx_ndb_tags | Create, update and delete tags |
| ntnx_ndb_tags_info | Get tags info |
| ntnx_ndb_database_clones | Create, update and delete database clones |
| ntnx_ndb_database_snapshots | Create, update and delete database snapshots |
| ntnx_ndb_database_clone_refresh | Perform database clone refresh |
Expand Down
30 changes: 30 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,33 @@ releases:
name: ntnx_ndb_time_machines_info
namespace: ''
release_date: '2022-10-20'
1.9.0:
changes:
bugfixes:
- info modules - [Bug] Multiple filters params are not considered for fetching
entities in PC based info modules [[\#352](https://github.com/nutanix/nutanix.ansible/issues/352)]
- ntnx_foundation - [Bug] clusters parameters not being passed to Foundation
Server in module nutanix.ncp.ntnx_foundation [[\#307](https://github.com/nutanix/nutanix.ansible/issues/307)]
- ntnx_karbon_clusters - [Bug] error in sample karbon/create_k8s_cluster.yml
[[\#349](https://github.com/nutanix/nutanix.ansible/issues/349)]
- ntnx_karbon_clusters - [Bug] impossible to deploy NKE cluster with etcd using
disk smaller than 120GB [[\#350](https://github.com/nutanix/nutanix.ansible/issues/350)]
- ntnx_subnets - [Bug] wrong virtual_switch selected in module ntnx_subnets
[\#328](https://github.com/nutanix/nutanix.ansible/issues/328)
deprecated_features:
- ntnx_security_rules - The ``apptier`` option in target group has been removed.
New option called ``apptiers`` has been added to support multi tier policy.
minor_changes:
- ntnx_profiles_info - [Impr] Develop ansible module for getting available IPs
for given network profiles in NDB [\#345](https://github.com/nutanix/nutanix.ansible/issues/345)
- ntnx_security_rules - [Imprv] Flow Network Security Multi-Tier support in
Security Policy definition [\#319](https://github.com/nutanix/nutanix.ansible/issues/319)
modules:
- description: Create,Update and Delete a worker node pools with the provided
configuration.
name: ntnx_karbon_clusters_node_pools
namespace: ''
- description: info module for ndb tags info
name: ntnx_ndb_tags_info
namespace: ''
release_date: '2023-07-11'
43 changes: 37 additions & 6 deletions examples/karbon/create_k8s_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
name: <subnet_name>
uuid: <subnet_uuid>
storage_class:
name: <container_name>
name: <storage_class_name>
storage_container:
name: <storage_container_name>
cni:
node_cidr_mask_size: 24
service_ipv4_cidr: "172.19.0.0/16"
Expand Down Expand Up @@ -53,9 +55,9 @@
nutanix_cluster_password: "{{nutanix_cluster_password}}"
nutanix_cluster_username: "{{nutanix_cluster_username}}"
default_storage_class: True
name: test-storage-class
name: "{{storage_class.name}}"
reclaim_policy: Delete
storage_container: "{{storage_class.name}}"
storage_container: "{{storage_container.name}}"
file_system: ext4
flash_mode: False
register: result
Expand Down Expand Up @@ -100,13 +102,42 @@
nutanix_cluster_password: "{{nutanix_cluster_password}}"
nutanix_cluster_username: "{{nutanix_cluster_username}}"
default_storage_class: True
name: test-storage-class
name: "{{storage_class.name}}"
reclaim_policy: Retain
storage_container: "{{storage_class.name}}"
storage_container: "{{storage_container.name}}"
file_system: xfs
flash_mode: true
register: result

- name: Create worker node pool with subnet uuid
ntnx_karbon_clusters_node_pools:
node_subnet:
uuid: "<uuid>"
node_pool_name: "{{karbon_name}}"
cluster_name: "{{cluster.name}}"
pool_config:
num_instances: 2
cpu: 4
memory_gb: 8
disk_gb: 120
register: result
ignore_errors: true

- name: update pool by increasing cpu,memory_gb,num_instances and add labels
ntnx_karbon_clusters_node_pools:
wait: True
node_pool_name: "{{karbon_name}}"
cluster_name: "{{cluster.name}}"
pool_config:
cpu: 6
memory_gb: 10
disk_gb: 150
num_instances: 4
add_labels:
property1: "test-property1"
register: result
ignore_errors: true

- name: create prod cluster
ntnx_karbon_clusters:
cluster:
Expand All @@ -126,7 +157,7 @@
nutanix_cluster_password: "{{nutanix_cluster_password}}"
nutanix_cluster_username: "{{nutanix_cluster_username}}"
default_storage_class: True
name: test-storage-class
name: "{{storage_class.name}}"
reclaim_policy: Delete
storage_container: "{{storage_container.name}}"
file_system: ext4
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace: "nutanix"
name: "ncp"
version: "1.8.0"
version: "1.9.0"
readme: "README.md"
authors:
- "Abhishek Chaudhary (@abhimutant)"
Expand Down
2 changes: 2 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ action_groups:
- ntnx_ndb_stretched_vlans
- ntnx_ndb_time_machine_clusters
- ntnx_ndb_tags
- ntnx_ndb_tags_info
- ntnx_ndb_database_clones
- ntnx_ndb_database_snapshots
- ntnx_ndb_database_clone_refresh
Expand All @@ -95,3 +96,4 @@ action_groups:
- ntnx_ndb_maintenance_window
- ntnx_ndb_maintenance_windows_info
- ntnx_ndb_slas
- ntnx_karbon_clusters_node_pools
2 changes: 1 addition & 1 deletion plugins/module_utils/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def unify_spec(self, spec1, spec2):

@staticmethod
def _parse_filters(filters):
return ",".join(map(lambda i: "{0}=={1}".format(i[0], i[1]), filters.items()))
return ";".join(map(lambda i: "{0}=={1}".format(i[0], i[1]), filters.items()))

@staticmethod
def _filter_entities(entities, custom_filters):
Expand Down
21 changes: 12 additions & 9 deletions plugins/module_utils/foundation/image_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,33 +111,36 @@ def _build_spec_blocks(self, payload, blocks):
payload["blocks"] = _blocks
return payload, None

def _build_spec_cluster(self, payload, param):
clusters = []
for cluster in param:
def _build_spec_cluster(self, payload, clusters):
cluster_specs = []
for cluster in clusters:
cluster_spec = self._get_default_cluster_spec(cluster)
cluster_spec["cluster_name"] = cluster.get("name")
cluster_spec["cluster_external_ip"] = cluster.get("cvm_vip", None)

if cluster_spec.get("cvm_ntp_servers"):
if cluster.get("cvm_ntp_servers"):
cluster_spec["cvm_ntp_servers"] = self._list2str(
cluster.get("cvm_ntp_servers")
)
if cluster_spec.get("cvm_dns_servers"):
if cluster.get("cvm_dns_servers"):
cluster_spec["cvm_dns_servers"] = self._list2str(
cluster.get("cvm_dns_servers")
)
if cluster_spec.get("hypervisor_ntp_servers"):
if cluster.get("hypervisor_ntp_servers"):
cluster_spec["hypervisor_ntp_servers"] = self._list2str(
cluster.get("hypervisor_ntp_servers")
)

if cluster.get("timezone"):
cluster_spec["timezone"] = cluster.get("timezone")

cluster_spec["cluster_members"] = cluster.get("cluster_members")

if len(cluster_spec["cluster_members"]) == 1:
if len(cluster["cluster_members"]) == 1:
cluster_spec["single_node_cluster"] = True

clusters.append(cluster_spec)
payload["clusters"] = clusters
cluster_specs.append(cluster_spec)
payload["clusters"] = cluster_specs
return payload, None

def _build_spec_hypervisor_iso(self, payload, value):
Expand Down
9 changes: 7 additions & 2 deletions plugins/module_utils/karbon/clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def validate_resources(resources, resource_type):
min_cpu = 4
min_memory = 8
min_disk_size = 120
min_etcd_disk_size = 40
err = "{0} cannot be less then {1}"
if (
resource_type == "master"
Expand All @@ -176,6 +177,10 @@ def validate_resources(resources, resource_type):
return None, err.format("cpu", min_cpu)
if resources["memory_gb"] < min_memory:
return None, err.format("memory_gb", min_memory)
if resources["disk_gb"] < min_disk_size:
return None, err.format("disk_gb", min_disk_size)
if resource_type == "etcd":
if resources["disk_gb"] < min_etcd_disk_size:
return None, err.format("disk_gb", min_etcd_disk_size)
else:
if resources["disk_gb"] < min_disk_size:
return None, err.format("disk_gb", min_disk_size)
return resources, None
Loading

0 comments on commit 923e9c7

Please sign in to comment.