{"id":18809257,"url":"https://github.com/thingsym/vaw","last_synced_at":"2025-04-13T20:25:56.887Z","repository":{"id":24910003,"uuid":"28326730","full_name":"thingsym/vaw","owner":"thingsym","description":"VAW (Vagrant Ansible WordPress) is Ansible playbooks for website developer, designer, webmaster and WordPress theme/plugin developer.","archived":false,"fork":false,"pushed_at":"2024-08-19T09:12:35.000Z","size":1931,"stargazers_count":17,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-19T10:52:29.463Z","etag":null,"topics":["ansible","playbook","vagrant","wordpress","wordpress-development"],"latest_commit_sha":null,"homepage":"https://thingsym.github.io/vaw/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thingsym.png","metadata":{"files":{"readme":"README-ja.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"thingsym"}},"created_at":"2014-12-22T06:07:16.000Z","updated_at":"2024-08-06T07:03:53.000Z","dependencies_parsed_at":"2024-08-19T12:47:24.398Z","dependency_job_id":null,"html_url":"https://github.com/thingsym/vaw","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsym%2Fvaw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsym%2Fvaw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsym%2Fvaw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsym%2Fvaw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thingsym","download_url":"https://codeload.github.com/thingsym/vaw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223602618,"owners_count":17171952,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","playbook","vagrant","wordpress","wordpress-development"],"created_at":"2024-11-07T23:15:47.433Z","updated_at":"2024-11-07T23:15:48.082Z","avatar_url":"https://github.com/thingsym.png","language":"Jinja","readme":"# VAW (Vagrant Ansible WordPress)\n\n**VAW (Vagrant Ansible WordPress)** は、WordPress でウェブサイトを構築する開発者、デザイナー、サイト運営者、WordPress のテーマ・プラグイン開発者のための **Ansible playbooks** です。\n\nVagrant で開発環境やテスト環境を素早く立ち上げて、ウェブサイトの構築や動作検証ができます。もちろん WordPress テーマやプラグインの開発も。\n\nまた、**VAW** は、開発パートナーやデザイナー、クライアントとポータブルに環境を共有してコラボレーションツールとして活用できます。\n\nVAW (Vagrant Ansible WordPress) documentation: [https://thingsym.github.io/vaw/](https://thingsym.github.io/vaw/)\n\n## Features\n\n### 1. OS、サーバ、データベース環境の構築\n\nOS は、**CentOS**、**Debian**、**Ubuntu** から、サーバは、**Apache**、**nginx**、**H2O** から、データベースは、**MariaDB**、**MySQL** から構成してサーバとデータベース環境の構築ができます。\n\nすべてのウェブサーバで、FastCGI 構成が可能で **PHP-FPM** (FastCGI Process Manager) から、PHP実行環境を構築します。\n\nサーバ、データベースは基本、素の設定でインストールされますが、設定ファイルの編集でチューニングも可能。\n\n様々な組み合わせのサーバとデータベース構成で検証が可能です。\n\n### 2. WordPress 環境の構築\n\n様々な設定やデータに処理を施した WordPress を構築します。テストデータや実データでの検証、本番環境のデータやファイルと同期した WordPress の構築が実現します。\n\n* WordPress 本体のインストールバージョン指定\n* WordPress 本体の言語指定\n* インストールディレクトリ指定、サブディレクトリインストール\n* マルチサイト対応\n* 管理画面の SSL 化\n* テーマのインストール\n\t* テーマの自動有効化\n\t* 複数のテーマを一括インストール\n\t* ローカルにあるテーマをインストール (開発中テーマや公式ディレクトリ未掲載テーマに対応)\n* プラグインのインストール\n\t* プラグインの自動有効化\n\t* 複数のプラグインを一括インストール\n\t* ローカルにあるプラグインをインストール (開発中プラグインや公式ディレクトリ未掲載プラグインに対応)\n* theme_mod (theme modification value) と Options の設定\n* パーマリンク構造の設定\n* データのインポートは 4 つのいずれかからインポートできます\n\t* XML (WXR) 形式\n\t* SQLデータ (データベースダンプデータ)\n\t* バックアッププラグイン「BackWPup」アーカイブファイル (Zip, Tar, Tar GZip, Tar BZip2)\n\t* テストデータ (Theme Unit Test)\n* wp-content ディレクトリの自動配置\n* uploads ディレクトリの自動配置\n* 本番環境の URL からテスト環境の URL に置換処理\n* サムネイル画像の再生成\n\n### 3. Develop \u0026 Deploy ツール\n\nプリインストールとしてプログラム言語 PHP のバージョン管理 「phpenv」、PHPパッケージ管理ツール「Composer」、WordPressのコマンドラインツール「WP-CLI」、ソースコードのバージョン管理ツール 「Git」が標準でインストール。\n\nウェブサイトの構築やテーマやプラグインの開発など用途によって Develop ツールと Deploy ツールがインストールできます。有効化によってインストールされるツールの一覧は Specification を参照。\n\n## Requirements\n\n* [Oracle VM VirtualBox](https://www.virtualbox.org) \u003e= 6.1\n* [Vagrant](https://www.vagrantup.com) \u003e= 2.2\n* [Ansible](https://www.ansible.com) \u003e= 2.9\n\n#### Optional\n\n* [mkcert](https://github.com/FiloSottile/mkcert)\n\n### Vagrant plugin (optional)\n\n* [vagrant-hostsupdater](https://github.com/cogitatio/vagrant-hostsupdater)\n* [vagrant-vbguest](https://github.com/dotless-de/vagrant-vbguest)\n* [vagrant-serverspec](https://github.com/jvoorhis/vagrant-serverspec)\n\n## Usage\n\n### 1. Virtualbox をインストール\n\n[www.virtualbox.org](https://www.virtualbox.org) から環境にあった VirtualBox をダウンロードしてインストールします。\n\n### 2. Vagrant をインストール\n\n[www.vagrantup.com](https://www.vagrantup.com) から環境にあった Vagrant をダウンロードしてインストールします。\n\n### 3. VAW の Ansible playbooks をダウンロード\n\n以下のリンクから Vagrantfile と Ansible playbooks 一式をダウンロードします。\n\n[Zip 形式で VAW をダウンロード](https://github.com/thingsym/vaw/archive/master.zip)\n\n### 4. mkcert を使ってSSL証明書を生成します\n\n mkcert のインストールは、以下のページを参考ください。 [https://github.com/FiloSottile/mkcert](https://github.com/FiloSottile/mkcert)\n\n\tcd vaw-x.x.x\n\tmkcert -install\n\tmkdir mkcert\n\tmkcert -cert-file ./mkcert/cert.pem -key-file ./mkcert/privkey.pem \u003cvm_hostname\u003e\n\n### 5. 仮想環境を立ち上げます\n\n\tcd vaw-x.x.x\n\tvagrant up\n\n初回で Box がない場合、Box のダウンロードから始まります。\nプロビジョニングが完了したら、WordPress開発環境が立ち上がります。\n\nNote: Passwordless for Vagrant::Hostsupdater. See [Suppressing prompts for elevating privileges\n](https://github.com/agiledivider/vagrant-hostsupdater#suppressing-prompts-for-elevating-privileges)\n\n### 6. ウェブサイトと WordPress 管理画面にアクセス\n\n初期設定でのウェブサイトへのアクセスは **http://vaw.local/** から、WordPress 管理画面は **http://vaw.local/wp-admin/** にブラウザでアクセスします。\n\n### 7. Vagrant に SSH で接続\n\n\tvagrant ssh\n\nOr using ssh config.\n\n\tvagrant ssh-config \u003e ssh_config.cache\n\tssh -F ssh_config.cache default\n\n## Default configuration Variables\n\n初期設定のデータベースと WordPress Admin の ID とパスワードは以下の通りです。プロビジョニング設定ファイルで設定が可能です。\n\n#### Database\n\n* ROOT USER `root`\n* ROOT PASSWORD `admin`\n* HOST `localhost`\n* DATABASE NAME `wordpress`\n* USER `admin`\n* PASSWORD `admin`\n\n#### WordPress Admin\n\n* USER `admin`\n* PASSWORD `admin`\n\n## Customize Options\n\nVAW は、設定ファイルを編集することで様々な環境が立ち上がります。カスタマイズできる設定ファイルは 2 種類あります。\n\n* Vagrantfile\n* group_vars/all.yml\n\n設定ファイルの編集後、開発環境の立ち上げは、`vagrant up` または `vagrant provision` するだけ。\n\n### Vagrant 設定ファイル (Ruby)\n\nVagrant 設定ファイルは、**Vagrantfile** です。\nVagrant で使う Box の指定 や プライベート IP アドレス、ホストネーム、ドキュメントルートの設定をします。\n\n複数の環境を立ち上げる場合、ディレクトリ名を変更の上、他の環境と重ならないように `vm_ip` と `vm_hostname` を書き換えてください。\n\nパブリックネットワークを使うと同じ LAN 内の端末から Vagrant 仮想環境にアクセスすることができます。パブリックネットワークを使うには、bridge 接続するための IP アドレスを設定します。その場合、`vm_hostname` に同じIP アドレスを設定することをお薦めします。\n\n\t## Vagrant Settings ##\n\n\tvm_box                = 'debian/bullseye64'    # Debian 11.0\n\tvm_box_version        = '\u003e= 0'\n\tvm_ip                 = '192.168.46.49'\n\tvm_hostname           = 'vaw.local'\n\tvm_document_root      = '/var/www/html'\n\n\tpublic_ip             = ''\n\n\tforwarded_port        = [\n\t\t3000,\n\t\t3001,\n\t\t1025,\n\t\t8025\n\t]\n\n\tvbguest_auto_update   = true\n\tsynced_folder_type    = 'virtualbox' # virtualbox|nfs|rsync|smb\n\n\tbackup_database       = false\n\n\tansible_install_mode  = :default    # :default|:pip\n\tansible_version       = 'latest'    # only :pip required\n\n\tprovision_mode        = 'all'       # all|wordpress|box\n\n\tvagrant_plugins       = [\n\t\t'vagrant-hostsupdater',\n\t\t'vagrant-vbguest',\n\t\t'vagrant-serverspec'\n\t]\n\n* `vm_box` (required) Vagrant Box 名 (default: `debian/bullseye64`)\n* `vm_box_version` (required) version of Vagrant Box (default: `\u003e= 0`)\n* `vm_ip` (required) プライベート IP アドレス (default: `192.168.46.49`)\n* `vm_hostname` (required) ホストネーム (default: `vaw.local`)\n* `vm_document_root` (required) ドキュメントルート (default: `/var/www/html`)\n\t* `wordpress` ディレクトリを自動的に作成して同期します\n* `public_ip` bridge 接続する IP アドレス (default: `''`)\n* `forwarded_port` list of ports that you want to transfer (default: `[ 3000, 3001, 1025, 8025 ]`)\n\t* 3000: Browsersync auto-detected port\n\t* 3001: Browsersync ui port\n\t* 1025: MailHog SMTP default port\n\t* 8025: MailHog HTTP default port\n* `vbguest_auto_update` whether to update VirtualBox Guest Additions (default: `true` / value: `true` | `false`)\nトします (default: `true` / value: `true` | `false`)\n* `synced_folder_type` 共有フォルダの種類 (default: `virtualbox` / value: `virtualbox` | `nfs` | `rsync` | `smb`)\n* `backup_database` vagrant destroy or halt の時、自動バックアップ (default: `false` / value: `true` | `false`)\n* `ansible_install` (required) install Ansible (default: `:true` / value: `:true` | `:false`)\n* `ansible_install_mode` (required) Ansible のインストール方法 (default: `:default` / value: `:default` | `:pip`)\n* `ansible_version` インストールする Ansible のバージョン (default: `latest`)\n* `provision_mode` (required) プロビジョニングモード (default: `all` / value: `all` | `wordpress` | `box`)\n* `vagrant_plugins` install vagrant plugins\n\n### プロビジョニング設定ファイル (YAML)\n\nプロビジョニング設定ファイルは、**group_vars/all.yml** です。\nYAML 形式でサーバ、データベース、WordPress 環境の設定や Develop \u0026 Deploy ツールの有効化ができます。\n\n\t## Server \u0026 Database Settings ##\n\n\tserver             : apache   # apache|nginx|h2o\n\tfastcgi            : none     # none|php-fpm\n\n\tdatabase           : mariadb  # mariadb|mysql\n\tdb_root_password   : admin\n\n\tdb_host            : localhost\n\tdb_name            : wordpress\n\tdb_user            : admin\n\tdb_password        : admin\n\tdb_prefix          : wp_\n\tdb_charset         : ''\n\tdb_collate         : '' # utf8mb4_general_ci\n\n\t## WordPress Settings ##\n\n\ttitle              : VAW (Vagrant Ansible WordPress)\n\tadmin_user         : admin\n\tadmin_password     : admin\n\tadmin_email        : hoge@example.com\n\n\t# e.g. latest, nightly, 4.1, 4.1-beta1\n\t# see Release Archive - https://wordpress.org/download/release-archive/\n\t# 3.7 or later to work properly\n\tversion            : latest\n\n\t# e.g. en_US, ja, ...\n\t# see wordpress-i18n list - http://svn.automattic.com/wordpress-i18n/\n\tlang               : en_US\n\n\t# in own directory or subdirectory install.\n\t# see http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory\n\twp_dir             : ''   #e.g. /wordpress\n\twp_site_path       : ''   #e.g. /wordpress\n\n\tmultisite          : false   # true|false\n\n\t# default theme|slug|url|zip (local path, /vagrant/themes/*.zip)\n\tactivate_theme     : ''\n\tthemes             : []\n\n\t# slug|url|zip (local path, /vagrant/plugins/*.zip)\n\tactivate_plugins   :\n\t                        - theme-check\n\t                        - log-deprecated-notices\n\t                        - debug-bar\n\t                        - query-monitor\n\t                        - broken-link-checker\n\tplugins            :\n\t                        - developer\n\t                        - monster-widget\n\t                        - wordpress-beta-tester\n\t                        - wp-multibyte-patch\n\n\ttheme_mod          : {}\n\n\t# see Option Reference - http://codex.wordpress.org/Option_Reference\n\toptions            : {}\n\n\t# e.g. /%year%/%monthnum%/%postname%\n\t# see http://codex.wordpress.org/Using_Permalinks\n\tpermalink_structure  :\n\t                      structure   : ''\n\t                      category    : ''\n\t                      tag         : ''\n\n\t# Any one of 4 ways to import\n\timport_xml_data    : ''   # local path, /vagrant/import/*.xml\n\timport_db_data     : ''   # local path, /vagrant/import/*.sql\n\timport_backwpup    :\n\t                      path          : ''   # local path, /vagrant/import/*.zip\n\t                      db_data_file  : ''\n\t                      xml_data_file : ''\n\timport_admin       : false   # true|false\n\ttheme_unit_test    : false   # true|false\n\n\treplace_old_url         : [] # http(s)://example.com, to vm_hostname from old url\n\tsearch_replace_strings  : {}\n\tregenerate_thumbnails   : false   # true|false\n\n\tWP_DEBUG           : true   # true|false\n\tSAVEQUERIES        : true   # true|false\n\n\t## Develop \u0026 Deploy Settings ##\n\n\tssl                : true   # true|false\n\thttp_protocol      : https   # http|https\n\n\t# See Supported Versions http://php.net/supported-versions.php\n\tphp_version        : 7.4.33\n\n\tdevelop_tools      : false   # true|false\n\tdeploy_tools       : false   # true|false\n\n\t## That's all, stop setting. Let's vagrant up!! ##\n\n\tWP_URL             : '{{ http_protocol }}://{{ HOSTNAME }}{{ wp_site_path }}'\n\tWP_PATH            : '{{ DOCUMENT_ROOT }}{{ wp_dir }}'\n\n\n#### Server \u0026 Database Settings ##\n\n* `server` (required) ウェブサーバ名 (default: `apache` / value: `apache` | `nginx` | `h2o`)\n* `fastcgi` fastCGI 名 (default: `none` / value: `none` | `php-fpm`)\n* `database` (required) データベース名 (default: `mariadb` / value: `mariadb` | `mysql`)\n* `db_root_password` (required) データベースの root パスワード (default: `admin`)\n* `db_host` (required) データベースホスト名 (default: `localhost`)\n* `db_name` (required) データベース名 (default: `wordpress`)\n* `db_user` (required) データベースユーザ名 (default: `admin`)\n* `db_password` (required) データベースパスワード (default: `admin`)\n* `db_prefix` データベースのプレフィックス名 (default: `wp_`)\n* `db_charset` データベースの文字コード (default: `''`)\n* `db_collate` データベースの照合順序 (default: `''`)\n\n#### WordPress Settings ##\n\n* `title` サイトタイトル (default: `VAW (Vagrant Ansible WordPress)`)\n* `admin_user` (required) WordPress 管理者ユーザー名 (default: `admin`)\n* `admin_password` (required) WordPress 管理者パスワード (default: `admin`)\n* `admin_email` (required) WordPress 管理者メールアドレス (default: `hoge@example.com`)\n* `version` (required) WordPress 本体のバージョン (default: `latest`)\n\t* e.g. `latest`, `4.1`, `4.1-beta1`\n\t* [Release Archive](https://wordpress.org/download/release-archive/) を参照\n\t* バージョン 3.7 以降で正常に動作します\n\n* `lang` (required) WordPress 本体の言語 (default: `en_US`)\n\t* e.g. `en_US`, `ja`, ...\n\t* [wordpress-i18n list](http://svn.automattic.com/wordpress-i18n/) を参照\n\n* `wp_dir` サブディレクトリにインストールするディレクトリパス (default: ドキュメントルートにインストール)\n* `wp_site_path` サイトパス (default: ドキュメントルート)\n\t* `wp_dir` と `wp_site_path` が同じパスの場合、ディレクトリにインストールされます。\n\t* `wp_dir` と `wp_site_path` のパスが違う場合、サブディレクトリインストールになります。必ず `wp_site_path` は `wp_dir` より一つ上のディレクトリに置いてください。\n\t*  [Giving WordPress Its Own Directory](http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory) を参照\n\n* `multisite` マルチサイトの有効化 (default: `false` / value: `true` | `false`)\n* `activate_theme` テーマをインストール・有効化 (default: default theme)\n\t* デフォルトテーマ `''`, `theme slug`, `zip file URL`,  `local zip file path` から設定\n\t* ローカルにある zip ファイルパスは `/vagrant/themes/*.zip`\n\t* 自動的に有効化します\n* `themes` テーマをインストール (複数可)\n\t* YAML 形式のハッシュの配列書式で設定 `theme slug`, `zip file URL`, `local zip file path`\n\t* ローカルにある zip ファイルパスは `/vagrant/themes/*.zip`\n\n設定例\n\n\tthemes             :\n\t                     - yoko\n\t                     - Responsive\n\n設定を無効にする場合\n\n\tthemes             : []\n\n* `activate_plugins` プラグインのインストール・有効化 (複数可)\n\t* YAML 形式のハッシュの配列書式で設定 `plagin slug`, `zip file URL`, `local zip file path`\n\t* ローカルにある zip ファイルパスは `/vagrant/plagins/*.zip`\n\t* 自動的に有効化します\n\n設定例\n\n\tactivate_plugins   :\n\t                        - theme-check\n\t                        - plugin-check\n\n設定を無効にする場合\n\n\tactivate_plugins   : []\n\n* `plugins` プラグインのインストール\n\t* YAML 形式のハッシュの配列書式で設定 `plagin slug`, `zip file URL`, `local zip file path`\n\t* ローカルにある zip ファイルパスは `/vagrant/plagins/*.zip`\n* `theme_mod` theme_mod (theme modification value) の設定\n\t* [set_theme_mod()](http://codex.wordpress.org/Function_Reference/set_theme_mod) を参照\n\t* YAML 形式のハッシュのネスト書式で設定\n\n設定例\n\n\ttheme_mod          :\n\t                       background_color: 'cccccc'\n\n設定を無効にする場合\n\n\ttheme_mod          : {}\n\n* `options` オプションの設定\n\t* [update_option()](http://codex.wordpress.org/Function_Reference/update_option) と [Option Reference](http://codex.wordpress.org/Option_Reference) を参照\n\t* YAML 形式のハッシュのネスト書式で設定\n\n設定例\n\n\toptions            :\n\t                       blogname: 'blog title'\n\t                       blogdescription: 'blog description'\n\n設定を無効にする場合\n\n\toptions            : {}\n\n* `permalink_structure` パーマリンク構造の設定\n\t* 以下の3つのパーマリンク構造の設定できます\n\t* [Using Permalinks](http://codex.wordpress.org/Using_Permalinks) を参照\n\t* `structure` Structure Tags で投稿のパーマリンク構造を設定\n\t* `category` カテゴリーアーカイブのカテゴリープレフィックスを設定\n\t* `tag` タグアーカイブのタグプレフィックスを設定\n* `import_xml_data` WXR 形式のファイルパス `/vagrant/import/*.xml`\n* `import_db_data` SQL ダンプファイルパス `/vagrant/import/*.sql`\n* `import_backwpup`\n\t* `path` アーカイブファイルパス `/vagrant/import/*.zip` (Zip, Tar, Tar GZip, Tar BZip2)\n\t* `db_data_file` DBバックアップファイル名 (データファイルのどちらかひとつからインポート)\n\t* `xml_data_file` XML エクスポートファイル名 (データファイルのどちらかひとつからインポート)\n* `import_admin` WordPress 管理者ユーザーの追加 (default: `false` / value: `true` | `false`)\n* `theme_unit_test` テーマユニットテストデータのインポート有効化 (default: `false` / value: `true` | `false`)\n* `replace_old_url` `old url` から `vm_hostname` に置換\n\n設定例\n\n\treplace_old_url         :\n\t                           - http://example.com\n\t                           - http://www.example.com\n\t                           - https://example.com\n\n設定を無効にする場合\n\n\treplace_old_url         : []\n\n* `search_replace_strings` データベースを検索してマッチした文字列を置換する\n\n設定例\n\n\tsearch_replace_strings  :\n\t                           'foo': 'bar'\n\t                           'abc': 'xyz'\n\t                           'Hello, World!': 'Welcome to WordPress!'\n\n設定を無効にする場合\n\n\tsearch_replace_strings  : {}\n\n* `regenerate_thumbnails` サムネイル画像の再生成を有効化 (default: `false` / value: `true` | `false`)\n* `WP_DEBUG` デバックモードを有効化 (default: `true` / value: `true` | `false`)\n* `SAVEQUERIES` データベースクエリを保存 (default: `true` / value: `true` | `false`)\n\n#### Develop \u0026 Deploy Settings ##\n\n* `ssl` WordPress管理画面 SSL 化の有効化 (default: `true` / value: `true` | `false`)\n* `http_protocol` HTTP プロトコル (default: `https` / value: `http` | `https`)\n* `php_version` PHPバージョン (default: `7.4.33`)\n* `develop_tools` Develop ツールを有効化 (default: `false` / value: `true` | `false`)\n* `deploy_tools` Deploy ツールを有効化 (default: `false` / value: `true` | `false`)\n\n## Directory Layout\n\nVAW のディレクトリ構成は以下の通りです。本ディレクトリは、ゲストOS側で `/vagrant` に同期します。また、`wordpress` は自動で作成されて Vagrant 設定ファイルで設定した Document Root `vm_document_root` に同期します。\n\n`wp-content` は WordPress のテーマやプラグイン、アップロードファイルを格納したディレクトリです。本番環境から本ディレクトリに `wp-content` をコピーして置くとプロビジョニング時に構築した WordPress に自動で配置されます。\n\n`uploads` は WordPress の wp-content にあるアップロードファイルを格納したディレクトリです。本番環境から本ディレクトリに `uploads` をコピーして置くとプロビジョニング時に構築した WordPress に自動で配置されます。\n\nデータベースのダンプデータのインポートと url の置換、サムネイル画像の再生成を活用して構築すると、本番環境と同じ環境が作れます。すべてプロビジョニング設定ファイルから設定できます。\n\n### Full Layout\n\n* backup (バックアップファイルを格納。無い場合、バックアップスクリプト起動時に自動作成)\n* command (シェルスクリプトを格納)\n* config (チューニング用設定ファイルを格納)\n* config.sample (チューニング用設定ファイルサンプル)\n* group_vars (Ansible のプロビジョニング設定ファイルを格納)\n\t* all.yml (プロビジョニング設定ファイル)\n* hosts\n\t* local (inventory file)\n* import (インポートデータを格納、必要ならば)\n* LICENSE (ライセンスファイル)\n* plugins (zip 形式のプラグインファイルを格納、必要ならば)\n* mkcert (SSL certificate ファイルを格納)\n* Rakefile (ServerSpec の Rakefile)\n* README-ja.md\n* README.md\n* roles (role 毎の Ansible playbook を格納)\n* site.yml (Ansible playbook 本体ファイル)\n* spec (ServerSpec spec file を格納)\n\t* box\n\t* localhost\n\t* spec_helper.rb\n\t* sync-dir\n* themes (zip 形式のテーマファイルを格納、必要ならば)\n* uploads (WordPress の wp-content にある uploads ディレクトリ)\n* Vagrantfile (Vagrant 設定ファイル)\n* wordpress (Document Root に同期するディレクトリ、無い場合、`vagrant up` 時に自動作成)\n* wp-content (WordPress の wp-content ディレクトリ)\n\n### Minimum Layout\n\nVAW は、以下の最小単位のディレクトリ構成でも環境が立ち上がります。\n\n* group_vars (Ansible のプロビジョニング設定ファイルを格納)\n\t* all.yml (プロビジョニング設定ファイル)\n* hosts\n\t* local (inventory file)\n* roles (Ansible playbook を格納)\n* site.yml (Ansible playbook 本体ファイル)\n* Vagrantfile (Vagrant 設定ファイル)\n* wordpress (Document Root に同期するディレクトリ、無い場合、`vagrant up` 時に自動作成)\n\n## Vagrant Box\n\nVAW は、Vagrant のプロバイダ VirtualBox をサポートしています。\n\nOS とアーキテクチャは、CentOS、Debian、Ubuntu の x86_64 系 Vagrant Box に対応しています。\n\n### Debian\n\n* Debian 12.0\n* Debian 11.0\n* Debian 10.0 (Deprecated ended 2024-06-30)\n* Debian 9.0 (Deprecated ended 2022-06-30)\n* Debian 8.0 (Deprecated ended 2020-06-30)\n\n### Ubuntu\n\n* Ubuntu 20.04\n* Ubuntu 18.04\n* Ubuntu 16.04\n* Ubuntu 14.04\n\n### CentOS\n\n* CentOS 8 (Deprecated ended 2021-12-31)\n* CentOS 7 (Deprecated ended 2024-06-30)\n* CentOS 6 (Deprecated ended 2020-11-30)\n\nVagrant Box のダウンロードは、[Discover Vagrant Boxes](https://app.vagrantup.com/boxes/search?provider=virtualbox) から検索できます。\n\n**Note: プロビジョニング済みの Box `vaw/centos*-default` と `vaw/centos*-full` は非推奨になりました。今後はディストリビューションのBoxを使うことをおすすめします。**\n\nVAW では、あらかじめ CentOS 7 と CentOS 6 用に 2 つずつ Box を用意しています。デフォルト設定のプロビジョニング済みの Box `vaw/centos*-default` と デフォルト設定に Develop ツールと Deploy ツールを有効化したプロビジョニング済みの Box `vaw/centos*-full`。真っさらな状態からのプロビジョニングと比べて短時間で環境が立ち上がります。\n\n### CentOS 7 (非推奨)\n\n* [vaw/centos7-default](https://atlas.hashicorp.com/vaw/boxes/centos7-default)\n* [vaw/centos7-full](https://atlas.hashicorp.com/vaw/boxes/centos7-full)\n\n### CentOS 6 (非推奨)\n\n* [vaw/centos6-default](https://atlas.hashicorp.com/vaw/boxes/centos6-default)\n* [vaw/centos6-full](https://atlas.hashicorp.com/vaw/boxes/centos6-full)\n\n## プロビジョニングモード\n\nVAW には、3つのプロビジョニングモードがあります。\n\n* `all` は、まっさらな Vagrant Box から通常のプロビジョニングを行います。\n* `wordpress` は、WordPress が含まれた同期フォルダだけプロビジョニングをします。\n* `box` は、Vagrant Box を作成するためのプロビジョニングをします。\n\nVAW は、いろんなサーバ、データベース構成の組み合わせでプロビジョニングできることが特徴です。\nその反面、まっさらな Vagrant Box から環境を構築することは、プロビジョニングに時間がかかります。\n\nあらかじめサーバ、データベース構成を設定した Vagrant Box を作成できます。\n作った Vagrant Box を使い回すことでプロビジョニングの時間短縮が図れます。\n\nまず、Provision mode `box` で Vagrant Box を作成します。\n次に、作成した Vagrant Box を Provision mode `wordpress` でプロビジョニングします。\n作成した Vagrant Boxをベースに WordPress開発環境が素早く立ち上がります。\n\n\n## Vagrant Box の作り方\n\nプロビジョニングモードをどのように活用するのか。\n\nVagrant Box の作り方から、つくった Vagrant Box でプロビジョニングして WordPress開発環境を構築するまでの流れを通じて見てみましょう。\n\n### 1. 設定ファイルの設定\n\nVagrant Box 作成するため Vagrant 環境を立ち上げます。\nまず、Vagrant 設定ファイルとプロビジョニング設定ファイルの設定をします。\n\nVagrant 設定ファイルの `provision_mode` を `box` に設定。\n\n\tprovision_mode        = 'box'    # all|wordpress|box\n\nプロビジョニング設定ファイルの設定はお好みで。\nただし、`provision_mode` が `box` 場合、\nプロビジョニング時にプロビジョニング設定ファイルの WordPress Settings セクションがスキップされます。\n\n### 2. プロビジョニング\n\nプロビジョニングをして環境を構築します。\n\n\tvagrant up\n\n### 3. Vagrant Box の作成 (パッケージ化)\n\nプロビジョニングが完了したら、box 名を付けて Vagrant Box を作成します。 (e.g. sample.box)\n\n\tvagrant package --output sample.box\n\n### 4. Vagrant Box の登録\n\n作成した Vagrant Box を Vagrant に追加します。(e.g. VM名 sample として登録)\n\n\tvagrant box add sample.box --name sample\n\nVagrant Box 作成のために作った Vagrant Box は、削除して構いません。 (e.g. sample.box)\n立ち上げた Vagrant環境は、動作確認後に削除して構いません。\n\n\tvagrant destroy\n\n### 5. 作成した Vagrant Box でプロビジョニング\n\n作成した Vagrant Box でWordPress開発用に Vagrant環境を立ち上げます。\nVagrant 設定ファイルとプロビジョニング設定ファイルの設定をします。\n\nVagrant 設定ファイルの `vm_box` を `sample` に設定。 (e.g. VM名 sample)\nVagrant 設定ファイルの `provision_mode` を `wordpress` に設定。\n\n\tvm_box                = 'sample'\n\t...\n\tprovision_mode        = 'wordpress'    # all|wordpress|box\n\nプロビジョニング設定ファイルの設定はお好みで。\n`provision_mode` が `wordpress` 場合、\nプロビジョニング時にプロビジョニング設定ファイルの WordPress Settings セクションだけが有効になります。\n\n### 6. 仮想環境を立ち上げます\n\n\tvagrant up\n\nプロビジョニングが完了したら、WordPress開発環境が立ち上がります。\n\n## Specification\n\n### Server (Selectable)\n\n* [Apache](http://httpd.apache.org)\n* [nginx](http://nginx.org)\n* [H2O](https://h2o.examp1e.net)\n\n### FastCGI (Selectable)\n\n* [PHP-FPM](http://php-fpm.org) (FastCGI Process Manager)\n\n### Database (Selectable)\n\n* [MariaDB](https://mariadb.org)\n* [MySQL](http://www.mysql.com)\n\n### Pre-installing\n\n* [WordPress](https://wordpress.org)\n* [phpenv](https://github.com/CHH/phpenv)\n* [php-build](https://php-build.github.io)\n* [PHP](https://secure.php.net) (Zend OPcache, APCu) via [phpenv](https://github.com/CHH/phpenv)\n* [Composer](https://getcomposer.org/) via [phpenv](https://github.com/CHH/phpenv)\n* [OpenSSL](https://www.openssl.org) (Selectable)\n* [WP-CLI](http://wp-cli.org)\n* [Git](http://git-scm.com)\n\n### Develop Tools (Activatable)\n\n* [Subversion](https://subversion.apache.org)\n* [gettext](https://www.gnu.org/software/gettext/)\n* [nodenv](https://github.com/nodenv/nodenv)\n* [Node.js](http://nodejs.org) via [nodenv](https://github.com/nodenv/nodenv)\n* [npm](https://www.npmjs.com)\n* [Yarn](https://yarnpkg.com/)\n* [Grunt](http://gruntjs.com)\n* [gulp](http://gulpjs.com)\n* [WordPress i18n tools](http://codex.wordpress.org/I18n_for_WordPress_Developers)\n* [npm-check-updates](https://www.npmjs.com/package/npm-check-updates)\n* [Xdebug](http://xdebug.org)\n* Opcache Web Viewer ([Opcache-Status](https://github.com/rlerdorf/opcache-status), [opcache-gui](https://github.com/amnuts/opcache-gui), [ocp.php](https://gist.github.com/ck-on/4959032/))\n* [cachetool](http://gordalina.github.io/cachetool/)\n* [wrk - Modern HTTP benchmarking tool](https://github.com/wg/wrk)\n* [webgrind](https://github.com/jokkedk/webgrind)\n* [MailHog](https://github.com/mailhog/MailHog)\n\n### Deploy Tools (Activatable)\n\n* [Dandelion](http://scttnlsn.github.io/dandelion/)\n* [Wordmove](https://github.com/welaika/wordmove)\n\n### Other\n\n* [rbenv](https://github.com/sstephenson/rbenv)\n* [ruby-build](https://github.com/sstephenson/ruby-build)\n* [Ruby](https://www.ruby-lang.org/) via [rbenv](https://github.com/sstephenson/rbenv)\n\n### Deprecated Tools (Recommend migrating to project's local development environment)\n\n以下は、package.json または composer.json を使ってプロジェクトごとにローカル開発環境を整えることをおすすめします。\n\n#### Migrate to package.json\n\n* [plato](https://github.com/es-analysis/plato)\n* [stylestats](https://github.com/t32k/stylestats)\n\n#### Migrate to composer.json\n\n* [PHPUnit](https://phpunit.de)\n* [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) \u0026 [WordPress Coding Standards](https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards)\n* [PHPStan](https://github.com/phpstan/phpstan) (Only PHP7)\n* [PHPMD](https://phpmd.org/)\n* [PHPUnit Selenium](https://github.com/giorgiosironi/phpunit-selenium)\n\n### Helper command\n\n* after_provision.sh\n* before_provision.sh\n* centos-box.sh\n* db_backup.sh\n* npm-installer.sh\n* phpenv.sh\n\n## Helper command\n\nVAW には、便利なスクリプトを用意しています。ターミナル上でスクリプトを走らせるだけ。データベースのデータバックアップや PHP の複数バージョンインストール、実行環境の切り替えができます。\n\n### db_backup.sh\n\nデータベースのデータをバックアップします。`backup` フォルダに `backup-%Y%m%d%H%M%S.sql` 形式で保存します。\n\n\tcd /var/www/html\n\t/vagrant/command/db_backup.sh\n\n### phpenv.sh\n\n指定したバージョンの PHP 実行環境を整えます。指定バージョンの PHP がインストールできます。PHPバージョン切り替えを行います。Apache や PHP-FPM のサーバ設定環境を切り替えて再起動します。\n\n\t/vagrant/command/phpenv.sh -v 8.2.19 -m php-fpm -s unix\n\n\t# help\n\t/vagrant/command/phpenv.sh -h\n\n## Custom Config\n\nディレクトリ `config` に編集したチューニング用設定ファイルを追加すると、プロビジョニング時に配置します。\nチューニング用設定ファイルは以下の通り。\n\n* default-node-packages.j2\n* default-ruby-gems.j2\n* h2o.conf.j2\n* httpd.conf.centos6.j2\n* httpd.conf.centos7.j2\n* httpd.www.conf.centos7.j2\n* mariadb.my.cnf.j2\n* mysql.my.cnf.j2\n* nginx.conf.j2\n* nginx.multisite.conf.j2\n* nginx.wordpress.conf.j2\n* nginx.wordpress.multisite.conf.j2\n* php-build.default_configure_options.j2\n* php-fpm.conf (for phpenv.sh)\n* php-fpm.www.conf (for phpenv.sh)\n* php.ini (for phpenv.sh)\n* ssh-config.j2\n\n## Trouble shooting\n\n### Vagrant can't mount to /mnt when vagrant up.\n\nThe following `umount /mnt` error message is displayed.\n\n```\nThe following SSH command responded with a non-zero exit status.\nVagrant assumes that this means the command failed!\n\numount /mnt\n\nStdout from the command:\n\n\nStderr from the command:\n\numount: /mnt: not mounted\n```\n\nIt may happens if the kernel version of OS used in vagrant box does not match the requirements.\n\nThe solution is to update the kernel and provision again. It may also be resolved by updating the vagrant box.\n\n1. Access to a guest via SSH.\n\n```\nvagrant ssh\n```\n\n2. Update the kernel into guest OS.\n\n#### Debian or Ubuntu\n\n```\nsudo apt-get -y install linux-image-amd64 linux-headers-amd64\n```\n\n#### CentOS\n\n```\nsudo yum -y update kernel kernel-devel kernel-headers kernel-tools kernel-tools-libs\n\nexit\n```\n\n3. Provision again on the host.\n\n```\nvagrant reload\n```\n\n## Contribution\n\n### Patches and Bug Fixes\n\nSmall patches and bug reports can be submitted a issue tracker in Github. Forking on Github is another good way. You can send a pull request.\n\n1. Fork [VAW](https://github.com/thingsym/vaw) from GitHub repository\n2. Create a feature branch: git checkout -b my-new-feature\n3. Commit your changes: git commit -am 'Add some feature'\n4. Push to the branch: git push origin my-new-feature\n5. Create new Pull Request\n\n## Changelog\n\nSee CHANGELOG.md\n\n## License\n\nThe VAW is distributed under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.html).\n\n## Author\n\n[thingsym](https://github.com/thingsym)\n\nCopyright (c) 2014-2021 thingsym\n","funding_links":["https://github.com/sponsors/thingsym"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsym%2Fvaw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthingsym%2Fvaw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsym%2Fvaw/lists"}