From d63a92f1e1938d9a176c86cec60fa468c15c196c Mon Sep 17 00:00:00 2001 From: Neaj Morshad Date: Fri, 15 Nov 2024 11:13:03 +0600 Subject: [PATCH] Update SQL Server yamls and doc (#710) Signed-off-by: Neaj Morshad --- .../ag-cluster/mssqlserver-ag-cluster.yaml | 15 +++-- .../compute/mssqlserver-ag-cluster.yaml | 11 ++-- .../storage/mssqlserver-ag-cluster.yaml | 11 ++-- .../custom-config-podtemplate.yaml | 2 + .../configuration/mssql-custom-config.yaml | 9 +++ .../monitoring/mssql-monitoring.yaml | 9 +++ .../quickstart/mssqlserver-quickstart.yaml | 9 +++ .../restart/mssqlserver-ag-cluster.yaml | 15 +++-- .../horizontal-scaling/mssql-ag-cluster.yaml | 11 ++-- .../vertical-scaling/mssql-ag-cluster.yaml | 11 ++-- .../vertical-scaling/mssql-standalone.yaml | 9 +++ .../standalone/mssqlserver-standalone.yaml | 9 +++ .../mssqlserver/tls/mssql-ag-tls.yaml | 15 +++-- .../mssqlserver/tls/mssql-standalone-tls.yaml | 9 +++ .../mssqlserver-ag-cluster.yaml | 15 +++-- .../mssqlserver/autoscaler/compute/cluster.md | 11 ++-- .../mssqlserver/autoscaler/storage/cluster.md | 11 ++-- .../backup/application-level/index.md | 9 +++ .../examples/sample-mssqlserver-2.yaml | 15 +++-- .../mssqlserver/backup/auto-backup/index.md | 24 ++++++-- .../common/sample-mssqlserver.yaml | 15 +++-- .../mssqlserver/backup/logical/index.md | 18 ++++++ .../mssqlserver/clustering/ag_cluster.md | 52 +++++++---------- .../mssqlserver/clustering/standalone.md | 26 ++++++--- .../mssqlserver/concepts/mssqlserver.md | 56 +++++++++---------- .../configuration/using-config-file.md | 9 +++ .../configuration/using-podtemplate.md | 2 + .../monitoring/using-prometheus-operator.md | 9 +++ docs/guides/mssqlserver/pitr/archiver.md | 30 ++++++---- .../examples/restored-mssqlserver-ag.yaml | 15 +++-- .../pitr/examples/sample-mssqlserver-ag.yaml | 15 +++-- .../mssqlserver/quickstart/quickstart.md | 26 ++++++--- docs/guides/mssqlserver/restart/restart.md | 15 +++-- .../scaling/horizontal-scaling/mssqlserver.md | 11 ++-- .../scaling/vertical-scaling/ag_cluster.md | 13 ++--- .../scaling/vertical-scaling/standalone.md | 11 +++- docs/guides/mssqlserver/tls/ag_cluster.md | 16 ++++-- docs/guides/mssqlserver/tls/standalone.md | 9 +++ .../volume-expansion/volume-expansion.md | 15 +++-- .../redis/reconfigure-tls/standalone.md | 2 +- 40 files changed, 384 insertions(+), 211 deletions(-) diff --git a/docs/examples/mssqlserver/ag-cluster/mssqlserver-ag-cluster.yaml b/docs/examples/mssqlserver/ag-cluster/mssqlserver-ag-cluster.yaml index 12c229439e..2c8703c773 100644 --- a/docs/examples/mssqlserver/ag-cluster/mssqlserver-ag-cluster.yaml +++ b/docs/examples/mssqlserver/ag-cluster/mssqlserver-ag-cluster.yaml @@ -12,18 +12,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "standard" diff --git a/docs/examples/mssqlserver/autoscaler/compute/mssqlserver-ag-cluster.yaml b/docs/examples/mssqlserver/autoscaler/compute/mssqlserver-ag-cluster.yaml index c43e3b77d1..831359f858 100644 --- a/docs/examples/mssqlserver/autoscaler/compute/mssqlserver-ag-cluster.yaml +++ b/docs/examples/mssqlserver/autoscaler/compute/mssqlserver-ag-cluster.yaml @@ -12,12 +12,6 @@ spec: databases: - agdb1 - agdb2 - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -28,6 +22,11 @@ spec: spec: containers: - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it resources: requests: cpu: "500m" diff --git a/docs/examples/mssqlserver/autoscaler/storage/mssqlserver-ag-cluster.yaml b/docs/examples/mssqlserver/autoscaler/storage/mssqlserver-ag-cluster.yaml index c43e3b77d1..831359f858 100644 --- a/docs/examples/mssqlserver/autoscaler/storage/mssqlserver-ag-cluster.yaml +++ b/docs/examples/mssqlserver/autoscaler/storage/mssqlserver-ag-cluster.yaml @@ -12,12 +12,6 @@ spec: databases: - agdb1 - agdb2 - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -28,6 +22,11 @@ spec: spec: containers: - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it resources: requests: cpu: "500m" diff --git a/docs/examples/mssqlserver/configuration/custom-config-podtemplate.yaml b/docs/examples/mssqlserver/configuration/custom-config-podtemplate.yaml index 1edd1eec5e..42eb51783c 100644 --- a/docs/examples/mssqlserver/configuration/custom-config-podtemplate.yaml +++ b/docs/examples/mssqlserver/configuration/custom-config-podtemplate.yaml @@ -18,6 +18,8 @@ spec: containers: - name: mssql env: + - name: ACCEPT_EULA + value: "Y" - name: MSSQL_PID value: "Evaluation" - name: MSSQL_MEMORY_LIMIT_MB diff --git a/docs/examples/mssqlserver/configuration/mssql-custom-config.yaml b/docs/examples/mssqlserver/configuration/mssql-custom-config.yaml index 27c3dfc3be..2cf006c072 100644 --- a/docs/examples/mssqlserver/configuration/mssql-custom-config.yaml +++ b/docs/examples/mssqlserver/configuration/mssql-custom-config.yaml @@ -14,6 +14,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "standard" diff --git a/docs/examples/mssqlserver/monitoring/mssql-monitoring.yaml b/docs/examples/mssqlserver/monitoring/mssql-monitoring.yaml index da1027aa74..33bb444649 100644 --- a/docs/examples/mssqlserver/monitoring/mssql-monitoring.yaml +++ b/docs/examples/mssqlserver/monitoring/mssql-monitoring.yaml @@ -12,6 +12,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it monitor: agent: prometheus.io/operator prometheus: diff --git a/docs/examples/mssqlserver/quickstart/mssqlserver-quickstart.yaml b/docs/examples/mssqlserver/quickstart/mssqlserver-quickstart.yaml index 85bd21d1ae..1168922974 100644 --- a/docs/examples/mssqlserver/quickstart/mssqlserver-quickstart.yaml +++ b/docs/examples/mssqlserver/quickstart/mssqlserver-quickstart.yaml @@ -13,6 +13,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: storageClassName: "standard" accessModes: diff --git a/docs/examples/mssqlserver/restart/mssqlserver-ag-cluster.yaml b/docs/examples/mssqlserver/restart/mssqlserver-ag-cluster.yaml index 12c229439e..2c8703c773 100644 --- a/docs/examples/mssqlserver/restart/mssqlserver-ag-cluster.yaml +++ b/docs/examples/mssqlserver/restart/mssqlserver-ag-cluster.yaml @@ -12,18 +12,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "standard" diff --git a/docs/examples/mssqlserver/scaling/horizontal-scaling/mssql-ag-cluster.yaml b/docs/examples/mssqlserver/scaling/horizontal-scaling/mssql-ag-cluster.yaml index 449e0edf60..1dd21530bf 100644 --- a/docs/examples/mssqlserver/scaling/horizontal-scaling/mssql-ag-cluster.yaml +++ b/docs/examples/mssqlserver/scaling/horizontal-scaling/mssql-ag-cluster.yaml @@ -12,12 +12,6 @@ spec: databases: - agdb1 - agdb2 - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -28,6 +22,11 @@ spec: spec: containers: - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it resources: requests: cpu: "500m" diff --git a/docs/examples/mssqlserver/scaling/vertical-scaling/mssql-ag-cluster.yaml b/docs/examples/mssqlserver/scaling/vertical-scaling/mssql-ag-cluster.yaml index 1102b8f4fd..be70206cbc 100644 --- a/docs/examples/mssqlserver/scaling/vertical-scaling/mssql-ag-cluster.yaml +++ b/docs/examples/mssqlserver/scaling/vertical-scaling/mssql-ag-cluster.yaml @@ -12,12 +12,6 @@ spec: databases: - agdb1 - agdb2 - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -28,6 +22,11 @@ spec: spec: containers: - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it resources: requests: cpu: "500m" diff --git a/docs/examples/mssqlserver/scaling/vertical-scaling/mssql-standalone.yaml b/docs/examples/mssqlserver/scaling/vertical-scaling/mssql-standalone.yaml index 29629d28a1..0773f860ff 100644 --- a/docs/examples/mssqlserver/scaling/vertical-scaling/mssql-standalone.yaml +++ b/docs/examples/mssqlserver/scaling/vertical-scaling/mssql-standalone.yaml @@ -13,6 +13,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: storageClassName: "standard" accessModes: diff --git a/docs/examples/mssqlserver/standalone/mssqlserver-standalone.yaml b/docs/examples/mssqlserver/standalone/mssqlserver-standalone.yaml index aed2f4a6ac..091495232f 100644 --- a/docs/examples/mssqlserver/standalone/mssqlserver-standalone.yaml +++ b/docs/examples/mssqlserver/standalone/mssqlserver-standalone.yaml @@ -13,6 +13,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: storageClassName: "standard" accessModes: diff --git a/docs/examples/mssqlserver/tls/mssql-ag-tls.yaml b/docs/examples/mssqlserver/tls/mssql-ag-tls.yaml index 013eb80a30..1ff273b8c8 100644 --- a/docs/examples/mssqlserver/tls/mssql-ag-tls.yaml +++ b/docs/examples/mssqlserver/tls/mssql-ag-tls.yaml @@ -12,18 +12,21 @@ spec: 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: true + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "standard" diff --git a/docs/examples/mssqlserver/tls/mssql-standalone-tls.yaml b/docs/examples/mssqlserver/tls/mssql-standalone-tls.yaml index 50bf7f7b2a..5f115cb414 100644 --- a/docs/examples/mssqlserver/tls/mssql-standalone-tls.yaml +++ b/docs/examples/mssqlserver/tls/mssql-standalone-tls.yaml @@ -13,6 +13,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: true + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: storageClassName: "standard" accessModes: diff --git a/docs/examples/mssqlserver/volume-expansion/mssqlserver-ag-cluster.yaml b/docs/examples/mssqlserver/volume-expansion/mssqlserver-ag-cluster.yaml index c3f849b482..e3f32586c1 100644 --- a/docs/examples/mssqlserver/volume-expansion/mssqlserver-ag-cluster.yaml +++ b/docs/examples/mssqlserver/volume-expansion/mssqlserver-ag-cluster.yaml @@ -12,18 +12,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "longhorn" diff --git a/docs/guides/mssqlserver/autoscaler/compute/cluster.md b/docs/guides/mssqlserver/autoscaler/compute/cluster.md index 14bc5ddf97..bfc19f8c4f 100644 --- a/docs/guides/mssqlserver/autoscaler/compute/cluster.md +++ b/docs/guides/mssqlserver/autoscaler/compute/cluster.md @@ -96,12 +96,6 @@ spec: databases: - agdb1 - agdb2 - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -112,6 +106,11 @@ spec: spec: containers: - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it resources: requests: cpu: "500m" diff --git a/docs/guides/mssqlserver/autoscaler/storage/cluster.md b/docs/guides/mssqlserver/autoscaler/storage/cluster.md index f95cf858f8..b48551aa4f 100644 --- a/docs/guides/mssqlserver/autoscaler/storage/cluster.md +++ b/docs/guides/mssqlserver/autoscaler/storage/cluster.md @@ -114,12 +114,6 @@ spec: databases: - agdb1 - agdb2 - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -130,6 +124,11 @@ spec: spec: containers: - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it resources: requests: cpu: "500m" diff --git a/docs/guides/mssqlserver/backup/application-level/index.md b/docs/guides/mssqlserver/backup/application-level/index.md index 4bc211b149..b5c9c4f0b3 100644 --- a/docs/guides/mssqlserver/backup/application-level/index.md +++ b/docs/guides/mssqlserver/backup/application-level/index.md @@ -115,6 +115,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: accessModes: - ReadWriteOnce diff --git a/docs/guides/mssqlserver/backup/auto-backup/examples/sample-mssqlserver-2.yaml b/docs/guides/mssqlserver/backup/auto-backup/examples/sample-mssqlserver-2.yaml index 08b6ee8e4d..6d55c8cbfb 100644 --- a/docs/guides/mssqlserver/backup/auto-backup/examples/sample-mssqlserver-2.yaml +++ b/docs/guides/mssqlserver/backup/auto-backup/examples/sample-mssqlserver-2.yaml @@ -20,18 +20,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: accessModes: diff --git a/docs/guides/mssqlserver/backup/auto-backup/index.md b/docs/guides/mssqlserver/backup/auto-backup/index.md index a279524f59..168f4a9145 100644 --- a/docs/guides/mssqlserver/backup/auto-backup/index.md +++ b/docs/guides/mssqlserver/backup/auto-backup/index.md @@ -257,6 +257,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: accessModes: - ReadWriteOnce @@ -614,18 +623,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: accessModes: diff --git a/docs/guides/mssqlserver/backup/customization/common/sample-mssqlserver.yaml b/docs/guides/mssqlserver/backup/customization/common/sample-mssqlserver.yaml index 7d219df8a0..4d472cc70e 100644 --- a/docs/guides/mssqlserver/backup/customization/common/sample-mssqlserver.yaml +++ b/docs/guides/mssqlserver/backup/customization/common/sample-mssqlserver.yaml @@ -12,18 +12,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: accessModes: diff --git a/docs/guides/mssqlserver/backup/logical/index.md b/docs/guides/mssqlserver/backup/logical/index.md index 8d1d7c5622..c9e124c6a2 100644 --- a/docs/guides/mssqlserver/backup/logical/index.md +++ b/docs/guides/mssqlserver/backup/logical/index.md @@ -113,6 +113,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: accessModes: - ReadWriteOnce @@ -619,6 +628,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: accessModes: - ReadWriteOnce diff --git a/docs/guides/mssqlserver/clustering/ag_cluster.md b/docs/guides/mssqlserver/clustering/ag_cluster.md index 5d699968d0..e12581060a 100644 --- a/docs/guides/mssqlserver/clustering/ag_cluster.md +++ b/docs/guides/mssqlserver/clustering/ag_cluster.md @@ -92,6 +92,7 @@ issuer.cert-manager.io/mssqlserver-ca-issuer created ``` ### Configuring Environment Variables for SQL Server on Linux +You can use environment variables to configure SQL Server on Linux containers. When deploying `Microsoft SQL Server` on Linux using `containers`, you need to specify the `product edition` through the [MSSQL_PID](https://mcr.microsoft.com/en-us/product/mssql/server/about#configuration:~:text=MSSQL_PID%20is%20the,documentation%20here.) environment variable. This variable determines which `SQL Server edition` will run inside the container. The acceptable values for `MSSQL_PID` are: `Developer`: This will run the container using the Developer Edition (this is the default if no MSSQL_PID environment variable is supplied) `Express`: This will run the container using the Express Edition @@ -100,9 +101,11 @@ When deploying `Microsoft SQL Server` on Linux using `containers`, you need to s `EnterpriseCore`: This will run the container using the Enterprise Edition Core ``: This will run the container with the edition that is associated with the PID +`ACCEPT_EULA` confirms your acceptance of the [End-User Licensing Agreement](https://go.microsoft.com/fwlink/?linkid=857698). + For a complete list of environment variables that can be used, refer to the documentation [here](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-2017). -Below is an example of how to configure the `MSSQL_PID` environment variable in the KubeDB MSSQLServer Custom Resource Definition (CRD): +Below is an example of how to configure the `MSSQL_PID` and `ACCEPT_EULA` environment variable in the KubeDB MSSQLServer Custom Resource Definition (CRD): ```bash metadata: name: mssqlserver @@ -111,10 +114,12 @@ spec: podTemplate: spec: containers: - - name: mssql - env: - - name: MSSQL_PID - value: Enterprise + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Enterprise ``` In this example, the SQL Server container will run the Enterprise Edition. @@ -139,18 +144,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "standard" @@ -242,33 +250,11 @@ metadata: spec: authSecret: name: mssqlserver-ag-cluster-auth - coordinator: - resources: {} deletionPolicy: WipeOut healthChecker: failureThreshold: 1 periodSeconds: 10 timeoutSeconds: 10 - internalAuth: - endpointCert: - certificates: - - alias: endpoint - secretName: mssqlserver-ag-cluster-endpoint-cert - subject: - organizationalUnits: - - endpoint - organizations: - - kubedb - issuerRef: - apiGroup: cert-manager.io - kind: Issuer - name: mssqlserver-ca-issuer - leaderElection: - electionTick: 10 - heartbeatTick: 1 - period: 300ms - transferLeadershipInterval: 1s - transferLeadershipTimeout: 1m0s podTemplate: controller: {} metadata: {} diff --git a/docs/guides/mssqlserver/clustering/standalone.md b/docs/guides/mssqlserver/clustering/standalone.md index 0506eacfe0..daed13436e 100644 --- a/docs/guides/mssqlserver/clustering/standalone.md +++ b/docs/guides/mssqlserver/clustering/standalone.md @@ -94,6 +94,7 @@ issuer.cert-manager.io/mssqlserver-ca-issuer created ``` ### Configuring Environment Variables for SQL Server on Linux +You can use environment variables to configure SQL Server on Linux containers. When deploying `Microsoft SQL Server` on Linux using `containers`, you need to specify the `product edition` through the [MSSQL_PID](https://mcr.microsoft.com/en-us/product/mssql/server/about#configuration:~:text=MSSQL_PID%20is%20the,documentation%20here.) environment variable. This variable determines which `SQL Server edition` will run inside the container. The acceptable values for `MSSQL_PID` are: `Developer`: This will run the container using the Developer Edition (this is the default if no MSSQL_PID environment variable is supplied) `Express`: This will run the container using the Express Edition @@ -102,9 +103,11 @@ When deploying `Microsoft SQL Server` on Linux using `containers`, you need to s `EnterpriseCore`: This will run the container using the Enterprise Edition Core ``: This will run the container with the edition that is associated with the PID +`ACCEPT_EULA` confirms your acceptance of the [End-User Licensing Agreement](https://go.microsoft.com/fwlink/?linkid=857698). + For a complete list of environment variables that can be used, refer to the documentation [here](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-2017). -Below is an example of how to configure the `MSSQL_PID` environment variable in the KubeDB MSSQLServer Custom Resource Definition (CRD): +Below is an example of how to configure the `MSSQL_PID` and `ACCEPT_EULA` environment variable in the KubeDB MSSQLServer Custom Resource Definition (CRD): ```bash metadata: name: mssqlserver @@ -113,10 +116,12 @@ spec: podTemplate: spec: containers: - - name: mssql - env: - - name: MSSQL_PID - value: Enterprise + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Enterprise ``` In this example, the SQL Server container will run the Enterprise Edition. @@ -142,6 +147,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: storageClassName: "standard" accessModes: @@ -216,8 +230,6 @@ metadata: spec: authSecret: name: mssqlserver-standalone-auth - coordinator: - resources: {} deletionPolicy: WipeOut healthChecker: failureThreshold: 1 diff --git a/docs/guides/mssqlserver/concepts/mssqlserver.md b/docs/guides/mssqlserver/concepts/mssqlserver.md index 0b8d9beddd..549b569087 100644 --- a/docs/guides/mssqlserver/concepts/mssqlserver.md +++ b/docs/guides/mssqlserver/concepts/mssqlserver.md @@ -40,27 +40,13 @@ spec: databases: - agdb1 - agdb2 + leaderElection: + electionTick: 10 + heartbeatTick: 1 + period: 300ms + transferLeadershipInterval: 1s + transferLeadershipTimeout: 1m0s mode: AvailabilityGroup - internalAuth: - endpointCert: - certificates: - - alias: endpoint - secretName: mssqlserver-endpoint-cert - subject: - organizationalUnits: - - endpoint - organizations: - - kubedb - issuerRef: - apiGroup: cert-manager.io - kind: Issuer - name: mssqlserver-ca-issuer - leaderElection: - electionTick: 10 - heartbeatTick: 1 - period: 300ms - transferLeadershipInterval: 1s - transferLeadershipTimeout: 1m0s podTemplate: metadata: annotations: @@ -151,23 +137,30 @@ spec: tls: certificates: - alias: server + emailAddresses: + - dev@appscode.com secretName: mssqlserver-server-cert subject: organizationalUnits: - server organizations: - kubedb - emailAddresses: - - dev@appscode.com - alias: client + emailAddresses: + - abc@appscode.com secretName: mssqlserver-client-cert subject: organizationalUnits: - client organizations: - kubedb - emailAddresses: - - abc@appscode.com + - alias: endpoint + secretName: mssqlserver-endpoint-cert + subject: + organizationalUnits: + - endpoint + organizations: + - kubedb clientTLS: true issuerRef: apiGroup: cert-manager.io @@ -491,6 +484,7 @@ If you don't specify `spec.deletionPolicy` KubeDB uses `Delete` termination poli Indicates that the database is halted and all offshoot Kubernetes resources except PVCs are deleted. ### Configuring Environment Variables for SQL Server on Linux +You can use environment variables to configure SQL Server on Linux containers. When deploying `Microsoft SQL Server` on Linux using `containers`, you need to specify the `product edition` through the [MSSQL_PID](https://mcr.microsoft.com/en-us/product/mssql/server/about#configuration:~:text=MSSQL_PID%20is%20the,documentation%20here.) environment variable. This variable determines which `SQL Server edition` will run inside the container. The acceptable values for `MSSQL_PID` are: `Developer`: This will run the container using the Developer Edition (this is the default if no MSSQL_PID environment variable is supplied) `Express`: This will run the container using the Express Edition @@ -499,9 +493,11 @@ When deploying `Microsoft SQL Server` on Linux using `containers`, you need to s `EnterpriseCore`: This will run the container using the Enterprise Edition Core ``: This will run the container with the edition that is associated with the PID +`ACCEPT_EULA` confirms your acceptance of the [End-User Licensing Agreement](https://go.microsoft.com/fwlink/?linkid=857698). + For a complete list of environment variables that can be used, refer to the documentation [here](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-2017). -Below is an example of how to configure the `MSSQL_PID` environment variable in the KubeDB MSSQLServer Custom Resource Definition (CRD): +Below is an example of how to configure the `MSSQL_PID` and `ACCEPT_EULA` environment variable in the KubeDB MSSQLServer Custom Resource Definition (CRD): ```bash metadata: name: mssqlserver @@ -510,10 +506,12 @@ spec: podTemplate: spec: containers: - - name: mssql - env: - - name: MSSQL_PID - value: Enterprise + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Enterprise ``` In this example, the SQL Server container will run the Enterprise Edition. diff --git a/docs/guides/mssqlserver/configuration/using-config-file.md b/docs/guides/mssqlserver/configuration/using-config-file.md index 42e5b58327..e4d0158891 100644 --- a/docs/guides/mssqlserver/configuration/using-config-file.md +++ b/docs/guides/mssqlserver/configuration/using-config-file.md @@ -153,6 +153,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "standard" diff --git a/docs/guides/mssqlserver/configuration/using-podtemplate.md b/docs/guides/mssqlserver/configuration/using-podtemplate.md index 6e57a99f91..851bad2fea 100644 --- a/docs/guides/mssqlserver/configuration/using-podtemplate.md +++ b/docs/guides/mssqlserver/configuration/using-podtemplate.md @@ -141,6 +141,8 @@ spec: containers: - name: mssql env: + - name: ACCEPT_EULA + value: "Y" - name: MSSQL_PID value: "Evaluation" - name: MSSQL_MEMORY_LIMIT_MB diff --git a/docs/guides/mssqlserver/monitoring/using-prometheus-operator.md b/docs/guides/mssqlserver/monitoring/using-prometheus-operator.md index d19fac6b82..a11033e690 100644 --- a/docs/guides/mssqlserver/monitoring/using-prometheus-operator.md +++ b/docs/guides/mssqlserver/monitoring/using-prometheus-operator.md @@ -222,6 +222,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it monitor: agent: prometheus.io/operator prometheus: diff --git a/docs/guides/mssqlserver/pitr/archiver.md b/docs/guides/mssqlserver/pitr/archiver.md index 5df20f4170..abe560df34 100644 --- a/docs/guides/mssqlserver/pitr/archiver.md +++ b/docs/guides/mssqlserver/pitr/archiver.md @@ -261,18 +261,21 @@ spec: availabilityGroup: databases: - demo - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - kind: Issuer - name: mssqlserver-ca-issuer tls: issuerRef: apiGroup: cert-manager.io kind: Issuer name: mssqlserver-ca-issuer clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: accessModes: @@ -476,18 +479,21 @@ spec: replicas: 2 topology: mode: AvailabilityGroup - 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: accessModes: diff --git a/docs/guides/mssqlserver/pitr/examples/restored-mssqlserver-ag.yaml b/docs/guides/mssqlserver/pitr/examples/restored-mssqlserver-ag.yaml index 266de6e349..5439c7e1bb 100644 --- a/docs/guides/mssqlserver/pitr/examples/restored-mssqlserver-ag.yaml +++ b/docs/guides/mssqlserver/pitr/examples/restored-mssqlserver-ag.yaml @@ -19,12 +19,6 @@ spec: replicas: 2 topology: mode: AvailabilityGroup - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -32,6 +26,15 @@ spec: apiGroup: cert-manager.io clientTLS: false storageType: Durable + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: accessModes: - ReadWriteOnce diff --git a/docs/guides/mssqlserver/pitr/examples/sample-mssqlserver-ag.yaml b/docs/guides/mssqlserver/pitr/examples/sample-mssqlserver-ag.yaml index 006e21f008..8af7bffa95 100644 --- a/docs/guides/mssqlserver/pitr/examples/sample-mssqlserver-ag.yaml +++ b/docs/guides/mssqlserver/pitr/examples/sample-mssqlserver-ag.yaml @@ -19,18 +19,21 @@ spec: availabilityGroup: databases: - demo - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - kind: Issuer - name: mssqlserver-ca-issuer tls: issuerRef: apiGroup: cert-manager.io kind: Issuer name: mssqlserver-ca-issuer clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: accessModes: diff --git a/docs/guides/mssqlserver/quickstart/quickstart.md b/docs/guides/mssqlserver/quickstart/quickstart.md index 1ce678b8cd..85fcbfb5f7 100644 --- a/docs/guides/mssqlserver/quickstart/quickstart.md +++ b/docs/guides/mssqlserver/quickstart/quickstart.md @@ -97,6 +97,7 @@ issuer.cert-manager.io/mssqlserver-ca-issuer created ``` ### Configuring Environment Variables for SQL Server on Linux +You can use environment variables to configure SQL Server on Linux containers. When deploying `Microsoft SQL Server` on Linux using `containers`, you need to specify the `product edition` through the [MSSQL_PID](https://mcr.microsoft.com/en-us/product/mssql/server/about#configuration:~:text=MSSQL_PID%20is%20the,documentation%20here.) environment variable. This variable determines which `SQL Server edition` will run inside the container. The acceptable values for `MSSQL_PID` are: `Developer`: This will run the container using the Developer Edition (this is the default if no MSSQL_PID environment variable is supplied) `Express`: This will run the container using the Express Edition @@ -105,9 +106,11 @@ When deploying `Microsoft SQL Server` on Linux using `containers`, you need to s `EnterpriseCore`: This will run the container using the Enterprise Edition Core ``: This will run the container with the edition that is associated with the PID +`ACCEPT_EULA` confirms your acceptance of the [End-User Licensing Agreement](https://go.microsoft.com/fwlink/?linkid=857698). + For a complete list of environment variables that can be used, refer to the documentation [here](https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-2017). -Below is an example of how to configure the `MSSQL_PID` environment variable in the KubeDB MSSQLServer Custom Resource Definition (CRD): +Below is an example of how to configure the `MSSQL_PID` and `ACCEPT_EULA` environment variable in the KubeDB MSSQLServer Custom Resource Definition (CRD): ```bash metadata: name: mssqlserver @@ -116,10 +119,12 @@ spec: podTemplate: spec: containers: - - name: mssql - env: - - name: MSSQL_PID - value: Enterprise + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Enterprise ``` In this example, the SQL Server container will run the Enterprise Edition. @@ -146,6 +151,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: storageClassName: "standard" accessModes: @@ -220,8 +234,6 @@ metadata: spec: authSecret: name: mssqlserver-quickstart-auth - coordinator: - resources: {} deletionPolicy: WipeOut healthChecker: failureThreshold: 1 diff --git a/docs/guides/mssqlserver/restart/restart.md b/docs/guides/mssqlserver/restart/restart.md index 3f4832e76b..3912fa9c49 100644 --- a/docs/guides/mssqlserver/restart/restart.md +++ b/docs/guides/mssqlserver/restart/restart.md @@ -86,18 +86,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "standard" diff --git a/docs/guides/mssqlserver/scaling/horizontal-scaling/mssqlserver.md b/docs/guides/mssqlserver/scaling/horizontal-scaling/mssqlserver.md index d60e364ec6..a1f996f54d 100644 --- a/docs/guides/mssqlserver/scaling/horizontal-scaling/mssqlserver.md +++ b/docs/guides/mssqlserver/scaling/horizontal-scaling/mssqlserver.md @@ -113,12 +113,6 @@ spec: databases: - agdb1 - agdb2 - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -129,6 +123,11 @@ spec: spec: containers: - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it resources: requests: cpu: "500m" diff --git a/docs/guides/mssqlserver/scaling/vertical-scaling/ag_cluster.md b/docs/guides/mssqlserver/scaling/vertical-scaling/ag_cluster.md index 8867b49748..e0cec80c92 100644 --- a/docs/guides/mssqlserver/scaling/vertical-scaling/ag_cluster.md +++ b/docs/guides/mssqlserver/scaling/vertical-scaling/ag_cluster.md @@ -5,7 +5,7 @@ menu: identifier: ms-scaling-vertical-ag-cluster name: Availability Group (HA Cluster) parent: ms-scaling-vertical - weight: 20 + weight: 30 menu_name: docs_{{ .version }} section_menu_id: guides --- @@ -106,12 +106,6 @@ spec: databases: - agdb1 - agdb2 - internalAuth: - endpointCert: - issuerRef: - apiGroup: cert-manager.io - name: mssqlserver-ca-issuer - kind: Issuer tls: issuerRef: name: mssqlserver-ca-issuer @@ -122,6 +116,11 @@ spec: spec: containers: - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it resources: requests: cpu: "500m" diff --git a/docs/guides/mssqlserver/scaling/vertical-scaling/standalone.md b/docs/guides/mssqlserver/scaling/vertical-scaling/standalone.md index 72d97a6d9d..fd48803af2 100644 --- a/docs/guides/mssqlserver/scaling/vertical-scaling/standalone.md +++ b/docs/guides/mssqlserver/scaling/vertical-scaling/standalone.md @@ -107,6 +107,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: false + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: storageClassName: "standard" accessModes: @@ -320,13 +329,13 @@ Now, we are going to verify whether the resources of the mssqlserver instance ha $ kubectl get pod -n demo mssql-standalone-0 -o json | jq '.spec.containers[0].resources' { "limits": { - "cpu": "2", "memory": "5Gi" }, "requests": { "cpu": "1", "memory": "5Gi" } +} ``` The above output verifies that we have successfully scaled up the resources of the MSSQLServer. diff --git a/docs/guides/mssqlserver/tls/ag_cluster.md b/docs/guides/mssqlserver/tls/ag_cluster.md index f419b5ef49..394e42dbac 100644 --- a/docs/guides/mssqlserver/tls/ag_cluster.md +++ b/docs/guides/mssqlserver/tls/ag_cluster.md @@ -118,18 +118,21 @@ spec: 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: true + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "standard" @@ -204,6 +207,7 @@ Ng1DaJSNjZkgXXFX ```bash $ kubectl exec -it -n demo mssql-ag-tls-0 -c mssql -- bash +mssql@mssql-ag-tls-0:/$ /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Ng1DaJSNjZkgXXFX -N 1> select name from sys.databases 2> go name diff --git a/docs/guides/mssqlserver/tls/standalone.md b/docs/guides/mssqlserver/tls/standalone.md index 234364d9ec..536c15f37e 100644 --- a/docs/guides/mssqlserver/tls/standalone.md +++ b/docs/guides/mssqlserver/tls/standalone.md @@ -120,6 +120,15 @@ spec: kind: Issuer apiGroup: "cert-manager.io" clientTLS: true + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storage: storageClassName: "standard" accessModes: diff --git a/docs/guides/mssqlserver/volume-expansion/volume-expansion.md b/docs/guides/mssqlserver/volume-expansion/volume-expansion.md index cc2983f534..4bf7d105e2 100644 --- a/docs/guides/mssqlserver/volume-expansion/volume-expansion.md +++ b/docs/guides/mssqlserver/volume-expansion/volume-expansion.md @@ -112,18 +112,21 @@ spec: 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 + podTemplate: + spec: + containers: + - name: mssql + env: + - name: ACCEPT_EULA + value: "Y" + - name: MSSQL_PID + value: Evaluation # Change it storageType: Durable storage: storageClassName: "longhorn" diff --git a/docs/guides/redis/reconfigure-tls/standalone.md b/docs/guides/redis/reconfigure-tls/standalone.md index d67247f2a3..590165ee46 100644 --- a/docs/guides/redis/reconfigure-tls/standalone.md +++ b/docs/guides/redis/reconfigure-tls/standalone.md @@ -94,7 +94,7 @@ root@rd-sample-0:/data# We can verify from the above output that TLS is disabled for this database. -### Create Issuer/ StandaloneIssuer +### Create Issuer/ClusterIssuer Now, We are going to create an example `Issuer` that will be used to enable SSL/TLS in Redis. Alternatively, you can follow this [cert-manager tutorial](https://cert-manager.io/docs/configuration/ca/) to create your own `Issuer`.