This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
91 lines (77 loc) · 2.87 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# -*- mode: ruby -*-
# vi: set ft=ruby :
ENV["LC_ALL"] = "en_US.UTF-8"
Vagrant.require_version ">= 2.2"
Vagrant.configure("2") do |config|
# @see https://app.vagrantup.com/generic
# config.vm.box = "geerlingguy/ubuntu2004"
# config.vm.box = "./ubuntu-20-04-nodejs-pnpm.box"
config.vm.box = "thedragon/ubuntu-20-04-nodejs-pnpm"
config.vm.box_check_update = false # check for updates
# config.vm.box_version = "1.0.4"
config.vm.provision "ubuntu-update-upgrade",
inline: "apt update && apt upgrade -y",
run: "always",
preserve_order: true,
type: "shell",
privileged: true
# config.vm.provision "install-missing-flow-dependencies",
# inline: "apt install -y libatomic1",
# preserve_order: true,
# type: "shell",
# privileged: true
# config.vm.provision "setup-node-env",
# path: "https://raw.githubusercontent.com/noahehall/theBookOfNoah/master/linux/.install_node_ci.sh",
# preserve_order: true,
# type: "shell",
# privileged: false,
# name: 'setup-node'
config.vm.provision "create-dir-var-nodeproto",
inline: "install -d -o vagrant -g vagrant /var/.nodeproto",
preserve_order: true,
type: "shell",
privileged: true
config.vm.provision "install-nodeproto-dependencies",
inline: "cd /opt/nodeproto && pnpm i --no-lockfile",
preserve_order: true,
privileged: false,
type: "shell"
config.vm.provision "install-flow-types",
inline: "cd /opt/nodeproto && pnpm proto repo:flowtyped:install",
preserve_order: true,
privileged: false,
type: "shell"
config.vm.provision "build-repo",
inline: "cd /opt/nodeproto && pnpm proto:script build",
preserve_order: true,
privileged: false,
type: "shell"
config.vm.provision "lint-repo",
inline: "cd /opt/nodeproto && pnpm proto repo:lint",
preserve_order: true,
privileged: false,
type: "shell"
config.vm.provision "test-repo",
inline: "cd /opt/nodeproto && pnpm proto:script repo:test",
preserve_order: true,
privileged: false,
type: "shell"
# config.vm.network "private_network", type: "dhcp" # create a private network for nfs
# nfs > virtualbox synced folder
config.vm.synced_folder ".", "/opt/nodeproto"
# disabled: true
# type: "nfs",
# nfs_export: true,
# nfs_udp: false,
# verify_installed: true,
# linux__nfs_options: ['rw','no_subtree_check','all_squash','async'] # make the NFS share asynchronous
# virtual box config
config.vm.provider "virtualbox" do |vb|
vb.gui = false
# vb.memory = "1024" # Customize the amount of memory on the VM:
# vb.cpus = 2 # max cores
# vb.linked_clone = true # the master is generated by importing the base box only once the first time it is required.
vb.check_guest_additions = false # dont set true in ci
vb.customize ["modifyvm", :id, "--cpuexecutioncap", "90"] # host CPU execution cap of 70%,
end
end