Skip to content. | Skip to navigation

Sections
You are here: Home content generated doc.free neda PLPC 110502 current accessPage

ByEntity/ByStar Libre Engine

ByEntity Design Notes

A Permanent Libre Published Content

ByEntity Design and Implementation Notes

Document Number: PLPC-110502   [ .bib ]
Version: 0.1
Dated: December 18, 2007
Group: LibrePlatform
Primary URL: http://www.neda.com/PLPC/110502
Federated Publications: ByTopic -- ByContent
AccessPage Revision: This AccessPage was produced on May 22, 2013 at 7:46 PDT (-0700)
Author(s): Mohsen BANAN
Organization: Neda Communications, Inc

AVAILABLE FORMATS

  • PDF: -- 112K -- Provides the document in Portable Document Format.
  • PS: -- 236K -- Provides the document in Postscript format for printing.
  • HTML: -- 228K -- Displays the document as a web page.

SHORT DESCRIPTION

ByEntity (the Libre Engine of ByStar) design and implementation notes.


FULL INLINE DOCUMENT

ByEntity/ByStar Libre Engine

ByEntity/ByStar Libre Engine
Design and Implementation Notes
Draft Document – Reflects Work in Progress
Document Nu: PLPC-110502
Mohsen Banan
http://mohsen.banan.1.byname.net/ContactMe


Version 1.5
January 4, 2008

Contents

List of Figures

List of Tables

1 Overview

See figure for details.


PIC

Figure 1: By* Libre Services Layers


2 ByEntity Roadmap

2.1 Extracted by bystarRoadmap.sh -i platformLayers

Description of bystarRoadmap.sh -- platformLayers  
 
 
+-----------------------+-----------------------------+  
|          lpGenesis.sh + lpSysMgmtSteps.sh           |  
|                intra / genesis1                     |  
|                                                     |  
|                 lpSysDevelopers.sh                  |  
|                                                     |  
+----------+------------+-------------+---------------+  
 
  ===============================================  
   ByStar Account Container Server Configuration  
          /libre/ByStar/InfoBase/HOST  
  ===============================================  
 
 
+-----------------------+-----------------------------+  
|               bystarHostAdmin.sh                    |  
|           lpSysMgmtSteps.sh                         |  
|                bystar / bacsNNNN                    |  
|                                                     |  
+----------+------------+-------------+---------------+  
 
  ===============================================  
         ByStar Account Container Server  
  ===============================================  
 
 
+-----------------------+-----------------------------+  
|               Ready For ByStarFactory               |  
|                Layer, see below                     |  
|                                                     |  
|                bystarAcctsHosts.sh                  |  
|                                                     |  
+----------+------------+-------------+---------------+

2.2 Extracted by bystarRoadmap.sh -i HostsHowTo

Description of bystarRoadmap.sh -- HostsHowTo  
See bystarRoadmap.sh for context.  
 
SEE HOST REGISTRATION PROCESS BELOW  
 
Rename HostBaseDirAdmin.sh to BystarPlatformAdmin.sh  
 
Bystar Platforms (Server or User Environment)  
 
- Bystar Intra Server Platform (BISP)  
           (bisp0001.intra)  
 
- ByStar User Environment [INTRA] (BUE)  
                bue.intra  
 
- ByStar Mobile User Environment [INTRA] (BMUE)  
                bmue.intra  
 
