Skip to content

Commit

Permalink
vagrant: base wowza configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ext committed Feb 25, 2016
1 parent 0502cd8 commit 5c9a336
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
29 changes: 26 additions & 3 deletions .ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
username: admin
password: admin
wowza_version: 4.4.0

dir: "/usr/local/WowzaStreamingEngine"

tasks:
- name: Installing other utils
apt:
Expand All @@ -29,9 +30,31 @@

- name: Push installation script
template: src=wowza.exp.j2 dest=/home/vagrant/wowza.exp mode=0755

- name: Run installation
command: /home/vagrant/wowza.exp
register: installed
args:
chdir: /home/vagrant
creates: /usr/local/WowzaStreamingEngine/conf/Server.license
creates: "{{ dir }}/conf/Server.license"

- name: Fixed borked directory permissions
command: find "{{ dir }}/" -type d -exec chmod 755 {} +
when: installed|changed

- name: Fixed borked file permissions
command: find "{{ dir }}/" -type f -regex '.*\.\(txt\|xml\|properties\|password\|access\|jar\|png\|so\|java\|ttf\|html\|js\|as\|pdf\|service\|desktop\|mo\|gif\|swf\|css\|user\|cs\|csproj\|fla\|mxml\|policy\|xaml\|db\|config\|dll\|war\|mp4\)' -exec chmod 644 {} +
when: installed|changed

- name: Symlink NitroXyWowzaModule.jar module
file:
path: "{{ dir }}/lib/NitroxyWowzaModule.jar"
src: "/vagrant/bin/NitroxyWowzaModule.jar"
state: link
force: yes

- name: Enable NitroXyWowzaModule
lineinfile:
dest: "{{ dir }}/conf/Server.xml"
line: '\t\t\t<ServerListener><BaseClass>com.nitroxy.wmz.module.ServerListener</BaseClass></ServerListener>'
insertbefore: '.*</ServerListeners>'
3 changes: 1 addition & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ Vagrant.configure(2) do |config|
config.vm.network "forwarded_port", guest: 8086, host: 8086
config.vm.network "forwarded_port", guest: 8087, host: 8087
config.vm.network "forwarded_port", guest: 8088, host: 8088
#config.vm.synced_folder ".", "/vagrant"
config.vm.synced_folder ".", "/vagrant"

config.vm.provision "ansible_local" do |ansible|
ansible.verbose = "v"
ansible.playbook = ".ansible/playbook.yml"
ansible.raw_arguments = "--extra-vars license='#{license}'"
end
Expand Down
4 changes: 2 additions & 2 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<project name="NitroxyWowzaModule" default="jar" basedir="..">
<project name="NitroxyWowzaModule" default="jar" basedir=".">

<property name="wowza.lib.dir" value="/usr/local/WowzaStreamingEngine/lib"/>
<property name="wowza.lib.dir" value="bin"/>
<property name="jar.filename" value="NitroxyWowzaModule.jar"/>
<property name="core.build.dir" value="bin"/>

Expand Down

0 comments on commit 5c9a336

Please sign in to comment.