Many database administrators (DBAs) tell me that one of the main reasons they run their Microsoft SQL Server instances on Red Hat Enterprise Linux (RHEL) is to reduce costs. The fact is, many SQL Server shops have a proliferation of smaller instances of Express and Standard editions in their environments.
With Red Hat Enterprise Linux, these instances can be consolidated onto a single RHEL system as containers, and with the new container licensing for SQL Server 2022 Standard Edition from Microsoft, there’s never been a better time to take advantage of this. Under the new pricing, Microsoft customers can license SQL Server Standard by virtual operating system environment (VM guest) and, as long as they have active Software Assurance from Microsoft, they can run an unlimited number of containers containing SQL Server within that virtual guest.
In this blog, we’ll learn how to set up an environment where DBAs take advantage of these savings by consolidating SQL Server containers and running them in a single host or virtual guest. In the past, DBAs might have achieved something similar with a technique known as instance stacking, where multiple instances of SQL Server were installed on the same Windows instance. We’ll be achieving the same thing by installing separate discrete containers on RHEL.
As with instance stacking, organizations with Software Assurance from Microsoft can still only pay for one license for SQL Server, still only have one operating system environment to pay for (this time a RHEL subscription), and (as with multi-instance) only have a single host OS to patch and maintain. So IT administrators and DBAs really do get all the advantages of a multi instance deployment.
So what’s better about taking the container approach? Three key points come to mind. First, performance tuning is easier, because it’s easier to dynamically assign CPU, networking and storage resources to discrete containers. Second, reboot planning can require less coordination, because in many cases we can update one container at a time without needing to reboot the entire system. Third, there are fewer potential security risks because administrators don’t need to give DBAs host system administration access to allow them control and manage their container environments.
It’s for this last reason that we’re going to demonstrate SQL Server container setup on RHEL with Podman in two parts. In the first part, as an IT administrator, we’re going to set up the host environment to more easily deploy and manage containers using the RHEL web console. This must be done as the system administrator (root) which is why we’re focusing on the IT administrator. We’re going to start off from the command line to make sure that our system is just generally ready to be a good container host.
If you’re a DBA without root access, stay tuned for my next blog where we’ll walk you through SQL Server container deployment. This only requires a basic user account on the system, one without administrative access. We’ll set that account up as part of the first phase, then we’ll use it to login to the graphical RHEL web console in the second, so that our SQL Server DBAs have an easy time of getting their applications up and running without requiring a lot of specific knowledge of Linux.
First, in order to use the RHEL web console to manage containers, we need to make sure that the software I’ll need is installed on the system.
We’ll use the dnf install command to make sure that cockpit and podman packages are installed:
$ sudo dnf install cockpit podman cockpit-podman tuned-profiles-mssql
There are several methods that can be used to connect to the web console, including Satellite integration with the web console, SSH access methods, or running the Cockpit web server on hosts. For more information on these options, refer to part 1 and part 2 of the blog series on connecting to the RHEL web console.
In this example, we’ll use the Cockpit web server, so we’ll enable the cockpit systemd socket with the following command:
$ sudo systemctl enable --now cockpit.socket
We then make sure that the RHEL Web Console cockpit service is enabled to open port 9090 with:
$ sudo firewall-cmd --add-service=cockpit --permanent $ sudo firewall-cmd --reload
Now we’ll add an account for the SQL Server DBA to be able to use when logging in to the RHEL system. In this example I call the account mssqldba:
$ sudo useradd mssqldba
We’ll also need to set up a password for the mssqldba account. When we run the passwd command as below, it will prompt us twice for a password. The passwords will not be displayed as they are typed in as seen below:
$ sudo passwd mssqldba Changing password for user msqldba New password: Retype new password: passwd: all authentication tokens updated successfully.
Next up we’ll enable lingering, to make sure that we’re able to restart end-user containers at boot time instead of at login time:
$ sudo loginctl enable-linger mssqldba
The linger capability we’ve enabled above provides a simple and easy way to get containers to restart without requiring system administrator access. Note that using linger for auto-starting containers may not work in some circumstances, such as when ecryptfs, NFS, or 2FA are used on a user account.
As a final step, we’ll want to tune our host so that we can get the best possible performance out of SQL Server. We do this using tuned-admin:
$ sudo tuned-adm profile mssql
At this point the mssqldba account we’ve created will be able to deploy and manage containers without root access. What’s more, because we’ve enabled the RHEL web console, they’ll be able to do this without needing a whole lot of knowledge about the Linux command line.
Stay tuned for the second blog in this series where we’ll walk you through how a DBA can deploy Microsoft SQL Server containers using the graphical experience of the Red Hat Enterprise Linux web console .
저자 소개
Louis Imershein is a Product Manager at Red Hat focussed on Microsoft SQL Server and database workloads. He is responsible for working with Microsoft and Red Hat engineering to ensure that SQL Server performance, management, and security is optimized for Red Hat platforms. For more than 30 years, Louis has worked in technical support, engineering, software architecture, and product management on a wide range of OS, management, security, and storage software projects. Louis joined Red Hat as part of the acquisition of Permabit Technology Corporation, where he was VP of Product.
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
오리지널 쇼
엔터프라이즈 기술 분야의 제작자와 리더가 전하는 흥미로운 스토리
제품
- Red Hat Enterprise Linux
- Red Hat OpenShift Enterprise
- Red Hat Ansible Automation Platform
- 클라우드 서비스
- 모든 제품 보기
툴
체험, 구매 & 영업
커뮤니케이션
Red Hat 소개
Red Hat은 Linux, 클라우드, 컨테이너, 쿠버네티스 등을 포함한 글로벌 엔터프라이즈 오픈소스 솔루션 공급업체입니다. Red Hat은 코어 데이터센터에서 네트워크 엣지에 이르기까지 다양한 플랫폼과 환경에서 기업의 업무 편의성을 높여 주는 강화된 기능의 솔루션을 제공합니다.