|
4 | 4 | Vagrant.configure("2") do |config| |
5 | 5 | # Every Vagrant development environment requires a box. You can search for |
6 | 6 | # boxes at https://atlas.hashicorp.com/search. |
7 | | - config.vm.box = "fedora/26-cloud-base" |
8 | | - config.vm.box_version = "20170705" |
| 7 | + config.vm.box = "centos/stream8" |
| 8 | + config.vm.box_url = "https://cloud.centos.org/centos/8-stream/x86_64/images/CentOS-Stream-Vagrant-8-latest.x86_64.vagrant-libvirt.box" |
9 | 9 |
|
10 | 10 | # Create a forwarded port mapping which allows access to a specific port |
11 | 11 | # within the machine from a port on the host machine. In the example below, |
@@ -33,27 +33,28 @@ Vagrant.configure("2") do |config| |
33 | 33 | # backing providers for Vagrant. These expose provider-specific options. |
34 | 34 | # Example for VirtualBox: |
35 | 35 | # |
36 | | - config.vm.provider "virtualbox" do |vb| |
37 | | - vb.memory = "1024" |
38 | | - vb.cpus = 2 |
39 | | - end |
| 36 | + config.vm.provider "virtualbox" do |vb| |
| 37 | + vb.memory = "1024" |
| 38 | + vb.cpus = 2 |
| 39 | + end |
| 40 | + |
| 41 | + config.vm.provider "libvirt" do |vb| |
| 42 | + vb.memory = "1024" |
| 43 | + vb.cpus = 2 |
| 44 | + end |
| 45 | + |
| 46 | + # Disable default sync folder |
| 47 | + config.vm.synced_folder ".", "/vagrant", disabled: true |
40 | 48 |
|
41 | 49 | # View the documentation for the provider you are using for more |
42 | 50 | # information on available options. |
43 | | - config.vm.synced_folder ".", "/vagrant", type: 'virtualbox' |
44 | | - |
45 | | - config.vm.synced_folder ".", "/home/vagrant/app", type: 'rsync', |
46 | | - rsync__exclude: %w[lua_modules .git .vagrant node_modules t/servroot t/servroot* ], |
| 51 | + config.vm.synced_folder ".", "/opt/app-root", type: 'rsync', |
| 52 | + rsync__exclude: %w[lua_modules .git .vagrant node_modules t/servroot t/servroot* .cpanm], |
47 | 53 | rsync__args: %w[--verbose --archive --delete -z --links ] |
48 | 54 |
|
49 | 55 | config.vm.provision "shell", path: 'script/install/centos.sh' |
| 56 | + config.vm.provision "shell", path: 'script/install/openresty.sh' |
| 57 | + config.vm.provision "shell", path: 'script/install/luarocks.sh' |
50 | 58 | config.vm.provision "shell", path: 'script/install/utilities.sh' |
51 | | - |
52 | | - config.vm.provision "shell", inline: <<~'SHELL' |
53 | | - systemctl start redis |
54 | | - systemctl disable openresty |
55 | | - systemctl stop openresty |
56 | | - SHELL |
57 | | - |
58 | | - config.vm.provision "shell", privileged: false, name: "Install APIcast dependencies", path: 'script/install/apicast.sh', args: %w[app] |
| 59 | + |
59 | 60 | end |
0 commit comments