2014. március havi bejegyzések

A szélessávú internet aktuális helyzete az Európai Unióban

Flag of Europe

Tegnap az Európai Unió közzétette a legújabb szélessávú internettel kapcsolatos felmérések eredményeit:
Az újonnan közzétett tanulmányok szerint a fogyasztók számára hátrányos, hogy földrajzi elhelyezkedésüktől függ, milyen széles sávú kapcsolatra fizethetnek elő
/ European Commission – IP/14/314 25/03/2014 /

“…Neelie Kroes (@NeelieKroesEU), az Európai Bizottság alelnöke így nyilatkozott: „Az internet egységes piaca nem létezik, de ennek meg kell változnia. Nincs ésszerű magyarázat arra, hogy Európában ugyanazért a széles sávú hozzáférésért miért kell valakinek négyszer annyit fizetnie, mint valaki másnak.”…”

Szélessávú Internet szolgáltatói (#ISP#internetserviceprovider) ill. távközlési (#telecommunication, #telco) szektorban érdekelteknek érdekes és/vagy hasznos lehet…

link (magyar): http://europa.eu/rapid/press-release_IP-14-314_hu.htm
link (english): http://europa.eu/rapid/press-release_IP-14-314_en.htm
cimkék: #ConnectedContinent#broadband
kapcsolattartó: Ryan Healt (@RyanHeathEU)

forrás:
@itcafehu : https://twitter.com/itcafehu/status/448466850850938880
IT café : A szolgáltatók azt csinálnak az EU-ban, amit csak akarnak

2013.03.26.

Virtuális gépek egy Csavargó szemszögéből [hu]

1. “A Vagrant box-okat prtóbáltad már?”

Ha jól emlékszem így hangzott az egyik kedves ismerősöm – Kapusi Joci – reakciója az előző posztomra.
Eddíg még nem. Mivel szakmailag nagyra becsülöm, úgy gondoltam, ha ő mondja muszáj lesz megnézem.
Előljáróban megjegyzem, hogy nem csalódtam! 😉
Letöltöttem múlt héten a Vagrant 1.4.3 és elkezdtem nézegetni az alapokat.
Közben hétfőn megjelent a Vagrant 1.5.0 és a Vagrant Cloud szolgáltatást is bejelentették.
Gyors 1.4.3 uninstall, 1.5.0 install, hogy ha már írok róla “up-to-date” legyek.

2. Mit kínál a Csavargó (Vagrant)? 😉

A Vagrant szlogenje valami hasonló lehet, ha le kellene fordítani:
“Fejlesztői környezetek könnyen.”
“Készíts, konfigurálj reprodukálható és hordozható fejlesztői környezeteket.”
(Megj.: Nem szeretek szakkifejezéseket és szakszövegeket fordítani, mert nem minden esetben adja vissza a tényleges jelentést.)
Ezt elég sok szoftver ill. alkalmazás ígéri.
Szükitsük egy kicsit a kört.
A dokumentáció ill. “Getting started” első pár fejezete alapján virtuális gépek létrehozását lehet vele automatizálni. Az alap beépített modul a VirtualBox-ot kezeli. Ezen kívűl a Vagrant támogatja még a VMware-t, AWS-t, Hyper-V-t is.
A doklumentáció alapján viszonylag gyorsan felhúzható például egy Ubunut 12.04 LTS szerver.
Ezt fogom megmutatni lépésről lépésre.
Előfeltétel: Oracle VirtualBox
Megj.: Én OS X Maverics-en csináltam, de létezik a Vagrant Linux-os ill. Windows-os változata is. ( Vagrant letöltése )

3. A telepítés

Vagrant-1.5.0_Install-SS-20140312110622

A Vargant telepítése néhány klikk, adminisztrátor jalszó megadása. Még néhány klikk.
És kész is.
Az alkalmazás a /Applications/Vagrant könyvtárba telepíti magát és létrehoz egy symlink-et.
( /usr/bin/vagrant -> /Applications/Vagrant/bin/vagrant )
Ha már futtattuk az alkalmazást, akkor létrehoz még egy .vagrant.d/ könyvtárat is az adott felhasználó “home”-jába.
Részemről szeretem, ha a file-ok a helyükön vannak és rend van:

carlos-n:~ karesz$ cd /data/VM/
carlos-n:VM karesz$ mkdir Vagrant
carlos-n:VM karesz$ cd Vagrant
carlos-n:Vagrant karesz$

Ide fognak kerülni a saját vagrant cuccok.

4. Alapfunkciók tesztelése hashicorp/precise32 előregyártott box-al.

A hashicorp/precise32 előre elkészített box letöltése:

carlos-n:~ karesz$ vagrant box add hashicorp/precise32
==> box: Loading metadata for box ‘hashicorp/precise32’
box: URL: https://vagrantcloud.com/hashicorp/precise32
==> box: Adding box ‘hashicorp/precise32’ (v1.0.0) for provider: virtualbox
box: Downloading: https://vagrantcloud.com/hashicorp/precise32/version/1/provider/virtualbox.box
==> box: Successfully added box ‘hashicorp/precise32’ (v1.0.0) for ‘virtualbox’!

Ide került a precise32 box:

carlos-n:~ karesz$ ls -laR ./.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise32/
total 8
drwxr-xr-x 4 karesz staff 136 Mar 12 11:22 .
drwxr-xr-x 3 karesz staff 102 Mar 12 11:22 ..
drwxr-xr-x 3 karesz staff 102 Mar 12 11:22 1.0.0
-rw-r–r– 1 karesz staff 44 Mar 12 11:22 metadata_url./.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise32//1.0.0:
total 0
drwxr-xr-x 3 karesz staff 102 Mar 12 11:22 .
drwxr-xr-x 4 karesz staff 136 Mar 12 11:22 ..
drwxr-xr-x 6 karesz staff 204 Mar 12 11:22 virtualbox./.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise32//1.0.0/virtualbox:
total 576688
drwxr-xr-x 6 karesz staff 204 Mar 12 11:22 .
drwxr-xr-x 3 karesz staff 102 Mar 12 11:22 ..
-rw-r–r– 1 karesz staff 505 Mar 12 11:22 Vagrantfile
-rw——- 1 karesz staff 295237632 Mar 12 11:22 box-disk1.vmdk
-rw——- 1 karesz staff 14103 Mar 12 11:22 box.ovf
-rw-r–r– 1 karesz staff 25 Mar 12 11:22 metadata.json

Hozzuk létre a saját környezetünket és virtuális gépünket a precise32-t használva:

carlos-n:~ karesz$ cd /data/VM/Vagrant/
carlos-n:Vagrant karesz$ mkdir vagrant-hashicorp-precise32
carlos-n:Vagrant karesz$ cd vagrant-hashicorp-precise32/
carlos-n:vagrant-hashicorp-precise32 karesz$ vagrant init hashicorp/precise32
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
carlos-n:vagrant-hashicorp-precise32 karesz$ vagrant up
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Importing base box ‘hashicorp/precise32’…
==> default: Matching MAC address for NAT networking…
==> default: Checking if box ‘hashicorp/precise32’ is up to date…
==> default: Setting the name of the VM: vagrant-hashicorp-precise32_default_1394621028030_15613
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 => 2222 (adapter 1)
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM…
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Mounting shared folders…
default: /vagrant => /data/VM/Vagrant/vagrant-hashicorp-precise32

És van egy grafikus felület nélkül háttérben futó virtuális gépünk, amit láthatunk is, ha elindítjuk a VirtualBox-ot.

VirtualBox-vagrant-1.5.0-hashicorp-precise32-SS-20140312115225

Ezt a program automatikusan létrehozta a VirtualBox (Default Machines Folder) könyvtárban. (Nálam a /data/VM/VM-vb könyvtárban laknak a VirualBox virtuális gépek, és a /data/VM/VM-vmw/ könyvtárban a VMware virtuális gépek.)

carlos-n:Vagrant karesz$ ls -l /data/VM/VM-vb/ | grep precise32
drwx—— 6 karesz admin 204 Mar 12 11:53 vagrant-hashicorp-precise32_default_1394621028030_15613

Akár be is tudunk rá SSH-zni:

carlos-n:vagrant-hashicorp-precise32 karesz$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic-pae i686)* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:22:31 2012 from 10.0.2.2

