vagrant-g5k 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +30 -2
  4. data/Vagrantfile +49 -20
  5. data/lib/vagrant-g5k.rb +16 -0
  6. data/lib/vagrant-g5k/action.rb +52 -20
  7. data/lib/vagrant-g5k/action/connect_g5k.rb +3 -8
  8. data/lib/vagrant-g5k/action/create_local_working_dir.rb +1 -1
  9. data/lib/vagrant-g5k/action/get_state.rb +23 -0
  10. data/lib/vagrant-g5k/action/is_created.rb +6 -2
  11. data/lib/vagrant-g5k/action/{message_already_created.rb → message_already_running.rb} +1 -1
  12. data/lib/vagrant-g5k/action/message_not_running.rb +16 -0
  13. data/lib/vagrant-g5k/action/read_ssh_info.rb +16 -14
  14. data/lib/vagrant-g5k/action/read_state.rb +8 -0
  15. data/lib/vagrant-g5k/action/run_instance.rb +1 -0
  16. data/lib/vagrant-g5k/action/wait_instance.rb +18 -0
  17. data/lib/vagrant-g5k/config.rb +7 -3
  18. data/lib/vagrant-g5k/util/g5k_utils.rb +164 -37
  19. data/lib/vagrant-g5k/util/launch_vm_bridge.sh +58 -0
  20. data/lib/vagrant-g5k/version.rb +1 -1
  21. data/vagrant-g5k.gemspec +6 -6
  22. metadata +24 -70
  23. data/Vagrantfile.multisite +0 -37
  24. data/results/.gitignore +0 -2
  25. data/results/README.md +0 -43
  26. data/results/Vagrantfile +0 -126
  27. data/results/ansible.cfg +0 -2
  28. data/results/boilerplate.retry +0 -1
  29. data/results/boilerplate.yml +0 -248
  30. data/results/files/grafana/dashboard.json +0 -4572
  31. data/results/files/grafana/dedicated.json +0 -5486
  32. data/results/files/grafana/haproxy.json +0 -2632
  33. data/results/files/heka/config.json +0 -47
  34. data/results/files/heka/heka-globals.toml +0 -2
  35. data/results/files/heka/lua_decoders/haproxy_log.lua +0 -162
  36. data/results/files/heka/lua_decoders/os_keystone_apache_log.lua +0 -78
  37. data/results/files/heka/lua_decoders/os_mysql_log.lua +0 -56
  38. data/results/files/heka/lua_decoders/os_openstack_log.lua +0 -146
  39. data/results/files/heka/lua_decoders/os_rabbitmq_log.lua +0 -79
  40. data/results/files/kibana/all_objects.json +0 -81
  41. data/results/files/nginx.conf +0 -34
  42. data/results/templates/heka-elasticsearch.toml.j2 +0 -18
  43. data/results/templates/heka-haproxy.toml.j2 +0 -10
  44. data/results/templates/heka-keystone.toml.j2 +0 -14
  45. data/results/templates/heka-mariadb.toml.j2 +0 -14
  46. data/results/templates/heka-openstack.toml.j2 +0 -15
  47. data/results/templates/heka-rabbitmq.toml.j2 +0 -21
  48. data/results/test.rb +0 -32