- ByStar Server Platform [INTERNET] (BACS)  
(ByStar Account Container Server bacs0001.by-star.net)  
 
 
bystarHostAdmin.sh  -p BoxName=AUTO -p siteName=nedaPlus -p IpAddrNet=pub1  -p HostId=AUTO -i HostRegisterProcess  
 
 
 HOST (BACS/BISP/BUE/BMU) REGISTRATION PROCESS  (And Host Creation/Update)  
 =============================================  
 
 1) Input Parameters Verification  
    A- Verify BoxName is Valid  
 
       If BoxName=auto  
       Go into /opt/public/osmt/siteControl/nedaPlus/opMachineItems.site  Create new  
       boxnu0001, ..., boxnu00NN  
 
       First Check to see if it is assigned  
       opMachines.sh -i myBoxName  
 
       if not assigned,  
       BoxName=UnAssigned  
 
       Then  
 
       opMachines.sh -s all -a summaryID | grep -i box0  
       to figure the next box number  
       opMachines.sh -i itemBoxGen 00NN  
       Then add that to /opt/public/osmt/siteControl/nedaPlus/opMachineItems.site  
       in other words  
       opMachines.sh -i itemBoxGen 00NN >> /opt/public/osmt/siteControl/nedaPlus/opMachineItems.site  
 
       Verify correctness  
       opMachines.sh -i myBoxName  
 
       Put a label on the Box that says BoxName=boxxxx  
 
    B- Verify SiteName is Valid  
 
    C- If specified verify HostId is valid  
       or Assign HostId  
       If you are using bacs000N, then don't need to do anything  
 
 2) Register/Obtain IP Address  
 
 Go in /opt/public/osmt/siteControl/L3Addrs/nedaPlus/nedaIPAddrHostItems.pub1  
   or  /opt/public/osmt/siteControl/L3Addrs/nedaPlus/nedaIPAddrHostItems.pub2  
   or  /opt/public/osmt/siteControl/L3Addrs/nedaPlus/nedaIPAddrHostItems.priv0  
    assign an IP Address for  
bacs0001, ...., bacsNNNN  
 
    OR use the generic address based on HOST TYPE -- DHCP  
 
  3) Go in opHostItems.site, create entry for bacsNNNN  
    /opt/public/osmt/siteControl/nedaPlus/opHostItems.site  
 
  4) In  
/libre/ByStar/InfoBase/HOST/nedaPlus/bisp0001/  
or  
/libre/ByStar/InfoBase/HOST/nedaPlus/bacs0001/  
      Create  
         HostId=0001  
         HostName=bacs0001  
         HostFamily=BACS  
         BoxName=  
         HostIpAddr1=xxxx  
 
 bystarHostAdmin.sh -p boxName=boxNN  -p family=bacs -p id=nu -p name=bacsxx -p ip=xxx -i genHostInfo  
 bystarHostAdmin.sh -p family=bacs  -i autoGenHostInfo  
 
 Then pass it through CVS  
 
  5) Run  
     vis_HostVerify  
     opDoq opHosts.sh -p opSiteName=nedaPlus -s bacs0003 -a summary_host  
     Verify it is all correct.  
 
       /opt/public/osmt/siteControl/nedaPlus/opHostItems.site  
 
  6) Run  
       - bystarHostAdmin.sh -h -c fast -v -n showRun -p HostBaseDir=/libre/ByStar/InfoBase/HOST/nedaPlus/bacs0002 -i HostIdentitySet  
 
       IF A GENERIC LSIP HOST -- NOT USING BYSTAR  
          - opSysIdentities.sh -p opSiteName=nedaPlus -p opParamStandalone=strict -i osmtIdentitySet HostNameGoesHere  
 
          [ You may have to run this twice ]  
 
            If  
            PROBLEM: Host -- bisp0002 -- FAMILY NAME BISP not found  
            You may have to re-run  
 
       ENDIF  
 
       - Verify Correctness by reviewing  
           /etc/osmtInfo  
 
  7) If a New Family, or Family is over written make sure that  
     item files are setup properly.  
 
     /opt/public/osmt/siteControl/nedaPlus/mmaQmailHostItems.site  
 
  8) Run  
 
     - UnSeal if needed  
 
     - bystarHostAdmin.sh -h -c fast -v -n showRun -p HostBaseDir="/libre/ByStar/InfoBase/HOST/nedaPlus/bacs0001" -i HostStepByStepNewId  
 
         If any problems take it from:  
 
     - bystarHostAdmin.sh -h -c fast -v -n showRun -p HostBaseDir="/libre/ByStar/InfoBase/HOST/nedaPlus/bacs0001" -i HostStepByStepIdentitySet  
 
     IF A GENERIC LSIP HOST -- NOT USING BYSTAR  
      - lpSysMgmtSteps.sh -h -v -n showRun -p developer=noedit -i restartFromNewId  
 
         If any problems take it from:  
 
      - lpSysMgmtSteps.sh -h -v -n showRun -p developer=noedit -i restartFromIdentitySet  
     ENDIF  
 