A guest és a host “alap” shared (synced) könyvtára a /vagrant mappában lakik.
Ki lehet próbálni.

vagrant@precise32:~$ ls /vagrant
Vagrantfile
vagrant@precise32:~$ touch /vagrant/foo
vagrant@precise32:~$ exit
logout
Connection to 127.0.0.1 closed.
carlos-n:vagrant-hashicorp-precise32 karesz$ ls -la
total 16
drwxr-xr-x 5 karesz admin 170 Mar 12 11:48 .
drwxr-xr-x 4 karesz admin 136 Mar 12 11:41 ..
drwxr-xr-x 3 karesz admin 102 Mar 12 11:43 .vagrant
-rw-r–r– 1 karesz admin 4643 Mar 12 11:42 Vagrantfile
-rw-r–r– 1 karesz admin 0 Mar 12 11:48 foo

Az első teszt sikeres volt. Állítsuk le a virtuális gépet:

carlos-n:vagrant-hashicorp-precise32 karesz$ vagrant halt
==> default: Attempting graceful shutdown of VM…

Ha a VirtualBox natív alkalmazásban megnézzük. A virtuális gépünk kikapcsolt állapotba került.

VirtualBox-vagrant-1.5.0-hashicorp-precise32-SS-20140312115338

Ha már nincs szükségünk a virtuális gépre egyszerűen eltüntethetjük:

