GitLab 차트를 사용할 때 Azure MinIO 게이트웨이
MinIO는 S3 호환 API를 제공하는 객체 저장소 서버로, Azure Blob Storage에 대한 요청을 프록시할 수 있는 게이트웨이 기능을 가지고 있습니다. 게이트웨이를 설정하기 위해 Azure의 Linux 웹 앱을 사용할 것입니다.
시작하려면 Azure CLI가 설치되어 있고 로그인된 상태(az login
)인지 확인하십시오. 아직 리소스 그룹이 없다면 리소스 그룹을 생성하십시오:
az group create --name "gitlab-azure-minio" --location "WestUS"
저장소 계정
리소스 그룹에 저장소 계정을 생성하십시오. 저장소 계정의 이름은 전 세계적으로 고유해야 합니다:
az storage account create \
--name "gitlab-azure-minio-storage" \
--kind BlobStorage \
--sku Standard_LRS \
--access-tier Cool \
--resource-group "gitlab-azure-minio" \
--location "WestUS"
저장소 계정의 계정 키를 검색합니다:
az storage account show-connection-string \
--name "gitlab-azure-minio-storage" \
--resource-group "gitlab-azure-minio"
출력은 다음 형식이어야 합니다:
{
"connectionString": "DefaultEndpointsProtocol=https;EndpointSuffix=core.windows.net;AccountName=gitlab-azure-minio-storage;AccountKey=h0tSyeTebs+..."
}
Linux 웹 앱에 MinIO 배포
먼저 동일한 리소스 그룹에 앱 서비스 계획을 생성해야 합니다.
az appservice plan create \
--name "gitlab-azure-minio-app-plan" \
--is-linux \
--sku B1 \
--resource-group "gitlab-azure-minio" \
--location "WestUS"
minio/minio
Docker 컨테이너로 구성된 웹 앱을 생성하십시오. 지정하는 이름은 웹 앱의 URL에 사용됩니다:
az webapp create \
--name "gitlab-minio-app" \
--deployment-container-image-name "minio/minio" \
--plan "gitlab-azure-minio-app-plan" \
--resource-group "gitlab-azure-minio"
웹 앱은 이제 https://gitlab-minio-app.azurewebsites.net
에서 접근할 수 있어야 합니다.
마지막으로 시작 명령을 설정하고 웹 앱에서 사용할 저장소 계정 이름과 키를 저장할 환경 변수를 생성해야 합니다. MINIO_ACCESS_KEY
와 MINIO_SECRET_KEY
입니다.
az webapp config appsettings set \
--settings "MINIO_ACCESS_KEY=gitlab-azure-minio-storage" "MINIO_SECRET_KEY=h0tSyeTebs+..." "PORT=9000" \
--name "gitlab-minio-app" \
--resource-group "gitlab-azure-minio"
# 시작 명령
az webapp config set \
--startup-file "gateway azure" \
--name "gitlab-minio-app" \
--resource-group "gitlab-azure-minio"
결론
이제 S3 호환 클라이언트와 함께 이 게이트웨이를 사용할 수 있습니다. 웹 애플리케이션 URL은 s3 endpoint
가 되고, 저장소 계정 이름은 accesskey
가 되며, 저장소 계정 키는 secretkey
가 됩니다.
참고
이 가이드는 Alessandro Segala의 동일한 주제에 대한 블로그 게시물을 위해 후세대에 맞게 조정되었습니다.