2.3 Extracted by bystarRoadmap.sh -i libreByStarInfoBase

Description of bystarRoadmap.sh -- libreByStarInfoBase  
 
/libre/ByStar  
 
/libre/ByStar/BACS  
    ByStar Account Container Server  
 
# /libre/ByStar/NUMBER  
bystarIbNumberRoot="/libre/ByStar/NUMBER"  
 
# Registered  
/libre/ByStar/BAP/ByName/sa/20000  
 
/libre/ByStar/DOMAINS/net/byname/banan/1/mohsen  
 
/libre/ByStar/DnsZone/net/byname/contentServers  
 
# /acct -- Not CVSed  
/libre/ByStar/acct/current/bacs0001/sa-20000/  
/libre/ByStar/acct/mirror  
/libre/ByStar/acct/backup  
 
# ./server -- Not CVSed  
bystarIbServerRoot=/libre/ByStar/server  
bystarIbServerMirrorRoot=/libre/ByStar/server/mirror  
bystarIbServerBackupRoot=/libre/ByStar/server/backup  
 
 
/libre/ByStar/BUE  
    ByStar User Environment  

2.4 Extracted by bystarRoadmap.sh -i bystarFullPicture

Description of bystarRoadmap.sh -- bystarFullPicture  
 
 
  --------------        --------------              ---------------  
  |  Web/Plone |        | BBDB       |              | Names Source |  
  --------------        --------------              ---------------  
 
 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
 ^     BystarBarcProc.sh                                            ^  
 ^   (BARC: Bystar Account Request Container)                       ^  
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
 
 - Given Parameters from the Web or BBDB or ...  
   create BARCs  
 
       -p acctType=ByName -p acctSupport=charge -p firstName=xxx -i create  
 
       Creates unique handle. /tmp/dateTag-2806.BARC  
 
              ===================================================  
               BARC: Bystar Account Request Container  
              /libre/ByStar/InfoBase/BARC/first.last-dateTag.BARC  
                            bystarBarc.libSh  
              ===================================================  
 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
 ^     BystarInfoBaseAdmin.sh                                       ^  
 ^   Register a BAP from (BARC: Bystar Account Request Container)   ^  
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
 
 - Given  (BARC: Bystar Account Request Container)  
   - Select BAP base file info in /libre/ByStar/InfoBase/BAP/  
      - Decide on ByStar Entity Type ByName/BySMB/ByMemory/ByAlias/ByFamily  
      - Decide on Account Support Type (.com vs .net)  
   - make necessary assignments (account, domain)  
      - Assign an account  
 
      - Capture BAP info  
   - confirm Registration  
 
              ==============================================  
                   RBAE: Registerd Bystar Account Entry  
               /libre/ByStar/InfoBase/BAP/ByName/sa/20000  
                           bystarInfoBase.libSh  
              ==============================================  
 
 
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
 ^     bystarAcctAdmin.sh                                         ^  
 ^   Create an Account and initial NSPs                           ^  
 ^ -p RBAE=/libre/ByStar/InfoBase/BAP/ByName/sa/20000             ^  
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
 
 - Given a Registered BAP,  
   - A registered BAP takes the form of an  
      assigned account directory such as:  
      /libre/ByStar/InfoBase/BAP/ByName/sa/20000/  
   - Create the Account  
   - Create the BAGP and BACPs  
 
 
 
   ==========        =======================      ========================  
      ACCT                    BAGP                          BACP  
                      Account Global Params       Account Component Params  
   ~sa-20000         ~sa-20000                    ~sa-20000  
   ==========        =======================      ========================  
 
 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
 ^     BystarServiceAdmin.sh               ^  
 ^   Creates Services for Account          ^  
 ^         -p uid=            ^  
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  
 
 - Given an account  
 
   - Create Domains  
   - Create Mail Accounts  
   - Create Web Site  
   - Create Plone Site  
   - Create Gallery  
   - Create Geneweb  
 
 - Do backups ...  
 
