forked from OpenCloud/opencloud
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.5 KiB
59 lines
1.5 KiB
# -*- mode: ruby -*- |
|
# vi: set ft=ruby : |
|
Vagrant.configure("2") do |config| |
|
config.vm.box = "Toasterson/openindiana-hipster" |
|
config.vm.provider "virtualbox" do |vb| |
|
# Set name of VM in virtualbox" |
|
vb.name = "opencloud_dev" |
|
# Use linked clone from master vm so that we do not install openindiana base 10 times |
|
vb.linked_clone = true |
|
# Set resources to something more reasonable |
|
vb.cpus = 4 |
|
vb.memory = 4096 |
|
end |
|
config.vm.provision "shell", inline: <<-SHELL |
|
|
|
# Install the go compiler and system header files to compile the applications inside the zone |
|
cat <<EOF >> ~/.bashrc |
|
export PATH=/usr/local/bin:$PATH |
|
EOF |
|
|
|
cat <<EOF > /etc/opencloud.yaml |
|
root: |
|
zfs: |
|
path: "rpool/podhost" |
|
mountpoint: "/podhost" |
|
docker: |
|
hubUrl: "https://registry-1.docker.io" |
|
EOF |
|
|
|
zfs create -o mountpoint=/zones rpool/zones |
|
|
|
dladm create-vnic -l e1000g0 template0 |
|
|
|
cat <<EOF | zonecfg -z template |
|
create |
|
set zonepath=/zones/template |
|
set ip-type=exclusive |
|
add net |
|
set physical=template0 |
|
set allowed-address=10.0.2.20/24 |
|
end |
|
verify |
|
commit |
|
EOF |
|
|
|
echo "Installing zone template" |
|
zoneadm -z template install |
|
|
|
echo "Installing developer tools" |
|
pkg install -v golang-114 system/header developer/build/gnu-make git developer/gcc-8 system/library/gcc-8-runtime jq |
|
|
|
echo "Installing Task" |
|
#curl -sL https://taskfile.dev/install.sh | sh |
|
git clone https://github.com/go-task/task |
|
pushd task/cmd/task |
|
go install -v |
|
popd |
|
SHELL |
|
end
|
|
|