Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Vagrant 1.2.2 and AWS
Search
Arturas Smorgun
May 09, 2013
Technology
0
48
Vagrant 1.2.2 and AWS
Demo of new features in Vagrant 1.2.2 and usage with AWS
Arturas Smorgun
May 09, 2013
Tweet
Share
More Decks by Arturas Smorgun
See All by Arturas Smorgun
Solve Complex Problems with DDD
asarturas
0
110
Review of Graph Databases
asarturas
0
52
Profiling in PHP
asarturas
5
890
Design Patterns in PHP Applications
asarturas
5
190
Application Quality
asarturas
6
300
Git Rebase
asarturas
2
210
Let's automate!
asarturas
0
240
AngularJS
asarturas
14
1.3k
Other Decks in Technology
See All in Technology
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
350
VPC間の接続方法を整理してみた #自治体クラウド勉強会
non97
1
850
新R25、乃木坂46 Mobileなどのファンビジネスを支えるマルチテナンシーなプラットフォームの全体像 / cam-multi-cloud
cyberagentdevelopers
PRO
1
130
[JAWS-UG金沢支部×コンテナ支部合同企画]コンテナとは何か
furuton
3
260
Amazon FSx for NetApp ONTAPを利用するにあたっての要件整理と設計のポイント
non97
1
160
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
5
49k
LeSSに潜む「隠れWF病」とその処方箋
lycorptech_jp
PRO
2
120
プロダクト成長に対応するプラットフォーム戦略:Authleteによる共通認証基盤の移行事例 / Building an authentication platform using Authlete and AWS
kakehashi
1
150
MAMを軸とした動画ハンドリングにおけるAI活用前提の整備と次世代ビジョン / abema-ai-mam
cyberagentdevelopers
PRO
1
120
小規模に始めるデータメッシュとデータガバナンスの実践
kimujun
3
590
生成AIと知識グラフの相互利用に基づく文書解析
koujikozaki
1
140
Java x Spring Boot Warm up
kazu_kichi_67
2
490
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Making the Leap to Tech Lead
cromwellryan
132
8.9k
The World Runs on Bad Software
bkeepers
PRO
65
11k
It's Worth the Effort
3n
183
27k
What's in a price? How to price your products and services
michaelherold
243
12k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Side Projects
sachag
452
42k
Designing the Hi-DPI Web
ddemaree
280
34k
GraphQLとの向き合い方2022年版
quramy
43
13k
KATA
mclloyd
29
13k
Automating Front-end Workflow
addyosmani
1365
200k
Transcript
Artūras Šmorgun, Inviqa Enlighten Lunch, 9th of May 2013 va·grant
One who lives on the streets and constitutes a public nuisance.
$ vagrant a tool to manage virtual boxes sometimes annoying
but easy and helpful (when works)
Versions 1.0.7 is widely used 1.2.2 is latest version 1.2.3
to be released soon
Vagrant 1.2.2 Compatibility Installation Configuration Plugins Windows support
1.1.x Fully compatible with 1.0.x (if you don’t use plugins)
1.x Fully compatible with 1.0.x Compatibility between 1.x not promised
(until next stable release 2.0) (1.0 considered to be stable)
Installation No RubyGems since 1.0.x downloads.vagrantup.com Install as usual Logout
and login back
Configuration Compatible with 1.0.x Versioning Vagrant.configure(“version#”) Vagrant.Config.run == Vagrant.configure(“1”)
Plugins Claimed to be compatible between version Many of them
(and increasing)
vagrant-apache2, vagrant-aws, vagrant- berkshelf, vagrant-boxen, vagrant-bundler, vagrant-butcher, vagrant-digitalocean, vagrant- exec,
vagrant-fog-box-storage, vagrant-host-path, vagrant-hostmaster, vagrant-hostmanager, vagrant-kvm, vagrant-librarian, vagrant- librarian-chef, vagrant-libvirt, vagrant-lxc, vagrant-mysql, vagrant-notify, vagrant-persistent- storage, vagrant-plugins, vagrant-rake, vagrant- rsync, vagrant-salt, vagrant-screenshot, vagrant- snap, vagrant-vbguest, nugrant, vagrant- sparseimage, vagrant-windows Last edited by p0deje, 10 days ago
vagrant-librarian-chef Automatically runs librarian-chef You will still need to have
in installed git://github.com/jimmycuadra/vagrant-librarian-chef.git Vagrant 1.2.0+
vagrant-aws Provisioner Amazon EC2 git://github.com/mitchellh/vagrant-aws.git Vagrant 1.2.0+
usage: step #1 vagrant plugin install vagrant-aws
usage: step #2 Create box file metadata.json Vagrantfile Tar-gzip it
metadata.json { "provider": "aws" }
Vagrantfile # -*- mode: ruby -*- # vi: set ft=ruby
: Vagrant.configure("2") do |config| config.vm.provider :aws do |aws| aws.ami = "ami-7747d01e" end end
tar-gzip it! tar cvzf aws.box ./metadata.json \ ./Vagrantfile
usage: step #3 Project configuration with Vagrantfile Source box from
last step Access details Configuration
Project structure > tools/ > vagrant/ > Vagrantfile
Vagrantfile # -*- mode: ruby -*- # vi: set ft=ruby
: Vagrant.configure("2") do |config| config.vm.provider :aws do |aws, override| end end
Vagrantfile: box # -*- mode: ruby -*- # vi: set
ft=ruby : Vagrant.configure("2") do |config| config.vm.box = "vagrant122-aws" config.vm.box_url = "file:///home/arturas/ Downloads/vagrant122-aws.box" <..> end
Vagrantfile: aws <..> config.vm.provider :aws do |aws, override| aws.access_key_id =
'key_id' aws.secret_access_key = 'secret_access_key' aws.keypair_name = 'Vagrant122' aws.region = 'eu-west-1' aws.instance_type = 'm1.micro' aws.ami = 'ami-f2191786' override.ssh.username = 'ubuntu' override.ssh.private_key_path = "path_to_pem" end <..>
https://portal.aws.amazon.com/gp/aws/securityCredentials
https://console.aws.amazon.com/ec2/home
usage: step #4 Project provisioning with Vagrantfile Shell script to
install chef Add shell provision Add chef provision
Project structure > tools/ > vagrant/ > Vagrantfile > install_chef_solo.sh
install_chef_solo.sh #!/bin/bash sudo apt-get update sudo apt-get -y install rubygems
sudo gem install chef
Project structure > tools/ > vagrant/ > Vagrantfile > install_chef_solo.sh
Vagrantfile: shell <..> config.vm.provision :shell do |shell| shell.path = "install_chef_solo.sh"
end <..>
Project structure > tools/ > vagrant/ > Vagrantfile > install_chef_solo.sh
> Cheffile > cookbooks/
Cheffile #!/usr/bin/env ruby #^syntax detection site 'http://community.opscode.com/api/v1' cookbook 'apache2', '>=
1.0.0' cookbook 'php', '>= 1.0.0' cookbook 'mysql', '>= 1.0.0'
Project structure > tools/ > vagrant/ > Vagrantfile > install_chef_solo.sh
> Cheffile > cookbooks/
Vagrantfile: chef <..> config.vm.provision :chef_solo do |chef| chef.cookbooks_path = ["cookbooks"]
chef.add_recipe "apache2" chef.add_recipe "php" chef.add_recipe "apache2::mod_php5" chef.add_recipe "mysql::server" chef.add_recipe "php::module_mysql" end <..>
usage: step #5 vagrant up --provider aws vagrant provision
Demonstration?
Questions? Artūras Šmorgun
[email protected]
@asarturas
Thank you! Artūras Šmorgun
[email protected]
@asarturas