+-----------------------+-----------------------------+  
|       Bystar Capability Layer                       |  
|       (bystarPloneAdmin.sh, bystarQmailAdmin.sh     |  
|         -p uid=                        |  
+----------+------------+-------------+---------------+  
 
 
+---------------------------------------------------------------+  
|         lcaCapabilityLayer --  LSIP                           |  
+---------------------------------------------------------------+  
 
 
+------------------------------------------------------+  
|                    opAcctUsers.sh                    |  
+------------------------------------------------------+  
+---------------------------------------------------------------+  
|                       opUidAssignments.sh                     |  
+---------------------------------------------------------------+  

2.5 Extracted by bystarRoadmap.sh -i AcctsHowTo

Description of bystarRoadmap.sh -- AcctsHowTo  
   Bystar Acct  
 
See Also  
 
      bystarCtldAcctAdmin.sh -i help  
 
 
HOW TO ADD A NEW ACCOUNT CONTROLLER/MASTER  
==========================================  
 
0) Verify that BACS is good  
     See bystarHostAdmin.sh -i help  
 
1) Created info dir  
 
       cd /libre/ByStar/InfoBase/RBAE/BYSMB/ea  
       ls  
       Take one as sample -- Determine next number (newAcct)  
       cp -r -p ea-59040 newAcct  
       Get rid of CVS dirs  
 
   Edit as needed for now.  
 
   Create old compatibility in  
   /opt/public/osmt/siteControl/nedaPlus/BAP/BySMB  
 
 
2) Create Acct and Full Update  
 
      bystarAcctAdmin.sh -h -v -n showRun -p RBAE="/libre/ByStar/InfoBase/RBAE/BYSMB/ea/nextNumber" -i acctCreate  
 
      Verify Account Creation went well, then  
 
      bystarAcctAdmin.sh -h -v -n showRun -p bystarUid="ca-nextNumber" -i fullUpdate  
 
      or do all in one shot:  
 
      bystarAcctAdmin.sh -h -v -n showRun -p RBAE="/libre/ByStar/InfoBase/RBAE/BYSMB/ea/nextNumber" -i fullUpdate  
 
      Note that in turn bystarServiceAdmin.sh  -i fullUpdate is called.  
 
====== CONTROLLED ACCOUNTS =======  
   Bystar Controlled Acct  (BCA)  
 
This is just a layer over bystarAcctAdmin.sh  
 
HOW TO ADD A NEW CONTROLLED/SLAVE ACCOUNT  
========================================  
 
  - Determine the Master Account ie ea-59040  
 
  - Created info dir for ~ea-59040/BAGP/BCA/ca-16001/RBAE  
       cd ~ea-59040/BAGP/BCA/  
       ls  
       Take one as sample  
       cp ca-16001 newAcct  
       Get rid of CVS dirs  
 
  - Run  
      bystarAcctAdmin.sh -h -v -n showRun -p RBAE="~ea-59040/BAGP/BCA/ca-16001/RBAE" -i acctCreate  
 
      Verify Account Creation went well, then  
 
      bystarAcctAdmin.sh -h -v -n showRun -p bystarUid="ca-16005" -i fullUpdate  
 
      or do all in one shot:  
 
      bystarAcctAdmin.sh -h -v -n showRun -p RBAE="~ea-59040/BAGP/BCA/ca-16001/RBAE" -i fullUpdate  
 
      Note that in turn bystarServiceAdmin.sh  -i fullUpdate is called.  

2.6 Extracted by bystarRoadmap.sh -i actualOldCode

