Wakanda includes an HTTP server so deploying onto a shared host will probably be unsuccessful or problematic at best. Full control over the environment is desirable when deploying Wakanda; a virtual private server (VPS) will probably be the most economic choice.
There are plenty of options in the VPS market but for this exercise we’ll go with Gandi VPS. Primarily known as a domain registrar, why pick Gandi rather than, say, EC2? There’s more to it than the concept of choosing a France-based company to host a France-based companies’ framework! Because Gandi is European-based rather than US-based it isn’t subject to the US PATRIOT Act which permits secretive sequestration of individuals’ data by the US government and we don’t want to be in violation of the European Data Protection Directive at some point in the future.
To deploy Wakanda only the server element is needed. Gandi VPS is Linux-based so the Wakanda Server 64-bit Linux download URL is required from the Wakanda downloads page.
Creating a VPS on Gandi is relatively straightforward: the only real provisos are they a minimum of 1Gb of memory is required and the OS must be 64-bit. Once the VPS has been created, access is via SSH. The IP address of the server can be found at https://www.gandi.net/admin/hosting/iface/management#main or in the email confirmation that arrives from Gandi. SSH access is via a username and password combination, which is not the most secure option but will suffice for an experiment:
aaitken@MacBook:~$ ssh email@example.com The authenticity of host '220.127.116.11 (18.104.22.168)' can't be established. RSA key fingerprint is 91:51:15:d9:29:5c:e6:73:32:3b:d2:9d:8b:a7:f0:1a. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '22.214.171.124' (RSA) to the list of known hosts. firstname.lastname@example.org's password: Welcome to Ubuntu 11.04 (GNU/Linux 2.6.36-xenU-4814-x86_64 x86_64) * Documentation: https://help.ubuntu.com/ The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. admin@wakanda-server:
First retrieve the compressed Wakanda Server file from Wakanda’s web site:
admin@wakanda-server:~$ wget http://download.wakanda.org/Releases/Latest/Linux/Wakanda-Server-x64.tar.gz --2011-11-08 17:23:38-- http://download.wakanda.org/Releases/Latest/Linux/Wakanda-Server-x64.tar.gz Resolving download.wakanda.org... 126.96.36.199 Connecting to download.wakanda.org|188.8.131.52|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 21549505 (21M) [application/x-gzip] Saving to: `Wakanda-Server-x64.tar.gz' 100%[========================================================>] 21,549,505 4.31M/s in 4.3s 2011-11-08 17:23:42 (4.78 MB/s) - `Wakanda-Server-x64.tar.gz' saved [21549505/21549505]
Then extract the contents of the file:
Wakanda_Server/walib/WAF/widget/yahooWeather/png/cog.png Wakanda_Server/walib/WAF/widget/yahooWeather/png/preview.png Wakanda_Server/walib/WAF/widget/yahooWeather/widget-yahooWeather-conf.js Wakanda_Server/walib/WAF/widget/yahooWeather/widget-yahooWeather.js admin@wakanda-server:~$
Having extracted the contents we can then test that the server runs successfully:
admin@wakanda-server:~$ ./Wakanda_Server/Wakanda & Welcome to Wakanda Server! Publishing solution "DefaultSolution" Project "ServerAdmin" published at 184.108.40.206 on port 8080
In a web browser navigate to: http://220.127.116.11:8080/ to view the Wakanda Server admin panel.
Back on the VPS, press Ctrl-C to stop the server.
Running a solution on the server
Ideally a robust deployment method would be in place but for the moment scp will suffice. First the solution needs to exist on the server. First create a solutions directory on the server, e.g.:
admin@wakanda-server:~$ mkdir Wakanda_Solutions
then on the local machine
cd to the solution directory and use
scp with the recursion flag to copy the whole solution directory:
develop@MacBook:Contacts$ scp -r . email@example.com:~/Wakanda_Solutions/Contacts/ firstname.lastname@example.org's password: Contacts.waBackup 100% 352 0.3KB/s 00:00 Contacts.waModel 100% 1964 1.9KB/s 00:00 Contacts.waModel.js 100% 48 0.1KB/s 00:00 Contacts.waPerm 100% 56 0.1KB/s 00:00 Contacts.waProject 100% 305 0.3KB/s 00:00
Contacts.waSolution 100% 261 0.3KB/s 00:00 Contacts_log_1.txt 100% 2324 2.3KB/s 00:00 studio_log_1.txt 100% 8803 8.6KB/s 00:00 develop@MacBook:Contacts$
The solution can then be loaded into the server directly from the command line:
admin@wakanda-server:~$ /home/admin/Wakanda_Server/Wakanda /home/admin/Wakanda_Solutions/Contacts/Contacts.waSolution Welcome to Wakanda Server! Publishing solution "Contacts" Project "Contacts" published at 18.104.22.168 on port 8081
The solution is then viewed at: http://22.214.171.124:8081/index.html
Thanks to Gandi for providing a 7 day trial of its Gandi Cloud VPS.
This article was originally posted on the Morgan Hill Consultants Ltd website.