Wednesday, February 19, 2014

BCC Deployment


This blog is to answer some basic question like what is deployment in BCC ? How do it works ? what are different types of deployment and what are the various stages/states of deployment. Let direct start with the most basic and first question which come to our mind.

What is deployment in BCC ?

Deployment generally means moving the built code too server, but when we use the term deployment in context of bcc the deployment means moving the data from versioned schema to non-versioned schema using the atg framework where as versioned schema means pub schema of bcc and non-versioned schema are the catalog schema like cata and catb of store jvm and stg_cat of preview/staging jvm.

How do BCC deployment works ?

In general deployment involves running the set of insert,update and delete script which are created using the data as part of deployment in pub schema.
The bcc server is connected to versioned and all the non-versioned schema of the ATG set-up. We also connect all the jvm (store) using RIM connection.
As part of deployment BCC created marker which are used to create the SQL statement which will be used to write to the versioned schema. This execution of the script is performed by the BCC server directly on the versioned schema (on passive schema). 
The RIM connection is used for file deployment and to send the deployment event to agent JVM's.

BCC deployment overview
Passive schema : When we have switch datasource configured, than the JVM will be reading the data from one versioned schema and the other schema is called passive schema.
Active Schema : When we have switch datasource configured, than the JVM will be reading the data from one versioned schema which is called passive schema.

 BCC will be connected to agent JVM and will know the schema name of the active and passive schema. Than bcc will start the deployment and will right the data into the passive. Once writing of data/transferring files is complete on the passive schema. It will trigger event for switching for agent , switch is process where the agent jvm make a switch between passive schema and active schema. that is after the completion of switching the passive schema will be active and active schema will be make passive. 
Now again the BCC will go head and complete writing of data/transferring file in passive.
activity/task performed by BCC after switch is to maintain the synchronization between schema.

What are different types of deployment ?

They are 2 type of deployment
  1. Incremental deployment 
  2. Full deployment

Incremental Deployment : Only data change which are in the project which are part of deployment are copied/transfer from versioned schema to non-versioned schema.

Eg. ProjectA contain change to product P1,P2 and P3 and ProjectB contains changes to product P11,P12 and P13. If we are deploying ProjectA than only change made to product P1,P2 and P3 as part of ProjectA are copied/transfer from versioned schema to non-versioned schema.

Full deployment  All the data which are live will be copied as part of deployment. It will not need project to start the deployment. 

Eg . All the project are deployment in the order in which are mentioned here.
ProjectA - Contains Product1 (created, version=1 ), Product2(created, version=1)- Deployed as part D1
ProjectB - Contains Product2 (update, version=2), Product3 (created, version=1) - Deployed as part D2
ProjectC - Contains Product2 (update, version=3), Product3 (deleted, version=2) - Deployed as part D3.
After if we do a full deployment that the product copied to nonVersioned schema are like

Product1 of version=1, Product2 of version and the product3 is not at all copied.

ATG has 2 way to perform Full Deployment. It depend on the databases and project requirement.
  1. Regular Full Deployment
  2. DirectSQL Full Deployment
  • Regular Full Deployment : It is normal Deployment which is performed in simillar as of incremental deployment where the is_head =1 set is picked and SQL script created and executed on non-versioned schema, marker are created and used in this process of deployment.
  • DirectSQL Full Deployment :  It is the new feature add as part of ATG 10.X. It used the power of the underlay databases to do the heavy copying of the data. In this process the marker are not created instead SQL query are formed in such a way that pick the is_head= 1 and copy to the non-versioned schema. Copying will not happen at the asset level instead happens at table level. Generally we can say the number of the SQL query involved will be equal to number of table listed in repository xml.    
          We have to set the flag at /atg/epub/DeploymentServer.useDirectSQLReplication=true and provide the schema name with a dot (.) at the end in prefix value and hostName:port in suffix in the repository mapping in the deployment configuration.


14 comments:

  1. Pradeep very good post.. Thanks Keep rocking

    ReplyDelete
  2. Hi Pradeep. This blog is very useful. Please provide some information on view mapping configuration for customizing the pages where the information of assets are displayed.

    ReplyDelete
  3. Hi Pradeep,
    You have mentioned
    schema name with a dot (.) at the end in prefix value and hostName:port in suffix in the repository mapping in the deployment configuration.

    can you please tell me where i have to do the same.

    ReplyDelete
    Replies
    1. this prefix and sufix columns do not show up by default, 1st thing is you have to make the "useSQLDirectReplication" flag ture in deploymentServer component. Than login to the BCC >> CA Console >> Congifurations. go to any site "production" or "stage". In tab where we can map the repositories, you will see some text box, with saying CATA and CATB some will have online (that is core).

      -Pradeep

      Delete
  4. Hi Pradeep,

    Is there any reverse process through which the cata or catb data can be copied to publish schema.?

    ReplyDelete
  5. Sports Betting - Mapyro
    Bet the moneyline from 1:25 PM to 11:00 출장마사지 PM. See casinosites.one more. MapYO Sportsbook features live odds, https://access777.com/ live streaming, https://febcasino.com/review/merit-casino/ and detailed information.

    ReplyDelete