Sunday, June 19, 2011

Setting up Stratos locally in your laptop

Now you can check out the trunk code of Carbon from the repository, build, and configure WSO2 Stratos in a few steps.
Check out https://svn.wso2.org/repos/wso2/trunk/carbon
mvn clean install from carbon directory

Set up the following in ~/.bashrc (change the values accordingly for the email addresses, carbon directory, the transport sender, and the other information given below.)
# Stratos setup constants
export stratos_local_ip="10.100.0.15"

export CARBON_DIR="/home/pradeeban/trunk/stratos/carbon"
export STRATOS_DIR=$CARBON_DIR/stratos_home
export STRATOS_VERSION=1.1.0-SNAPSHOT
export SSO_ENABLED=true
export CREATE_DB=true
export STRATOS_MAIL_TRANSPORT=' ********.***.***25 false false cloud-noreply@wso2.com '
export NOTIFICATION_EMAIL=pradeeban@wso2.com

If you are going to use the stratos binaries, you can use the downloaded packs, usually available from the builders online (find it here, for the Stratos-1.5.1 binaries), as of the trunk or development branch version or from the wso2.org download area, for a released version.

Place the downloaded zips in to a location and also define that location in bashrc profile.
export PACKS_DIR="/home/pradeeban/Downloads"

Now you may run the set up script as above.

Running Stratos Set up script - carbon/build/stratos-setup.pl
./stratos-setup.pl

Add the following lines to your /etc/hosts file

127.0.0.1 cloud-test.wso2.com
127.0.0.1 identity.cloud-test.wso2.com
127.0.0.1 governance.cloud-test.wso2.com
127.0.0.1 appserver.cloud-test.wso2.com
127.0.0.1 bam.cloud-test.wso2.com
127.0.0.1 dss.cloud-test.wso2.com
127.0.0.1 bps.cloud-test.wso2.com
127.0.0.1 brs.cloud-test.wso2.com
127.0.0.1 cep.cloud-test.wso2.com
127.0.0.1 esb.cloud-test.wso2.com
127.0.0.1 gadget.cloud-test.wso2.com
127.0.0.1 mb.cloud-test.wso2.com
127.0.0.1 mashup.cloud-test.wso2.com


Start all the Stratos services
from $stratos_home
sh stratos.sh start all

Stop all the Stratos services
form $stratos_home
sh stratos.sh stop all

Also you can start and stop the services individually or as a chosen subset of all the available services.

Here by pointing the browser to cloud-test.wso2.com, you can access Stratos Manager. Pls note that in the configuration we have enabled SSO. You can also set up the Stratos services with SSO disabled instead, by setting export SSO_ENABLED=false, above in .bashrc profile. 

Since we have enabled SSO as above, once you have logged in to one of the services, you can just click and enter the other services without logging into each of the other services separately. Here identity.cloud-test.wso2.com is the url for WSO2 Identity Server as a Service, and governance.cloud-test.wso2.com is WSO2 Governance Registry as a Service, and the other urls as given above lists the respective services.



Await the official Stratos-1.5 release soon!

2 comments:

  1. Hi: I get a build error:

    [INFO] Unable to find resource 'org.apache.axis2:axis2-mar-maven-plugin:maven-plugin:1.6.1-wso2v1' in repository central (http://repo1.maven.org/maven2)
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Plugin could not be found - check that the goal name is correct: Unable to download the artifact from any repository

    Try downloading the file manually from the project website.

    Then, install it using the command:
    mvn install:install-file -DgroupId=org.apache.axis2 -DartifactId=axis2-mar-maven-plugin -Dversion=1.6.1-wso2v1 -Dpackaging=maven-plugin -Dfile=/path/to/file

    Alternatively, if you host your own repository you can deploy the file there:
    mvn deploy:deploy-file -DgroupId=org.apache.axis2 -DartifactId=axis2-mar-maven-plugin -Dversion=1.6.1-wso2v1 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]


    org.apache.axis2:axis2-mar-maven-plugin:maven-plugin:1.6.1-wso2v1

    from the specified remote repositories:
    apache.snapshots (http://repository.apache.org/snapshots),
    repository.dev.java.net-maven2 (http://download.java.net/maven/2/),
    central (http://repo1.maven.org/maven2),
    wso2-nexus (http://dist.wso2.org/nexus/content/groups/wso2-public)

    Cheers,
    Dave

    ReplyDelete
  2. Hi Dave,
    I guess you must have found the fix yourself. This issue was discussed here
    http://wso2.org/forum/thread/14391.

    There was some other issue in the hosted file in the middle, which was also fixed. Pls let us know if you still face any issue building Stratos source pack.

    Regards,
    Pradeeban.

    [P.S. Apologies for not replying to your query on time. It has somehow gone into spam section of my blog.]

    ReplyDelete

You are welcome to provide your opinions in the comments. Spam comments and comments with random links will be deleted.