forked from monasca/monasca-docker
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
53 lines (46 loc) · 2.08 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
# This file can be used to simulate a CI locally using Vagrant
# It requires the vagrant-docker-compose plugin that can be installed with:
# $ vagrant plugin install vagrant-docker-compose
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
# https://docs.vagrantup.com.
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
# config.vm.box = "ubuntu/bionic64" #10GB
config.vm.box = "bento/ubuntu-18.04"
config.vm.hostname = "monasca"
# access a port on your host machine (via localhost) and have all data forwarded to a port on the guest machine.
config.vm.network "forwarded_port", guest: 9092, host: 9092
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.188.110"
config.vm.provider "virtualbox" do |vb|
vb.name = 'Monasca'
vb.memory = 8200
vb.cpus = 2
#vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
#vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"]
end
# set up Docker in the new VM:
config.vm.provision :docker
config.vm.provision :docker_compose
config.vm.provision "shell", privileged: false, inline: <<-SHELL
# sudo apt-get update
# sudo apt-get -y upgrade
sudo apt install -y python-pip
sudo pip install pip --upgrade
sudo pip install git+https://github.com/monasca/dbuild.git
sudo pip install "six>=1.13.0"
sudo apt-get -y install git
# Change to the branch you want to test
git clone https://github.com/FujitsuEnablingSoftwareTechnologyGmbH/monasca-docker.git -b master
cd monasca-docker
export CI_EVENT_TYPE="pull_request"
# Choose the pipeline you want to test (metrics XOR logs):
python ci.py --pipeline metrics --print-logs --verbose --CI_EVENT_TYPE cron
# python ci.py --pipeline metrics --print-logs --verbose --CI_EVENT_TYPE cron
SHELL
end