Showing posts with label vagrant. Show all posts
Showing posts with label vagrant. Show all posts

Thursday, March 5, 2015

Installing Weblogic 11.1.6 with Java 7 in a few seconds

(maybe the few seconds is an overstatement....)

With the Biemond way (thank you Biemond you are a God):

install git and vagrant

Download jdk-7u55-linux-x64.tar.gz from http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html#jdk-7u55-oth-JPR



Download UnlimitedJCEPolicyJDK7.zip (JCE Java Cryptographic Extensions) here http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

Download wls1036_generic.jar from http://www.oracle.com/technetwork/middleware/ias/downloads/wls-main-097127.html (choose "Oracle WebLogic Server 11gR1 (10.3.6) + Coherence - Package Installer" for "Additional Platforms", where it says "File1 1 GB" )

Download from https://support.oracle.com the p17572726_1036_Generic.zip "Patch 17572726: SU Patch [FCX7]: WLS PATCH SET UPDATE 10.3.6.0.7" https://support.oracle.com/epmos/faces/PatchDetail?requestId=16925196&_afrLoop=481943043189464&patchId=17572726&_afrWindowMode=0&_adf.ctrl-state=jhdx9weyr_233

Checkout the Biemond Vagrant from here https://github.com/biemond/biemond-orawls-vagrant (copy the http url from the "HTTPS clone URL" box)

git clone https://github.com/biemond/biemond-orawls-vagrant.git

put the downloaded jars and zips and tar.gz into /Users/edwin/software

vagrant up

It should all work. If not, use your brain.





If you don't want to use Biemond's Puppet module, but rather waste countless hours doing it manually, you can download a CentOS Appliance (OVA file)

http://virtualboxes.org/images/centos/

download https://s3-eu-west-1.amazonaws.com/virtualboxes.org/CentOS7-base.ova.torrent (you can download Free Download Manager to download it)

Open VirtualBox, Import appliance, select the .ova file just downloaded

See also

http://www.javamonamour.org/2014/09/weblogic-installing-weblogic-1035.html



Wednesday, August 13, 2014

default: VirtualBox VM is already running.

I have cloned an existing Vagrantfile, changed the properties "config.vm.box" and "config.vm.host_name", and done a "vagrant up" hoping to have a brand new VM available. After all this is what Vagrant should be good at.

Nope. It keeps saying:

Bringing machine 'default' up with 'virtualbox' provider...
==> default: VirtualBox VM is already running.


I had to do a "vagrant destroy" of my previously running VM, then a "vagrant up" of both.

ruby --version
ruby 2.0.0p353 (2013-11-22) [x64-mingw32]

vagrant --version
Vagrant 1.6.3


There you have a workaround.... however I am quite skeptical that Vagrant "fails" on such a basic operation... I am NOT impressed... I am unconditionally unimpressed by whatever turns around Ruby, the language is way too unstable and buggish when you compare to Java... I really wish all this Puppet/Vagrant world had not used Ruby as implementation language...



Friday, June 27, 2014

Vagrant snapshot

http://priyaaank.tumblr.com/post/50707609769/snapshotting-vagrant

I have just discovered there are PLUGINS in Vagrant (do "vagrant plugin list" to know what you have installed), and that you can take snapshots of a box with Vagrant 1.6.3 (it was not available with my previous Vagrant version) and doing "vagrant plugin install vagrant-vbox-snapshot"

I never really needed this feature, but it's cool to know it exists.

Saturday, June 21, 2014

Book: creating development environments with vagrant

http://www.packtpub.com/creating-development-environments-with-vagrant/book



This is a really cool, down to earth, getting started tutorial guiding you through some simple configurations with Vagrant and Puppet/Chef.

A few recipes are shown to
- create your own Virtual Box
- configure the network
- install apache, mysql etc etc

One should  really go through this book when getting started with Vagrant and Puppet, great value for the money.



 




Friday, May 30, 2014

Vagrant, setting multiple IPs on a box

The official doc gives example only for 1 IP: http://docs.vagrantup.com/v2/networking/private_network.html

Vagrant.configure("2") do |config|
  config.vm.network "private_network", ip: "192.168.50.4"
end


Googling around I could find only 1 example of Multiple IPs:

https://groups.google.com/forum/#!topic/vagrant-up/hqtdOEjjlsw
Vagrant::Config.run do |config|
  config.vm.define :web001 do |config|
    config.vm.box = "base"
    config.vm.forward_port("http", 5000, 8881)
    config.vm.forward_port("ssh", 22, 2222)
    config.vm.host_name = "web001.example.com"
    config.vm.network("33.33.33.10")
    config.vm.network("33.33.33.20", {:adapter=>2})
  end
end 


but it doesn't work for me...

Any help would be greatly appreciated....

PS the question was answered here just do a:
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "precise64"

  config.vm.network "private_network", ip: "192.168.50.4"
  config.vm.network "private_network", ip: "192.168.50.5"
  config.vm.network "private_network", ip: "192.168.50.6"
  config.vm.network "private_network", ip: "192.168.50.7"

end


I thought I had tried it before and didn't work... but it DOES work! Great!



Friday, October 4, 2013

Huge caveat working with Vagrant and Puppet

Never, ever remove the content of the /tmp folder on your VirtualBox:
I have done it today, and after getting a weird warning:

[root@osb-vagrant tmp]# rm -rf *
rm: cannot remove `vagrant-puppet/manifests': Device or resource busy
rm: cannot remove `vagrant-puppet/modules-0': Device or resource busy



I have discovered that all the puppet files on my HOST machine had been deleted... the Vagrant mapping between the Vagrantfile directory on the host, and the /tmp/vagrant-puppet folder on the guest, seems to work BOTH WAYS.
So, just leave those folders alone. I know, it's painful.



Saturday, August 24, 2013

Stderr: VBoxManage.exe: error: Could not rename the directory

I am not a big fan of Vagrant, its behavior is way too erratic and opaque for me. When it works we are happy, when it fails - and it fails way too often - we are left googling sparse and stern documentation.

This new error "Stderr: VBoxManage.exe: error: Could not rename the directory" could be fixed only after LOTS of googling and trial and error:

Vagrant.configure("2") do |config2|
  # ... (other config)
  config2.vm.provider :virtualbox do |vb|
      vb.name = "jkstest"
  end
end


This should be added just after the config.vm.box_url clause, and BEFORE any customize.

How frustrating.

Despite this settings, my VB is created in C:\Users\myuser\VirtualBox VMs\workspaceJKS_1377339021, rather than in the jkstest folder.

The original error message was:
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["modifyvm", "3a81f6e5-ba5a-438b-85a8-501a63a3a053", "--name", "trunk_1377853840"]

Stderr: VBoxManage.exe: error: Could not rename the directory 'C:\Users\pippo\VirtualBox VMs\acme-basebox' to
'C:\Users\pippo\VirtualBox VMs\trunk_1377853840' to save the settings file (VERR_ACCESS_DENIED)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component SessionMachine, interface IMachine, callee IUnknown
VBoxManage.exe: error: Context: "SaveSettings()" at line 2527 of file VBoxManageModifyVM.cpp

In fact, there was another VBOX running, which had been created with the name "acme-basebox" (this is the setting config.vm.box = "acme-basebox" . Shutting down this machine allowed me to start the other without the above mentioned hack.

Saturday, April 20, 2013

Geppetto IDE, Vagrant and Puppet - part 2

Introductory tutorial on Geppetto IDE here:

https://puppetlabs.com/blog/geppetto-a-puppet-ide/

I come up with my first manifest:
file { "/tmp/somefile.txt":
    ensure => present,
    content => "Ciao scemo",
}

now, how do I execute it on my VirtualBox?

MUST READ Puppet and Vagrant tutorial here:
http://www.linux.com/news/software/applications/694157-setup-your-dev-environment-in-nothing-flat-with-puppet

Here we learn that under your vagrant base directory,
you should create a manifests folder and there a default.pp file, and there you stick your "file { "/tmp/somefile.txt":" etc etc declaration.

At this point, do "vagrant up" and the file somefile.txt is magically created in /tmp.

you can check by logging in with putty at port 2222 using vagrant/vagrant.

Interestingly, my default.pp file has ended up in /tmp/vagrant-puppet/manifests/default.pp on the VM.

more vagrant-puppet doc here: http://docs-v1.vagrantup.com/v1/docs/provisioners/puppet.html



Tuesday, April 16, 2013

vagrant VM not created. Moving on

On Windows, I have installed a VM, and everything was working fine. vagrant up, vagrant down, vagrante suspend, vagrant resume. All perfect.
Then I rebooted my machine, and when I issue any command I get "vagrant VM not created. Moving on".
My VM had disappeared. Luckily I didn't lose anything.
The only solution was to "add box" again.
Disappointing.