carlos-n:vagrant-hashicorp-precise32 karesz$ vagrant destroy
default: Are you sure you want to destroy the ‘default’ VM? [y/N] y
==> default: Destroying VM and associated drives…

Ez a VirtualBox-ból teljesen kitörli, amit odarakott, de a Vargant box megmarad, uh. bármikor létrehozhatjuk újra egy “vargant up” parancsal…

5. Fapados webszerver készítése hashicorp/precise64 előregyártott box-al.

Remek. Most bonyolítsuk egy kicsit. a VM guest legyen 64 bites és legyen rajta egy “fapados” Apache webszerver is.

Ehhez a hashicorp/precise64 box-ot használtam. Itt annyi a különbség, hogy a precise64 box támogatja a Hyper-V-t és a VMware-t is. Ki kell választanunk a nekünk valót. (2 virtualbox)

Az előzőhöz hasonlóan:

carlos-n:~ karesz$ vagrant box add hashicorp/precise64
==> box: Loading metadata for box ‘hashicorp/precise64’
box: URL: https://vagrantcloud.com/hashicorp/precise64
This box can work with multiple providers! The providers that it
can work with are listed below. Please review the list and choose
the provider you will be working with.
1) hyperv
2) virtualbox
3) vmware_fusion
Enter your choice: 2
==> box: Adding box ‘hashicorp/precise64’ (v1.1.0) for provider: virtualbox
box: Downloading: https://vagrantcloud.com/hashicorp/precise64/version/2/provider/virtualbox.box
==> box: Successfully added box ‘hashicorp/precise64’ (v1.1.0) for ‘virtualbox’!

Ide kerül a standard precise64 box:

carlos-n:~ karesz$ ls -laR .vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64/
total 8
drwxr-xr-x 4 karesz staff 136 Mar 12 12:02 .
drwxr-xr-x 4 karesz staff 136 Mar 12 12:02 ..
drwxr-xr-x 3 karesz staff 102 Mar 12 12:02 1.1.0
-rw-r–r– 1 karesz staff 44 Mar 12 12:02 metadata_url.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64//1.1.0:
total 0
drwxr-xr-x 3 karesz staff 102 Mar 12 12:02 .
drwxr-xr-x 4 karesz staff 136 Mar 12 12:02 ..
drwxr-xr-x 6 karesz staff 204 Mar 12 12:02 virtualbox.vagrant.d/boxes/hashicorp-VAGRANTSLASH-precise64//1.1.0/virtualbox:
total 626328
drwxr-xr-x 6 karesz staff 204 Mar 12 12:02 .
drwxr-xr-x 3 karesz staff 102 Mar 12 12:02 ..
-rw-r–r– 1 karesz staff 505 Mar 12 12:02 Vagrantfile
-rw——- 1 karesz staff 320654336 Mar 12 12:02 box-disk1.vmdk
-rw——- 1 karesz staff 14108 Mar 12 12:02 box.ovf
-rw-r–r– 1 karesz staff 25 Mar 12 12:02 metadata.json

Hozzuk létre a már 64 bites Vargant környezetet és Ubuntu 12.04 LTS szervert

