Commit 070508fe authored by Candy Tsai's avatar Candy Tsai

edit Vagrantfile to setup development environment

parent 6dcd6c70
Pipeline #47321 failed with stage
in 9 minutes and 48 seconds
......@@ -18,3 +18,4 @@
\ No newline at end of file
......@@ -2,9 +2,21 @@
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = ENV['BOX'] || 'debian/stretch64' 'forwarded_port', guest: 8080, host: 8080 = ENV['BOX'] || "debian/stretch64" "forwarded_port", guest: 8080, host: 8080
# default synced_folder settings will copy the actual contents of the symlink
# but we only want to copy the symlinks as they are
config.vm.synced_folder ".", "/vagrant", type: "rsync",
rsync__args: ["--verbose", "--archive", "--delete", "-z", "--links"]
# if for some reason you want to run `vagrant provision`
# please uncomment the following line and comment the original line
# config.vm.provision "shell", inline: 'echo "deb stretch-backports main" >> /etc/apt/sources.list', run: "never"
config.vm.provision "shell", inline: 'echo "deb stretch-backports main" >> /etc/apt/sources.list'
config.vm.provision "shell", path: "vagrant/"
......@@ -2,6 +2,44 @@
## Setting up a development environment
There are two ways to setup the development environment:
* Manual Setup
* Vagrant
## Vagrant
### Prerequisites
* Vagrant: 2.2.4
* VirtualBox: 6.0
### Install the virtual machine
Run this at the same path where `VagrantFile` is
$ vagrant up
### Start debci
SSH into vagrant environment
$ vagrant ssh
Once inside vagrant, you can start run debci with the following commands
vagrant@stretch $ cd /vagrant
vagrant@stretch $ sudo foreman start
Note: The other commands are the same as the ones mentioned in manual setup, but you have to use `sudo`.
## Manual Setup
### Grab the dependencies and required software
Install the dependencies and build dependencies:
......@@ -21,4 +21,8 @@ esac
echo "I: Web UI at http://localhost:$port/"
echo "I: Hit Control+C to stop"
echo ""
exec rerun --no-notify --background --dir lib -p '**/*.rb' -- rackup --include lib --port="$port"
# --host defaults to localhost
# which is different from what `man rackup` says
# also see:
# change to for vagrant or docker environments to have access
exec rerun --no-notify --background --dir lib -p '**/*.rb' -- rackup --include lib --port="$port" --host=
export DEBIAN_FRONTEND=noninteractive
apt-get -y update
apt-get -qqyt stretch-backports install autopkgtest
apt-get -qqy install make ruby git debootstrap
cd /vagrant
apt-get -qqy build-dep .
./bin/debci migrate
./bin/debci setup-chdist
echo "Development virtual machine is installed!"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment