Use separate configuration files for vmbuilder
This commit is contained in:
1 parent
4f7a6b215c
commit
23d5f19e39
6 files changed
+27
-23
No files matched your search
@@ -0,0 +1,4 @@
|
|||||||
|
vmbuilder.cfg
|
||||||
|
vmbuilder.copy
|
||||||
|
ubuntu-vmw6
|
||||||
|
*~
|
||||||
+5
-8
@@ -1,14 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
sed "s|BUILDDIR|$BUILDDIR|g" < vmbuilder.cfg.template > vmbuilder.cfg
|
||||||
|
sed "s|BUILDDIR|$BUILDDIR|g" < vmbuilder.copy.template > vmbuilder.copy
|
||||||
|
|
||||||
echo "Building Virtual Machine for Avans Security Workshop..."
|
echo "Building Virtual Machine for Avans Security Workshop..."
|
||||||
echo "(Requires vmbuilder, install with: 'sudo apt-get install python-vm-builder')"
|
echo "(Requires vmbuilder, install with: 'sudo apt-get install python-vm-builder')"
|
||||||
|
|
||||||
sudo vmbuilder vmw6 ubuntu --flavour virtual --arch i386 -o \
|
echo sudo vmbuilder vmw6 ubuntu --config vmbuilder.cfg -o
|
||||||
--firstboot $DIR/firstboot.sh \
|
|
||||||
--user security --pass security --name "Security Workshop" \
|
|
||||||
--addpkg apache2 --addpkg apache2-mpm-prefork \
|
|
||||||
--addpkg git-core \
|
|
||||||
--addpkg php5-cli --addpkg php5-mysql --addpkg libapache2-mod-php5 \
|
|
||||||
--addpkg mysql-server --addpkg mysql-client
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This script is run the first time the VM boots up.
|
|
||||||
# It configures the VM for the security workshop
|
|
||||||
DIR=/home/security/workshop
|
|
||||||
echo "Initializing this VM for the Security Workshop..."
|
|
||||||
|
|
||||||
# Get the workshop files
|
|
||||||
git clone https://github.com/Avans/Security-Workshop.git $DIR
|
|
||||||
|
|
||||||
# Add boot.sh to the boot sequence
|
|
||||||
echo "$DIR/build-vm/boot.sh" >> /etc/rc.local
|
|
||||||
|
|
||||||
# Resume normal boot sequence
|
|
||||||
$DIR/build-vm/boot.sh
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
arch = i386
|
||||||
|
user = security
|
||||||
|
name = Security Workshop
|
||||||
|
pass = security
|
||||||
|
copy = BUILDDIR/vmbuilder.copy
|
||||||
|
execscript = BUILDDIR/vmbuilder.postinst
|
||||||
|
verbose = true
|
||||||
|
|
||||||
|
[ubuntu]
|
||||||
|
flavour = virtual
|
||||||
|
addpkg = apache2, git-core, php5-cli, php5-mysql, libapache2-mod-php5, mysql-server, mysql-client
|
||||||
|
hostname = security-workshop
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
BUILDDIR/security-workshop.conf /etc/init/security-workshop.conf
|
||||||
Executable
+4
@@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
chroot $1 git clone https://github.com/Avans/Security-Workshop.git /home/security/workshop
|
||||||
|
|
||||||
Reference in new issue
Block a user