Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
isochrone-vm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Institut für Informatik
dbis
dbis-isochrone
isochrone-vm
Commits
70af05c0
You need to sign in or sign up before continuing.
Commit
70af05c0
authored
8 years ago
by
User expired
Browse files
Options
Downloads
Patches
Plain Diff
preparations to use libvirt on dbis-ci test system
parent
94009185
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Vagrantfile
+29
-18
29 additions, 18 deletions
Vagrantfile
with
29 additions
and
18 deletions
Vagrantfile
+
29
−
18
View file @
70af05c0
# -*- mode: ruby -*-
# vi: set ft=ruby :
REQUIRED_PLUGINS
=
%w(vagrant-cachier
vagrant-vbguest
vagrant-triggers)
REQUIRED_PLUGINS
=
%w(vagrant-cachier vagrant-triggers)
exit
unless
REQUIRED_PLUGINS
.
all?
do
|
plugin
|
Vagrant
.
has_plugin?
(
plugin
)
||
(
puts
"The
#{
plugin
}
plugin is required. Please install it with:"
...
...
@@ -15,22 +15,28 @@ VAGRANTFILE_API_VERSION = "2"
HOSTNAME
=
`hostname -s`
deployAllDatasets
=
false
hostnameDbisCi
=
"ci"
hostnameDbisIsochrone
=
"dbis-w65107"
hostnameDbisTests
=
"ci"
isJenkinsDeploy
=
false
isLocalDeploy
=
false
isServerOverride
=
ENV
[
'TOMCAT_INIT'
]
||
false
provider
=
"virtualbox"
vname
=
"isochrone-local"
vbox
=
"box-cutter/centos73"
if
HOSTNAME
.
strip
.
eql?
hostnameDbis
Tests
if
HOSTNAME
.
strip
.
eql?
hostnameDbis
Ci
# puts "Starting box 'isochrone-jenkins'"
deployAllDatasets
=
false
isJenkinsDeploy
=
true
provider
=
"libvirt"
vbox
=
"centos/7"
vname
=
"isochrone-jenkins"
elsif
HOSTNAME
.
strip
.
eql?
hostnameDbisIsochrone
# puts "Starting box 'isochrone' (server mode)"
deployAllDatasets
=
true
isLocalDeploy
=
false
provider
=
"libvirt"
vbox
=
"centos/7"
# using libvirt (not virtualbox)
vname
=
"isochrone"
elsif
isServerOverride
# puts "Starting box 'isochrone' (forced server mode)"
...
...
@@ -46,19 +52,26 @@ end
Vagrant
.
configure
(
VAGRANTFILE_API_VERSION
)
do
|
config
|
config
.
vm
.
boot_timeout
=
600
config
.
vm
.
box
=
vbox
# Hardware configuration
# WARNING: Be VERY careful with this settings!!!
# -> giving the client more cores can SLOW DOWN the VM (if there is not enough workload on the guest, two less cores on the host...)
config
.
vm
.
provider
"virtualbox"
do
|
v
|
v
.
name
=
vname
v
.
gui
=
false
v
.
cpus
=
1
v
.
memory
=
2048
v
.
customize
[
"modifyvm"
,
:id
,
"--cpuexecutioncap"
,
"100"
]
v
.
customize
[
"modifyvm"
,
:id
,
"--ostype"
,
"RedHat_64"
]
v
.
customize
[
"modifyvm"
,
:id
,
"--nictype1"
,
"virtio"
]
v
.
customize
[
"storagectl"
,
:id
,
"--name"
,
"SATA Controller"
,
"--hostiocache"
,
"on"
]
config
.
vm
.
provider
"libvirt"
do
|
libvirt
|
libvirt
.
driver
=
"kvm"
libvirt
.
memory
=
2048
libvirt
.
cpus
=
1
end
config
.
vm
.
provider
"virtualbox"
do
|
virtualbox
|
virtualbox
.
name
=
vname
virtualbox
.
gui
=
false
virtualbox
.
cpus
=
1
virtualbox
.
memory
=
2048
virtualbox
.
customize
[
"modifyvm"
,
:id
,
"--cpuexecutioncap"
,
"100"
]
virtualbox
.
customize
[
"modifyvm"
,
:id
,
"--ostype"
,
"RedHat_64"
]
virtualbox
.
customize
[
"modifyvm"
,
:id
,
"--nictype1"
,
"virtio"
]
virtualbox
.
customize
[
"storagectl"
,
:id
,
"--name"
,
"SATA Controller"
,
"--hostiocache"
,
"on"
]
end
config
.
trigger
.
after
:destroy
do
...
...
@@ -69,10 +82,8 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Enable vagrant-cachier plugin
config
.
cache
.
enable
:yum
# Information about the box itself (name from vagrantcloud)
config
.
vm
.
box
=
"box-cutter/centos73"
# Setup of shared folders
config
.
vm
.
synced_folder
"."
,
"/vagrant"
,
type:
"nfs"
,
rsync__exclude:
[
".git/"
,
".vagrant/"
]
config
.
vm
.
synced_folder
"conf"
,
"/setup/conf"
config
.
vm
.
synced_folder
"data"
,
"/opt/data"
,
create:
true
config
.
vm
.
synced_folder
"img"
,
"/setup/img"
...
...
@@ -80,7 +91,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config
.
vm
.
synced_folder
"log/bootstrap"
,
"/var/log/vagrant_bootstrap"
,
create:
true
,
owner:
"vagrant"
,
group:
"vagrant"
# Setup environment on startup (done using a shell script)
config
.
vm
.
provision
"shell"
,
keep_color:
true
,
path:
"bootstrap/prepareEnvironment.sh"
,
args:
[
"secretPhdPassword#2014!"
,
(
isLocalDeploy
?
"true"
:
"false"
),
(
isJenki
nsDeploy
?
"true"
:
"false"
)]
config
.
vm
.
provision
"shell"
,
keep_color:
true
,
path:
"bootstrap/prepareEnvironment.sh"
,
args:
[
"secretPhdPassword#2014!"
,
(
isLocalDeploy
?
"true"
:
"false"
),
(
isJenki
$
config
.
vm
.
provision
"shell"
,
keep_color:
true
,
path:
"bootstrap/createDatabase.sh"
,
args:
[
"niko"
,
"secretPhdPassword#2014!"
]
config
.
vm
.
provision
"shell"
,
keep_color:
true
,
path:
"bootstrap/importData.sh"
,
args:
[
"niko"
,
"secretPhdPassword#2014!"
,
(
deployAllDatasets
?
"true"
:
"false"
)]
# Optionally activate database logging (for queryTimeLogging this is done in the testcase itself now)
...
...
@@ -95,6 +106,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
unless
(
isLocalDeploy
||
isJenkinsDeploy
)
config
.
vm
.
network
:forwarded_port
,
guest:
8080
,
host:
8080
,
id:
"tomcat"
,
auto_correct:
false
end
#
config.vm.network :private_network, :ip => '192.168.4.50'
#
config.vm.network :public_network
# config.vm.network :private_network, :ip => '192.168.4.50'
# config.vm.network :public_network
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment