Skip to content
This repository has been archived by the owner on Nov 6, 2021. It is now read-only.

Commit

Permalink
fixed issue #6 ; added docs for host-only configuration
Browse files Browse the repository at this point in the history
Former-commit-id: 860a595
Former-commit-id: 9763135
  • Loading branch information
maoo committed Aug 1, 2014
1 parent 853b995 commit fbcd57d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 17 deletions.
14 changes: 12 additions & 2 deletions packer/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
Creating VirtualBox/Vagrant box
Creating a Packer box
---
Create a host-only network interface for VirtualBox (unless ```ifconfig -a``` already lists ```vboxnet0```)
```
VBoxManage hostonlyif create >/dev/null 2>&1
```

Now assign an IP to this interface with a subnet that doesn't conflict with your home ones (avoid ```192.168.0.x```), for example ```192.168.23.x```
```
vboxmanage hostonlyif ipconfig vboxnet0 --ip 192.168.23.1 --netmask 255.255.255.0
```

Edit file ```alfresco-boxes/packer/precise-alf421.json``` to choose an IP that can be bridged to one of your host Network Interfaces:
```
{
"type": "shell",
"execute_command": "echo 'vagrant' | sudo -S sh '{{ .Path }}'",
"inline": ["/tmp/static-ip.sh 192.168.1.223 192.168.1.1 255.255.255.0"]
"inline": ["/tmp/static-ip.sh 192.168.23.223 192.168.23.1 255.255.255.0"]
}
```

Expand Down
30 changes: 15 additions & 15 deletions packer/precise-alf421.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,21 @@
}
],
"provisioners": [
{
"type": "file",
"source": "../common/scripts/common.sh",
"destination": "/home/vagrant/common.sh"
},
{
"type": "file",
"source": "../common/scripts/static-ip.sh",
"destination": "/home/vagrant/static-ip.sh"
},
{
"type": "shell",
"execute_command": "echo 'vagrant' | sudo -E -S sh '{{ .Path }}'",
"inline": ["chmod 755 /home/vagrant/static-ip.sh && /home/vagrant/static-ip.sh 192.168.23.23 192.168.23.1 255.255.255.0"]
},
{
"cookbook_paths": [
"../common/vendor-cookbooks"
Expand Down Expand Up @@ -96,16 +111,6 @@
"skip_install": false,
"type": "chef-solo"
},
{
"type": "file",
"source": "../common/scripts/common.sh",
"destination": "/home/vagrant/common.sh"
},
{
"type": "file",
"source": "../common/scripts/static-ip.sh",
"destination": "/home/vagrant/static-ip.sh"
},
{
"type": "shell",
"execute_command": "echo 'vagrant' | sudo -E -S sh '{{ .Path }}'",
Expand All @@ -114,11 +119,6 @@
"../common/scripts/vagrant-ssh-key.sh",
"../common/scripts/vbox-additions.sh"
]
},
{
"type": "shell",
"execute_command": "echo 'vagrant' | sudo -E -S sh '{{ .Path }}'",
"inline": ["chmod 755 /home/vagrant/static-ip.sh && /home/vagrant/static-ip.sh 192.168.1.223 192.168.1.1 255.255.255.0"]
}
]
}

0 comments on commit fbcd57d

Please sign in to comment.