Description of bystarRoadmap.sh -- actualOldCode  
 
               =====================================  
                 BAPs  -- ByEntity Account Profile  
               =====================================  
 
 /opt/public/osmt/siteControl/nedaPlus/BAP/BySMB/ea-59040.wojtunik.org.BAP  
 
 /opt/public/osmt/siteControl/nedaPlus/BAP/BySMB/RunBAPs.sh  
 
 /opt/public/osmt/bin/bystarBAPs.sh  
 
 
                                            PloneExternalCall  
 
+-----------------------+-----------------------------+  
|       ByStarFactory.sh                              |  
|                                                     |  
+----------+------------+-------------+---------------+  
 
 
+-----------------------+-----------------------------+  
|                bystarBatchBasic.sh                  |  
+----------+------------+-------------+---------------+  

2.7 Extracted by bystarRoadmap.sh -i byentityLegacyDesign

Description of bystarRoadmap.sh -- byentityLegacyDesign  
 
 
   PloneWebAccess      bbdbInfo  
 
+-----------------------+-----------------------------+  
|               BAP Generator/Processor Layer         |  
|                  ByStarFactory.sh -p first=xxx      |  
|                                                     |  
+----------+------------+-------------+---------------+  
 
            ==========================  
               Unregistered    BAPs  
             ByEntity Account Profile  
            ==========================  
 
+-----------------------+-----------------------------+  
|               bystarInfoBaseAdmin                   |  
|       (bystarBAP2NSP.sh, bystarBAPreport.sh, ...)   |  
|                -p bapContainer=xx.Unreg             |  
+----------+------------+-------------+---------------+  
 
            ==========================  
               Registered    BAPs  
             ByEntity Account Profile  
            ==========================  
 
 
+-----------------------+-----------------------------+  
|               bystarBAP2NSPLayer                    |  
|       (bystarBAP2NSP.sh, bystarBAPreport.sh, ...)   |  
|                -p bapContainer=xx.Reg               |  
+----------+------------+-------------+---------------+  
 
  =============================            ============  
                 NSPs                       Activated  
   Numbered Subscriber Profile              Accounts  
  =============================            ============  
 
+-----------------------+-----------------------------+  
|       Bystar Account Layer                          |  
|       Administers the entire acct/service           |  
|       (bystarAcctAdmin.sh, bystarBackup.sh, ...)    |  
|        -p uid=                         |  
+----------+------------+-------------+---------------+  
 
