在OpenStack上安装Stratos2

You can use any OpenStack configured IaaS. We have tested Stratos 2.0 with Essex and Folsom which are versions of OpensStack. We recommend the SUSE Cloud since it has a production ready OpenStack IaaS. You can use a single node or multi node OpenStack environment. You can install WSO2 Stratos 2.0 servers into the same single node or on a separate node. 

  1. Install OpenStack Iaas.
  2. Download wso2s2-openstack-1.0.0.zip.
  3. Extract  wso2s2-openstack-1.0.0.zip on your OpenStack installed server.
  4. Follow the instructions in the README.txt file.
  5. Install Java in your server. 
    Copy the JDK to any preferred location and export environment variable JAVA_HOME to point to your java run-time. We recommend that you use Java 6.0.   
         

    export JAVA_HOME= "/opt/jdk1.6.0_24"

     

  6. Download mysql-connector-java-5.1.17-bin.jar
  7. Copy the jar inside wso2s2-openstack-1.0.0
    If you intend to use a different MySQL connector version then make sure you update the following line in the wso2s2-openstack-1.0.0 /conf/setup.conf file.

    export mysql_connector_jar= "mysql-connector-java-5.1.24.jar"

     

  8. Configure MySQL to allow requests from Cartridges as follows:

    • Add the following entry to the /etc/hosts file.

      <host_ip> stratos.wso2.com
    • Add the following entry to the /etc/mysql/my.cnf file.

      bind-address = 0.0 . 0.0
    • Restart MySQL using the following command:

      sudo service mysql restart
  9. Create a public key to use with OpenStack
    Do not enter any passwords while creating the public key, to ensure ease of use. Just press ENTER

    $ ssh-keygen -t rsa

    You can check the created public key as follows:

    $ cat ~/.ssh/id_rsa.pub

      
    Edit   wso2s2-openstack-1.0.0 conf/setup.conf   according to your environment. 
    When editing, you need to provide information about your OpenStack environment. 

    Ensure to give the following information in the wso2s2-openstack-1.0.0 / conf/setup.conf .

    openstack_public_key= "/.ssh/id_ras.pub"

    File path of the public key location.        

    Make sure that the conf/setup.conf is according to your environment (specially the “General configuration” section and “OpenStack” section). You can accept the default values for most of the parameters.
    The parameter descriptions are as follows:

    ParameterDescription
    hostipIP of the machine where you setup Stratos2 packs
    stratos2_domainDefine your own domain
    agent_hostnameHostname of the agent
    bam_hostnameHostname of the bam
    cc_hostnameHostname of Cloud Controller
    s2_db_hostnameHostname of the database
    sc_hostnameHostname of the Stratos Controller
    userstore_db_hostnameHostname of the userstore
    userstore_db_schemaSchema name of the userstore
    userstore_db_portPort of userstore database
    userstore_db_userUser of the userstore database
    userstore_db_passPassword of the userstore database
    s2_db_hostnameHostname of the Stratos2 foundation databse
    s2_db_schemaSchema of the Stratos2 foundation databse
    s2_db_portPort of the Stratos2 foundation database
    s2_db_userUser of the Stratos2 foundation databse
    s2_db_passPassword of the Stratos2 foundation databse
    git_userUsername of the Git
    emailemail
     git_hostname Hostname of the Git
    git_ipIP of the Git server
    openstack_provider_enableDefault value should be "true" when using OpenStack
    openstack_identityOpenstack login username
    openstack_credentialOpenStack login password
    openstack_tenantOpenStack project name
    openstack_project_idID of the Openstack project
    openstack_api_keyDefualt should be "openstack"
    openstack_jclouds_endpointjclouds endpoint URL e.g., http://10.100.0.29:5000/
    openstack_scaleup_orderScale up order
    openstack_scaledown_orderScale down order
    openstack_keypair_nameKeypair used in OpenStack
    openstack_regionOpenStack region provided in the setup
    openstack_instance_type_tinyType of instance (tiny) spawed in OpenStack
    openstack_instance_type_smallType of instance (small) spawed in OpenStack (will be used by Carbon Cartridges)
    openstack_security_groupSecurity group name in OpenStack
    php_cartridge_image_idPHP Cartridge image ID
    carbon_cartridge_image_idCarbon Cartridge image ID
    mysql_cartridge_image_idMySQL Cartridge image ID
  10. Run the setup.sh (given below) inside wso2s2-openstack-1.0.0 as a root user to install Stratos2 Paas with Openstack demo.
    When you enable the Stratos2 demo, it will upload images of all out of the box Carbon and Non-Carbon Cartridges provided into the glance image server.

    sudo JAVA_HOME=/opt/jdk1. 6 .0_24 ./setup.sh -d openstack -p "all"

    Command Argument Description

    SyntaxDescription
    -d
    The IaaS that is used.
    -p
    All components in Stratos 2

    You can see the logs at:

    $ tail -f /var/log/s2/s2.log
    $ tail -f /var/log/s2/s2-openstack.log

     

  11. If you want to re-do the Stratos2 setup by running the setup.sh, first you need to clean the existing setup by using clean.sh and then if you enabled Stratos2 Openstack demo clean_openstack.sh. The commands are as follows:

    sudo ./clean.sh -a<hostname> -b<host_user> -c<Openstack mysql root user> -d<Openstack mysql password>

    Example:

    sudo ./clean.sh -as2demo -bwso2 -croot -dopenstack

     

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值