Showing posts with label aws. Show all posts
Showing posts with label aws. Show all posts

Jan 3, 2013

Citrix XenApp Fundamentals installation on AWS



Installing a trial version was a painful experience, description below.

Create a new Windows 2008 R2 x64 Amazon instance, I used AMI:Windows_Server-2008-R2_SP1-English-64Bit-Base-2012.12.12 (ami-2542c04c).

The following ports should be open in security group:
tcp 80,tcp 443,tcp 1494,tcp 2598,tcp 3389

Download the installation image - XAF_6_0_0_ML_dvd.iso.
Mount the ISO with Virtual CloneDrive or any other tool, launch setup.

After a few minutes setup will crash.
Quit the installation and restart the server.

Uninstall Citrix Licensing server, and launch setup again. This time installation will prompt you to restart.
After restart, launch setup again, it will continue.

Launch Citrix Quick Start, setup the license.
Configure external access - for simplicity use self-signed certificate.
Either disable Windows firewall, or just verify that port 443 is open.

Current version of Google Chrome cannot navigate to the citrix url (https://hostname/CitrixAccess/site/default.aspx), probably old/unsupported tls version, use other browser.

By default citrix assumes that you're logging in with domain+user+password, since aws machine is in workgroup mode, you need to use the machine name instead, same name that you used for license.

Since you used self-signed certificate, launching citrix will fail with message: untrusted root certificate - Citrix Access Essentials Test Root Certificate.

QuickStart -> External Access -> Save Root certificate (rootcert.cer), transfer it to your desktop and install.


Jun 17, 2012

FreeSWITCH on Amazon EC2

So far, work in progress, I'll update this post with additional details.

AWS security group

Before launching an instance, create new or extend existing security group, to allow sip/rtp ports.
Wide-open configuration is described here: http://wiki.freeswitch.org/wiki/Firewall

Instance

32 bit EBS Amazon Linux AMI from here: http://aws.amazon.com/amazon-linux-ami/
For testing, system can run on tiny instance, but you might want to run small instance to speed up compilation during system install.

Login as ec2-user.

Prerequisites

sudo yum update

sudo yum install git autoconf automake libtool ncurses-devel libjpeg-devel make gcc gcc-c++

sudo yum install expat-devel gnutls-devel libtiff-devel libX11-devel unixODBC-devel python-devel zlib-devel alsa-lib-devel libogg-devel libvorbis-devel perl-libs gdbm-devel uuid-devel

Build trunk version

git clone git://git.freeswitch.org/freeswitch.git
cd freeswitch
./bootstrap.sh

#here you might want to change modules.conf

./configure
make

Install the build

sudo make all install cd-sounds-install cd-moh-install

Configure service

sudo useradd freeswitch
sudo chown -R freeswitch:freeswitch /usr/local/freeswitch
sudo cp ./build/freeswitch.init.redhat /etc/init.d/freeswitch
sudo chmod +x /etc/init.d/freeswitch
echo "FS_FILE=/usr/local/freeswitch/bin/freeswitch" | sudo tee /etc/sysconfig/freeswitch
sudo mkdir /var/run/freeswitch/ 
sudo chown freeswitch:freeswitch /var/run/freeswitch/

sudo chkconfig --add freeswitch 
sudo chkconfig --levels 35 freeswitch on

Change default configuration

/usr/local/freeswitch/conf/vars.xml
Change default password 1234 to something less obvious.
EC2 instance ip address is different from public address, also it changes when machine restarts. Allocate elastic ip, configure dns name associated with this ip, and use it instead your_host.

diff -r conf/vanilla/vars.xml /usr/local/freeswitch/conf/vars.xml
15c15
<   <X-PRE-PROCESS cmd="set" data="default_password=1234"/>
---
>   <X-PRE-PROCESS cmd="set" data="default_password=your_password"/>
27c27
<   <X-PRE-PROCESS cmd="set" data="domain=$${local_ip_v4}"/>
---
>   <X-PRE-PROCESS cmd="set" data="domain=your_host"/>
168c168,169
<   <X-PRE-PROCESS cmd="set" data="external_rtp_ip=stun:stun.freeswitch.org"/>
---
>   <X-PRE-PROCESS cmd="set" data="external_rtp_ip=host:your_host"/>
181c182,183
<   <X-PRE-PROCESS cmd="set" data="external_sip_ip=stun:stun.freeswitch.org"/>
---
>   <X-PRE-PROCESS cmd="set" data="external_sip_ip=host:your_host"/>

auto-nat does not seem to work, define external ip explicitly for internal and external profiles:

/usr/local/freeswitch/conf/sip_profiles/external.xml
diff -r conf/vanilla/sip_profiles/external.xml /usr/local/freeswitch/conf/sip_profiles/external.xml
66,67c66,67
<     <param name="ext-rtp-ip" value="auto-nat"/>
<     <param name="ext-sip-ip" value="auto-nat"/>
---
>     <param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
>     <param name="ext-sip-ip" value="$${external_sip_ip}"/>

/usr/local/freeswitch/conf/sip_profiles/internal.xml
diff -r conf/vanilla/sip_profiles/internal.xml /usr/local/freeswitch/conf/sip_profiles/internal.xml
268,269c268,269
<     <param name="ext-rtp-ip" value="auto-nat"/>
<     <param name="ext-sip-ip" value="auto-nat"/>
---
>     <param name="ext-rtp-ip" value="$${external_rtp_ip}"/>
>     <param name="ext-sip-ip" value="$${external_sip_ip}"/>

Launch the service

sudo service freeswitch start

At this point you should be able to register with zoiper or similar softphone, and make a call to 5000, to verify connectivity.
FreeSWITCH comes configured with some default extensions, this should work:

  • domain: your_host
  • user: 1000
  • password: your_password