This blog post is going to explain how to setup the Stratos2 Demo Setup in VirtualBox
first you have to download our image from here (This will take some time because of the size 17.3GB)
Now double click on it to install.
Once you done with the installation you have to go to configure the “virtual host only interface” with following details
1. go to file->preferences in VirtualBox
2. Select Network tab and add new “Host only network“

IPV4 address: 172.14.0.254
IPV4 network mask :255.255.0.0

3. Now start this image and login to the Instance
username: wso2 password: g
4. Go to /demo_setup/conf/ and view setup.conf
If you have any changes in configuration according to your environment you can do it in setup.conf
5. Move to demo_setup folder and type “sudo bash” to move to root and run the setup-demo.sh
Press enter when the following questions are coming
================================================================================
Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: No password supplied Enter new UNIX password: Retype new UNIX password: No password supplied passwd: Authentication token manipulation error passwd: password unchanged Try again? [y/N] N Changing the user information for git Enter the new value, or press ENTER for the default Full Name []: Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y do ssh-keygen without password for git user. press enter to continue... Generating public/private rsa key pair. Enter file in which to save the key (/home/git/.ssh/id_rsa): Created directory '/home/git/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/git/.ssh/id_rsa. Your public key has been saved in /home/git/.ssh/id_rsa.pub. The key fingerprint is: 83:55:ac:2b:ae:6d:4a:58:98:b9:11:46:2a:7d:cf:f5 git@s2demo The key's randomart image is: +--[ RSA 2048]----+ | . .. | | + .. | |o + . o. | |.. * o +.. | | = . + S.E | | = . .. | | o .. . | | . .o | | o+. | +-----------------+ Reading package lists... Done Building dependency tree Reading state information... Done git is already the newest version. gitolite is already the newest version. gitweb is already the newest version. apache2 is already the newest version. bind9 is already the newest version. apache2-suexec is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 56 not upgraded. Adding entries to gitolite... Please do :wq after gitolite.rc file open. Press enter to continue... The default settings in the rc file (/home/git/.gitolite.rc) are fine for most people but if you wish to make any changes, you can do so now. hit enter...
================================================================================
Once you reached here, it will open the file with details then you have to save the file by doing the “:wq” command

Again you can see the following commands in console – just press enter to proceed
================================================================================
creating gitolite-admin... Initialized empty Git repository in /home/git/repositories/gitolite-admin.git/ creating testing... Initialized empty Git repository in /home/git/repositories/testing.git/ [master (root-commit) 390bc9e] start 2 files changed, 6 insertions(+) create mode 100644 conf/gitolite.conf create mode 100644 keydir/git.pub Cloning into 'gitolite-admin'... Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts. remote: Counting objects: 6, done. remote: Compressing objects: 100% (4/4), done. Receiving objects: 100% (6/6), 709 bytes, done. remote: Total 6 (delta 0), reused 0 (delta 0) do ssh-keygen without password for wso2 user. press enter to continue... Generating public/private rsa key pair. Enter file in which to save the key (/home/wso2/.ssh/id_rsa): /home/wso2/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/wso2/.ssh/id_rsa. Your public key has been saved in /home/wso2/.ssh/id_rsa.pub. The key fingerprint is: 03:80:76:55:c0:ea:9f:04:3c:e9:38:d8:bd:9e:09:11 wso2@s2demo The key's randomart image is: +--[ RSA 2048]----+ | ..ooo. | | o ... | | .Eo o. | | .* . | | o.= o S | |. +.+ . . | | .. + . | | ..oo | | .+ | +-----------------+ [master a6087aa] Check in by git 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 conf/repos/testing.conf create mode 100644 keydir/wso2.pub Already up-to-date. Counting objects: 12, done. Compressing objects: 100% (7/7), done. Writing objects: 100% (8/8), 927 bytes, done. Total 8 (delta 0), reused 0 (delta 0) remote: creating testingt... remote: Initialized empty Git repository in /home/git/repositories/testingt.git/ To git@localhost:gitolite-admin 390bc9e..a6087aa master -> master Cloning into 'gitolite-admin'... remote: Counting objects: 14, done. remote: Compressing objects: 100% (11/11), done. Receiving objects: 100% (14/14), 1.57 KiB, done. remote: Total 14 (delta 0), reused 0 (delta 0) ln: failed to create symbolic link `/etc/apache2/mods-enabled/appfactory.load': File exists -D AP_DOC_ROOT="/var/www" -D AP_GID_MIN=100 -D AP_HTTPD_USER="www-data" -D AP_LOG_EXEC="/var/log/apache2/suexec.log" -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin" -D AP_UID_MIN=100 -D AP_USERDIR_SUFFIX="public_html" ln: failed to create symbolic link `/etc/apache2/mods-enabled/suexec.load': File exists ln: failed to create symbolic link `/etc/apache2/sites-enabled/git': File exists apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName httpd (no pid file) not running apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName /opt/ADC ~/demo_setup ~/demo_setup /opt/cloud_controller ~/demo_setup In repository/conf/carbon.xml rm: cannot remove `./repository/conf/service-topology.conf': No such file or directory rm: cannot remove `./repository/conf/service-topology.conf.back': No such file or directory ~/demo_setup /opt/wso2mb-2.0.1 ~/demo_setup ~/demo_setup /opt/elb ~/demo_setup ~/demo_setup /opt/agent ~/demo_setup ~/demo_setup /opt/wso2is-4.0.0 ~/demo_setup ~/demo_setup Import the wso2.pub into openstack (With the same name mentioned in /opt/cloud_controller/repository/deployment/server/cartridges/) cat /home/wso2/wso2.pub. Cut and paste the output into the box that you get when execute import keys of the openstack dashboard When you are ready press any key to continue starting servers
================================================================================
once you come here in the command line you have to take another console and login to the VM as follows
ssh wso2@172.14.0.1 password : g
then follow this command to view the public key
cat /home/wso2/wso2.pub and copy the public key

Then open the OpenStack buy using the IP address http://172.14.0.1/

username : admin password : openstack
Go to Project -> Access and Security then go to section Key Pairs

Delete the already exist “stratos-demo” key and import it again

once you finish this again you can go to earlier command line and press enter to start servers

when it finished you can see the command line as follows

Now the stratos demo environment ready for use
6. Go to https://172.14.0.1:9445/carbon/admin/login.jsp
username : admin password : admin
Create new tenant with following details
Domain : stratos.com
FirstName : statos2
LastName : alpha
Admin Username : dinuka
Password : dinuka123
Email : dinukam@wso2.com

Now we are done with the Stratos2 Demo Setup







damitha23
January 5, 2013 at 7:20 am
Hi,
Before starting the VM I suggest you do the following,
“Select the virtual machine and click the Details tab on the right. Then click the Network panel. Under the Network click the Adaptor 2 tab. In the Attached To drop-down box select Host-only Adaptor. Under the Name drop-down box select the host only interface you created(as described by Dinuka) and click OK button”
Otherwise it try to use the configured interface in the image and pop up a warning message box.