Skip to content

Commit 6aa596b

Browse files
committed
add VagrantSample files
1 parent c836964 commit 6aa596b

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

files/VagrantSample/Vagrantfile

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
5+
# configures the configuration version (we support older styles for
6+
# backwards compatibility). Please don't change it unless you know what
7+
# you're doing.
8+
Vagrant.configure(2) do |config|
9+
# The most common configuration options are documented and commented below.
10+
# For a complete reference, please see the online documentation at
11+
# https://docs.vagrantup.com.
12+
13+
# Every Vagrant development environment requires a box. You can search for
14+
# boxes at https://atlas.hashicorp.com/search.
15+
config.vm.box = "ubuntu14.04"
16+
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
17+
config.vm.provision :shell, :path => "bootstrap.sh", :privileged => true
18+
19+
# Disable automatic box update checking. If you disable this, then
20+
# boxes will only be checked for updates when the user runs
21+
# `vagrant box outdated`. This is not recommended.
22+
# config.vm.box_check_update = false
23+
24+
# Create a forwarded port mapping which allows access to a specific port
25+
# within the machine from a port on the host machine. In the example below,
26+
# accessing "localhost:8080" will access port 80 on the guest machine.
27+
config.vm.network "forwarded_port", guest: 5900, host: 15900
28+
29+
config.vm.provider :virtualbox do |vb|
30+
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
31+
end
32+
33+
# Create a private network, which allows host-only access to the machine
34+
# using a specific IP.
35+
# config.vm.network "private_network", ip: "192.168.33.10"
36+
37+
# Create a public network, which generally matched to bridged network.
38+
# Bridged networks make the machine appear as another physical device on
39+
# your network.
40+
41+
# Share an additional folder to the guest VM. The first argument is
42+
# the path on the host to the actual folder. The second argument is
43+
# the path on the guest to mount the folder. And the optional third
44+
# argument is a set of non-required options.
45+
# config.vm.synced_folder "../data", "/vagrant_data"
46+
47+
config.vm.synced_folder "sync", "/home/vagrant/sync", create:true, type:"rsync"
48+
49+
# Provider-specific configuration so you can fine-tune various
50+
# backing providers for Vagrant. These expose provider-specific options.
51+
# Example for VirtualBox:
52+
#
53+
# config.vm.provider "virtualbox" do |vb|
54+
# # Display the VirtualBox GUI when booting the machine
55+
# vb.gui = true
56+
#
57+
# # Customize the amount of memory on the VM:
58+
# vb.memory = "1024"
59+
# end
60+
#
61+
# View the documentation for the provider you are using for more
62+
# information on available options.
63+
64+
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
65+
# such as FTP and Heroku are also available. See the documentation at
66+
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
67+
# config.push.define "atlas" do |push|
68+
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
69+
# end
70+
71+
# Enable provisioning with a shell script. Additional provisioners such as
72+
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
73+
# documentation for more information about their specific syntax and use.
74+
# config.vm.provision "shell", inline: <<-SHELL
75+
# sudo apt-get update
76+
# sudo apt-get install -y apache2
77+
# SHELL
78+
end

files/VagrantSample/bootstrap.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
test -f /etc/bootstrapped && exit
3+
4+
apt-get update
5+
apt-get install -y git g++ make language-pack-ja-base language-pack-ja
6+
update-locale LANG=ja_JP.UTF-8 LANGUAGE="ja_JP:ja"
7+
8+
date > /etc/bootstrapped

0 commit comments

Comments
 (0)