The guide below will help you to install latest version of JIRA (at the time of writing this article – version 7) in the VirtualBox VM, using Vagrant and Chef.
We won’t be creating any Chef cookbooks, we’ll just re-use the existing jira cookbook from the Chef supermarket.
We will also be using Berkshelf to handle the cookbook dependencies for us and Vagrant bento/centos-6.7 box that is available on hashicorp site, but you should be able to use any other Vagrant box as long as the jira cookbook supports it.

1. Install VirtualBox

  • I recommend using version 4.3 as version 5 still seems bit unstable to me.
  • You can disable VirtualBox updates to stay on 4.3. Use GUI or this:
    1
    
    VBoxManage setextradata global GUI/UpdateDate never

2. Install Vagrant

  • I recommend installation of the vagrant-vbguest plugin to recompile guest additions:
    1
    
    vagrant plugin install vagrant-vbguest
  • If you’re behind proxy, install also vagrant-proxyconf plugin:
    1
    
    vagrant plugin install vagrant-proxyconf

3. Install ChefDK (Berkshelf)
4. Install vagrant-berkshelf plugin:

1
vagrant plugin install vagrant-berkshelf

5. Create some directory and go to that directory:

1
2
mkdir jira
cd jira

6. Create Berksfile – jira/Berksfile:

1
2
source "https://supermarket.chef.io"
cookbook 'jira', '~> 2.7.0'

7. Create Vagrantfile – jira/Vagrantfile:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Vagrant.configure(2) do |config|
  # I am using centos-6.7 box, but others should work too...
  config.vm.box = "bento/centos-6.7" 
  config.vm.network "forwarded_port", guest: 8080, host: 8080
  config.vm.network "forwarded_port", guest: 443, host: 443
  config.vm.network "private_network", type: "dhcp"
  config.vm.provider "virtualbox" do |vb|
  # I am using 2GB of ram and 4 cpus as JIRA is resource hungry, adjust as needed
  # natdnshostresolver1 means that VirtualBox will use your host DNS to resolve hostnames
  vb.memory = 2048
     vb.cpus = 4
     vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
  end
  # enable Berkshelf, the Chef dependency management
  config.berkshelf.enabled = true
  # use jira cookbook to provision this box
  # jira cookbook will also create mysql database by default
  # mysql server password is mandatory for jira cookbook, otherwise the provisioning will fail, change it if you need to or leave it as it is
  config.vm.provision "chef_solo" do |chef|
    chef.add_recipe "jira"
    chef.json = {
    "mysql" => {
      "server_root_password" => "mysql"
    }
  }
  end
  # if you're using proxy and you installed vagrant-proxyconf plugin, set it up here
  if Vagrant.has_plugin?("vagrant-proxyconf")
    config.proxy.http     = "http://someproxy:8080"
    config.proxy.https    = "http://someproxy:8080"
    config.proxy.no_proxy = "localhost,127.0.0.1"
  end
  # optional - ssh agent forwarding
  config.ssh.forward_agent = true
end

8. You should now have the following structure:

1
2
3
+ jira/
++ Berksfile
++ Vagrantfile

9. Run Vagrant and let the provisioning finish:

1
vagrant up

10. Open browser and navigate to http://localhost:8080 or https://localhost

Note:
If there a is problem with JIRA startup because of some plugin timeout, increase the plugin startup timeout in /opt/atlassian/jira/bin/setenv.sh:

1
JVM_SUPPORT_RECOMMENDED_ARGS="-Datlassian.plugins.enable.wait=300"

Enjoy!

, , , , , , , ,

Install EPEL and NUX repositories

1
rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-1.noarch.rpm
1
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

Install VLC

1
yum install vlc

Enjoy!

, , , ,

Optional: Remove GNOME
Note: It’s probably better to run Minimal installation and then install MATE, but if you already installed GNOME, this is the way to get rid of it.

Following command will remove all gnome packages excluding MATE dependencies.
WARNING: Your X session will be terminated during the removal of some GNOME packages, so it’s better to run the following command from another terminal (e.g. Ctrl+Alt+F2).

If you want to confirm removal of each package, exclude the ‘-y’ in the yum command below.

1
for i in `yum list installed|grep gnome|grep -v -E 'libgnome|gnome-icon-theme|gnome-keyring|gnome-themes-standard'|awk '{print $1}'`; do yum -y remove $i; done

Install EPEL

1
rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Install MATE

1
yum groups install "MATE Desktop"

Replace GDM with LightDM

1
2
systemctl disable gdm.service
systemctl enable lightdm.service

Reboot and select MATE in the LightDM settings (icon is in the upper right corner of login screen).

Enjoy!

, , , ,