-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MSSQLServer Volume Expansion Doc (#704)
Signed-off-by: Neaj Morshad <[email protected]>
- Loading branch information
1 parent
a322735
commit 1b408f7
Showing
10 changed files
with
386 additions
and
7 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
docs/examples/mssqlserver/volume-expansion/mops-volume-exp-ag-cluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
35 changes: 35 additions & 0 deletions
35
docs/examples/mssqlserver/volume-expansion/mssqlserver-ag-cluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
||
## 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> | ||
|
||
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. | ||
|
Oops, something went wrong.