Difference between revisions of "Mssql"
Jump to navigation
Jump to search
Line 57: | Line 57: | ||
# Values.yaml | # Values.yaml | ||
− | non-stateful values.yaml - tag and password are changed from original | + | ## non-stateful values.yaml - tag and password are changed from original |
``` | ``` | ||
# Default values for mssql-latest. | # Default values for mssql-latest. | ||
Line 104: | Line 104: | ||
+ | ## stateful set values | ||
+ | ``` | ||
+ | # Default values for mssql-latest. | ||
+ | # This is a YAML-formatted file. | ||
+ | # Declare variables to be passed into your templates. | ||
+ | |||
+ | replicas: 3 | ||
+ | |||
+ | image: | ||
+ | repository: mcr.microsoft.com/mssql/server | ||
+ | pullPolicy: IfNotPresent | ||
+ | # Overrides the image tag whose default is the chart appVersion. | ||
+ | tag: "2019-latest" | ||
− | + | ACCEPT_EULA: | |
+ | value: "y" | ||
+ | MSSQL_PID: | ||
+ | value: "Developer" | ||
+ | MSSQL_AGENT_ENABLED: | ||
+ | value: "false" | ||
+ | |||
+ | containers: | ||
+ | ports: | ||
+ | containerPort: 1433 | ||
+ | |||
+ | podAnnotations: {} | ||
+ | |||
+ | podSecurityContext: | ||
+ | fsGroup: 10001 | ||
+ | |||
+ | service: | ||
+ | port: 1433 | ||
``` | ``` |
Revision as of 17:55, 10 March 2023
https://github.com/microsoft/mssql-docker/tree/master/linux/sample-helm-chart-statefulset-deployment
NS=mssql # envtpl --keep-template service.yaml.tpl kubectl config set-context --current --namespace=$NS git clone --depth=1 --branch=master https://github.com/microsoft/mssql-docker.git # cd mssql-docker/linux/sample-helm-chart/ cd mssql-docker/linux/sample-helm-chart-statefulset-deployment
update values.yaml
helm install mssql-latest-deploy . --set ACCEPT_EULA.value=Y --set MSSQL_PID.value=Developer
install sqlcmd on Debian/Ubuntu
#!/bin/bash set -eu apt-get install -y gnupg2 curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list apt-get update apt-get install mssql-tools unixodbc-dev echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc source ~/.bashrc
export MSSQLPASSWORD=PleaseChangeMe sqlcmd -S mssql-latest-deploy.mssql.svc,1433 -U SA -P ${MSSQLPASSWORD}
create database foo; go USE foo; go CREATE TABLE test ( name varchar(20) ); go insert into test (name) values ('footest1'); select * from test; go
Values.yaml
non-stateful values.yaml - tag and password are changed from original
# Default values for mssql-latest. # This is a YAML-formatted file. # Declare variables to be passed into your templates. replicas: 1 image: repository: mcr.microsoft.com/mssql/server pullPolicy: IfNotPresent tag: "2022-latest" ACCEPT_EULA: value: "y" MSSQL_PID: value: "Developer" MSSQL_AGENT_ENABLED: value: "true" hostname: mssqllatest sa_password: "PleaseChangeMe" containers: ports: containerPort: 1433 podAnnotations: {} podSecurityContext: fsGroup: 10001 service: type: LoadBalancer port: 1433 pvc: StorageClass: "managed-csi" userdbaccessMode: ReadWriteOnce userdbsize: 5Gi userlogaccessMode: ReadWriteOnce userlogsize: 5Gi tempdbaccessMode: ReadWriteOnce tempsize: 2Gi mssqldataaccessMode: ReadWriteOnce mssqldbsize: 2Gi
stateful set values
# Default values for mssql-latest. # This is a YAML-formatted file. # Declare variables to be passed into your templates. replicas: 3 image: repository: mcr.microsoft.com/mssql/server pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. tag: "2019-latest" ACCEPT_EULA: value: "y" MSSQL_PID: value: "Developer" MSSQL_AGENT_ENABLED: value: "false" containers: ports: containerPort: 1433 podAnnotations: {} podSecurityContext: fsGroup: 10001 service: port: 1433