-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
189 lines (173 loc) · 6.17 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
# coding: utf-8
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This Vagrantfile makes use of the plugin vagrant-g5k
# https://github.com/msimonin/vagrant-g5k
#
# version 0.9.2
# The list of experimentation. There will be one VM per
# experimentation. You can access it thought eg, `vagrant ssh idle`.
XPS =[
{
:name => "idle",
:confs => [
"idle-cpt20-nfk05",
"idle-cpt20-nfk10",
"idle-cpt20-nfk25",
"idle-cpt20-nfk50"
]
},
{
# dedicated 1 node for each mariadb, haproxy, conductor, rabbitmq, memcached
# with rally benchmark
:name => "load-ded",
:confs => [
"load-ded-cpt20-nfk05",
"load-ded-cpt20-nfk10",
"load-ded-cpt20-nfk25",
"load-ded-cpt20-nfk50-stopped"
]
},
{
# default topology
# with rally benchmark
:name => "load-default",
:confs => [
"load-default-cpt20-nfk05",
"load-default-cpt20-nfk10",
"load-default-cpt20-nfk25"
]
},
{
:name => "concurrency",
:confs => [ "concurrency-ccy0001-0015-cpt20-nfk50",
"concurrency-ccy0025-0045-cpt20-nfk50",
"concurrency-ccy0100-1000-cpt20-nfk05",
"concurrency-ccy200x5-hap100000vs4000-cpt20-nfk05",
"concurrency-ccy100x5-key10vs20-cpt20-nfk05" ]
},
{
# load test with a clustered rabbitmq first set of iterations
:name => "load-clust-rabbit-1",
:confs => [
"load-clust-rabbit-cpt20-nfk50",
"load-clust-rabbit-cpt20-nfk50-tuned-report-sync-intervals",
"load-clust-rabbit-cpt20-nfk50-tuned-report-sync-intervals-handshake-timeout",
"load-clust-rabbit-cpt20-nfk50-cond10-tuned-handshake-timeout",
"load-clust-rabbit-cpt20-nfk50-sched8-tuned-handshake-timeout-rally-1000-times",
]
},
{
# load test with a clustered rabbitmq second set of iteration
:name => "load-clust-rabbit-2",
:confs => [
"load-clust-rabbit-cpt20-nfk50-sched8-tuned-handshake-timeout-rally-times-10000",
"load-clust-rabbit-cpt20-nfk50-sched8-tuned-handshake-timeout-rally-times-10000-2",
"load-clust-rabbit-cpt20-nfk50-sched8-tuned-handshake-timeout-rally-times-10000-3",
"load-clust-rabbit-cpt20-nfk50-sched8-tuned-handshake-timeout-rally-times-10000-4",
"load-clust-rabbit-cpt20-nfk50-sched8-on-1-tuned-handshake-timeout-rally-20000"
]
},
{
# load test with a clustered rabbitmq third set of iteration
:name => "load-clust-rabbit-3",
:confs => [
"load-clust-rabbit-cpt20-nfk50-sched8-on-1-tuned-handshake-timeout-rally-20000",
"load-clust-rabbit-cpt20-nfk50-sched8-on-1-tuned-handshake-timeout-rally-20000-2"
]
},
{
# load test with a clustered rabbitmq third set of iteration
:name => "dense_l3_east_west",
:confs => [
"dense_l3_east_west_dvr_cpt4",
"dense_l3_east_west_nodvr_4cpt",
"dense_l3_east_west_dvr_cpt1",
"dense_l3_east_west_dvr_cpt1_interfaces",
"dense_l3_east_west_nodvr_cpt1_interfaces"
]
},
{
# load test with a clustered rabbitmq third set of iteration
:name => "test_shaker",
:confs => [
"test_shaker",
"test_shaker2"
]
}
# Add another experimentation
# ,{ :name => "vanilla",
# :confs => [ "cpt20-nfk05", "cpt20-nfk10", "cpt20-nfk25", "cpt20-nfk50" ]}
]
Vagrant.configure(2) do |config|
# user to log with inside the vm
config.ssh.username = "root"
# password to use to log inside the vm
config.ssh.private_key_path = File.join(ENV['HOME'], ".ssh/id_rsa_discovery")
config.vm.provider "g5k" do |g5k|
# The project id.
# It is used to generate uniq remote storage for images
# It must be uniq accros all project managed by vagrant.
g5k.project_id = "vagrant-g5k"
# user name used to connect to g5k
g5k.username = "discovery"
# private key
g5k.private_key = File.join(ENV['HOME'], ".ssh/id_rsa_discovery")
# site to use
g5k.site = "rennes"
g5k.gateway = "access.grid5000.fr"
# walltime to use
g5k.walltime = "03:00:00"
# image location
# g5k.image = {
# "path" => "$HOME/public/ubuntu1404.qcow2",
# "backing" => "copy"
#}
# it could be backed by the ceph
g5k.image = {
:pool => "discovery_kolla_registry",
:rbd => "bases/alpine_docker",
:id => "discovery",
:conf => "/home/discovery/.ceph/config",
:backing => "copy"
}
# ports to expose (at least ssh has to be forwarded)
g5k.net = {
:type => "nat",
:ports => ['2222-:22','3000-:3000', '8000-:80', '5601-:5601']
}
g5k.oar = "virtual != 'none' and core >= 16"
end
XPS.each do |xp|
config.vm.define xp[:name] do |my|
# box isn't used
my.vm.box = "dummy"
# From `boilerplate.yml`: this playbook relies on an `xps` variable.
# The `xps` variable is a list that contains the name of all
# experimentation. For instance, this list is as following for the
# idle experimentation:
# - idle-cpt20-nfk05
# - idle-cpt20-nfk10
# - idle-cpt20-nfk25
# - idle-cpt20-nfk50
#
# This ruby method computes this list and gives it to
# `ansible-playbook`. The construction of the list is based on the
# name of the experimentation `xp[:name]` and the list of
# experimentation done `xp[:confs]`
xps = {:xps => xp[:confs]}
# For the provision to run a dedicated proxy command seems necessary
# in your ssh config (the provisionner seems to not take into account
# the ssh-config of vagrant)
# Host *.grid5000.fr
# User <login>
# StrictHostKeyChecking no
# ProxyCommand ssh <login>@194.254.60.4 "nc %h %p"
my.vm.provision :ansible do |ansible|
ansible.playbook = "boilerplate.yml"
ansible.extra_vars = xps
ansible.verbose = "-vvvv"
end
end
end
end