Category: Uncategorized

0

Packer.io machine building and provisioning part 2

In the previous part of this series we had a look on building a bare Debian VM with the bare minimum packages installed to run a web server. In this part we will have a look on how we can improve our packer script with user variables and how to use the file and shell provisioner. User variablesVariables can be easily added to the packer script by adding following JSON. 1234567891011{ "variables": { "username": "root", "password": "r00tme", "memory": "1024", "cpus": "1", "database_name": "{{env `DB_NAME`}}" }, "builders": [{ // Left for brevity} Best practice is to put your variables as the first property in your JSON, before your builders. This way you have all the configurable values to your script quickly accessible. As you can see we define for each variable a default value, which will be used as the value when the user doesn’t provide one. For the “database_name” variable I used a special default. This default will be retrieved from your environment variables. You can set this kind of variable just as you would set any other variable from your command line/shell.

0

Packer.io machine building and provisioning part 1

Large development teams are often coping with the “It works on my machine” syndrome. One solution to solve these kind of issues is by give each single developer the same VM, which is most preferably the same as your production server. So imagine your company is building a web application. The web application is hosted on a Debian server using Apache, MySQL and PHP. So considering these preconditions I will give you a simple example to get your machines scripted en fully provisioned. In this first part of these series we will zoom in on the packer.io builders. So let me first explain you what packer is by quoting some statements of their webpage. Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.Modern, AutomatedPacker is easy to use and automates the creation of any type of machine image. It embraces modern configuration management by encouraging you to use automated scripts to install and configure the software within your Packer-made images. Packer brings machine images into the modern age, unlocking untapped potential and opening new opportunities. Works Great WithOut of the box Packer comes with support to build images for Amazon EC2, DigitalOcean, VirtualBox, and VMware. Support for more platforms is on the way, and anyone can add new platforms via plugins. In order to create an image for a specific platform packer uses builders. Since I don’t want to zoom in on creating your own builder plugin for your own platform and I don’t want you to have more cost to get up your VM I will use the VirtualBox builder in this example. VirtualBox is free to use, so if you don’t have it already installed on your machine please first install VirtualBox to continue with this example. VirtualBox will run on following OSes: Windows, Linux and Mac, so no matter what OS you’re on, you can continue reading.

0

Unblock downloaded files with PowerShell

Have you ever got in the situation that you downloaded a zip-file and figured out to late the files are blocked? So you extracted the zip file into a folder with existing items. It will be damn hard t

0

Install Windows 8 from rusty 256 MB USB stick

This is the fourth time I installed Windows 8. This time I installed it on my personal notebook instead of a VHD, because Windows 8 is finally ready to market. So I started with downloading the enterprise edition from my MSDN subscription. Unfortunately my USB drive died so I had no storage large enough to put the image on and boot from. So I started thinking to install it over the network. Luckily me I still had my rusty 10 year old 256MB USB drive which perfectly fits a Windows PE image. So I also downloaded the Windows 8 ADK to make a Windows PE boot image. First install the Windows 8 ADK. Then open a command prompt and, key in the following commands to create a image. 123mkdir c:\winpe_amd64call copype.cmd amd64 c:\winpe_amd64Makewinpemedia /ufd c:\winpe_amd64 F: The first command makes a directory on your c: drive and can be removed afterwards. The second command creates all the necessary files for a 64 installation. The third command copies the files to your usb drive (in my case F:) and makes it bootable. If you need a 32 bit installation replace amd64 with x86. Then create a share on a pc in your network and extract the contents of the Windows 8 iso to the network share. Make sure you configure the security to allow everyone to access it. Also make sure your firewall responds to ping commands, this comes in handy when trying to connect to the share. I created a share called Win8.

0

Install and boot Windows 8 from vhd

In a previous blog post I explained to you how to install Windows 8 in a virtual machine in VirtualBox. In VirtualBox I used 1 gig of memory and 2 of my cores and it performed quite good. However in t

0

Install Microsoft Kinect on PC

In this blogpost I explain how you can install Microsoft Kinect on your pc. For installing Microsoft Kinect on your pc you need to install some drivers. You can get the latest drivers from http://www.