Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.9.0 release branch and qualifications #379

Merged
merged 29 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8289c28
fix bug#349 (#357)
Gevorg-Khachatryan-97 Jun 13, 2023
dc9a6a9
Fetch available IPs for network profiles in NDB (#346)
bhati-pradeep Jun 13, 2023
01811fd
Fix mismatch of virtual switch in subnet creation (#341)
bhati-pradeep Jun 13, 2023
c29f02c
fix for etcd min disk size (#356)
Gevorg-Khachatryan-97 Jun 13, 2023
676d2c8
Support multi-tiers target in application network security rule (#342)
bhati-pradeep Jun 13, 2023
cb111cb
Fix setting some configuration for cluster in foundation (#343)
bhati-pradeep Jun 13, 2023
7ad83e8
fix filters combination expression (#353)
bhati-pradeep Jun 13, 2023
9759445
Feat/karbon clusters update (#351)
Gevorg-Khachatryan-97 Jun 13, 2023
1ade245
fix tests
alaa-bish Jun 14, 2023
450edeb
NDB tags info module (#348)
bhati-pradeep Jun 14, 2023
99ba207
Add nutanix open source support info in read me
bhati-pradeep Jun 14, 2023
d7805e7
Enable karbon tests
bhati-pradeep Jun 14, 2023
1d0c8ba
Enable PC setup
bhati-pradeep Jun 14, 2023
70fbdf7
Disable NDB tests
bhati-pradeep Jun 15, 2023
58c6ece
Merge branch 'main' into release/1.9.0
alaa-bish Jun 20, 2023
3d63009
set validate_certs
alaa-bish Jun 20, 2023
7802123
Delete user group post projects test for cleanup. Skip IDP tests
bhati-pradeep Jun 21, 2023
0743710
fix tests
alaa-bish Jun 21, 2023
572c424
Merge branch 'release/1.9.0' of https://github.com/nutanix/nutanix.an…
alaa-bish Jun 21, 2023
e04bff7
Minor test fix
bhati-pradeep Jun 22, 2023
2e6fa61
Fix sanity
bhati-pradeep Jun 22, 2023
9cd0502
Add docs and release notes. Add sanity tests for NDB and Foundation a…
bhati-pradeep Jun 23, 2023
825a591
sanity fixes
bhati-pradeep Jun 23, 2023
92f178e
Add docs for karbon new module and minor fixes
bhati-pradeep Jun 23, 2023
0442b35
sanity fixes
bhati-pradeep Jun 23, 2023
72dca49
fix sanity
bhati-pradeep Jun 23, 2023
5e1344f
Disable netwoek segmentation in foundation sanity tests
bhati-pradeep Jun 23, 2023
37e02ac
Skip Liquid syntax checks for conflicting ansible playbook code
bhati-pradeep Jun 27, 2023
327deb0
Update release dates
bhati-pradeep Jul 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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