@@ -1,79 +0,0 @@
1
- -- Copyright 2015-2016 Mirantis, Inc.
2
- --
3
- -- Licensed under the Apache License, Version 2.0 (the "License");
4
- -- you may not use this file except in compliance with the License.
5
- -- You may obtain a copy of the License at
6
- --
7
- -- http://www.apache.org/licenses/LICENSE-2.0
8
- --
9
- -- Unless required by applicable law or agreed to in writing, software
10
- -- distributed under the License is distributed on an "AS IS" BASIS,
11
- -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- -- See the License for the specific language governing permissions and
13
- -- limitations under the License.
14
- local dt = require "date_time"
15
- local l = require 'lpeg'
16
- l.locale(l)
17
-
18
- local patt = require 'os_patterns'
19
- local utils = require 'os_utils'
20
-
21
-
22
- -- Allow custom type
23
- t = read_config('type')
24
- if t == nil or t == '' then
25
- t = 'log'
26
- end
27
-
28
- local msg = {
29
- Timestamp = nil,
30
- Type = t,
31
- Hostname = nil,
32
- Payload = nil,
33
- Pid = nil,
34
- Fields = nil,
35
- Severity = nil,
36
- }
37
-
38
- -- RabbitMQ message logs are formatted like this:
39
- -- =ERROR REPORT==== 2-Jan-2015::09:17:22 ===
40
- -- Blabla
41
- -- Blabla
42
- --
43
- local message = l.Cg(patt.Message / utils.chomp, "Message")
44
- -- The token before 'REPORT' isn't standardized so it can be a valid severity
45
- -- level as 'INFO' or 'ERROR' but also 'CRASH' or 'SUPERVISOR'.
46
- local severity = l.Cg(l.R"AZ"^1, "SeverityLabel")
47
- local day = l.R"13" * l.R"09" + l.R"19"
48
- local datetime = l.Cg(day, "day") * patt.dash * dt.date_mabbr * patt.dash * dt.date_fullyear *
49
- "::" * dt.rfc3339_partial_time
50
- local timestamp = l.Cg(l.Ct(datetime)/ dt.time_to_ns, "Timestamp")
51
-
52
- local grammar = l.Ct("=" * severity * " REPORT==== " * timestamp * " ===" * l.P'\n' * message)
53
-
54
- function process_message ()
55
- local log = read_message("Payload")
56
-
57
- local m = grammar:match(log)
58
- if not m then
59
- return -1
60
- end
61
-
62
- msg.Timestamp = m.Timestamp
63
- msg.Payload = m.Message
64
- msg.Logger = read_message("Logger")
65
-
66
- if utils.label_to_severity_map[m.SeverityLabel] then
67
- msg.Severity = utils.label_to_severity_map[m.SeverityLabel]
68
- elseif m.SeverityLabel == 'CRASH' then
69
- msg.Severity = 2 -- CRITICAL
70
- else
71
- msg.Severity = 5 -- NOTICE
72
- end
73
-
74
- msg.Fields = {}
75
- msg.Fields.severity_label = utils.severity_to_label_map[msg.Severity]
76
- msg.Fields.programname = 'rabbitmq'
77
-
78
- return utils.safe_inject_message(msg)
79
- end
@@ -1,81 +0,0 @@
1
- [
2
- {
3
- "_id": "Logs",
4
- "_type": "dashboard",
5
- "_source": {
6
- "title": "Logs",
7
- "hits": 0,
8
- "description": "",
9
- "panelsJSON": "[{\"id\":\"Types\",\"type\":\"visualization\",\"panelIndex\":1,\"size_x\":4,\"size_y\":3,\"col\":1,\"row\":1},{\"id\":\"progname\",\"type\":\"visualization\",\"panelIndex\":2,\"size_x\":4,\"size_y\":3,\"col\":5,\"row\":1},{\"id\":\"http_status\",\"type\":\"visualization\",\"panelIndex\":3,\"size_x\":4,\"size_y\":3,\"col\":9,\"row\":1},{\"id\":\"raw\",\"type\":\"search\",\"panelIndex\":4,\"size_x\":12,\"size_y\":6,\"col\":1,\"row\":4,\"columns\":[\"_source\"],\"sort\":[\"Timestamp\",\"desc\"]}]",
10
- "optionsJSON": "{\"darkTheme\":false}",
11
- "uiStateJSON": "{}",
12
- "version": 1,
13
- "timeRestore": false,
14
- "kibanaSavedObjectMeta": {
15
- "searchSourceJSON": "{\"filter\":[{\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}}}]}"
16
- }
17
- }
18
- },
19
- {
20
- "_id": "raw",
21
- "_type": "search",
22
- "_source": {
23
- "title": "raw",
24
- "description": "",
25
- "hits": 0,
26
- "columns": [
27
- "_source"
28
- ],
29
- "sort": [
30
- "Timestamp",
31
- "desc"
32
- ],
33
- "version": 1,
34
- "kibanaSavedObjectMeta": {
35
- "searchSourceJSON": "{\"index\":\"heka*\",\"filter\":[],\"highlight\":{\"pre_tags\":[\"@kibana-highlighted-field@\"],\"post_tags\":[\"@/kibana-highlighted-field@\"],\"fields\":{\"*\":{}},\"require_field_match\":false,\"fragment_size\":2147483647},\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}}}"
36
- }
37
- }
38
- },
39
- {
40
- "_id": "progname",
41
- "_type": "visualization",
42
- "_source": {
43
- "title": "progname",
44
- "visState": "{\"title\":\"progname\",\"type\":\"pie\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"isDonut\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"programname\",\"size\":10,\"order\":\"desc\",\"orderBy\":\"1\"}}],\"listeners\":{}}",
45
- "uiStateJSON": "{}",
46
- "description": "",
47
- "version": 1,
48
- "kibanaSavedObjectMeta": {
49
- "searchSourceJSON": "{\"index\":\"heka*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"
50
- }
51
- }
52
- },
53
- {
54
- "_id": "http_status",
55
- "_type": "visualization",
56
- "_source": {
57
- "title": "http_status",
58
- "visState": "{\"title\":\"http_status\",\"type\":\"pie\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"isDonut\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"http_status\",\"size\":5,\"order\":\"desc\",\"orderBy\":\"1\"}}],\"listeners\":{}}",
59
- "uiStateJSON": "{}",
60
- "description": "",
61
- "version": 1,
62
- "kibanaSavedObjectMeta": {
63
- "searchSourceJSON": "{\"index\":\"heka*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"
64
- }
65
- }
66
- },
67
- {
68
- "_id": "Types",
69
- "_type": "visualization",
70
- "_source": {
71
- "title": "Types",
72
- "visState": "{\"title\":\"Types\",\"type\":\"pie\",\"params\":{\"shareYAxis\":true,\"addTooltip\":true,\"addLegend\":true,\"isDonut\":false},\"aggs\":[{\"id\":\"1\",\"type\":\"count\",\"schema\":\"metric\",\"params\":{}},{\"id\":\"2\",\"type\":\"terms\",\"schema\":\"segment\",\"params\":{\"field\":\"Type\",\"size\":20,\"order\":\"desc\",\"orderBy\":\"1\"}}],\"listeners\":{}}",
73
- "uiStateJSON": "{}",
74
- "description": "",
75
- "version": 1,
76
- "kibanaSavedObjectMeta": {
77
- "searchSourceJSON": "{\"index\":\"heka*\",\"query\":{\"query_string\":{\"query\":\"*\",\"analyze_wildcard\":true}},\"filter\":[]}"
78
- }
79
- }
80
- }
81
- ]
@@ -1,34 +0,0 @@
1
- user nginx;
2
- worker_processes 1;
3
- error_log /var/log/nginx/error.log warn;
4
- pid /var/run/nginx.pid;
5
-
6
- events {
7
- worker_connections 1024;
8
- }
9
-
10
- http {
11
- include /etc/nginx/mime.types;
12
- # prevent chrome to guess the content-type
13
- add_header X-Content-Type-Options nosniff;
14
- default_type text/plain;
15
- log_format main '$remote_addr - $remote_user [$time_local] "$request" '
16
- '$status $body_bytes_sent "$http_referer" '
17
- '"$http_user_agent" "$http_x_forwarded_for"';
18
- access_log /var/log/nginx/access.log main;
19
- sendfile on;
20
- keepalive_timeout 65;
21
- server {
22
- listen 80;
23
- server_name localhost;
24
- location / {
25
- root /usr/share/nginx/html;
26
- autoindex on;
27
- }
28
-
29
- error_page 500 502 503 504 /50x.html;
30
- location = /50x.html {
31
- root /usr/share/nginx/html;
32
- }
33
- }
34
- }
@@ -1,18 +0,0 @@
1
- [elasticsearch_json_encoder]
2
- type = "ESJsonEncoder"
3
- #index = "{{ item }}"
4
- index = "heka"
5
- es_index_from_timestamp = true
6
- fields = ["Timestamp", "Type", "Logger", "Severity", "Payload", "Pid", "Hostname", "DynamicFields"]
7
-
8
- [elasticsearch_output]
9
- type = "ElasticSearchOutput"
10
- # elastic container is likned to heka one
11
- server = "http://elasticsearch:9200"
12
- message_matcher = "Type =~ /^log.*/"
13
- encoder = "elasticsearch_json_encoder"
14
- use_buffering = true
15
- [elasticsearch_output.buffering]
16
- max_buffer_size = 1073741824 # 1024 * 1024 * 1024
17
- max_file_size = 134217728 # 128 * 1024 * 1024
18
- full_action = "drop"
@@ -1,10 +0,0 @@
1
- [haproxy_log_decoder]
2
- type = "SandboxDecoder"
3
- filename = "lua_decoders/haproxy_log.lua"
4
-
5
- [haproxy_logstreamer_input]
6
- type = "LogstreamerInput"
7
- decoder = "haproxy_log_decoder"
8
- log_directory = "/var/log/kolla"
9
- file_match = 'haproxy/haproxy\.log'
10
-
@@ -1,14 +0,0 @@
1
- [keystone_apache_log_decoder]
2
- type = "SandboxDecoder"
3
- filename = "lua_decoders/os_keystone_apache_log.lua"
4
- [keystone_apache_log_decoder.config]
5
- type = "log-{{ item[1] }}"
6
- apache_log_pattern = '%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"'
7
-
8
- [keystone_apache_logstreamer_input]
9
- type = "LogstreamerInput"
10
- decoder = "keystone_apache_log_decoder"
11
- log_directory = "/var/log/kolla"
12
- file_match = 'keystone/keystone-apache-(?P<Service>.+)-access\.log\.?(?P<Seq>\d*)$'
13
- priority = ["^Seq"]
14
- differentiator = ["keystone-apache-", "Service"]
@@ -1,14 +0,0 @@
1
- [mariadb_log_decoder]
2
- type = "SandboxDecoder"
3
- filename = "lua_decoders/os_mysql_log.lua"
4
-
5
- [mariadb_log_decoder.config]
6
- type = "log-{{ item[1] }}"
7
-
8
- [mariadb_logstreamer_input]
9
- type = "LogstreamerInput"
10
- decoder = "mariadb_log_decoder"
11
- log_directory = "/var/log/kolla"
12
- file_match = 'mariadb/mariadb\.log\.?(?P<Seq>\d*)$'
13
- priority = ["^Seq"]
14
- differentiator = ['mariadb']
@@ -1,15 +0,0 @@
1
- [openstack_log_decoder]
2
- type = "SandboxDecoder"
3
- filename = "lua_decoders/os_openstack_log.lua"
4
-
5
- [openstack_log_decoder.config]
6
- type = "log-{{ item[1] }}"
7
-
8
- [openstack_logstreamer_input]
9
- type = "LogstreamerInput"
10
- decoder = "openstack_log_decoder"
11
- log_directory = "/var/log/kolla"
12
- file_match = '(?P<Service>cloudkitty|nova|glance|keystone|neutron|ceph|cinder|heat|murano|magnum|mistral|manila|senlin)/(?P<Program>.*)\.log\.?(?P<Seq>\d*)$'
13
- priority = ["^Seq"]
14
- differentiator = ["Service", "_", "Program"]
15
-
@@ -1,21 +0,0 @@
1
- [rabbitmq_log_decoder]
2
- type = "SandboxDecoder"
3
- filename = "lua_decoders/os_rabbitmq_log.lua"
4
-
5
- [rabbitmq_log_decoder.config]
6
- type = "log-{{ item[1] }}"
7
-
8
- [rabbitmq_log_splitter]
9
- type = "RegexSplitter"
10
- delimiter = '\n\n(=[^=]+====)'
11
- delimiter_eol = false
12
- deliver_incomplete_final = true
13
-
14
- [rabbitmq_logstreamer_input]
15
- type = "LogstreamerInput"
16
- decoder = "rabbitmq_log_decoder"
17
- splitter = "rabbitmq_log_splitter"
18
- log_directory = "/var/log/kolla"
19
- file_match = 'rabbitmq/(?P<Service>rabbit.*)\.log\.?(?P<Seq>\d*)$'
20
- priority = ["^Seq"]
21
- differentiator = ["Service"]
data/results/test.rb DELETED
@@ -1,32 +0,0 @@
1
- require 'net/ssh/gateway'
2
- require 'net/http'
3
- include Process
4
-
5
- $gateway = Net::SSH::Gateway.new('access.grid5000.fr', 'msimonin')
6
- ports = []
7
-
8
- def close()
9
- $gateway.shutdown!
10
- end
11
-
12
-
13
- # Trap ^C
14
- Signal.trap("INT") {
15
- close()
16
- exit
17
- }
18
-
19
- # Trap ^C
20
- Signal.trap("TERM") {
21
- close()
22
- exit
23
- }
24
-
25
- remote_host = 'parapide-9.rennes.grid5000.fr'
26
- remote_ports = [5601, 3000]
27
- remote_ports.each do |remote_port|
28
- port = $gateway.open(remote_host, remote_port)
29
- puts "localhost:#{port} forwards to #{remote_host}:#{remote_port}"
30
- end
31
-
32
- wait