Asterisk In The Cloud

STEP 1: Sign up

  • Sign up for Rackspace Cloud at https://cart.rackspace.com/cloud
  • Select “Cloud Account”
  • Fill out the account and billing info.
  • Rackspace will actually call you to confirm your account.  Once they talk to you on the phone then you should be able to launch your servers.

 STEP 2: Launch server

  • Log in to your account at https://mycloud.rackspace.com/
  • Click “Create Server”
  • Give your server a name
  • The Northern Virginia region is fine.
  • Image- Select Linux Ubuntu 14.04 LTS (Trusty Tahr)(PVHVM)
  • choose the server size.
  • My guess is the 512MB / 20GB “standard” server will work fine for most small Asterisk setups.
  • Click “Create Server”
  • Rackspace will assign a password.  Write it down!  This will be your only chance to get this password.

STEP 3: Connect to Server

Your server should be active after a few minutes.  Rackspace will email you when the server is ready, or you can check the server’s overview page.  If the status=active then you’re good to go.

  • Get the IP address from the server’s overview page.
  • SSH onto the server as the root user.  For example: ssh root@50.56.142.190
  • You may get asked if you’re sure you want to connect.  Just answer “yes”.
  • When prompted, copy/paste the server’s password and hit enter.
  • You should be connected to the server.

STEP 4: Configure Server

Run this command.  It will run a  bash script that will install base components necessary for all future installations, and will upgrade your server.

wget https://raw.githubusercontent.com/itp-redial/redial-server-setup/master/setup_scripts/install_core.sh
bash install_core.sh
  • This script will take about 5 minutes to run.
  • At the end of the script, your server will reboot.  Please wait 5 minutes for your server to reboot.
STEP 5: Install the components you want
The core script has cloned the repo “redial-server-setup” which contains the scripts that will install various servers and components that you may need for your projects.
cd ~/redial-server-setup/setup_scripts
Here’s the order I would follow, although you can probably skip any scripts for software you don’t need.
  1. install_mysql.sh  (database)
  2. install_ruby.sh    (installs Ruby 2.0.0 and Gem package installer)
  3. install_nodejs.sh  (Node.js 0.10.x and NPM)
  4. install_datamapper.sh   (Installs datamapper gem – REQUIRES MySQL)
  5. install_passenger_nginx.sh (Installs NGINX and Passenger – REQUIRES RUBY)
  6. install_asterisk11.sh   (Asterisk 11 and other apps like sox and mpg123)
  7. install_tinyphone.sh  (REQUIRES NODEJS)
bash install_scriptname.sh
#all scripts should be executable, so this will also work:
./install_scriptname.sh
Asterisk 11
  • All Asterisk conf files are at /etc/asterisk.
  • Asterisk is running and ready for configuration.
  • “service asterisk stop” will stop Asterisk
  • “service asterisk start” will start it up, if it’s stopped.
  • -more info to come…
Ruby and Gem
  • Ruby and Gem are installed using RVM, a popular Ruby management utility.
  • More information on RVM: https://rvm.io/
  • install_ruby.sh will install Ruby version 2.0.0
  • Once the script is complete, you should run this command, or log out and log back in to ssh:
source /etc/profile.d/rvm.sh
Tinyphone
More info on Tinyphone is in the Week 9 notes: http://www.itp-redial.com/class/weekly-notes/week9-notes

That’s it!  Have fun!