What is AGPL?

Recently bumped into a license called AGPL. If you don’t know what it is, just by looking at the name you can guess that it’s one from FSF. AGPL is designed to close the “ASP loophole”. What does that mean? If you’re using GPL licensed software, you MUST release the source code if you’re redistributing the software. For example, if you use a GPL licensed library or program in your software projects, when you put your product out there (either sell or give it away free) you must release the source code for your program under the same license. So your program will also be GPL licensed automatically. If not it’s a violation of the GPL licensing terms.

Now, if you use a GPL licensed program in the server side (a CMS such as WordPress for example) to provide a service and you’ve done some modifications to the server side software, then even though it’s GPL licensed you don’t have to release your modifications. In this case you’re not really redistributing the software so you’re alright. This has been referred to as the “ASP loophole”.

So, AGPL is designed to close this “loophole”. Meaning, if you’re using an AGPL licensed program on the server side and you have done some modifications, you MUST release the source code with those modifications.

My view about the AGPL, as with anything GPL, don’t bother.

VMware ESXi on Realtek NIC

VMware ESXi 4.0 doesn’t support Realtek RTL8111/8168 network cards by default. When you try to install ESXi on a computer with a Realtek NIC it will say the network card is not supported and will not allow you to proceed with the installation. Luckily you can modify the ESXi ISO to include the Realtek driver so that you’ll be able to install it without a problem. A forum post describes how to do this. I’m echoing the steps below.

  1. Create a folder and copy your VMware ESXi ISO file
  2. Download RTL8111_8168_P55_integr_SATA_Ctrl.(AHCI).oem.tgz and copy it to the folder you just created
  3. Download mkesxiaio_3.9.sh and inetd.conf from here and copy it to the same folder.
  4. Run sudo ./mkesxiaio_3.9.sh
  5. Burn the modified ISO

Realtek network cards are not exactly esoteric hardware. Not sure why the default installation doesn’t have support for this. If you’re trying to install ESXi better check the HCL.

Howto install WSO2 Stratos?

If you tried the hosted version of WSO2 Stratos at cloud.wso2.com and wants to get down to install it in your virtualized environment, this will help you to build it from the source code. Before you build WSO2 Stratos you have to build WSO2 Carbon. This guide only assumes that you’ve installed Sun JDK and Apache Maven which is in your PATH.

Building WSO2 Stratos

  1. Checkout WSO2 Carbon and WSO2 Stratos

    $ svn checkout http://svn.wso2.org/repos/wso2/trunk/carbon
    $ svn checkout http://svn.wso2.org/repos/wso2/trunk/stratos
    

  2. In order to build WSO2 Carbon, first need to build two Axis2 plugins. As the Axis2 README points out, this is due to some dependency resolution issues in Maven
    • Build Axis2 AAR Maven plugin

      $ cd carbon/dependencies/axis2/modules/tool/axis2-aar-maven-plugin/
      $ mvn clean install
      

    • Bulid Axis2 MAR Maven plugin

      $ cd carbon/dependencies/axis2/modules/tool/axis2-mar-maven-plugin/
      $ mvn clean install
      

  3. Build Carbon dependencies

    $ cd carbon/dependencies
    $ mvn clean install
    

  4. Build Carbon Orbit

    $ cd carbon/orbit
    $ mvn clean install
    

  5. Bulid Carbon core

    $ cd carbon/core
    $ mvn clean install
    

  6. Bulid Carbon components

    $ cd carbon/components
    $ mvn clean install
    

  7. Build Carbon features

    $ cd carbon/features
    $ mvn clean install
    

  8. Build WSO2 Stratos
    • Bulid WSO2 Stratos components

      $ cd stratos/components
      $ mvn clean install
      

    • Build WSO2 Stratos features

      $ cd stratos/components
      $ mvn clean install
      

    • Build WSO2 Stratos services

      $ cd stratos/services
      $ mvn clean install
      

      This will create binary distributions for each service in, stratos/services//modules/distribution/target

Configuring WSO2 Stratos

Cloud manager is a special program designed to manage all other services. Therefore some configuration parameters differ from other services. There are some configuration parameters which are common across all the services.

Once you build WSO2 Stratos, unzip binary packages to a folder. <statos dir> in the following configurations refer to the folder you get when you unzip a binary distribution.

Common configurations

These are common to cloud manager as well as other services. Configuration files are located at <stratos dir>/repository/conf

  1. carbon.xml

    You should change ServerURL, HostName, and Name parameter. E.g.,

    <ServerURL>https://example.com${carbon.context}/services/</ServerURL>
    <HostName>example.com</HostName>
    <Name>WSO2 Stratos Cloud Application Server</Name> (this name should
    be same as the name given in cloud-services-desc.xml cloud manager)
    

  2. axis2.xml

    Configure mail transport. E.g.,

    <transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
            <parameter name="mail.smtp.host">smtp.example.org</parameter>
            <parameter name="mail.smtp.port">25</parameter>
            <parameter name="mail.smtp.starttls.enable">false</parameter>
            <parameter name="mail.smtp.auth">true</parameter>
            <parameter name="mail.smtp.user">user</parameter>
            <parameter name="mail.smtp.password">password</parameter>
            <parameter name="mail.smtp.from">noreply@example.com</parameter>
    </transportSender>
    

  3. mgt-transport.xml

    Configure proxy ports. E.g.,

    <transport name="http" class="org.wso2.carbon.server.transports.http.HttpTransport">
            <parameter name="port">9763</parameter>1
            <parameter name="proxyPort">80</parameter>
            ...
    
    <transport name="https" class="org.wso2.carbon.server.transports.http.HttpsTransport">
            <parameter name="port">9443</parameter>
            <parameter name="proxyPort">443</parameter>
    

  4. registry.xml

    Database configuration. E.g.,

    </dbConfig>
            <dbConfig name="WSO2Registry">
            <url>jdbc:mysql://db.example.com:3306/registry_db?autoReconnect=true</url>
            <userName>user</userName>
            <password>password</password>
            <driverName>com.mysql.jdbc.Driver</driverName>
            <maxActive>50</maxActive>
            <maxWait>60000</maxWait>
            <minIdle>5</minIdle>
            <validationQuery>SELECT 1</validationQuery>
    </dbConfig>
    

  5. user-mgt.xml

    Configure user store. E.g.,

    <Property name="url">jdbc:mysql://db.example.com:3306/userstore_db?autoReconnect=true</Property>
    <Property name="userName">user</Property>
    <Property name="password">password</Property>
    <Property name="driverName">com.mysql.jdbc.Driver</Property>
    <Property name="maxActive">50</Property>
    <Property name="maxWait">60000</Property>
    <Property name="minIdle">5</Property>
    <Property name="MultiTenantRealmConfigBuilder">org.wso2.carbon.user.core.config.multitenancy.SimpleRealmConfigBuilder</Property>
    <Property name="validationQuery">SELECT 1</Property>
    

  6. Copy MySQL JDBC driver to <stratos dir>/repository/components/lib. MySQL JDBC driver can be downloaded from http://dev.mysql.com/downloads/connector/j/
  7. wrapper.conf

    wrapper.java.additional.11=-Dcarbon.https.port=443
    wrapper.java.additional.12=-Dcarbon.http.port=80
    

  8. axis2_client.xml

    Increase SO_TIMEOUT of http and https about 60 seconds <parameter name="SO_TIMEOUT">60000</parameter>

Cloud Manager Configuration

  1. billing-config.xml

    Database configuration. E.g.,

    <dbConfig>
            <url>jdbc:mysql://db.example.com:3306/billing_db?autoReconnect=true</url>
            <userName>user</userName>
            <password>password</password>
            <driverName>com.mysql.jdbc.Driver</driverName>
            <maxActive>80</maxActive>
            <maxWait>60000</maxWait>
            <minIdle>5</minIdle>
            <validationQuery>SELECT 1</validationQuery>
    </dbConfig>
    

  2. tenant-reg-agent.xml

    <tenantRegListenerServers>
            <server>
                <!-- governance -->
                <serverUrl>https://governance.example.com/services/</serverUrl>
                <userName>admin</userName>
                <password>password</password>
            </server>
            <server>
                <!-- identity -->
                <serverUrl>https://identity.example.com/services/</serverUrl>
                <userName>admin</userName>
                <password>password</password>
            </server>
            <server>
                <!-- gadget -->
                <serverUrl>https://gadget.example.com/services/</serverUrl>
                <userName>admin</userName>
                <password>password</password>
            </server>
            ...
    </tenantRegListenerServers>
    

  3. cloud-services-desc.xml

    <cloudService name="WSO2 Stratos Cloud Governance">
            <label>Cloud Governance</label>
            <link>https://governance.example.com</link>
            <description>Governance in the cloud.</description>
            <icon>
    
    https://example.com/cloud-services-icons/governance.gif
    
            </icon>
    </cloudService>
    

  4. All the configurations starting with email_ should be modified with correct
    cloud manager URL

Other services

Other services means all the services except could manager.

  1. metering-config.xml

    Metering configuration have to be changed to include cloud admin username, password (in post handler and pre handler)

    <handler service="org.wso2.stratos.metering.agent.handlers.RemoteTaskInvoker" async="true" frequency="1">
            <parameter name="taskServiceUrl">https://cloud.wso2.com/services/</parameter>
            <parameter name="userName">user</parameter>
            <parameter name="password">password</parameter>
            <parameter name="taskName">org.wso2.stratos.metering.manager.task.PerRegistryRequestRemoteTask</parameter>
    </handler>
    

  2. In Appserver carbon.xml, you can specify the URL for BAM so that you can monitor appserver.

    <BamServerURL>https://bam.example.com/services/BAMServiceStatisticsSubscriberService</BamServerURL>
    

That’s it!