- Windows 8.1 Pro Update 1 x64
- VirtualBox 4.3.10
- Vagrant Ver.1.6.3
https://github.com/WinRb/vagrant-windows/
- [WIP]動作するか => Ver.1.6.0 で確認するが一部問題あり
- ネットワークアダプターの変更ができない。
- Configurating network adapter failed when NON-ASCII adapter name used. · Issue #182 · WinRb/vagrant-windows
- WinRM Ver.1.1.3 で日本語が扱えない問題のため
- PR 済み => Fix PowerShell encoding from ASCII-8BIT to UTF-16LE for NON-ASCII string... by toruuetani · Pull Request #70 · WinRb/WinRM
https://github.com/schisamo/vagrant-omnibus
- [DONE]Windows でも動作するか => Ver.1.4.1 で確認
- [DONE]Chef インストーラがダウンロードされるか
- [DONE]Chef がインストールされるか
- [DONE]cookbookがコピーされるか
- [DONE]レシピが適用されるか
- [NG]インストーラのダウンロード先をローカルパスにできるか
- [NG]
config.omnibus.install_url
は URL しか受け付けない。 - [NG]Vagrant-Cachier プラグインでできるかも
- そもそもホストOSにインストーラがあってもゲストOSに転送する手段がないので不可能では?
- [NG]
https://github.com/mitchellh/vagrant-aws
- [DONE]Windows AMI を
vagrant up
できるか- EC2インスタンスは起動するが、 ssh の接続待ちでハングアップする。
- WinRM で接続する方法は不明
vagrant destroy
でEC2インスタンスが Terminate されることを確認済み
- [WIP]WinRM でネットワークアダプターを変更できるか
- [WIP]Vagrant-Omnibus で Chef をインストールできるか
- [DONE]dummy box 登録 =>
vagrant box add aws-dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
- [DONE]アクセスキー等はVCSに登録したくないので、 Dotenv を使う。
vagrant plugin install dotenv
AWS_ACCESS_KEY_ID = "aws_access_key"
AWS_SECRET_ACCESS_KEY = "aws_secret_key"
AWS_KEYPAIR_NAME = "keypair"
AWS_SECURITY_GROUP = "security_name"
AWS_INSTANCE_NAME = "instance_name"
Dotenv.load
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "aws-dummy"
# config.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.communicator = "winrm"
config.winrm.username = "vagrant"
config.winrm.password = "vagrant"
config.vm.provider :aws do |aws, override|
aws.access_key_id = ENV['AWS_ACCESS_KEY_ID']
aws.secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
aws.keypair_name = ENV['AWS_KEYPAIR_NAME']
aws.region = "ap-northeast-1" # Tokyo
aws.availability_zone = "ap-northeast-1c"
aws.ami = "ami-6f397a6e" # Windows_Server-2012-R2_RTM-Japanese-64Bit-Base-2014.05.20
aws.instance_type = "t1.micro"
aws.security_groups = ENV['AWS_SECURITY_GROUP']
aws.tags = {
'Name' => ENV['AWS_INSTANCE_NAME'],
}
end
end