Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Vagrantfile « build - github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3573bbc7fb64b72d1a7ee868992102b998e08612 (plain)
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
# -*- mode: ruby -*-
# vi: set ft=ruby :

#
# Vagrantfile for the NCP Debian VM
#
# Instructions: vagrant up; vagrant ssh
#
# Notes: User/Pass is ubnt/ubnt.
# $HOME is accessible as /external. CWD is accessible as /cwd
#

Vagrant.configure("2") do |config|

  vmname = "NCP Debian VM"
  release = ENV["DEB_RELEASE"]
  config.vm.box = "debian/#{release}64"
  config.vm.box_check_update = true
  config.vm.hostname = "ncp-vm"
  config.vm.define "ncp-vm"
  config.vm.provider :libvirt do |libvirt|
    libvirt.default_prefix = ""
  end

  config.vm.synced_folder '.', '/vagrant', disabled: true

  $script = <<-SHELL
    sudo su
    set -e
    BRANCH=master
    #BRANCH=devel  # uncomment to install devel
    apt-get update
    DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git ca-certificates

    # install
    git clone -b "$BRANCH" https://github.com/nextcloud/nextcloudpi.git /tmp/nextcloudpi
    cd /tmp/nextcloudpi

    source install.sh

    # cleanup
    source etc/library.sh
    run_app_unsafe post-inst.sh
    cd /
    rm -r /tmp/nextcloudpi
    echo "root:ownyourbits" | chpasswd
    systemctl disable sshd
    poweroff
  SHELL

  # Provision the VM
  config.vm.provision "shell", inline: $script

end