Acquia

Drupalベースのエンタープライズクラウドプラットフォーム。Drupalサイトの構築・運用・最適化を支援。

CMSエンタープライズDrupalPHPクラウドプラットフォームDevOpsホスティング
ライセンス
Commercial
言語
PHP (Drupal)
料金
有料のみ

CMS

Acquia

概要

Acquiaは、Drupalベースのエンタープライズクラウドプラットフォームで、Drupalサイトの構築、運用、最適化を包括的に支援します。

詳細

Acquiaは、Drupalに特化したエンタープライズグレードのクラウドプラットフォームです。DrupalコアとAcquiaが開発した高度な機能を組み合わせ、大規模なWebサイトやアプリケーションの構築と運用を支援します。Acquia Cloud Platformは、Drupal最適化されたホスティング環境、CI/CD、セキュリティ管理、パフォーマンス監視を統合的に提供します。特に政府機関、大学、非営利団体で広く採用され、FedRAMP認証を取得した唯一のDrupalプラットフォームです。2024年にはDrupal 11のサポートを開始し、Acquia Code Studio(フルスタック開発プラットフォーム)、Acquia Cloud IDE(Web IDE)、Acquia Site Studio(ローコードサイトビルダー)などの革新的なツールを提供しています。Drupalコミュニティへの最大の貢献者であり、唯一のDrupal認定プロバイダーでもあります。

メリット・デメリット

メリット

  • Drupal専門知識: Drupalに特化した深い専門性とサポート
  • 高性能ホスティング: 7つのグローバルリージョン、99.99%のSLA
  • 包括的なDevOpsツール: CI/CD、Git統合、環境管理を統合
  • エンタープライズセキュリティ: FedRAMP、HIPAA、PCI、SOC準拠
  • 自動化された運用: 最適化されたデプロイメントとスケーリング
  • 24/7エキスパートサポート: Drupal専門家による継続的支援
  • 統合開発環境: Code Studio、Cloud IDE、Site Studio

デメリット

  • Drupal専用: 他のCMSには対応していない
  • 高額な費用: 月額$175から、エンタープライズは数十万円以上
  • ベンダーロックイン: Acquiaプラットフォームへの依存
  • 技術的複雑さ: Drupalの学習曲線が高い
  • カスタマイズの制限: マネージドサービスによる制約
  • 規模に応じたコスト: トラフィック増加に伴う費用上昇

主要リンク

使い方の例

Acquia Cloud環境のセットアップ

# Acquia CLIのインストール
curl -OL https://github.com/acquia/cli/releases/latest/download/acli.phar
chmod +x acli.phar
sudo mv acli.phar /usr/local/bin/acli

# 認証設定
acli auth:login

# 新規Drupalプロジェクトの作成
composer create-project acquia/drupal-recommended-project my-drupal-site
cd my-drupal-site

# Acquia環境の初期化
acli app:new

# Gitリポジトリの設定
git init
git remote add acquia <acquia-git-url>
git add -A
git commit -m "Initial commit"
git push acquia master

Drupalモジュール開発

// modules/custom/my_module/my_module.info.yml
name: 'My Custom Module'
type: module
description: 'Custom functionality for Acquia Drupal site'
core_version_requirement: ^9 || ^10 || ^11
package: Custom
dependencies:
  - drupal:node
  - drupal:views
  - drupal:taxonomy

// modules/custom/my_module/src/Controller/MyController.php
<?php

namespace Drupal\my_module\Controller;

use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Cache\CacheableMetadata;

class MyController extends ControllerBase {
  
  protected $entityTypeManager;
  
  public function __construct(EntityTypeManagerInterface $entity_type_manager) {
    $this->entityTypeManager = $entity_type_manager;
  }
  
  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('entity_type.manager')
    );
  }
  
  public function content() {
    // Acquiaキャッシュタグの活用
    $node_storage = $this->entityTypeManager->getStorage('node');
    $nodes = $node_storage->loadByProperties(['status' => 1, 'type' => 'article']);
    
    $build = [
      '#theme' => 'item_list',
      '#items' => [],
      '#title' => $this->t('Latest Articles'),
    ];
    
    foreach ($nodes as $node) {
      $build['#items'][] = [
        '#type' => 'link',
        '#title' => $node->getTitle(),
        '#url' => $node->toUrl(),
      ];
    }
    
    // Acquiaのキャッシュ最適化
    $cache_metadata = new CacheableMetadata();
    $cache_metadata->addCacheTags(['node_list:article']);
    $cache_metadata->addCacheContexts(['url.path', 'user.permissions']);
    $cache_metadata->applyTo($build);
    
    return $build;
  }
}

