diff --git a/.gitignore b/.gitignore index f91cc01..a56c8e6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ vagrant/ tmp iso *.box +*.ova *~ *# .#* diff --git a/Berksfile b/Berksfile index a7527f2..2369c24 100644 --- a/Berksfile +++ b/Berksfile @@ -3,11 +3,11 @@ source "http://api.berkshelf.com" # Misc -cookbook 'mojolingo-misc', path: 'mojolingo-misc' +cookbook 'telephony-dev-box', path: 'cookbook' cookbook 'apt' # Asterisk -cookbook 'asterisk', '~> 0.2.7' +cookbook 'asterisk', '~> 0.3.0' cookbook 'unimrcp' # FreeSWITCH diff --git a/Berksfile.lock b/Berksfile.lock index 1b12f9f..3d675e1 100644 --- a/Berksfile.lock +++ b/Berksfile.lock @@ -1,20 +1,22 @@ DEPENDENCIES apt - asterisk (~> 0.2.7) + asterisk (~> 0.3.0) freeswitch (~> 0.2) lumenvox (~> 0.1) - mojolingo-misc - path: mojolingo-misc sipp sudo + telephony-dev-box + path: cookbook unimrcp wav2rtp (~> 1.0) GRAPH apt (2.3.10) - asterisk (0.2.7) + asterisk (0.3.0) apt (~> 2.2) - unimrcp (~> 0.1) + build-essential (~> 1.4) + unimrcp (~> 0.2) + yum (~> 3.0) build-essential (1.4.4) chef_handler (1.1.6) dmg (2.2.0) @@ -32,11 +34,6 @@ GRAPH lumenvox (0.1.1) yum (>= 0.0.0) yum-repoforge (>= 0.0.0) - mojolingo-misc (0.0.0) - java (~> 1.6) - rbenv (>= 0.0.0) - sipp (~> 1.0) - wav2rtp (~> 1.0) ohai (2.0.0) rbenv (1.7.1) apt (>= 0.0.0) @@ -49,6 +46,11 @@ GRAPH yum-epel (>= 0.0.0) sipp (1.0.1) sudo (2.5.2) + telephony-dev-box (0.0.0) + java (~> 1.6) + rbenv (>= 0.0.0) + sipp (~> 1.0) + wav2rtp (~> 1.0) unimrcp (0.2.0) build-essential (~> 1.4) wav2rtp (1.0.0) diff --git a/Gemfile b/Gemfile index 8b6d7f3..3be5305 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,3 @@ source 'https://rubygems.org' -gem 'veewee', git: 'git://github.com/jedi4ever/veewee' gem 'berkshelf', '~> 3.1' diff --git a/Gemfile.lock b/Gemfile.lock index 96bfc85..1e6337b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,32 +1,7 @@ -GIT - remote: git://github.com/jedi4ever/veewee - revision: ebb81d0699b5eae4c0e257784eaaa0c5bf488832 - specs: - veewee (0.3.8.dev) - ansi (~> 1.3.0) - childprocess - fission (= 0.4.0) - fog (~> 1.8) - grit - highline - i18n - json - net-ssh (>= 2.2.0) - popen4 (~> 0.1.2) - progressbar - ruby-vnc (~> 1.0.0) - thor (~> 0.15) - whichr - GEM remote: https://rubygems.org/ specs: - CFPropertyList (2.0.17) - libxml-ruby (>= 1.1.0) - rake (>= 0.7.0) - Platform (0.4.0) addressable (2.3.6) - ansi (1.3.0) berkshelf (3.1.1) addressable (~> 2.3.4) berkshelf-api-client (~> 1.2) @@ -52,73 +27,31 @@ GEM buff-ruby_engine (0.1.0) buff-shell_out (0.1.1) buff-ruby_engine (~> 0.1.0) - builder (3.2.2) celluloid (0.16.0.pre) timers (~> 2.0.0) celluloid-io (0.16.0.pre) celluloid (>= 0.16.0.pre) nio4r (>= 1.0.0) - childprocess (0.3.9) - ffi (~> 1.0, >= 1.0.11) dep-selector-libgecode (1.0.0) dep_selector (1.0.3) dep-selector-libgecode (~> 1.0) ffi (~> 1.9) - diff-lcs (1.2.4) erubis (2.7.0) - excon (0.27.6) faraday (0.9.0) multipart-post (>= 1.2, < 3) ffi (1.9.0) - fission (0.4.0) - CFPropertyList (~> 2.0.17) - fog (1.16.0) - builder - excon (~> 0.27.0) - formatador (~> 0.2.0) - mime-types - multi_json (~> 1.0) - net-scp (~> 1.1) - net-ssh (>= 2.1.3) - nokogiri (~> 1.5) - ruby-hmac - unicode (~> 0.4.4) - formatador (0.2.4) - grit (2.5.0) - diff-lcs (~> 1.1) - mime-types (~> 1.15) - posix-spawn (~> 0.3.6) hashie (2.1.1) - highline (1.6.20) hitimes (1.2.1) - i18n (0.6.5) json (1.8.0) - libxml-ruby (2.7.0) - mime-types (1.25) - mini_portile (0.5.1) minitar (0.5.4) mixlib-authentication (1.3.0) mixlib-log mixlib-log (1.6.0) - multi_json (1.8.2) multipart-post (2.0.0) net-http-persistent (2.9.4) - net-scp (1.1.2) - net-ssh (>= 2.6.5) - net-ssh (2.7.0) nio4r (1.0.0) - nokogiri (1.6.0) - mini_portile (~> 0.5.0) octokit (3.1.0) sawyer (~> 0.5.3) - open4 (1.3.0) - os (0.9.6) - popen4 (0.1.2) - Platform (>= 0.4.0) - open4 (>= 0.4.0) - posix-spawn (0.3.6) - progressbar (0.21.0) - rake (10.1.0) retryable (1.3.5) ridley (3.1.0) addressable @@ -137,10 +70,6 @@ GEM retryable semverse (~> 1.1) varia_model (~> 0.3) - ruby-hmac (0.4.0) - ruby-vnc (1.0.1) - sane (0.25.6) - os sawyer (0.5.4) addressable (~> 2.3.5) faraday (~> 0.8, < 0.10) @@ -151,16 +80,12 @@ GEM thor (0.18.1) timers (2.0.0) hitimes - unicode (0.4.4) varia_model (0.3.2) buff-extensions (~> 0.2) hashie (>= 2.0.2) - whichr (0.3.6) - sane PLATFORMS ruby DEPENDENCIES berkshelf (~> 3.1) - veewee! diff --git a/Makefile b/Makefile index 70247d6..588c576 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,30 @@ -base_boxes: bundle_install ubuntu_base_box centos_base_box +default: fetch_cookbooks boxes -bundle_install: - bundle install +clean: create_work_directory fetch_origin_base_boxes -ubuntu_base_box: - bundle exec veewee vbox build tdb-ubuntu1204 --force --nogui --auto - bundle exec veewee vbox export tdb-ubuntu1204 - bundle exec veewee vbox destroy tdb-ubuntu1204 +fetch_packer: + cd tmp; wget https://dl.bintray.com/mitchellh/packer/0.5.2_linux_amd64.zip; unzip 0.5.2_linux_amd64.zip + export PATH=$PATH:tmp/packer -centos_base_box: - bundle exec veewee vbox build tdb-centos64 --force --nogui --auto - bundle exec veewee vbox export tdb-centos64 - bundle exec veewee vbox destroy tdb-centos64 +ci: clean fetch_packer default + +create_work_directory: + rm -r tmp + mkdir -p tmp + +fetch_origin_base_boxes: + mkdir tmp/ubuntu + cd tmp/ubuntu; wget http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box; tar -xf opscode_ubuntu-12.04_chef-provisionerless.box + + mkdir tmp/centos + cd tmp/centos; wget http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box; tar -xf opscode_centos-6.5_chef-provisionerless.box + +fetch_cookbooks: + berks vendor cookbooks + +boxes: + packer build boxes/tdb-adhearsion.json + packer build boxes/tdb-asterisk.json + packer build boxes/tdb-freeswitch.json + packer build boxes/tdb-loadtest.json + packer build boxes/tdb-lumenvox.json diff --git a/README.markdown b/README.markdown index 3364085..75576d1 100644 --- a/README.markdown +++ b/README.markdown @@ -18,27 +18,7 @@ One thing to note is that the "adhearsion" VM is especially optional. Most of t ## Usage -### Create an Adhearsion app - -Configure it to connect to the platform of your choice using one of the following samples: - -```ruby -## -# Use with Rayo (FreeSWITCH) -# -config.punchblock.username = "usera@freeswitch.local-dev.mojolingo.com" # Your XMPP JID for use with Rayo -config.punchblock.password = "1" # Your XMPP password -``` - -```ruby -## -# Use with Asterisk -# -config.punchblock.platform = :asterisk # Use Asterisk -config.punchblock.username = "manager" # Your AMI username -config.punchblock.password = "password" # Your AMI password -config.punchblock.host = "asterisk.local-dev.mojolingo.com" # Your AMI host -``` +Generated Adhearsion apps have sample config which targets Telephony Dev Box by default. ### Test Boot your Adhearsion app and call in. You can dial `usera@[asterisk/freeswitch].local-dev.mojolingo.com`, or any number from a registered endpoint. @@ -48,7 +28,3 @@ The Asterisk and FreeSWITCH VMs contain preconfigured "usera" and "userb" accoun * Username: usera@[asterisk/freeswitch].local-dev.mojolingo.com / Password: usera * Username: userb@[asterisk/freeswitch].local-dev.mojolingo.com / Password: userb - -## Base Boxes - -This project includes base box templates for use on Mojo Lingo projects. These base boxes are published at http://ci.mojolingo.com/job/Telephony-Dev-Box-Base-Boxen, and include Chef 11. Ubuntu 12.04 and CentOS 6.4 boxes are available, both 64bit. The main difference between these and other publicly available base boxes is the visibility into their build mechanism and that they *never* change after they are published - new builds always have a new build number in their URL; this way you can be sure of base box stability. diff --git a/Rakefile b/Rakefile deleted file mode 100644 index a641364..0000000 --- a/Rakefile +++ /dev/null @@ -1,4 +0,0 @@ -task :package do - system 'vagrant ssh -c "sudo aptitude clean && cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill"' - system 'vagrant package' -end diff --git a/Vagrantfile b/Vagrantfile index 713cf8c..373d680 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -1,9 +1,10 @@ Vagrant.configure("2") do |config| - config.vm.box = 'tdb-ubuntu1204-v9' - config.vm.box_url = 'http://ci.mojolingo.com/job/Telephony-Dev-Box-Base-Boxen/9/artifact/tdb-ubuntu1204.box' config.berkshelf.enabled = true config.vm.define :adhearsion do |adhearsion| + adhearsion.vm.box = 'tdb-adhearsion' + adhearsion.vm.box_url = 'build/tdb-adhearsion.box' + adhearsion.vm.network :private_network, ip: "10.203.175.10" adhearsion.vm.hostname = "adhearsion.local-dev.mojolingo.com" @@ -17,12 +18,13 @@ Vagrant.configure("2") do |config| chef.roles_path = "roles" chef.add_role "adhearsion" - - chef.log_level = :debug end end config.vm.define :asterisk do |asterisk| + asterisk.vm.box = 'tdb-asterisk' + asterisk.vm.box_url = 'build/tdb-asterisk.box' + public_ip = "10.203.175.11" asterisk.vm.network :private_network, ip: public_ip @@ -39,13 +41,14 @@ Vagrant.configure("2") do |config| chef.add_role "asterisk" - chef.log_level = :debug - chef.json = {} end end config.vm.define :freeswitch do |freeswitch| + freeswitch.vm.box = 'tdb-freeswitch' + freeswitch.vm.box_url = 'build/tdb-freeswitch.box' + public_ip = "10.203.175.13" domain = "freeswitch.local-dev.mojolingo.com" @@ -64,8 +67,6 @@ Vagrant.configure("2") do |config| chef.add_role "freeswitch" - chef.log_level = :debug - chef.json = { freeswitch: { local_ip: public_ip, @@ -79,8 +80,8 @@ Vagrant.configure("2") do |config| domain = "lumenvox.local-dev.mojolingo.com" ip = "10.203.175.14" - lumenvox.vm.box = 'tdb-centos64-v9' - lumenvox.vm.box_url = 'http://ci.mojolingo.com/job/Telephony-Dev-Box-Base-Boxen/9/artifact/tdb-centos64.box' + lumenvox.vm.box = 'tdb-lumenvox' + lumenvox.vm.box_url = 'build/tdb-lumenvox.box' lumenvox.vm.network :private_network, ip: ip lumenvox.vm.hostname = domain @@ -96,8 +97,6 @@ Vagrant.configure("2") do |config| chef.add_role "lumenvox" - chef.log_level = :debug - chef.json = { 'lumenvox' => { 'media_server' => { @@ -113,6 +112,9 @@ Vagrant.configure("2") do |config| end config.vm.define :loadtest do |loadtest| + loadtest.vm.box = 'tdb-loadtest' + loadtest.vm.box_url = 'build/tdb-loadtest.box' + loadtest.vm.network :private_network, ip: '10.203.175.15' loadtest.vm.hostname = 'loadtest.local-dev.mojolingo.com' @@ -126,8 +128,6 @@ Vagrant.configure("2") do |config| chef.roles_path = "roles" chef.add_role "loadtest" - - chef.log_level = :debug end end end diff --git a/boxes/tdb-adhearsion.json b/boxes/tdb-adhearsion.json new file mode 100644 index 0000000..46d89eb --- /dev/null +++ b/boxes/tdb-adhearsion.json @@ -0,0 +1,61 @@ +{ + "builders": [ + { + "type": "virtualbox-ovf", + "source_path": "tmp/ubuntu/box.ovf", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "30s", + "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", + "vm_name": "TDB Adhearsion", + "export_opts": [ + "--vsys", "0", + "--vendor", "MojoLingo", + "--vendorurl", "http://mojolingo.com", + "--product", "Telephony Dev Box - Adhearsion", + "--producturl", "http://mojolingo.github.io/Telephony-Dev-Box/", + "--version", "2.0" + ], + "format": "ova", + "headless": true, + "output_directory": "build/adhearsion", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "1024" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "1" + ] + ] + } + ], + "provisioners": [ + { + "type": "shell", + "inline": ["sudo apt-get update && sudo apt-get -y install curl"] + }, + { + "type": "chef-solo", + "cookbook_paths": ["cookbooks"], + "roles_path": "roles", + "data_bags_path": "data_bags", + "run_list":[ + "role[adhearsion]" + ] + } + ], + "post-processors": [ + { + "type": "vagrant", + "compression_level": 9, + "output": "build/tdb-adhearsion.box", + "keep_input_artifact": true + } + ] +} diff --git a/boxes/tdb-asterisk.json b/boxes/tdb-asterisk.json new file mode 100644 index 0000000..995bae0 --- /dev/null +++ b/boxes/tdb-asterisk.json @@ -0,0 +1,61 @@ +{ + "builders": [ + { + "type": "virtualbox-ovf", + "source_path": "tmp/ubuntu/box.ovf", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "30s", + "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", + "vm_name": "TDB Asterisk", + "export_opts": [ + "--vsys", "0", + "--vendor", "MojoLingo", + "--vendorurl", "http://mojolingo.com", + "--product", "Telephony Dev Box - Asterisk", + "--producturl", "http://mojolingo.github.io/Telephony-Dev-Box/", + "--version", "2.0" + ], + "format": "ova", + "headless": true, + "output_directory": "build/asterisk", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "1024" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "1" + ] + ] + } + ], + "provisioners": [ + { + "type": "shell", + "inline": ["sudo apt-get update && sudo apt-get -y install curl"] + }, + { + "type": "chef-solo", + "cookbook_paths": ["cookbooks"], + "roles_path": "roles", + "data_bags_path": "data_bags", + "run_list":[ + "role[asterisk]" + ] + } + ], + "post-processors": [ + { + "type": "vagrant", + "compression_level": 9, + "output": "build/tdb-asterisk.box", + "keep_input_artifact": true + } + ] +} diff --git a/boxes/tdb-freeswitch.json b/boxes/tdb-freeswitch.json new file mode 100644 index 0000000..ec56849 --- /dev/null +++ b/boxes/tdb-freeswitch.json @@ -0,0 +1,61 @@ +{ + "builders": [ + { + "type": "virtualbox-ovf", + "source_path": "tmp/ubuntu/box.ovf", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "30s", + "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", + "vm_name": "TDB FreeSWITCH", + "export_opts": [ + "--vsys", "0", + "--vendor", "MojoLingo", + "--vendorurl", "http://mojolingo.com", + "--product", "Telephony Dev Box - FreeSWITCH", + "--producturl", "http://mojolingo.github.io/Telephony-Dev-Box/", + "--version", "2.0" + ], + "format": "ova", + "headless": true, + "output_directory": "build/freeswitch", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "1024" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "1" + ] + ] + } + ], + "provisioners": [ + { + "type": "shell", + "inline": ["sudo apt-get update && sudo apt-get -y install curl"] + }, + { + "type": "chef-solo", + "cookbook_paths": ["cookbooks"], + "roles_path": "roles", + "data_bags_path": "data_bags", + "run_list":[ + "role[freeswitch]" + ] + } + ], + "post-processors": [ + { + "type": "vagrant", + "compression_level": 9, + "output": "build/tdb-freeswitch.box", + "keep_input_artifact": true + } + ] +} diff --git a/boxes/tdb-loadtest.json b/boxes/tdb-loadtest.json new file mode 100644 index 0000000..5983a5e --- /dev/null +++ b/boxes/tdb-loadtest.json @@ -0,0 +1,61 @@ +{ + "builders": [ + { + "type": "virtualbox-ovf", + "source_path": "tmp/ubuntu/box.ovf", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "30s", + "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", + "vm_name": "TDB Loadtest", + "export_opts": [ + "--vsys", "0", + "--vendor", "MojoLingo", + "--vendorurl", "http://mojolingo.com", + "--product", "Telephony Dev Box - Loadtest", + "--producturl", "http://mojolingo.github.io/Telephony-Dev-Box/", + "--version", "2.0" + ], + "format": "ova", + "headless": true, + "output_directory": "build/loadtest", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "1024" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "1" + ] + ] + } + ], + "provisioners": [ + { + "type": "shell", + "inline": ["sudo apt-get update && sudo apt-get -y install curl"] + }, + { + "type": "chef-solo", + "cookbook_paths": ["cookbooks"], + "roles_path": "roles", + "data_bags_path": "data_bags", + "run_list":[ + "role[loadtest]" + ] + } + ], + "post-processors": [ + { + "type": "vagrant", + "compression_level": 9, + "output": "build/tdb-loadtest.box", + "keep_input_artifact": true + } + ] +} diff --git a/boxes/tdb-lumenvox.json b/boxes/tdb-lumenvox.json new file mode 100644 index 0000000..accc2cf --- /dev/null +++ b/boxes/tdb-lumenvox.json @@ -0,0 +1,57 @@ +{ + "builders": [ + { + "type": "virtualbox-ovf", + "source_path": "tmp/centos/box.ovf", + "ssh_username": "vagrant", + "ssh_password": "vagrant", + "ssh_wait_timeout": "30s", + "shutdown_command": "echo 'vagrant' | sudo -S shutdown -P now", + "vm_name": "TDB LumenVox", + "export_opts": [ + "--vsys", "0", + "--vendor", "MojoLingo", + "--vendorurl", "http://mojolingo.com", + "--product", "Telephony Dev Box - LumenVox", + "--producturl", "http://mojolingo.github.io/Telephony-Dev-Box/", + "--version", "2.0" + ], + "format": "ova", + "headless": true, + "output_directory": "build/lumenvox", + "vboxmanage": [ + [ + "modifyvm", + "{{.Name}}", + "--memory", + "1024" + ], + [ + "modifyvm", + "{{.Name}}", + "--cpus", + "1" + ] + ] + } + ], + "provisioners": [ + { + "type": "chef-solo", + "cookbook_paths": ["cookbooks"], + "roles_path": "roles", + "data_bags_path": "data_bags", + "run_list":[ + "role[lumenvox]" + ] + } + ], + "post-processors": [ + { + "type": "vagrant", + "compression_level": 9, + "output": "build/tdb-lumenvox.box", + "keep_input_artifact": true + } + ] +} diff --git a/build/.gitkeep b/build/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/mojolingo-misc/files/default/event_socket.conf.xml b/cookbook/files/default/event_socket.conf.xml similarity index 100% rename from mojolingo-misc/files/default/event_socket.conf.xml rename to cookbook/files/default/event_socket.conf.xml diff --git a/mojolingo-misc/files/default/lumenvox.conf.xml b/cookbook/files/default/lumenvox.conf.xml similarity index 100% rename from mojolingo-misc/files/default/lumenvox.conf.xml rename to cookbook/files/default/lumenvox.conf.xml diff --git a/mojolingo-misc/files/default/unimrcp.conf.xml b/cookbook/files/default/unimrcp.conf.xml similarity index 100% rename from mojolingo-misc/files/default/unimrcp.conf.xml rename to cookbook/files/default/unimrcp.conf.xml diff --git a/mojolingo-misc/files/default/unimrcpserver.xml b/cookbook/files/default/unimrcpserver.xml similarity index 100% rename from mojolingo-misc/files/default/unimrcpserver.xml rename to cookbook/files/default/unimrcpserver.xml diff --git a/mojolingo-misc/metadata.rb b/cookbook/metadata.rb similarity index 58% rename from mojolingo-misc/metadata.rb rename to cookbook/metadata.rb index 14410d6..d71bf7a 100644 --- a/mojolingo-misc/metadata.rb +++ b/cookbook/metadata.rb @@ -1,9 +1,9 @@ -name "mojolingo-misc" +name "telephony-dev-box" maintainer "Mojo Lingo LLC" maintainer_email "ops@mojolingo.com" license "MIT" -description "Miscellaneous small tasks" -recipe "mojolingo-misc::no_iptables", "Kill iptables" +description "Miscellaneous build stuff for Telephony Dev Box" +recipe "telephony-dev-box::no_iptables", "Kill iptables" %w{ ubuntu centos }.each do |os| supports os diff --git a/mojolingo-misc/recipes/adhearsion.rb b/cookbook/recipes/adhearsion.rb similarity index 87% rename from mojolingo-misc/recipes/adhearsion.rb rename to cookbook/recipes/adhearsion.rb index e51d465..543f635 100644 --- a/mojolingo-misc/recipes/adhearsion.rb +++ b/cookbook/recipes/adhearsion.rb @@ -6,7 +6,7 @@ package 'libpcre3-dev' package 'default-jre-headless' -%w{2.0.0-p353 jruby-1.7.9}.each do |ruby| +%w{2.1.1 jruby-1.7.11}.each do |ruby| rbenv_ruby ruby rbenv_gem 'bundler' do diff --git a/mojolingo-misc/recipes/freeswitch_ies.rb b/cookbook/recipes/freeswitch_ies.rb similarity index 100% rename from mojolingo-misc/recipes/freeswitch_ies.rb rename to cookbook/recipes/freeswitch_ies.rb diff --git a/mojolingo-misc/recipes/freeswitch_lumenvox.rb b/cookbook/recipes/freeswitch_lumenvox.rb similarity index 100% rename from mojolingo-misc/recipes/freeswitch_lumenvox.rb rename to cookbook/recipes/freeswitch_lumenvox.rb diff --git a/mojolingo-misc/recipes/mrcp_server_config.rb b/cookbook/recipes/mrcp_server_config.rb similarity index 93% rename from mojolingo-misc/recipes/mrcp_server_config.rb rename to cookbook/recipes/mrcp_server_config.rb index 0dd8d63..7521979 100644 --- a/mojolingo-misc/recipes/mrcp_server_config.rb +++ b/cookbook/recipes/mrcp_server_config.rb @@ -14,5 +14,5 @@ end service 'unimrcp-server' do - action [:enable, :start] + action [:enable, :restart] end diff --git a/mojolingo-misc/recipes/no_iptables.rb b/cookbook/recipes/no_iptables.rb similarity index 100% rename from mojolingo-misc/recipes/no_iptables.rb rename to cookbook/recipes/no_iptables.rb diff --git a/mojolingo-misc/recipes/sippy_cup.rb b/cookbook/recipes/sippy_cup.rb similarity index 90% rename from mojolingo-misc/recipes/sippy_cup.rb rename to cookbook/recipes/sippy_cup.rb index fc1bd1f..50cb225 100644 --- a/mojolingo-misc/recipes/sippy_cup.rb +++ b/cookbook/recipes/sippy_cup.rb @@ -3,7 +3,7 @@ include_recipe 'rbenv::default' include_recipe 'rbenv::ruby_build' -ruby_v = '1.9.3-p484' +ruby_v = '1.9.3-p545' rbenv_ruby ruby_v do global true diff --git a/definitions/tdb-centos64/base.sh b/definitions/tdb-centos64/base.sh deleted file mode 100644 index df362a0..0000000 --- a/definitions/tdb-centos64/base.sh +++ /dev/null @@ -1,16 +0,0 @@ -# Base install -sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers - -cat > /etc/yum.repos.d/epel.repo << EOM -[epel] -name=epel -baseurl=http://download.fedoraproject.org/pub/epel/6/\$basearch -enabled=1 -gpgcheck=0 -EOM - -# Install NFS client for Virtualbox directory sharing -yum -y install nfs-utils - -# Make ssh faster by not waiting on DNS -echo "UseDNS no" >> /etc/ssh/sshd_config diff --git a/definitions/tdb-centos64/chef.sh b/definitions/tdb-centos64/chef.sh deleted file mode 100644 index cf2ddee..0000000 --- a/definitions/tdb-centos64/chef.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Install Chef -curl -L https://www.opscode.com/chef/install.sh | bash diff --git a/definitions/tdb-centos64/cleanup.sh b/definitions/tdb-centos64/cleanup.sh deleted file mode 100644 index 929e13f..0000000 --- a/definitions/tdb-centos64/cleanup.sh +++ /dev/null @@ -1,8 +0,0 @@ -yum -y erase gtk2 libX11 hicolor-icon-theme avahi freetype bitstream-vera-fonts -yum -y clean all -rm -rf /etc/yum.repos.d/{puppetlabs,epel}.repo -rm -rf VBoxGuestAdditions_*.iso - -# Remove traces of mac address from network configuration -sed -i /HWADDR/d /etc/sysconfig/network-scripts/ifcfg-eth0 -rm /etc/udev/rules.d/70-persistent-net.rules diff --git a/definitions/tdb-centos64/definition.rb b/definitions/tdb-centos64/definition.rb deleted file mode 100644 index 47cf894..0000000 --- a/definitions/tdb-centos64/definition.rb +++ /dev/null @@ -1,34 +0,0 @@ -Veewee::Session.declare cpu_count: '1', - memory_size: '480', - disk_size: '10140', - disk_format: 'VDI', - hostiocache: 'off', - os_type_id: 'RedHat6_64', - iso_file: "CentOS-6.4-x86_64-minimal.iso", - iso_src: "http://yum.singlehop.com/CentOS/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso", - iso_md5: "4a5fa01c81cc300f4729136e28ebe600", - iso_download_timeout: 1000, - boot_wait: "10", - boot_cmd_sequence: [ - ' text ks=http://%IP%:%PORT%/ks.cfg' - ], - kickstart_port: "7122", - kickstart_timeout: 10000, - kickstart_file: "ks.cfg", - ssh_login_timeout: "10000", - ssh_user: "vagrant", - ssh_password: "vagrant", - ssh_key: "", - ssh_host_port: "7222", - ssh_guest_port: "22", - sudo_cmd: "echo '%p'|sudo -S sh '%f'", - shutdown_cmd: "/sbin/halt -h -p", - postinstall_files: [ - "base.sh", - "chef.sh", - "vagrant.sh", - "virtualbox.sh", - "cleanup.sh", - "zerodisk.sh" - ], - postinstall_timeout: 10000 diff --git a/definitions/tdb-centos64/ks.cfg b/definitions/tdb-centos64/ks.cfg deleted file mode 100644 index eb40470..0000000 --- a/definitions/tdb-centos64/ks.cfg +++ /dev/null @@ -1,35 +0,0 @@ -install -cdrom -lang en_US.UTF-8 -keyboard us -network --bootproto=dhcp -rootpw --iscrypted $1$damlkd,f$UC/u5pUts5QiU3ow.CSso/ -firewall --enabled --service=ssh -authconfig --enableshadow --passalgo=sha512 -selinux --disabled -timezone UTC -bootloader --location=mbr - -text -skipx -zerombr - -clearpart --all --initlabel -autopart - -auth --useshadow --enablemd5 -firstboot --disabled -reboot - -%packages --nobase -@core -%end - -%post -/usr/bin/yum -y install sudo -/usr/sbin/groupadd vagrant -/usr/sbin/useradd vagrant -g vagrant -G wheel -echo "vagrant"|passwd --stdin vagrant -echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrante -chmod 0440 /etc/sudoers.d/vagrant -%end diff --git a/definitions/tdb-centos64/vagrant.sh b/definitions/tdb-centos64/vagrant.sh deleted file mode 100644 index 6f86fe9..0000000 --- a/definitions/tdb-centos64/vagrant.sh +++ /dev/null @@ -1,19 +0,0 @@ -# Vagrant specific -date > /etc/vagrant_box_build_time - -# Add vagrant user -/usr/sbin/groupadd vagrant -/usr/sbin/useradd vagrant -g vagrant -G wheel -echo "vagrant"|passwd --stdin vagrant -echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers.d/vagrant -chmod 0440 /etc/sudoers.d/vagrant - -# Installing vagrant keys -yum -y install wget -mkdir -pm 700 /home/vagrant/.ssh -wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O /home/vagrant/.ssh/authorized_keys -chmod 0600 /home/vagrant/.ssh/authorized_keys -chown -R vagrant /home/vagrant/.ssh - -# Customize the message of the day -echo 'Welcome to your Vagrant-built virtual machine.' > /etc/motd diff --git a/definitions/tdb-centos64/virtualbox.sh b/definitions/tdb-centos64/virtualbox.sh deleted file mode 100644 index 6a184f7..0000000 --- a/definitions/tdb-centos64/virtualbox.sh +++ /dev/null @@ -1,9 +0,0 @@ -# Installing the virtualbox guest additions -yum -y install gcc make gcc-c++ kernel-devel-`uname -r` perl -VBOX_VERSION=$(cat /home/vagrant/.vbox_version) -cd /tmp -mount -o loop /home/vagrant/VBoxGuestAdditions_$VBOX_VERSION.iso /mnt -sh /mnt/VBoxLinuxAdditions.run -umount /mnt -rm -rf /home/vagrant/VBoxGuestAdditions_*.iso -yum -y remove gcc make gcc-c++ kernel-devel-`uname -r` perl diff --git a/definitions/tdb-centos64/zerodisk.sh b/definitions/tdb-centos64/zerodisk.sh deleted file mode 100644 index 938075a..0000000 --- a/definitions/tdb-centos64/zerodisk.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Zero out the free space to save space in the final image: -dd if=/dev/zero of=/EMPTY bs=1M -rm -f /EMPTY diff --git a/definitions/tdb-ubuntu1204/base.sh b/definitions/tdb-ubuntu1204/base.sh deleted file mode 100644 index 3241c24..0000000 --- a/definitions/tdb-ubuntu1204/base.sh +++ /dev/null @@ -1,6 +0,0 @@ -apt-get -y update -apt-get -y upgrade -apt-get clean - -# Install NFS client for Virtualbox directory sharing -apt-get -y install nfs-common diff --git a/definitions/tdb-ubuntu1204/chef.sh b/definitions/tdb-ubuntu1204/chef.sh deleted file mode 100644 index e0bf0bb..0000000 --- a/definitions/tdb-ubuntu1204/chef.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Install Chef -apt-get -y install curl -curl -L https://www.opscode.com/chef/install.sh | sudo bash diff --git a/definitions/tdb-ubuntu1204/cleanup.sh b/definitions/tdb-ubuntu1204/cleanup.sh deleted file mode 100644 index 8460d23..0000000 --- a/definitions/tdb-ubuntu1204/cleanup.sh +++ /dev/null @@ -1,21 +0,0 @@ -# Remove any packages that were installed as dependencies of packages that we already removed -apt-get -y autoremove - -# Clean up tmp -rm -rf /tmp/* - -# Remove leftover leases and persistent rules -echo "cleaning up dhcp leases" -rm /var/lib/dhcp/* - -# Make sure Udev doesn't block our network -# http://6.ptmc.org/?p=164 -echo "cleaning up udev rules" -rm /etc/udev/rules.d/70-persistent-net.rules -mkdir /etc/udev/rules.d/70-persistent-net.rules -rm -rf /dev/.udev/ -rm /lib/udev/rules.d/75-persistent-net-generator.rules - -echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" -echo "pre-up sleep 2" >> /etc/network/interfaces -exit diff --git a/definitions/tdb-ubuntu1204/definition.rb b/definitions/tdb-ubuntu1204/definition.rb deleted file mode 100644 index 656fa0c..0000000 --- a/definitions/tdb-ubuntu1204/definition.rb +++ /dev/null @@ -1,40 +0,0 @@ -Veewee::Session.declare cpu_count: '1', - memory_size: '512', - disk_size: '10140', - disk_format: 'VDI', - hostiocache: 'off', - os_type_id: 'Ubuntu_64', - iso_file: "ubuntu-12.04.3-server-amd64.iso", - iso_src: "http://releases.ubuntu.com/12.04/ubuntu-12.04.3-server-amd64.iso", - iso_md5: '2cbe868812a871242cdcdd8f2fd6feb9', - iso_download_timeout: "1000", - boot_wait: "4", - boot_cmd_sequence: [ - '', - '/install/vmlinuz noapic preseed/url=http://%IP%:%PORT%/preseed.cfg ', - 'debian-installer=en_US auto locale=en_US kbd-chooser/method=us ', - 'hostname=%NAME% ', - 'fb=false debconf/frontend=noninteractive ', - 'keyboard-configuration/modelcode=SKIP keyboard-configuration/layout=USA keyboard-configuration/variant=USA console-setup/ask_detect=false ', - 'initrd=/install/initrd.gz -- ' - ], - kickstart_port: "7122", - kickstart_timeout: "10000", - kickstart_file: "preseed.cfg", - ssh_login_timeout: "10000", - ssh_user: "vagrant", - ssh_password: "vagrant", - ssh_key: "", - ssh_host_port: "7222", - ssh_guest_port: "22", - sudo_cmd: "echo '%p'|sudo -S sh '%f'", - shutdown_cmd: "shutdown -P now", - postinstall_files: [ - "base.sh", - "vagrant.sh", - "vmtools.sh", - "chef.sh", - "cleanup.sh", - "zerodisk.sh" - ], - postinstall_timeout: "10000" diff --git a/definitions/tdb-ubuntu1204/preseed.cfg b/definitions/tdb-ubuntu1204/preseed.cfg deleted file mode 100644 index 61df594..0000000 --- a/definitions/tdb-ubuntu1204/preseed.cfg +++ /dev/null @@ -1,87 +0,0 @@ -## Options to set on the command line -d-i debian-installer/locale string en_US.utf8 -d-i console-setup/ask_detect boolean false -d-i console-setup/layout string USA - -#d-i netcfg/get_hostname string dummy -d-i netcfg/get_hostname string unassigned-hostname -d-i netcfg/get_domain string unassigned-domain - -# Continue without a default route -# Not working , specify a dummy in the DHCP -#d-i netcfg/no_default_route boolean - -d-i time/zone string UTC -d-i clock-setup/utc-auto boolean true -d-i clock-setup/utc boolean true - -d-i kbd-chooser/method select American English - -d-i netcfg/wireless_wep string - -d-i base-installer/kernel/override-image string linux-server -#d-i base-installer/kernel/override-image string linux-image-2.6.32-21-generic - -# Choices: Dialog, Readline, Gnome, Kde, Editor, Noninteractive -d-i debconf debconf/frontend select Noninteractive - -d-i pkgsel/install-language-support boolean false -tasksel tasksel/first multiselect standard, ubuntu-server - -#d-i partman-auto/method string regular -d-i partman-auto/method string lvm -#d-i partman-auto/purge_lvm_from_device boolean true - -d-i partman-lvm/confirm boolean true -d-i partman-lvm/device_remove_lvm boolean true -d-i partman-auto/choose_recipe select atomic - -d-i partman/confirm_write_new_label boolean true -d-i partman/confirm_nooverwrite boolean true -d-i partman/choose_partition select finish -d-i partman/confirm boolean true - -#http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=9626883 -#Message: "write the changes to disk and configure lvm preseed" -#http://serverfault.com/questions/189328/ubuntu-kickstart-installation-using-lvm-waits-for-input -#preseed partman-lvm/confirm_nooverwrite boolean true - -# Write the changes to disks and configure LVM? -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true -d-i partman-auto-lvm/guided_size string max - -## Default user, we can get away with a recipe to change this -d-i passwd/user-fullname string vagrant -d-i passwd/username string vagrant -d-i passwd/user-password password vagrant -d-i passwd/user-password-again password vagrant -d-i user-setup/encrypt-home boolean false -d-i user-setup/allow-password-weak boolean true - -## minimum is puppet and ssh and ntp -# Individual additional packages to install -d-i pkgsel/include string openssh-server ntp - -# Whether to upgrade packages after debootstrap. -# Allowed values: none, safe-upgrade, full-upgrade -d-i pkgsel/upgrade select full-upgrade - -d-i grub-installer/only_debian boolean true -d-i grub-installer/with_other_os boolean true -d-i finish-install/reboot_in_progress note - -#For the update -d-i pkgsel/update-policy select none - -# debconf-get-selections --install -#Use mirror -#d-i apt-setup/use_mirror boolean true -#d-i mirror/country string manual -#choose-mirror-bin mirror/protocol string http -#choose-mirror-bin mirror/http/hostname string 192.168.4.150 -#choose-mirror-bin mirror/http/directory string /ubuntu -#choose-mirror-bin mirror/suite select maverick -#d-i debian-installer/allow_unauthenticated string true - -choose-mirror-bin mirror/http/proxy string diff --git a/definitions/tdb-ubuntu1204/vagrant.sh b/definitions/tdb-ubuntu1204/vagrant.sh deleted file mode 100644 index c7a08eb..0000000 --- a/definitions/tdb-ubuntu1204/vagrant.sh +++ /dev/null @@ -1,18 +0,0 @@ -date > /etc/vagrant_box_build_time - -# Setup sudo to allow no-password sudo for "sudo" -usermod -a -G sudo vagrant -( cat <<'EOP' -%vagrant ALL=(ALL) NOPASSWD:ALL -EOP -) > /tmp/vagrant -chmod 0440 /tmp/vagrant -mv /tmp/vagrant /etc/sudoers.d/ - -# Installing vagrant keys -mkdir /home/vagrant/.ssh -chmod 700 /home/vagrant/.ssh -cd /home/vagrant/.ssh -wget --no-check-certificate 'https://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pub' -O authorized_keys -chmod 600 /home/vagrant/.ssh/authorized_keys -chown -R vagrant /home/vagrant/.ssh diff --git a/definitions/tdb-ubuntu1204/vmtools.sh b/definitions/tdb-ubuntu1204/vmtools.sh deleted file mode 100644 index 294061c..0000000 --- a/definitions/tdb-ubuntu1204/vmtools.sh +++ /dev/null @@ -1,37 +0,0 @@ -if test -f .vmfusion_version ; then - - cd /tmp - mkdir -p /mnt/cdrom - mount -o loop /home/vagrant/linux.iso /mnt/cdrom - tar zxvf /mnt/cdrom/VMwareTools-*.tar.gz -C /tmp/ - /tmp/vmware-tools-distrib/vmware-install.pl -d - rm /home/vagrant/linux.iso - umount /mnt/cdrom - -fi - -if test -f .vbox_version ; then - - # Without libdbus virtualbox would not start automatically after compile - apt-get -y install --no-install-recommends libdbus-1-3 - - # The netboot installs the VirtualBox support (old) so we have to remove it - /etc/init.d/virtualbox-ose-guest-utils stop - rmmod vboxguest - aptitude -y purge virtualbox-ose-guest-x11 virtualbox-ose-guest-dkms virtualbox-ose-guest-utils - aptitude -y install dkms - - # Install the VirtualBox guest additions - apt-get -y install gcc build-essential linux-headers-$(uname -r) - apt-get -y install zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev - VBOX_VERSION=$(cat /home/vagrant/.vbox_version) - VBOX_ISO=VBoxGuestAdditions_$VBOX_VERSION.iso - mount -o loop $VBOX_ISO /mnt - yes|sh /mnt/VBoxLinuxAdditions.run - umount /mnt - - # Cleanup VirtualBox - rm $VBOX_ISO - apt-get -y remove gcc build-essential linux-headers-$(uname -r) - apt-get -y remove zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev -fi diff --git a/definitions/tdb-ubuntu1204/zerodisk.sh b/definitions/tdb-ubuntu1204/zerodisk.sh deleted file mode 100644 index 938075a..0000000 --- a/definitions/tdb-ubuntu1204/zerodisk.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Zero out the free space to save space in the final image: -dd if=/dev/zero of=/EMPTY bs=1M -rm -f /EMPTY diff --git a/roles/adhearsion.rb b/roles/adhearsion.rb index 21b1daf..0e56446 100644 --- a/roles/adhearsion.rb +++ b/roles/adhearsion.rb @@ -1,7 +1,7 @@ name 'adhearsion' description 'Installs components necessary to run Adhearsion apps' run_list "recipe[apt]", - "recipe[mojolingo-misc::adhearsion]" + "recipe[telephony-dev-box::adhearsion]" override_attributes 'rbenv' => { 'group_users' => ['vagrant'] diff --git a/roles/asterisk.rb b/roles/asterisk.rb index 3f25dee..7819a47 100644 --- a/roles/asterisk.rb +++ b/roles/asterisk.rb @@ -2,7 +2,7 @@ description 'Installs Asterisk to run Adhearsion apps' run_list "recipe[asterisk]", "recipe[unimrcp]", - "recipe[mojolingo-misc::mrcp_server_config]", + "recipe[telephony-dev-box::mrcp_server_config]", "recipe[asterisk::unimrcp]" override_attributes asterisk: { diff --git a/roles/freeswitch.rb b/roles/freeswitch.rb index 4687d93..68820b9 100644 --- a/roles/freeswitch.rb +++ b/roles/freeswitch.rb @@ -2,8 +2,8 @@ description 'Installs FreeSWITCH to run Adhearsion apps' run_list "recipe[apt]", "recipe[freeswitch::rayo]", - "recipe[mojolingo-misc::freeswitch_ies]", - "recipe[mojolingo-misc::freeswitch_lumenvox]" + "recipe[telephony-dev-box::freeswitch_ies]", + "recipe[telephony-dev-box::freeswitch_lumenvox]" override_attributes({ 'freeswitch' => { diff --git a/roles/loadtest.rb b/roles/loadtest.rb index 66a1eae..3d4dd8c 100644 --- a/roles/loadtest.rb +++ b/roles/loadtest.rb @@ -2,7 +2,7 @@ description 'Installs load testing tools' run_list "recipe[apt]", "recipe[sudo]", - "recipe[mojolingo-misc::sippy_cup]" + "recipe[telephony-dev-box::sippy_cup]" override_attributes 'rbenv' => { 'group_users' => ['vagrant'] diff --git a/roles/lumenvox.rb b/roles/lumenvox.rb index a19d431..691c2f8 100644 --- a/roles/lumenvox.rb +++ b/roles/lumenvox.rb @@ -5,32 +5,20 @@ "recipe[lumenvox::sre]", "recipe[lumenvox::media_server]", "recipe[lumenvox::tts]", - "recipe[mojolingo-misc::no_iptables]" + "recipe[telephony-dev-box::no_iptables]" override_attributes 'lumenvox' => { - 'core' => { - 'version' => '11.3.100-2.el6' - }, 'tts' => { - 'version' => '11.3.100-1SF.el6', 'voices' => [ - {"voice" => "Chloe", - "version" => "11.3.100-1" - } + {"voice" => "Chloe"} ] }, 'sre' => { - 'version' => '11.3.100-2.el6', 'language_packs' => [{ - "language" => "BritishEnglish", - "version" => "11.3.100-1" + "language" => "BritishEnglish" }] }, - 'media_server' => { - 'version' => '11.3.100-2.el6' - }, 'client' => { - 'version' => '11.3.100-2.el6', 'license_servers' => ["208.52.151.220"], 'default_tts_voice' => "default", 'default_tts_language' => "en-GB"