+-----------------------+-----------------------------+  
|       Bystar Capability Layer                       |  
|       (bystarPloneAdmin.sh, bystarQmail             |  
|         -p uid=                        |  
+----------+------------+-------------+---------------+  
 
+---------------------------------------------------------------+  
|         lcaCapabilityLayer --  LSIP                           |  
+---------------------------------------------------------------+

2.8 Extracted by bystarRoadmap.sh -i byEntityLegacyCallFlow

Description of bystarRoadmap.sh -- byEntityLegacyCallFlow  
 
 
   PloneWebAccess      bbdbInfo  
 
+-----------------------+-----------------------------+  
|                  BAP Generator /Processors Layer    |  
|                                                     |  
|       ByStarFactory.sh                              |  
|                                                     |  
+----------+------------+-------------+---------------+  
 
               =====================================  
                 BAPs  -- ByEntity Account Profile  
               =====================================  
 
 
+-----------------------+-----------------------------+  
|                 bysmbBatchBasic.sh                  |  
|                                                     |  
|      LATER            |   IMMEDIATE                 |  
| fullUpdateBackground  |   vis_acctUpdate            |  
+----------+------------+-------------+---------------+  
     |  
     |  
     |  
     |  
     |  
     |  
     v  
 
              ========================================  
                 NSPs  -- Numbered Subscriber Profile  
              ========================================  
 
 
          /|          / |          /  |          /   |  
+------+ +-----+ +------+  
| LEAP | | WEB | | MAIL | .......BystarCapabilityLayer  
+------+ +-----+ +------+  
 
 
+----------------------------------+  
|      lcaCapabilityLayer          |  
+----------------------------------+  
 
 
+------------------------------------------------------+  
|                    opAcctUsers.sh                    |  
+------------------------------------------------------+  
+---------------------------------------------------------------+  
|                       opUidAssignments.sh                     |  
+---------------------------------------------------------------+

2.9 Extracted by bystarRoadmap.sh -i modelAndTerminology

Description of bystarRoadmap.sh -- modelAndTerminology  
 
bystar is a common script for creating bystar site,  
e.g. byname, bysmb/forsmb/, bymemory, bywhere, byalias, etc.  
 
 
 
    bystarRoadmap.sh        -- This file.  
 
    bystarBAPs.sh           -- Given a BAP file with assigned id number  
       rather than automatically generating id  
       number based on the acct type.  
       Sample BAP file is in  
       /opt/public/osmt/siteControl/nedaPlus/BAP/  
ByName/sa.1.rashid.eyas.20123.BAP  
 
       This method is to create bystar acct  
       in a batch mode without having to go  
       to website form.  
 
       Root has to run this script.  
 
 
    bystarFactory.sh        -- This script is called from the web (create  
       new account form) with the parameters passed  
       from it and generate a new UNIX account  
       based on the acct type.  After the account  
       is generated, it also generate all of the  
       features nsp files and put them in user's  
       home directory.  Currently it generates  
       ploneFeatures.nsp, galleryFeatures.nsp,  
       and generalFeatures.nsp.  
 
       We can also deactivate the acct by calling  
       the function fullDelete.  The process of  
       deactivate an account is as follows:  
        - Lock a user password  
  (usermod -L)  
- Backup user plone site to his/her  
  backup directory.  
- Remove user plone account  
- Remove user plone site  
- Remove virtual domain entry in apache  
  httpd.conf file for both  
  name and number form.  
  (i.e. web.57000.byalias.net and  
  aliasname.byalias.net)  
 
    bystarBatchBasic.sh     -- This script generate all the necessary features  
       based on the user's nsp files.  The account  
       is assumed exist for this to work.  Currently  
       it generate plone site and galllery as well as  
       delete an account process.  
 
    bystarLib.sh            -- Contains all the common functions.  

2.10 Extracted by bystarRoadmap.sh -i pointersAndReferences

Description of bystarRoadmap.sh -- pointersAndReferences  
 
Additionally See:  
   http://www.neda.com/PLPC/110501  
   http://www.neda.com/PLPC/110502  
   http://www.neda.com/PLPC/110101

2.11 Extracted by bystarRoadmap.sh -i howTos

Description of bystarRoadmap.sh -- howTos  
 
How To Create a new ByEntity Service  
------------------------------------  
 
OLD LEGACY PROCESS  
==================  
 
1) Go to  
   /opt/public/osmt/siteControl/nedaPlus/BAP/BySMB  
 
2) Create a new bap file and bynumber  
 
3) Run Script  
 
 
NEW DESIGN  
==========  
 
0) Verify that BACS is good  
     See bystarHostAdmin.sh -i help  
 
1) Go to  
   /libre/ByStar/InfoBase/RBAE/BYSMB/ea  
 
   get the nest number and create the directory  
   say 59041  
      cp -r -p 59040 59041  
 
   Edit as needed for now.  
 
   Create old compatibility in  
   /opt/public/osmt/siteControl/nedaPlus/BAP/BySMB  
 
2)  

2.12 Extracted by bystarRoadmap.sh -i help

Description of bystarRoadmap.sh -- help  
bystarRoadmap.sh provides an overview of the bystar layer.

Document Actions
Libre/Halaal Internet Services Provided At LibreCenter By Neda

Member of By* Federation Of Autonomous Libre Services

This web site has been created based exclusively on the use of Halaal Software and Halaal Internet Application Services. It is part of the By* Federation of Autonomous Libre Services which in turn are part of the Halaal/Libre By* Digitial Ecosystem which incorporate the following software components: