클라우드 저장 공간

The cloud storage integration allows to store chatter and email attachments on the Google Cloud or Microsoft Azure platform instead of the database’s server.

The module can be used to prevent large files from being uploaded to and downloaded from a database’s server or when a database requires more data storage.

참고

  • Files generated by Odoo (e.g., sales orders) and Documents/Sign app files are always stored on the database’s server.

  • 데이터베이스의 스토리지 제한량은 호스팅 솔루션에 따라 다릅니다:

    • Odoo 온라인: 100 GB

    • Odoo.sh:

      • 공유 호스팅: 512 GB

      • 전용 호스팅: 4 TB

    • 온프레미스: 기존 인프라 구축 상황에 따라 제한 가능.

Google 클라우드

먼저 Google Cloud 에 등록한 후 로그인합니다.

서비스 계정

  1. Open the navigation sidebar on the Google Cloud console, then go to IAM & Admin ‣ Service Accounts ‣ Create service account.

  2. Define a Service account name, click Create and continue, then Done.

    Google Cloud 클라우드 계정 생성
  3. Note down the service account’s Email as it will be used during the cloud storage bucket configuration.

  4. (작업) 버튼을 클릭한 다음 키 관리 를 선택합니다.

    “키 관리” 작업에 접근하기
  5. Go to Add key ‣ Create new key, select JSON as the Key type, and click Create. Store the downloaded JSON file containing the key securely. It will be used when configuring Odoo.

    Google Cloud 서비스 계정용 JSON 키 생성하기

클라우드 저장소 버켓

  1. Open the navigation sidebar on the Google Cloud console, then go to Cloud Storage ‣ Buckets ‣ Create.

  2. Enter a bucket name following the bucket naming guidelines and note it down as it will be used when configuring Odoo.

  3. 원하는 대로 버킷을 설정 후 완료되면 생성 을 클릭합니다.

    버켓 생성하기
  4. (추가 작업) 버튼을 클릭한 다음 액세스 편집 을 선택합니다.

    Accessing the "Edit access" action of a Google Cloud storage bucket
  5. Click Add principal and paste the service account’s email in the New principals field.

  6. Select Storage Admin as Role under the Cloud Storage section and click Save.

    Google Cloud Storage 버킷에 기준 추가하기

Odoo 환경설정

  1. 클라우드 스토리지 Google 모듈을 설치 합니다.

  2. Open the Settings app and select Cloud Storage in the navigation sidebar.

  3. Select Google Cloud Storage as the Cloud Storage Provider for new attachments.

  4. Google 버킷 이름이전 설정 내용으로 입력합니다.

  5. Click Upload your file next to Google Service Account Key and select the downloaded JSON file.

  6. Set a Minimum File Size (bytes) for attachments to be stored on Google Cloud.

Microsoft Azure

먼저 Microsoft Azure <https://azure.microsoft.com> 에 등록한 후 로그인합니다.

앱 등록

  1. On the Microsoft Azure portal, search for the App registrations service and open it.

  2. Click New registration, enter an application Name, select Accounts in any organizational directory (Any Microsoft Entra ID tenant - Multitenant) under Supported account types, and click Register.

    Microsoft Azure 앱 등록하기
  3. Note down the Application (client) ID and Directory (tenant) ID as they will be used when configuring Odoo.

  4. Click Add a certificate or secret next to Client credentials, click New client secret, then Add.

    중요

    For security reasons, leave the Expires field on 180 days (6 months) or choose a shorter expiration interval. Before the secret expires, adding a new client secret and updating Odoo’s configuration with the new value is necessary.

  5. Copy the client secret’s Value and store it securely. It will be used when configuring Odoo.

    Microsoft Azure 앱에 비밀번호 추가하기

저장소 계정

  1. Search for the Storage accounts service, open it, and click Create.

  2. Click Create new below the Resource group field, enter a Name, and click OK.

  3. Enter a unique Storage account name and note it down as it will be used when configuring Odoo.

  4. Configure the storage account as desired, and, when done, click Review + create, then Create.

    Microsoft Azure 스토리지 계정 생성

컨테이너

  1. Open your storage account resource, for example by searching for its name, and select Containers under Data storage in the navigation sidebar.

  2. Enter a Name, note it down as it will be used when configuring Odoo, and click Create.

    Microsoft Azure 스토리지 컨테이너 생성

리소스 공유

  1. Select Resource sharing (CORS) under Settings on the storage account’s navigation sidebar.

  2. 첫 번째 CORS BLOB 서비스 규칙 생성:

    • 출처 허용: *

    • 방법 허용: GET

    • 머리글 허용: Content-Type

    • 머리글 안내: Content-Type

    • 최대 연령: 0

  3. 두 번째 CORS 블롭 서비스 규칙을 생성한 후 저장 을 클릭합니다.

    • 출처 허용: *

    • 허용 방식: PUT

    • 허용 머리글: content-type,x-ms-blob-type

    • 머리글 표시 내용: content-type,x-ms-blob-type

    • 최대 연령: 0

    Microsoft Azure 스토리지 계정 CORS 규칙 생성

역할 지정

  1. Select Access control (IAM) on the storage account’s navigation sidebar, then click Add and select Add role assignment.

  2. Storage Blobs Data Contributor 로 검색한 후 다음 을 클릭합니다.

    참고

    To remove the unnecessary delete permission, create a custom role and search for the custom role’s name instead.

  3. Click Select members, enter the name of the previously registered application, select it, and click Select.

  4. :guilabel:`검토 및 할당`을 더블 클릭하세요.

    컨테이너에 멤버 추가하기
맞춤형 역할

참고

This step is optional. However, removing the delete permission would prevent anyone managing to access the cloud storage’s credentials from deleting files.

  1. Open your subscription resource, for example by searching for its name, select Access control (IAM) in the navigation sidebar, click Add and select Add custom role.

  2. Select the JSON tab and click Edit. Copy the code below, add your subscription-id under assignableScopes and change the roleName (Custom role) if desired, paste it, and click Save.

{
    "properties": {
        "roleName": "Custom role",
        "description": "",
        "assignableScopes": [
            "/subscriptions/subscription-id"
        ],
        "permissions": [
            {
                "actions": ["Microsoft.Storage/storageAccounts/blobServices/generateUserDelegationKey/action"],
                "notActions": [],
                "dataActions": ["Microsoft.Storage/storageAccounts/blobServices/containers/blobs/read", "Microsoft.Storage/storageAccounts/blobServices/containers/blobs/add/action"],
                "notDataActions": []
            }
        ]
    }
}

Odoo 환경설정

  1. 클라우드 스토리지 Azure 모듈을 설치 합니다.

  2. Open the Settings app and select Cloud Storage in the navigation sidebar.

  3. Select Azure Cloud Azure as the Cloud Storage Provider for new attachments.

  4. 입력:

  5. Set a Minimum File Size (bytes) for attachments to be stored on Microsoft Azure.