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

SqlServerProtocolTcpIp: New resource proposal #1378

Closed
johlju opened this issue Jun 17, 2019 · 2 comments · Fixed by #1517
Closed

SqlServerProtocolTcpIp: New resource proposal #1378

johlju opened this issue Jun 17, 2019 · 2 comments · Fixed by #1517
Labels
resource proposal The issue is proposing a new resource in the resource module.

Comments

@johlju
Copy link
Member

johlju commented Jun 17, 2019

Description

This resource should manage IP address groups.

IP Address groups are added depending on available network cards, see Adding or Removing IP Addresses. In my lab server I only have IP1-IP6 and IPAll. But in a test server with a cluster I have IP1-IP8 and IPAll.
So we cannot support adding and removing IP address groups, but I think we should support managing IP address groups with this resource. For that reason I see a need
for a IpAddressGroup parameter that is mentioned in the #339 (comment). The user can then choose which group should have which IP address, and if it should be enabled or not. This resource will most likely be used to change the IP addresses to different once that wasn't used during installation, or configure additional ones when network configuration changes.

It would be good to be able to support all these properties. The property Active seems to be read-only.
image

Proposed properties

[ClassVersion("1.0.0.0"), FriendlyName("SqlServerProtocolTcpIp")]
class MSFT_SqlServerProtocolTcpIp : OMI_BaseResource
{
    [Write, Description("The host name of the SQL Server to be configured. Default value is $env:COMPUTERNAME.")] String ServerName;
    [Key, Description("The name of the SQLf instance to be configured.")] String InstanceName;
    [Key, Description("The name of the IP address group in the TCP/IP protocol.")] String IpAddressGroup;
    [Write, Description("Enables or disables the IP address. Only used if the IP address group is not set to 'IPAll'. If not specified, the existing value will not be changed.")] Boolean Enabled;
    [Write, Description("The IP address. Only used if the IP address group is not set to 'IPAll'. If not specified, the existing value will not be changed.")] String IPAddress;
    [Write, Description("Specifies whether the SQL Server instance should use a dynamic port. Value will be ignored if TcpPort is set to a non-empty string. If not specified, the existing value will not be changed.")] Boolean TcpDynamicPort;
    [Write, Description("The TCP port(s) that SQL Server should be listening on. If the IP address should listen on more than one port, list all ports separated with a comma ('1433,1500,1501'). If not specified, the existing value will not be changed.")] String TcpPort;
    [Write, Description("If set to $true then SQL Server and dependent services will be restarted if a change to the configuration is made. The default value is $false.")] Boolean RestartService;
    [Write, Description("Timeout value for restarting the SQL Server services. The default value is 120 seconds.")] UInt16 RestartTimeout;
}

Special considerations or limitations

This is a redesign of the resource SqlServerNetwork and splitting it up into two new resources will simplify the code and therefore easier to maintain. This resource could be added side-by-side with SqlServerNetwork and together with SqlServerProtocol will deprecate the resource SqlServerNetwork.
This was discussed in closed PR #1045.

@johlju johlju added help wanted The issue is up for grabs for anyone in the community. resource proposal The issue is proposing a new resource in the resource module. labels Jun 17, 2019
@johlju
Copy link
Member Author

johlju commented Jun 17, 2019

There might be some code that can be reused in the closed PR #1045.

@johlju
Copy link
Member Author

johlju commented Apr 17, 2020

The are some code in #339 (comment) that can be used to get test data. Also this issue also closes issue #339.

@johlju johlju added in progress The issue is being actively worked on by someone. and removed help wanted The issue is up for grabs for anyone in the community. labels Apr 22, 2020
@johlju johlju added help wanted The issue is up for grabs for anyone in the community. and removed help wanted The issue is up for grabs for anyone in the community. labels Apr 29, 2020
johlju added a commit that referenced this issue May 5, 2020
- SqlServerDsc
  - Added new resource SqlServerProtocolTcpIp (issue #1378).
  - Changed to use the property `NuGetVersionV2` from GitVersion in the
    CI pipeline.
@johlju johlju removed the in progress The issue is being actively worked on by someone. label May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resource proposal The issue is proposing a new resource in the resource module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant