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

New MRS v2 cluster resource #1324

Merged
merged 2 commits into from
Jul 31, 2021
Merged

New MRS v2 cluster resource #1324

merged 2 commits into from
Jul 31, 2021

Conversation

Lance52259
Copy link
Collaborator

@Lance52259 Lance52259 commented Jul 30, 2021

What this PR does / why we need it:
Compared with the V1 version of the cluster, the V2 version have a more user-friendly parameter structure, and supports enterprise project ID and node expansion and contraction.

Which issue this PR fixes:
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)
fixes #1149 #1306

Special notes for your reviewer:

Release note:

1. New cluster resource support:
    a. support master, core and task nodes management
    b. support resize core groups for core and task group
2. Related document support.
3. Related acc test support (except for the failure of the ANALYSIS cluster due to the security group rule port 9022 error).

PR Checklist

  • Tests added/passed.
  • Documentation updated.
  • Schema updated.

Acceptance Steps Performed

basic test

make testacc
TEST='./huaweicloud/services/acceptance/mrs' TESTARGS='-run=TestAccMrsMapReduceCluster_basic'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/mrs -v -run=TestAccMrsMapReduceCluster_basic -timeout 360m -parallel 4
=== RUN   TestAccMrsMapReduceCluster_basic
=== PAUSE TestAccMrsMapReduceCluster_basic
=== CONT  TestAccMrsMapReduceCluster_basic
--- PASS: TestAccMrsMapReduceCluster_basic (1352.10s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/mrs1352.177s

with keypair

make testacc 
TEST='./huaweicloud/services/acceptance/mrs' TESTARGS='-run=TestAccMrsMapReduceCluster_keypair'
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./huaweicloud/services/acceptance/mrs -v -run=TestAccMrsMapReduceCluster_keypair -timeout 360m -parallel 4
=== RUN   TestAccMrsMapReduceCluster_keypair
=== PAUSE TestAccMrsMapReduceCluster_keypair
=== CONT  TestAccMrsMapReduceCluster_keypair
--- PASS: TestAccMrsMapReduceCluster_keypair (727.97s)
PASS
ok      github.com/huaweicloud/terraform-provider-huaweicloud/huaweicloud/services/acceptance/mrs 728.042s

@Lance52259 Lance52259 mentioned this pull request Jul 30, 2021
- support master, core and task nodes management
- support resize core groups for core and task group
Comment on lines 15 to 16
"github.com/huaweicloud/golangsdk/openstack/mrs/v1/cluster"
"github.com/huaweicloud/golangsdk/openstack/mrs/v2/clusters"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as we used both v1 and v2 packages, suggest to give an alias for one of them

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The v2 sdk use clusterV2 as an alias now.

Type: schema.TypeString,
Computed: true,
},
"external_ip": {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public_ip?

Copy link
Collaborator Author

@Lance52259 Lance52259 Jul 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not public IP, it's a external IP for MRS managent page and the external_ip has been removed.

docs/resources/mapreduce_cluster.md Outdated Show resolved Hide resolved
docs/resources/mapreduce_cluster.md Show resolved Hide resolved
* `subnet_id` - (Required, String, ForceNew) Specifies the network ID of a subnet.
Changing this will create a new MapReduce cluster resource.

-> **NOTE:** The duplication of subnet CIDR will cause the MRS cluster creation to fail.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we create a subent with duplication CIDR?

Copy link
Collaborator Author

@Lance52259 Lance52259 Jul 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the description has been removed.

Comment on lines 315 to 318
* `external_ip` - The external IP address.
* `private_ip` - The preferred private IP address.
* `internal_ip` - The internal IP address.
* `external_alternate_ip` - IP address of a Master node.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the differents between xx_ip ?

Copy link
Collaborator Author

@Lance52259 Lance52259 Jul 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The private_ip is the virtual ip of the HA master node of the master node group.
The external_ip, external_alternate_ip and internal_ip are not used, has been removed.

docs/resources/mapreduce_cluster.md Show resolved Hide resolved
@Lance52259 Lance52259 mentioned this pull request Jul 30, 2021
3 tasks
@ShiChangkuo ShiChangkuo merged commit 3071043 into huaweicloud:master Jul 31, 2021
@Lance52259 Lance52259 deleted the br_mrs_cluster_active branch August 31, 2021 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plan for MRS v2
2 participants