성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] The Windows Registry Adventure #1: ...
[정성태] systemd for Developers I ; https:/...
[정성태] 엄밀히 object 타입의 인스턴스가 다른 타입으로 형변환 가능...
[정성태] 아래의 글에서 나오는 "Windows Application Pa...
[정성태] The history of calling conventions,...
[정성태] Secure and Deploy .NET Windows Form...
[정성태] Get Started with Milvus Vector DB i...
[정성태] cyberark/PipeViewer - A tool that...
[정성태] WinForms in a 64-Bit world – our st...
[정성태] 예제에서 SELECT_SQL도 내부적으로는 SqlCommand/...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>Azure - 리눅스 호스팅의 Site Extension 제작 방법</h1> <p> 지난 글을 통해 닷넷과 자바에 대한 Site Extension 제작에 대해 간략하게 설명했는데요,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Azure Web App 확장 예제 제작 ; <a target='tab' href='https://www.sysnet.pe.kr/2/0/11540'>https://www.sysnet.pe.kr/2/0/11540</a> Azure - Java Web App Service를 위한 Site Extension 제작 방법 ; <a target='tab' href='https://www.sysnet.pe.kr/2/0/12711'>https://www.sysnet.pe.kr/2/0/12711</a> </pre> <br /> 아쉽게도 리눅스 호스팅 환경에 대해서는 기존의 Site Extension 방식을 지원하지 않고 있습니다. 실제로 리눅스 호스팅의 Azure App Service 메뉴에는 "Extensions"가 회색 처리되어 나옵니다.<br /> <br /> <img alt='linux_site_ext_1.png' src='/SysWebRes/bbs/linux_site_ext_1.png' /><br /> <br /> (메뉴를 아주 빼진 않고 grayed out 처리했다는 것은 향후 지원할 의사가 있다는 것이겠죠? ^^)<br /> <br /> <hr style='width: 50%' /><br /> <br /> 그래도 특정 시나리오에서는 이를 해결하는 방법이 있는데요, 그것은 바로 (위의 그림에서도 볼 수 있는) SSH 연결로 들어가 Site Extension으로 해결해야 할 작업을 직접 구성할 수 있다는 것입니다.<br /> <br /> 아니... 그럼 그렇게 구성하는 경우 scale out 시 인스턴스가 늘어나면 새로운 인스턴스들은 그게 적용이 안 될 텐데요?<br /> <br /> 물론, 그게 전부라면 안 되는 것이 맞겠지만 Azure의 경우 리눅스에서 App Service를 호스팅하는 것은 내부적으로 docker container로 처리한다고 합니다. 그리고, App Service에서 SSH 연결로 들어가 작업하는 /home 디렉터리가 각각의 컨테이너별로 (아마도 볼륨으로) 공유됩니다. 실제로 SSH 접속 시 보이는 화면은 다음과 같은 메시지를 보여주며 시작합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > _____ / _ \ __________ _________ ____ / /_\ \___ / | \_ __ \_/ __ \ / | \/ /| | /| | \/\ ___/ \____|__ /_____ \____/ |__| \___ > \/ \/ \/ A P P S E R V I C E O N L I N U X Documentation: http://aka.ms/webapp-linux <span style='color: blue; font-weight: bold'>**NOTE**: No files or system changes outside of /home will persist beyond your application's current session. /home is your application's persistent storage and is shared across all the server instances.</span> 23ec1b86e7b3:/home# </pre> <br /> 따라서, 사실 Linux 호스팅 환경에서는 윈도우 환경처럼 "Site Extension"으로서 별도 웹 사이트를 구성하는 방식은 제공하지 않습니다. 단지, 해당 Extension이 내부적인 설치 과정 중에 App Service에 변경을 하는 식의 작업이 전부라면 SSH 연결로 /home 디렉터리에 직접 작업하는 것이 가능합니다.<br /> <br /> (제가 아직 테스트는 안 해봤지만 윈도우 호스팅에서의 d:\home 디렉터리도 아마 App Service의 scale out 발생 시 늘어나는 인스턴스 간에도 공유되는 걸로 알고 있습니다. 이건 나중에 테스트해 보고 다시 업데이트하겠습니다. ^^)<br /> <br /> <hr style='width: 50%' /><br /> <br /> 참고로, Azure에 App Service를 명시적으로 container로 배포하는 유형에 대한 문서가 있는데요,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Configure a custom container for Azure App Service ; <a target='tab' href='https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux'>https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux</a> </pre> <br /> 위의 문서에 포함된 "<a target='tab' href='https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#use-persistent-shared-storage'>Use persistent shared storage</a>" 설명에 보면,<br /> <br /> <div style='BACKGROUND-COLOR: #ccffcc; padding: 10px 10px 5px 10px; MARGIN: 0px 10px 10px 10px; FONT-FAMILY: Malgun Gothic, Consolas, Verdana; COLOR: #005555'> You can use the /home directory in your app's file system to persist files across restarts and share them across instances. The /home in your app is provided to enable your container app to access persistent storage.<br /> <br /> When persistent storage is disabled, then writes to the /home directory aren't persisted across app restarts or across multiple instances. The only exception is the /home/LogFiles directory, which is used to store the Docker and container logs. When persistent storage is enabled, all writes to the /home directory are persisted and can be accessed by all instances of a scaled-out app.<br /> <br /> By default, persistent storage is disabled and the setting is not exposed in the app settings. To enable it, set the WEBSITES_ENABLE_APP_SERVICE_STORAGE app setting via the Cloud Shell. In Bash:<br /> <br /> az webapp config appsettings set --resource-group <group-name> --name <app-name> --settings WEBSITES_ENABLE_APP_SERVICE_STORAGE=true<br /> </div><br /> <br /> 이렇게 나옵니다. 저런 차원에서라면, 아마도 비-컨테이너 방식의 App Service는 /home 디렉터리를 공유/지속시켜 주는 기능이 기본적으로 켜져 있다고 이해할 수 있을 것입니다.<br /> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1980
(왼쪽의 숫자를 입력해야 합니다.)