Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-built boxes #39

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
514fabc
We're not going to build our own generic base boxes any more, the Ops…
benlangfeld Feb 26, 2014
b458669
Use pre-built Adhearsion base box
benlangfeld Feb 26, 2014
9fb6e3f
We don't want Chef debug logs when building the VMs in their final stage
benlangfeld Feb 27, 2014
92cfbee
Ditch PRISM box because we have no interest in its continued support
benlangfeld Feb 27, 2014
3724265
Use pre-built base boxes for all other boxes
benlangfeld Feb 27, 2014
9197e74
Update Asterisk and Lumenvox installs
benlangfeld Feb 27, 2014
ce0e9c6
Merge branch 'refs/heads/master' into feature/pre-built-boxes
benlangfeld Mar 12, 2014
d642e54
No more PRISM
benlangfeld Mar 12, 2014
0ccc4a3
No need for Ahn config examples
benlangfeld Mar 12, 2014
297bed7
We don't build base boxes any more
benlangfeld Mar 12, 2014
f838f9e
Update cookbooks
benlangfeld Mar 12, 2014
8e9d44d
Keep .ovf files around
benlangfeld Mar 12, 2014
dafff45
Give VMs nice names
benlangfeld Mar 12, 2014
e8ae9a3
Set boxes product metadata
benlangfeld Mar 15, 2014
bfa366e
Use correct user in shutdown command
benlangfeld Mar 15, 2014
26ff59d
Export boxes to single-file OVAs
benlangfeld Mar 15, 2014
672a718
Build all boxes
benlangfeld Mar 15, 2014
332204b
We're not going to use Vagrant packaging any more
benlangfeld Mar 15, 2014
6396780
Rename project cookbook
benlangfeld Mar 15, 2014
9389750
Update ruby versions
benlangfeld Mar 15, 2014
63efea0
Remember the output directory
benlangfeld Mar 15, 2014
5791e29
Only install packer on CI
benlangfeld Mar 15, 2014
ee8380e
Always fetch cookbooks
benlangfeld Mar 15, 2014
c70ccc0
Build boxes headless (for CI)
benlangfeld Mar 15, 2014
166545a
Only clean the build environment on CI
benlangfeld Mar 15, 2014
7a2b26a
Shorter task name for building boxes
benlangfeld Mar 15, 2014
2724737
UniMRCP server might already be running, restart is idempotent
benlangfeld Mar 15, 2014
c935853
Avoid VMs squashing each other's build directories
benlangfeld Mar 15, 2014
832e2fc
Ignore built assets from git
benlangfeld Mar 15, 2014
576b7f7
Merge branch 'master' into feature/pre-built-boxes
benlangfeld May 8, 2014
4e8da46
Berkshelf vendoring changed in 3.x
benlangfeld May 23, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ vagrant/
tmp
iso
*.box
*.ova
*~
*#
.#*
Expand Down
4 changes: 2 additions & 2 deletions Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 12 additions & 10 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
source 'https://rubygems.org'

gem 'veewee', git: 'git://github.com/jedi4ever/veewee'
gem 'berkshelf', '~> 3.1'
75 changes: 0 additions & 75 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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
Expand All @@ -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)
Expand All @@ -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!
38 changes: 27 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
26 changes: 1 addition & 25 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]" # 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.
Expand All @@ -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.
4 changes: 0 additions & 4 deletions Rakefile

This file was deleted.

28 changes: 14 additions & 14 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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
Expand All @@ -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"

Expand All @@ -64,8 +67,6 @@ Vagrant.configure("2") do |config|

chef.add_role "freeswitch"

chef.log_level = :debug

chef.json = {
freeswitch: {
local_ip: public_ip,
Expand All @@ -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

Expand All @@ -96,8 +97,6 @@ Vagrant.configure("2") do |config|

chef.add_role "lumenvox"

chef.log_level = :debug

chef.json = {
'lumenvox' => {
'media_server' => {
Expand All @@ -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'

Expand All @@ -126,8 +128,6 @@ Vagrant.configure("2") do |config|
chef.roles_path = "roles"

chef.add_role "loadtest"

chef.log_level = :debug
end
end
end
Loading