Vagrant WordPress(Amimoto)をEC2で起動するための方法
久しぶりのpostになってしまいましたね。そっか年末は餅つきをしたのかと思いだしました。
今回は短めの内容となっています。
はじめに
Vagrant+Amimotoで超高速&鼻血がでるぐらい便利なWordPress環境をコマンド一発で起動する。hatena
上記のリンクを参考に、EC2でAmimotoを起動しようと思ったのですが・・・・
起動しない。鼻血出ない(;´∀`)
動作環境(ローカル)
<OS>
Mac OS X 10.9.2
<Vagrant>
$ vagrant -v Vagrant 1.5.2
<Vagrant plugin>
$ vagrant plugin list vagrant-aws (0.4.1) vagrant-hostsupdater (0.0.11) vagrant-login (1.0.1, system) vagrant-share (1.0.1, system) vagrant-vbguest (0.10.0)
Vagrantfileの編集
以下が起動するように編集したVagrantfileです。
Vagrantfile for amimoto launch on EC2
<変更点>
@miya0001さんが貼って下さったリンクを参考に、region_configを追加しました。これが不足していたため起動しませんでした。
Vagrant起動
$ vagrant up --provider=aws Bringing machine 'default' up with 'aws' provider... ==> default: HandleBoxUrl middleware is deprecated. Use HandleBox instead. ==> default: This is a bug with the provider. Please contact the creator ==> default: of the provider you use to fix this. ==> default: Warning! The AWS provider doesn't support any of the Vagrant ==> default: high-level network configurations (`config.vm.network`). They ==> default: will be silently ignored. ==> default: Launching an instance with the following settings... ==> default: -- Type: t1.micro ==> default: -- AMI: ami-29d54d28 ==> default: -- Region: ap-northeast-1 ==> default: -- Keypair: awskey ==> default: -- Security Groups: ["amimoto"] ==> default: -- Block Device Mapping: [] ==> default: -- Terminate On Shutdown: false ==> default: -- Monitoring: false ==> default: -- EBS optimized: false ==> default: Waiting for instance to become "ready"... ==> default: Waiting for SSH to become available... ==> default: Machine is booted and ready for use! ==> default: Rsyncing folder: /usr/local/vagrant/amimoto/ => /vagrant ==> default: Checking for host entries
Vagant SSH
$ vagrant ssh ___ _ __ / _ | __ _ (_)_ _ ___ / /____ / __ |/ ' \/ / ' \/ _ \/ __/ _ \ /_/ |_/_/_/_/_/_/_/_/\___/\__/\___/ Amazon Linux AMI release 2013.09 Nginx 1.4 + PHP 5.4 + Percona 5.5 amimoto http://ja.megumi-cloud.com/ digitalcube http://www.digitalcube.jp/ [ec2-user@ip-10-166-14-162 ~]$
WordPress Install
http://Public DNS/wp-admin/install.php
まとめ
この環境があれば気軽にサーバを起動させたり停止させたり削除したりすることが可能となります。
最近ではVagrant以外にDockerなど開発環境周りの技術が盛り上がってますね。
自分のペースで盛り上がりについていけるようにしたいです。