Acquia Cloud Hooks

#!/bin/bash
# hooks/common/post-code-deploy/update.sh
# コードデプロイ後の自動実行スクリプト

site="$1"
target_env="$2"
source_branch="$3"
deployed_tag="$4"
repo_url="$5"
repo_type="$6"

# Drupalのメンテナンスモード有効化
drush @$site.$target_env state:set system.maintenance_mode 1 --input-format=integer

# データベース更新の実行
drush @$site.$target_env updatedb -y

# 設定のインポート
drush @$site.$target_env config:import -y

# キャッシュのクリア
drush @$site.$target_env cache:rebuild

# メンテナンスモード解除
drush @$site.$target_env state:set system.maintenance_mode 0 --input-format=integer

# Acquia Purgeによるキャッシュ無効化
drush @$site.$target_env ap:purge-all

echo "Deployment completed successfully"

パフォーマンス最適化

// settings.php での Acquia 最適化設定
<?php

// Acquia環境の検出
if (isset($_ENV['AH_SITE_ENVIRONMENT'])) {
  // Memcacheの設定
  $settings['cache']['default'] = 'cache.backend.memcache';
  $settings['memcache']['servers'] = ['memcached:11211' => 'default'];
  
  // Redis設定(利用可能な場合)
  if (extension_loaded('redis')) {
    $settings['redis.connection']['interface'] = 'PhpRedis';
    $settings['redis.connection']['host'] = 'redis';
    $settings['cache']['default'] = 'cache.backend.redis';
  }
  
  // Acquia Searchの設定
  $config['search_api.server.acquia_search_server'] = [
    'backend_config' => [
      'connector' => 'standard',
      'connector_config' => [
        'host' => $_ENV['ACQUIA_SEARCH_HOST'],
        'core' => $_ENV['ACQUIA_SEARCH_CORE'],
      ],
    ],
  ];
  
  // CDN設定
  $config['acquia_purge.settings']['domains'] = [
    $_ENV['AH_SITE_NAME'] . '.prod.acquia-sites.com',
    'www.example.com',
  ];
}

// パフォーマンスチューニング
$config['system.performance']['cache']['page']['max_age'] = 3600;
$config['system.performance']['css']['preprocess'] = TRUE;
$config['system.performance']['js']['preprocess'] = TRUE;

Site Studioでのコンポーネント作成

# site_studio/components/hero/hero.yml
name: Hero Component
category: Layout
preview_image: hero.png
fields:
  title:
    type: text
    label: Title
    default: "Welcome to our site"
  subtitle:
    type: textarea
    label: Subtitle
  background_image:
    type: image
    label: Background Image
  cta_text:
    type: text
    label: CTA Button Text
  cta_link:
    type: link
    label: CTA Link
{# site_studio/templates/hero.html.twig #}
<section class="hero-component" style="background-image: url('{{ background_image.url }}')">
  <div class="hero-content">
    <h1>{{ title }}</h1>
    {% if subtitle %}
      <p class="hero-subtitle">{{ subtitle }}</p>
    {% endif %}
    {% if cta_text and cta_link %}
      <a href="{{ cta_link.url }}" class="btn btn-primary">
        {{ cta_text }}
      </a>
    {% endif %}
  </div>
</section>

セキュリティとコンプライアンス

// カスタムセキュリティモジュール
<?php

namespace Drupal\acquia_security\EventSubscriber;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;

class SecurityHeadersSubscriber implements EventSubscriberInterface {
  
  public static function getSubscribedEvents() {
    return [
      KernelEvents::REQUEST => ['onRequest', 100],
    ];
  }
  
  public function onRequest(RequestEvent $event) {
    $response = $event->getResponse();
    if (!$response) {
      return;
    }
    
    // セキュリティヘッダーの追加
    $response->headers->set('X-Content-Type-Options', 'nosniff');
    $response->headers->set('X-Frame-Options', 'SAMEORIGIN');
    $response->headers->set('X-XSS-Protection', '1; mode=block');
    $response->headers->set('Referrer-Policy', 'strict-origin-when-cross-origin');
    
    // HIPAA準拠のための追加設定
    if (getenv('ACQUIA_HIPAA_ENABLED')) {
      $response->headers->set('Strict-Transport-Security', 'max-age=31536000; includeSubDomains');
      $response->headers->set('Content-Security-Policy', "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';");
    }
  }
}