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

Add MSSQLServer Volume Expansion Doc #704

Merged
merged 4 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: ops.kubedb.com/v1alpha1
kind: MSSQLServerOpsRequest
metadata:
name: mops-volume-exp-ag-cluster
namespace: demo
spec:
type: VolumeExpansion
databaseRef:
name: mssqlserver-ag-cluster
volumeExpansion:
mode: "Offline" # Online
mssqlserver: 2Gi
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: kubedb.com/v1alpha2
kind: MSSQLServer
metadata:
name: mssqlserver-ag-cluster
namespace: demo
spec:
version: "2022-cu12"
replicas: 3
topology:
mode: AvailabilityGroup
availabilityGroup:
databases:
- agdb1
- agdb2
internalAuth:
endpointCert:
issuerRef:
apiGroup: cert-manager.io
name: mssqlserver-ca-issuer
kind: Issuer
tls:
issuerRef:
name: mssqlserver-ca-issuer
kind: Issuer
apiGroup: "cert-manager.io"
clientTLS: false
storageType: Durable
storage:
storageClassName: "longhorn"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
deletionPolicy: WipeOut
4 changes: 2 additions & 2 deletions docs/guides/mssqlserver/clustering/ag_cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,6 @@ If you are just testing some basic functionalities, you might want to avoid addi
## Next Steps

- Learn about [backup and restore](/docs/guides/mssqlserver/backup/overview/index.md) SQL Server using KubeStash.
- Want to set up SQL Server Availability Group clusters? Check how to [Configure SQL Server Availability Gruop Cluster](/docs/guides/mssqlserver/clustering/ag_cluster.md)
- Detail concepts of [MSSQLServer object](/docs/guides/mssqlserver/concepts/mssqlserver.md).
- Want to set up SQL Server Availability Group clusters? Check how to [Configure SQL Server Availability Group Cluster](/docs/guides/mssqlserver/clustering/ag_cluster.md)
- Detail concepts of [MSSQLServer Object](/docs/guides/mssqlserver/concepts/mssqlserver.md).
- Want to hack on KubeDB? Check our [contribution guidelines](/docs/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion docs/guides/mssqlserver/tls/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Read about the fields in details from [MSSQLServer Concepts](/docs/guides/mssqls
The following figure shows how `KubeDB` used to configure TLS/SSL in MSSQLServer. Open the image in a new tab to see the enlarged version.

<figure align="center">
<img alt="Deploy MSSQLServer with TLS/SSL" src="/docs/images/day-2-operation/mssqlserver/ms-tls.svg">
<img alt="Deploy MSSQLServer with TLS/SSL" src="/docs/images/day-2-operation/mssqlserver/ms-tls.png">
<figcaption align="center">Fig: Deploy MSSQLServer with TLS/SSL</figcaption>
</figure>

Expand Down
10 changes: 10 additions & 0 deletions docs/guides/mssqlserver/volume-expansion/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: Volume Expansion
menu:
docs_{{ .version }}:
identifier: ms-volume-expansion
name: Volume Expansion
parent: guides-mssqlserver
weight: 42
menu_name: docs_{{ .version }}
---
57 changes: 57 additions & 0 deletions docs/guides/mssqlserver/volume-expansion/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: MSSQLServer Volume Expansion Overview
menu:
docs_{{ .version }}:
identifier: ms-volume-expansion-overview
name: Overview
parent: ms-volume-expansion
weight: 10
menu_name: docs_{{ .version }}
section_menu_id: guides
---

> New to KubeDB? Please start [here](/docs/README.md).

# MSSQLServer Volume Expansion

This guide will give an overview on how KubeDB Ops Manager expand the volume of `MSSQLServer`.

## Before You Begin

- You should be familiar with the following `KubeDB` concepts:
- [MSSQLServer](/docs/guides/mssqlserver/concepts/mssqlserver.md)
- [MSSQLServerOpsRequest](/docs/guides/mssqlserver/concepts/opsrequest.md)
Neaj-Morshad-101 marked this conversation as resolved.
Show resolved Hide resolved

## How Volume Expansion Process Works

The following diagram shows how KubeDB Ops Manager expand the volumes of `MSSQLServer` database components. Open the image in a new tab to see the enlarged version.

<figure align="center">
  <img alt="Volume Expansion process of MSSQLServer" src="/docs/images/day-2-operation/mssqlserver/ms-volume-expansion.png">
<figcaption align="center">Fig: Volume Expansion process of MSSQLServer</figcaption>
</figure>

Neaj-Morshad-101 marked this conversation as resolved.
Show resolved Hide resolved
The Volume Expansion process consists of the following steps:

1. At first, a user creates a `MSSQLServer` Custom Resource (CR).

2. `KubeDB` Provisioner operator watches the `MSSQLServer` CR.

3. When the operator finds a `MSSQLServer` CR, it creates required `PetSet` and related necessary stuff like secrets, services, etc.

4. The petSet creates Persistent Volumes according to the Volume Claim Template provided in the petset configuration. This Persistent Volume will be expanded by the `KubeDB` Ops-manager operator.

5. Then, in order to expand the volume of the `MSSQLServer` database the user creates a `MSSQLServerOpsRequest` CR with desired information.

6. `KubeDB` Ops-manager operator watches the `MSSQLServerOpsRequest` CR.

7. When it finds a `MSSQLServerOpsRequest` CR, it pauses the `MSSQLServer` object which is referred from the `MSSQLServerOpsRequest`. So, the `KubeDB` Provisioner operator doesn't perform any operations on the `MSSQLServer` object during the volume expansion process.

8. Then the `KubeDB` Ops-manager operator will expand the persistent volume to reach the expected size defined in the `MSSQLServerOpsRequest` CR.

9. After the successful expansion of the volume of the related PetSet Pods, the `KubeDB` Ops-manager operator updates the new volume size in the `MSSQLServer` object to reflect the updated state.

10. After the successful Volume Expansion of the `MSSQLServer`, the `KubeDB` Ops-manager operator resumes the `MSSQLServer` object so that the `KubeDB` Provisioner operator resumes its usual operations.

In the next docs, we are going to show a step-by-step guide on Volume Expansion of various MSSQLServer database using `MSSQLServerOpsRequest` CRD.
Neaj-Morshad-101 marked this conversation as resolved.
Show resolved Hide resolved

Loading
Loading