carlos-n:~ karesz$ cd /data/VM/Vagrant/
carlos-n:Vagrant karesz$ mkdir vagrant-hashicorp-precise64
carlos-n:Vagrant karesz$ cd vagrant-hashicorp-precise64
carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant init hashicorp/precise64
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant up
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Importing base box ‘hashicorp/precise64’…
==> default: Matching MAC address for NAT networking…
==> default: Checking if box ‘hashicorp/precise64’ is up to date…
==> default: Setting the name of the VM: vagrant-hashicorp-precise64_default_1394622900460_95833
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 => 2222 (adapter 1)
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM…
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Mounting shared folders…
default: /vagrant => /data/VM/Vagrant/vagrant-hashicorp-precise64

Nézzük meg sikerült-e:

VirtualBox-vagrant-1.5.0-hashicorp-precise64-SS-20140312121752

carlos-n:Vagrant karesz$ ls -l /data/VM/VM-vb/ | grep precise64
drwx—— 6 karesz admin 204 Mar 12 14:09 vagrant-hashicorp-precise64_default_1394622900460_95833
carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2
vagrant@precise64:~$ ls /vagrant
Vagrantfile
vagrant@precise64:~$ touch /vagrant/foo
vagrant@precise64:~$ exit
logout
Connection to 127.0.0.1 closed.
carlos-n:vagrant-hashicorp-precise64 karesz$ ls -la
total 16
drwxr-xr-x 5 karesz admin 170 Mar 12 12:16 .
drwxr-xr-x 5 karesz admin 170 Mar 12 12:13 ..
drwxr-xr-x 3 karesz admin 102 Mar 12 12:14 .vagrant
-rw-r–r– 1 karesz admin 4643 Mar 12 12:14 Vagrantfile
-rw-r–r– 1 karesz admin 0 Mar 12 12:16 foo
carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant halt
==> default: Attempting graceful shutdown of VM…

A precise64 box eddíg ugyanaz ill. nagyon hasonló volt mint a precise32 box.
Most jöhet a web szerver.

carlos-n:vagrant-hashicorp-precise64 karesz$ mkdir www
carlos-n:vagrant-hashicorp-precise64 karesz$ touch ./bootstrap.sh
carlos-n:vagrant-hashicorp-precise64 karesz$ vi ./bootstrap.sh
carlos-n:vagrant-hashicorp-precise64 karesz$ cat ./bootstrap.sh ;
#!/usr/bin/env bashapt-get update
apt-get install -y apache2
rm -rf /var/www
ln -fs /vagrant/www /var/www
carlos-n:vagrant-hashicorp-precise64 karesz$ cp -av ./Vagrantfile ./Vagrantfile.orig
./Vagrantfile -> ./Vagrantfile.orig
carlos-n:vagrant-hashicorp-precise64 karesz$ vi ./Vagrantfile
carlos-n:vagrant-hashicorp-precise64 karesz$ diff ./Vagrantfile.orig ./Vagrantfile
117a118,119
> # added by carlos
> config.vm.provision :shell, :path => “bootstrap.sh”
carlos-n:vagrant-hashicorp-precise64 karesz$ touch ./www/index.html
carlos-n:vagrant-hashicorp-precise64 karesz$ vi ./www/index.html
carlos-n:vagrant-hashicorp-precise64 karesz$ cat ./www/index.html
<h1>Carlos Vagrant Test Server</h1>
<h2>Ubuntu 12.04 LTS amd64 – Standard Vagrant box – hashicorp/precise64</h2>
carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant up
Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Checking if box ‘hashicorp/precise64’ is up to date…
==> default: Clearing any previously set forwarded ports…
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 => 2222 (adapter 1)
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM…
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Mounting shared folders…
default: /vagrant => /data/VM/Vagrant/vagrant-hashicorp-precise64
==> default: VM already provisioned. Run `vagrant provision` or use `–provision` to force it

Nem történt meg a dokumntáció szerint a “provisioning”, emiatt:

carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant reload –provision
==> default: Attempting graceful shutdown of VM…
==> default: Checking if box ‘hashicorp/precise64’ is up to date…
==> default: Clearing any previously set forwarded ports…
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 => 2222 (adapter 1)
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM…
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Mounting shared folders…
default: /vagrant => /data/VM/Vagrant/vagrant-hashicorp-precise64
==> default: Running provisioner: shell…
default: Running: /var/folders/1x/myxppz79051bnzyf2d57xgbm0000gp/T/vagrant-shell20140312-2468-jsu915
stdin: is not a tty
Ign http://us.archive.ubuntu.com precise InRelease
Ign http://security.ubuntu.com precise-security InRelease
Ign http://us.archive.ubuntu.com precise-updates InRelease
Ign http://us.archive.ubuntu.com precise-backports InRelease
Hit http://us.archive.ubuntu.com precise Release.gpg
Get:1 http://us.archive.ubuntu.com precise-updates Release.gpg [198 B]
Get:2 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:3 http://security.ubuntu.com precise-security Release [49.6 kB]
Get:4 http://us.archive.ubuntu.com precise-backports Release.gpg [198 B]
Hit http://us.archive.ubuntu.com precise Release
Get:5 http://us.archive.ubuntu.com precise-updates Release [49.6 kB]
Get:6 http://us.archive.ubuntu.com precise-backports Release [49.6 kB]
Get:7 http://security.ubuntu.com precise-security/main Sources [98.7 kB]
Hit http://us.archive.ubuntu.com precise/main Sources
Hit http://us.archive.ubuntu.com precise/restricted Sources
Hit http://us.archive.ubuntu.com precise/universe Sources
Hit http://us.archive.ubuntu.com precise/multiverse Sources
Hit http://us.archive.ubuntu.com precise/main amd64 Packages
Hit http://us.archive.ubuntu.com precise/restricted amd64 Packages
Hit http://us.archive.ubuntu.com precise/universe amd64 Packages
Hit http://us.archive.ubuntu.com precise/multiverse amd64 Packages
Hit http://us.archive.ubuntu.com precise/main i386 Packages
Hit http://us.archive.ubuntu.com precise/restricted i386 Packages
Hit http://us.archive.ubuntu.com precise/universe i386 Packages
Hit http://us.archive.ubuntu.com precise/multiverse i386 Packages
Hit http://us.archive.ubuntu.com precise/main TranslationIndex
Hit http://us.archive.ubuntu.com precise/multiverse TranslationIndex
Hit http://us.archive.ubuntu.com precise/restricted TranslationIndex
Hit http://us.archive.ubuntu.com precise/universe TranslationIndex
Get:8 http://us.archive.ubuntu.com precise-updates/main Sources [451 kB]
Get:9 http://security.ubuntu.com precise-security/restricted Sources [2,494 B]
Get:10 http://security.ubuntu.com precise-security/universe Sources [30.9 kB]
Get:11 http://security.ubuntu.com precise-security/multiverse Sources [1,789 B]
Get:12 http://security.ubuntu.com precise-security/main amd64 Packages [369 kB]
Get:13 http://security.ubuntu.com precise-security/restricted amd64 Packages [4,627 B]
Get:14 http://security.ubuntu.com precise-security/universe amd64 Packages [91.2 kB]
Get:15 http://security.ubuntu.com precise-security/multiverse amd64 Packages [2,446 B]
Get:16 http://security.ubuntu.com precise-security/main i386 Packages [396 kB]
Get:17 http://us.archive.ubuntu.com precise-updates/restricted Sources [8,028 B]
Get:18 http://us.archive.ubuntu.com precise-updates/universe Sources [105 kB]
Get:19 http://us.archive.ubuntu.com precise-updates/multiverse Sources [8,474 B]
Get:20 http://us.archive.ubuntu.com precise-updates/main amd64 Packages [758 kB]
Get:21 http://security.ubuntu.com precise-security/restricted i386 Packages [4,620 B]
Get:22 http://security.ubuntu.com precise-security/universe i386 Packages [95.9 kB]
Get:23 http://security.ubuntu.com precise-security/multiverse i386 Packages [2,646 B]
Get:24 http://security.ubuntu.com precise-security/main TranslationIndex [74 B]
Get:25 http://security.ubuntu.com precise-security/multiverse TranslationIndex [72 B]
Get:26 http://security.ubuntu.com precise-security/restricted TranslationIndex [72 B]
Get:27 http://security.ubuntu.com precise-security/universe TranslationIndex [73 B]
Get:28 http://security.ubuntu.com precise-security/main Translation-en [173 kB]
Get:29 http://us.archive.ubuntu.com precise-updates/restricted amd64 Packages [12.2 kB]
Get:30 http://us.archive.ubuntu.com precise-updates/universe amd64 Packages [237 kB]
Get:31 http://us.archive.ubuntu.com precise-updates/multiverse amd64 Packages [14.5 kB]
Get:32 http://us.archive.ubuntu.com precise-updates/main i386 Packages [781 kB]
Get:33 http://security.ubuntu.com precise-security/multiverse Translation-en [1,299 B]
Get:34 http://security.ubuntu.com precise-security/restricted Translation-en [1,253 B]
Get:35 http://security.ubuntu.com precise-security/universe Translation-en [56.4 kB]
Get:36 http://us.archive.ubuntu.com precise-updates/restricted i386 Packages [12.2 kB]
Get:37 http://us.archive.ubuntu.com precise-updates/universe i386 Packages [242 kB]
Get:38 http://us.archive.ubuntu.com precise-updates/multiverse i386 Packages [14.7 kB]
Get:39 http://us.archive.ubuntu.com precise-updates/main TranslationIndex [3,564 B]
Get:40 http://us.archive.ubuntu.com precise-updates/multiverse TranslationIndex [2,605 B]
Get:41 http://us.archive.ubuntu.com precise-updates/restricted TranslationIndex [2,461 B]
Get:42 http://us.archive.ubuntu.com precise-updates/universe TranslationIndex [2,850 B]
Get:43 http://us.archive.ubuntu.com precise-backports/main Sources [4,843 B]
Get:44 http://us.archive.ubuntu.com precise-backports/restricted Sources [14 B]
Get:45 http://us.archive.ubuntu.com precise-backports/universe Sources [36.4 kB]
Get:46 http://us.archive.ubuntu.com precise-backports/multiverse Sources [5,311 B]
Get:47 http://us.archive.ubuntu.com precise-backports/main amd64 Packages [6,189 B]
Get:48 http://us.archive.ubuntu.com precise-backports/restricted amd64 Packages [14 B]
Get:49 http://us.archive.ubuntu.com precise-backports/universe amd64 Packages [38.2 kB]
Get:50 http://us.archive.ubuntu.com precise-backports/multiverse amd64 Packages [5,206 B]
Get:51 http://us.archive.ubuntu.com precise-backports/main i386 Packages [6,205 B]
Get:52 http://us.archive.ubuntu.com precise-backports/restricted i386 Packages [14 B]
Get:53 http://us.archive.ubuntu.com precise-backports/universe i386 Packages [38.1 kB]
Get:54 http://us.archive.ubuntu.com precise-backports/multiverse i386 Packages [5,178 B]
Get:55 http://us.archive.ubuntu.com precise-backports/main TranslationIndex [72 B]
Get:56 http://us.archive.ubuntu.com precise-backports/multiverse TranslationIndex [72 B]
Get:57 http://us.archive.ubuntu.com precise-backports/restricted TranslationIndex [70 B]
Get:58 http://us.archive.ubuntu.com precise-backports/universe TranslationIndex [73 B]
Hit http://us.archive.ubuntu.com precise/main Translation-en
Hit http://us.archive.ubuntu.com precise/multiverse Translation-en
Hit http://us.archive.ubuntu.com precise/restricted Translation-en
Hit http://us.archive.ubuntu.com precise/universe Translation-en
Get:59 http://us.archive.ubuntu.com precise-updates/main Translation-en [338 kB]
Get:60 http://us.archive.ubuntu.com precise-updates/multiverse Translation-en [8,473 B]
Get:61 http://us.archive.ubuntu.com precise-updates/restricted Translation-en [2,988 B]
Get:62 http://us.archive.ubuntu.com precise-updates/universe Translation-en [138 kB]
Get:63 http://us.archive.ubuntu.com precise-backports/main Translation-en [5,562 B]
Get:64 http://us.archive.ubuntu.com precise-backports/multiverse Translation-en [4,610 B]
Hit http://us.archive.ubuntu.com precise-backports/restricted Translation-en
Get:65 http://us.archive.ubuntu.com precise-backports/universe Translation-en [28.0 kB]
Fetched 4,809 kB in 4s (1,160 kB/s)
Reading package lists…
Reading package lists…
Building dependency tree…
Reading state information…
The following extra packages will be installed:
apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1
libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap ssl-cert
Suggested packages:
www-browser apache2-doc apache2-suexec apache2-suexec-custom
openssl-blacklist
The following NEW packages will be installed:
apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common
libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap ssl-cert
0 upgraded, 10 newly installed, 0 to remove and 159 not upgraded.
Need to get 1,855 kB of archives.
After this operation, 5,681 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libapr1 amd64 1.4.6-1 [89.6 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ precise/main libaprutil1 amd64 1.3.12+dfsg-3 [74.6 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu/ precise/main libaprutil1-dbd-sqlite3 amd64 1.3.12+dfsg-3 [10.4 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ precise/main libaprutil1-ldap amd64 1.3.12+dfsg-3 [8,044 B]
Get:5 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main apache2.2-bin amd64 2.2.22-1ubuntu1.4 [1,340 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main apache2-utils amd64 2.2.22-1ubuntu1.4 [90.1 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main apache2.2-common amd64 2.2.22-1ubuntu1.4 [226 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main apache2-mpm-worker amd64 2.2.22-1ubuntu1.4 [2,284 B]
Get:9 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main apache2 amd64 2.2.22-1ubuntu1.4 [1,492 B]
Get:10 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main ssl-cert all 1.0.28ubuntu0.1 [12.3 kB]
dpkg-preconfigure: unable to re-open stdin: No such file or directory
Fetched 1,855 kB in 1s (969 kB/s)
Selecting previously unselected package libapr1.
(Reading database … 51095 files and directories currently installed.)
Unpacking libapr1 (from …/libapr1_1.4.6-1_amd64.deb) …
Selecting previously unselected package libaprutil1.
Unpacking libaprutil1 (from …/libaprutil1_1.3.12+dfsg-3_amd64.deb) …
Selecting previously unselected package libaprutil1-dbd-sqlite3.
Unpacking libaprutil1-dbd-sqlite3 (from …/libaprutil1-dbd-sqlite3_1.3.12+dfsg-3_amd64.deb) …
Selecting previously unselected package libaprutil1-ldap.
Unpacking libaprutil1-ldap (from …/libaprutil1-ldap_1.3.12+dfsg-3_amd64.deb) …
Selecting previously unselected package apache2.2-bin.
Unpacking apache2.2-bin (from …/apache2.2-bin_2.2.22-1ubuntu1.4_amd64.deb) …
Selecting previously unselected package apache2-utils.
Unpacking apache2-utils (from …/apache2-utils_2.2.22-1ubuntu1.4_amd64.deb) …
Selecting previously unselected package apache2.2-common.
Unpacking apache2.2-common (from …/apache2.2-common_2.2.22-1ubuntu1.4_amd64.deb) …
Selecting previously unselected package apache2-mpm-worker.
Unpacking apache2-mpm-worker (from …/apache2-mpm-worker_2.2.22-1ubuntu1.4_amd64.deb) …
Selecting previously unselected package apache2.
Unpacking apache2 (from …/apache2_2.2.22-1ubuntu1.4_amd64.deb) …
Selecting previously unselected package ssl-cert.
Unpacking ssl-cert (from …/ssl-cert_1.0.28ubuntu0.1_all.deb) …
Processing triggers for man-db …
Processing triggers for ureadahead …
ureadahead will be reprofiled on next reboot
Processing triggers for ufw …
Setting up libapr1 (1.4.6-1) …
Setting up libaprutil1 (1.3.12+dfsg-3) …
Setting up libaprutil1-dbd-sqlite3 (1.3.12+dfsg-3) …
Setting up libaprutil1-ldap (1.3.12+dfsg-3) …
Setting up apache2.2-bin (2.2.22-1ubuntu1.4) …
Setting up apache2-utils (2.2.22-1ubuntu1.4) …
Setting up apache2.2-common (2.2.22-1ubuntu1.4) …
Enabling site default.
Enabling module alias.
Enabling module autoindex.
Enabling module dir.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module status.
Enabling module auth_basic.
Enabling module deflate.
Enabling module authz_default.
Enabling module authz_user.
Enabling module authz_groupfile.
Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.
Setting up apache2-mpm-worker (2.2.22-1ubuntu1.4) …
* Starting web server apache2
apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.1.1 for ServerName
…done.
Setting up apache2 (2.2.22-1ubuntu1.4) …
Setting up ssl-cert (1.0.28ubuntu0.1) …
Processing triggers for libc-bin …
ldconfig deferred processing now taking place

Látszik a program kimenetéből, hogy csomagokat telepített a program.
Nézzük meg, mi történt ill. működik-e a webszerver:

carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Wed Mar 12 11:15:44 2014 from 10.0.2.2
vagrant@precise64:~$ wget -qO- 127.0.0.1
<h1>Carlos Vagrant Test Server</h1>
<h2>Ubuntu 12.04 LTS amd64 – Standard Vagrant box – hashicorp/precise64</h2>

Azaz a webszerver elkészült és működik is.
Ha csinálunk a guest és a host között port forwarding-ot, akkor a host-on keresztül is elérhető lesz.

carlos-n:vagrant-hashicorp-precise64 karesz$ cp -av ./Vagrantfile ./Vagrantfile.old
./Vagrantfile -> ./Vagrantfile.old
carlos-n:vagrant-hashicorp-precise64 karesz$ vi ./Vagrantfile
carlos-n:vagrant-hashicorp-precise64 karesz$ diff ./Vagrantfile.old ./Vagrantfile
119a120
> config.vm.network :forwarded_port, host: 4567, guest: 80
carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant reload
==> default: Attempting graceful shutdown of VM…
==> default: Checking if box ‘hashicorp/precise64’ is up to date…
==> default: Clearing any previously set forwarded ports…
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 80 => 4567 (adapter 1)
default: 22 => 2222 (adapter 1)
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM…
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 4.2.0
default: VirtualBox Version: 4.3
==> default: Mounting shared folders…
default: /vagrant => /data/VM/Vagrant/vagrant-hashicorp-precise64
==> default: VM already provisioned. Run `vagrant provision` or use `–provision` to force it

Az eredmény a host-on:

Vagrant-1.5.0_hashicorp-precise64-httpd_test-SS-20140312140444

Örülünk Vincent? 😀

Mostmár leállíthatjuk a környezetet.

carlos-n:vagrant-hashicorp-precise64 karesz$ vagrant halt
==> default: Attempting graceful shutdown of VM…

VirtualBox-vagrant-1.5.0-hashicorp-precise64-SS-20140312121823

6. Összefoglalva
Viszonylag egyszerüen lehet előre legyártott box-ból fejlesztői környezetet és virtuális gépet létrehozni ill. kezelni a következő néhány lépéssel:

$ vagrant box add “box_gyártója/box_neve”
$ vagrant init “box_gyártója/box_neve”
$ vagrant up
$ vagrant halt
$ vagrant destroy

7. Részemről a konklúzió

Tetszik, és szeretném megköszönni Jocinak, hogy felhívta erre a megoldásra a figyelmemet!
Biztonsági oldalról meg kell még néznem, mit csinál ez a megoldás pontosan. (synced folder ill. ssh user stb.)
Kezd érdekelni, hogyan kell egy saját standard box-ot létrehozni, valamint, hogy van-e megoldás a snapshot-ok kezelésére is? Ez esetben nem kellene annyit “kézimunkázni”, amikor saját tesztkörnyezetet építek valamire, egyszerűbb lenne az életem.

2014.03.13.

Standard Virtuális gépek készülőben [hu]

Hónapokkal ezeleőtt eldöntöttem, hogy rendet fogok rakni a tanulós, tesztelős, játszós virtuális gépeim között.
Annak rendje és módja szerint szépen nekiláttam az Oracle VirtualBox-ban lakó virtuális gépeket teljesen nulláról egy saját szisztéma szerint felépíteni, hogy később jól átláthatóak legyenek a verziók, az adott gépek állapot változásai ill. módosításai is (pl.: snapshot-ok).
Március elejére végre megszületett ez az állapot:

Oracle Virtualbox - Standard VMs

Azóta a két Oracle Linux (6.4, 6.5) standard base_vm is elkészült.
… és az Alkotó megpihent.

Gondolkozom még, hogy esetlegesen egy Gentoo Linux és egy LFS (Linux From Scratch) is elférne, csak hogy mégjobban teljesebbnek érezzem a listát…

2014.03.07.