Introduction
Introduction Statistics Contact Development Disclaimer Help
using docker for dev as its alot quicker - warvox - VoIP based wardialing tool,…
Log
Files
Refs
README
---
commit 1847885cde03343d8eef9035bc4cbe76d1a38149
parent f906e2822e33420c52e994b4e56cdaa2293780ec
Author: Jay Scott <[email protected]>
Date: Tue, 19 Jul 2016 15:24:43 +0100
using docker for dev as its alot quicker
Diffstat:
A Dockerfile | 26 ++++++++++++++++++++++++++
M README.md | 35 +++++++++++++++++++++++------…
D Vagrantfile | 14 --------------
D hosts | 2 --
D playbook.yml | 8 --------
D roles/ansible-role-warvox/README.md | 33 -----------------------------…
D roles/ansible-role-warvox/defaults… | 8 --------
D roles/ansible-role-warvox/handlers… | 2 --
D roles/ansible-role-warvox/meta/mai… | 14 --------------
D roles/ansible-role-warvox/tasks/ma… | 50 ---------------------------…
D roles/ansible-role-warvox/tasks/se… | 16 ----------------
D roles/ansible-role-warvox/tests/in… | 2 --
D roles/ansible-role-warvox/tests/te… | 5 -----
D roles/ansible-role-warvox/vars/mai… | 2 --
A setup.sh | 34 +++++++++++++++++++++++++++++…
15 files changed, 86 insertions(+), 165 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
@@ -0,0 +1,26 @@
+FROM ruby:slim
+MAINTAINER Jay Scott <[email protected]>
+
+RUN apt-get update && apt-get -y install \
+ gnuplot \
+ lame \
+ build-essential \
+ libssl-dev \
+ libcurl4-openssl-dev \
+ postgresql-contrib \
+ git-core \
+ curl \
+ libpq-dev \
+ && rm -rf /var/lib/apt/lists/*
+
+ADD . /home/warvox
+ADD setup.sh /
+
+WORKDIR /home/warvox
+RUN ln -s /usr/bin/ruby2.1 /usr/bin/ruby \
+ && bundle install \
+ && make
+
+EXPOSE 7777
+
+CMD ["/setup.sh"]
diff --git a/README.md b/README.md
@@ -7,12 +7,12 @@ The latest version of this software is available from http://…
Questions and suggestions can be sent to:
x(at)hdm(dot)io
-Installing
---
-WarVOX 2.0.0 is still in development and the installation process is not ideal…
-
-**DO NOT USE WARVOX 2.0.0-dev YET!**
+#table of contents
+ - [Installing](#installing)
+ - [Development](#development)
+#installing
+--
WarVOX requires a Linux operating system, preferably Ubuntu or Debian, but Kal…
WarVOX requires PostgreSQL 9.1 or newer with the "contrib" package installed f…
@@ -20,9 +20,9 @@ WarVOX requires PostgreSQL 9.1 or newer with the "contrib" pa…
To get started, install the OS-level dependencies:
$ sudo apt-get install gnuplot lame build-essential libssl-dev libcurl…
- postgresql postgresql-contrib postgresql-common git-core curl libpq …
+ postgresql postgresql-contrib postgresql-common git-core curl libpq-…
-Install RVM to obtain Ruby 2.1.5 or later
+Install RVM to obtain Ruby 2.2.3 or later
$ \curl -L https://get.rvm.io | bash -s stable --autolibs=3 --rails
@@ -30,9 +30,9 @@ After RVM is installed you need to run the rvm script provided
$ source /usr/local/rvm/scripts/rvm
-In case you have not installed Ruby 1.9.3 or later by now, do so using RVM.
+In case you have not installed Ruby 2.2.3 or later by now, do so using RVM.
- $ rvm install ruby-2.1
+ $ rvm install ruby-2.2.3
Clone this repository to the location you want to install WarVOX:
@@ -79,3 +79,20 @@ Start the WarVOX daemons:
Access the web interface at http://127.0.0.1:7777/
At this point you can configure a new IAX2 provider, create a project, and sta…
+
+### Development
+
+Using Docker
+
+Run a postgres container
+
+ docker pull postgres
+ docker run -d --name=postgres postgres
+
+Build the image
+
+ docker build -t warvox/test .
+
+Run the image
+
+ docker run -p 7777:7777 -ti --link postgres:db warvox/test
diff --git a/Vagrantfile b/Vagrantfile
@@ -1,14 +0,0 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
-
-VAGRANTFILE_API_VERSION = "2"
-
-Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
- config.vm.synced_folder ".", "/home/warvox", type: "rsync"
- config.vm.box = "debian/jessie64"
- config.vm.network :private_network, ip: "192.168.60.4"
-
- config.vm.provision "ansible" do |ansible|
- ansible.playbook = "playbook.yml"
- end
-end
diff --git a/hosts b/hosts
@@ -1,2 +0,0 @@
-[warvox-app]
-192.168.60.4
diff --git a/playbook.yml b/playbook.yml
@@ -1,8 +0,0 @@
----
-- hosts: all
- become: yes
- roles:
- - ansible-role-warvox
- tasks:
-
-
diff --git a/roles/ansible-role-warvox/README.md b/roles/ansible-role-warvox/RE…
@@ -1,33 +0,0 @@
-Role Name
-=========
-
-Provision warvox from source, rapid7/warvox.
-
-Requirements
-------------
-
-No pre-requisites.
-
-Role Variables
---------------
-
-TBC
-
-Dependencies
-------------
-
-No dependencies
-
-Example Playbook
-----------------
-
-
-License
--------
-
-None
-
-Author Information
-------------------
-
-Beardyjay
diff --git a/roles/ansible-role-warvox/defaults/main.yml b/roles/ansible-role-w…
@@ -1,8 +0,0 @@
----
-
-rvm:
- url: https://get.rvm.io
- temp_installer_path: /tmp/rvm-installer.sh
- default_ruby_version: ruby-2.2.3
- root: "~/.rvm"
- init_script: "~/.rvm/scripts/rvm"
diff --git a/roles/ansible-role-warvox/handlers/main.yml b/roles/ansible-role-w…
@@ -1,2 +0,0 @@
----
-# handlers file for .
diff --git a/roles/ansible-role-warvox/meta/main.yml b/roles/ansible-role-warvo…
@@ -1,14 +0,0 @@
-galaxy_info:
- author: Jay Scott
- description: Beardyjay
- license: NONE
- min_ansible_version: 1.3
- galaxy_tags:
- - warvox
- - voip
- platforms:
- - name: Debian
- versions:
- - jessie
-dependencies: []
-
diff --git a/roles/ansible-role-warvox/tasks/main.yml b/roles/ansible-role-warv…
@@ -1,50 +0,0 @@
----
-
-# Setup/install tasks.
-- include: setup-RedHat.yml
- when: ansible_os_family == 'RedHat'
-
-- include: setup-Debian.yml
- when: ansible_os_family == 'Debian'
-
- # RVM Install
-- name: check for mpapis gpg key
- shell: gpg --list-keys mpapis
- become: false
- register: mpapis_gpg_key_exists
- ignore_errors: true
-
-- name: import GPG key
- shell: "curl -sSL https://rvm.io/mpapis.asc | gpg --import -"
- become: false
- when: mpapis_gpg_key_exists is defined and mpapis_gpg_key_exists.rc is defin…
-
-- name: download RVM
- get_url:
- url: "{{rvm.url}}"
- dest: "{{rvm.temp_installer_path}}"
-
-- name: set executable
- file:
- path: "{{rvm.temp_installer_path}}"
- mode: 0755
-
-- name: installing RVM
- become: false
- command: "{{rvm.temp_installer_path}} --path {{rvm.root}} stable"
-
-- name: setting RVM autolibs
- become: false
- command: "{{rvm.root}}/bin/rvm autolibs 3"
-
- # Ruby Install
-- name: installing Ruby
- become: false
- command: "{{rvm.root}}/bin/rvm install {{rvm.default_ruby_version}}"
-
-- name: setting default Ruby
- shell: "source {{rvm.init_script}} && rvm use {{rvm.default_ruby_version}} -…
- become: false
- register: rvm_select_ruby_version_root
- ignore_errors: True
- changed_when: False
diff --git a/roles/ansible-role-warvox/tasks/setup-Debian.yml b/roles/ansible-r…
@@ -1,16 +0,0 @@
-
-- name: install warvox deps
- apt: "name={{ item }} state=installed"
- with_items:
- - gnuplot
- - lame
- - build-essential
- - libssl-dev
- - libcurl4-openssl-dev
- - postgresql
- - postgresql-contrib
- - postgresql-common
- - git-core
- - curl
- - libpq-dev
- - sox
diff --git a/roles/ansible-role-warvox/tests/inventory b/roles/ansible-role-war…
@@ -1 +0,0 @@
-localhost
-\ No newline at end of file
diff --git a/roles/ansible-role-warvox/tests/test.yml b/roles/ansible-role-warv…
@@ -1,5 +0,0 @@
----
-- hosts: localhost
- remote_user: root
- roles:
- - .
diff --git a/roles/ansible-role-warvox/vars/main.yml b/roles/ansible-role-warvo…
@@ -1,2 +0,0 @@
----
-# vars file for .
diff --git a/setup.sh b/setup.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+#
+# based of a setup script by pandrew/metasploit
+#
+
+VOXUSER="warvox"
+VOXPASS="changeme"
+
+USEREXIST="$(psql -h $DB_PORT_5432_TCP_ADDR -p 5432 -U postgres postgres -tAc …
+if [[ ! $USEREXIST -eq 1 ]]
+then
+ psql -h $DB_PORT_5432_TCP_ADDR -p 5432 -U postgres postgres -c "create role …
+fi
+
+DBEXIST="$(psql -h $DB_PORT_5432_TCP_ADDR -p 5432 -U postgres postgres -l | g…
+if [[ ! $DBEXIST ]]
+then
+ psql -h $DB_PORT_5432_TCP_ADDR -p 5432 -U postgres postgres -c "CREATE DATAB…
+fi
+
+sh -c "echo 'production:
+ adapter: postgresql
+ database: warvox
+ username: $VOXUSER
+ password: $VOXPASS
+ host: $DB_PORT_5432_TCP_ADDR
+ port: 5432
+ pool: 75
+ timeout: 5' > /home/warvox/config/database.yml"
+
+cd /home/warvox
+make database
+bin/adduser admin godsexlove
+bin/warvox.rb --address 0.0.0.0
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.