Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vagrantsetup
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
devbox
vagrantsetup
Commits
5188f6f1
Commit
5188f6f1
authored
Aug 01, 2019
by
Reimar Stier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add multiple disks
parent
2ce6d81e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
9 deletions
+29
-9
.gitignore
.gitignore
+2
-0
Readme.md
Readme.md
+4
-0
Vagrantfile
Vagrantfile
+23
-9
No files found.
.gitignore
0 → 100644
View file @
5188f6f1
*.vmdk
.vagrant/
Readme.md
0 → 100644
View file @
5188f6f1
# Prerequisites
choco install vagrant
vagrant plugin install vagrant-disksize
vagrant plugin install vagrant-proxyconf
Vagrantfile
View file @
5188f6f1
# -*- mode: ruby -*-
# vi: set ft=ruby :
disks
=
[
DISKS
=
[
{
"name"
=>
"home"
,
"size"
=>
5
},
{
"name"
=>
"home"
,
"size"
=>
5
},
"size"
=>
5
,
"port"
=>
1
},
{
"name"
=>
"opt"
,
"size"
=>
5
,
"port"
=>
2
},
]
Vagrant
.
configure
(
"2"
)
do
|
config
|
...
...
@@ -13,16 +16,27 @@ Vagrant.configure("2") do |config|
config
.
vm
.
box
=
"geerlingguy/debian10"
config
.
vm
.
network
"private_network"
,
ip:
"10.10.0.2"
,
adapter:
2
config
.
vm
.
hostname
=
"devbox.devops.detss.corpintra.net"
config
.
disksize
.
size
=
"20GB"
# require additional vagrant plugins
# config.disksize.size = "20GB"
config
.
proxy
.
http
=
"http://yourproxy:8080"
config
.
proxy
.
https
=
"http://yourproxy:8080"
config
.
proxy
.
no_proxy
=
"localhost,127.0.0.1"
config
.
vm
.
provider
"virtualbox"
do
|
vb
|
vb
.
memory
=
"4096"
vb
.
cpus
=
4
datadisk
=
"home.vmdk"
unless
File
.
exist?
(
datadisk
)
vb
.
customize
[
'createmedium'
,
'--filename'
,
datadisk
,
'--format'
,
'VMDK'
,
'--variant'
,
'Standard'
,
'--size'
,
16
*
1024
]
vb
.
name
=
"devbox"
# Adding a SATA controller that allows 4 hard drives
vb
.
customize
[
'storagectl'
,
:id
,
'--name'
,
'SATA Controller'
,
'--add'
,
'sata'
,
'--portcount'
,
4
]
DISKS
.
each
do
|
disk
|
datadisk
=
disk
[
"name"
]
+
".vmdk"
unless
File
.
exist?
(
datadisk
)
vb
.
customize
[
'createmedium'
,
'--filename'
,
datadisk
,
'--format'
,
'VMDK'
,
'--variant'
,
'Standard'
,
'--size'
,
disk
[
"size"
]
*
1024
]
end
vb
.
customize
[
'storageattach'
,
"devbox"
,
'--storagectl'
,
'SATA Controller'
,
'--port'
,
disk
[
"port"
],
'--device'
,
0
,
'--type'
,
'hdd'
,
'--medium'
,
datadisk
]
end
vb
.
customize
[
'storageattach'
,
:id
,
'--storagectl'
,
'SATA Controller'
,
'--port'
,
1
,
'--device'
,
0
,
'--type'
,
'hdd'
,
'--medium'
,
datadisk
]
end
config
.
vm
.
provision
"shell"
do
|
s
|
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment