This documentation is for WSO2 Stratos 2.0.0. View the latest Apache Stratos documentation.
Wordpress Guide - Stratos 2.0.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

This page is under construction.

Check with LakmalW

 

Logging into Stratos2.0

  1. Login to Stratos 2.0 using CLI.

    $ ./stratos.sh [email protected] password


  2. Subscribe to the PHP Cartridge

    stratos>subscribe php myweb --repoURL <git-repo-url> --username <username> --password <password>

    Code Description

    SyntaxDescription
    php
    PHP Cartridge
    myweb
    Alias name for the PHP application.
    repoURL
    URL of the GIT repository.
    Example: https://github.com/lakwarus/wordpress.git
    usernameUsername for provided GIT account.
    password
    Password for provided GIT account.

     

The provided PHP Cartridge is configured to except the following folder structure in order to work.

simplesamlphp  sql  www

Where the www folder contains wordpress php files. For samples please go to https://github.com/lakwarus/wordpress.git.

 

Uploading WordPress

  1. Checkout the tenant repo into a folder of your choice.

    $ git clone http://git.stratos.com/telecom.org/myweb.git


  2. When prompted, enter the tenant username and password.
  3. Change the current working directory to myweb  

    $ cd myweb
  4. List the folder.  

    $ ls

    Output

    simplesamlphp  sql  www
  5. Copy wordpress/* files into the www folder. 
    If you do not have the WordPress files initially go to  http://wordpress.org/latest.tar.gz  

    $ git add www/*

     

  6. Record a snapshot of your history.  

    $ git commit -a -m “initial commit”

     Code Description

    SyntaxDescription
    -a

    The option to automatically stage all tracked, modified files before the commit.

    -mThe option to provide the commit message on the command line.

     

  7. Share the changes made.  

    $ git push

    If the outcome is as follows and GIT push takes a long time,  

    remote: 100   357    0     0  100   357      0      6  0:00:59  0:00:52  0:00:07

    Press Ctrl+C to finish the process as this is a known issue. 

Setting up a database

  1. Subscribe to the MySQL database cartridge.  

    stratos>subscribe mysql mywebdb

      Code Description

    SyntaxDescription
    mysql MySQL Cartridge.
    mywebdb Alias for MySQL database Cartridge

     

  2. Request for MySQL database Cartridge information.  

    stratos> info mywebdb

    Output

    Cartridge Info
    -----------------
    Cartridge: mysql
    Alias: mywebdb
    Host: 192.168.92.67
    Password: cilxskqh
    Admin URL: https://mywebdb.mysql.stratos.com
    Status: ACTIVE
    Active Instances: 1


  3. Add an entry in the /etc/hosts file for mywebdb.mysql.stratos.com to be able to access the URL shown in the output of the above command.

    ELB IP Address    mywebdb.mysql.stratos.com


  4. Go to https://mywebdb.mysql.stratos.com
  5. Login using the credentials given in the Cartridge Info output. The username is root.
     

Creating a Database

  1. On the phpmyadmin menu, click Databases.
  2. Enter the DB name in the Create new database text-box.
    For example, mywebdb
  3. Add an entry in the /etc/hosts file for myweb.php.stratos.com to be able to access the URL shown in the output of the command when requesting for database information.

    192.168.92.10    myweb.php.stratos.com


  4. Go to   http://myweb.php.stratos.com:8280
    This request is sent to the WSO2 elastic load balancer. The user can access their application running on the PHP Cartridge through the load balancer.  


Running the Installer

  1. Enter the details that you get when executing info mywebdb command.
    Example:  

    Database Name : mywebdb 
    User Name : root
    Password : cilxskqh     
    Database Host : 192.168.92.67
  2. Click Submit.
    Now the http://myweb.php.stratos.com:8280 website is ready for use.

    Known Issue:

    Upon trying to access the http://myweb.php.stratos.com:8280 link the first time it will not work but when you access it again you will be able to log into the WordPress page.

      

  3. Continue installing WordPress.

    The login page will appear after successful installation of WordPress.


  • No labels