Skip to content

Commit 4cbaac2

Browse files
To get VM withnew Jasper Reports Server you have to install VirtualBox and Vagrant, next place Vagrant file in your directory for VM and run 'vagrant up --provision'. To stop VM run 'vagrant halt'. To access web interface of Jasper Reports Server go to 'localhost:8090/jasperserver'. This install scripts will download Ubuntu 14.04, install there JRS and run it
1 parent 89fe8fb commit 4cbaac2

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

Vagrant/Vagrantfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Vagrant.configure(2) do |config|
2+
3+
config.vm.box = "ubuntu/trusty64"
4+
config.vm.box_check_update = false
5+
6+
config.vm.network "forwarded_port", guest: 8080, host: 8090
7+
config.vm.network "forwarded_port", guest: 5432, host: 5430
8+
9+
config.vm.provider "virtualbox" do |vb|
10+
vb.gui = true
11+
vb.memory = "2048"
12+
end
13+
14+
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
15+
16+
config.vm.provision :shell do |sh|
17+
sh.path = "bootstrap.sh"
18+
end
19+
end

Vagrant/bootstrap.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
3+
sudo apt-get update
4+
5+
yes | sudo apt-get install python-pip python-dev build-essential python-setuptools
6+
sudo pip install --upgrade pip
7+
sudo pip install --upgrade virtualenv
8+
sudo pip install paramiko PyYAML Jinja2 httplib2 six
9+
10+
if [ $(dpkg-query -W -f='${Status}' ansible 2>/dev/null | grep -c "ok installed") -eq 0 ];
11+
then
12+
echo "Add APT repositories"
13+
export DEBIAN_FRONTEND=noninteractive
14+
apt-get install -qq software-properties-common &> /dev/null || exit 1
15+
apt-add-repository ppa:ansible/ansible &> /dev/null || exit 1
16+
17+
apt-get update -qq
18+
19+
echo "Installing Ansible"
20+
apt-get install -qq ansible &> /dev/null || exit 1
21+
echo "Ansible installed"
22+
fi
23+
24+
echo "Running Ansible"
25+
bash -c "ansible-playbook /vagrant/playbook.yml --connection=local"

Vagrant/playbook.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- hosts: localhost
3+
remote_user: vagrant
4+
tasks:
5+
- name: download Jasper Server
6+
get_url: url=http://sourceforge.net/projects/jasperserver/files/JasperServer/JasperReports%20Server%20Community%20Edition%206.1.0/jasperreports-server-cp-6.1.0-linux-x64-installer.run dest=/home/vagrant/jasperreports-server-cp-6.1.0-linux-x64-installer.run mode=755
7+
- name: setup Jasper Server
8+
shell: printf '\n\n\n\ny\n\n/home/vagrant/jrs/\n\nn\nn\n' | ./jasperreports-server-cp-6.1.0-linux-x64-installer.run
9+
args:
10+
chdir: /home/vagrant/
11+
creates: /home/vagrant/jrs/
12+
- name: run Jasper Server
13+
command: sh /home/vagrant/jrs/ctlscript.sh start
14+
sudo: yes

0 commit comments

Comments
 (0)