running a contentbox cluster on the jelastic cloud paas ... · 3. from this next screen you will be...

17
Oct 17, 2013 Running a ContentBox Cluster on the Jelastic Cloud PaaS (https://www.ortussolutions.com /blog/running-a-contentbox-cluster-on-the- jelastic-cloud-paas) Luis Majano The folks at Jelastic have published an excellent article about how to deploy ContentBox in their Jelastic Cloud (http://blog.jelastic.com/2013 /10/17/contentbox-cluster-on-jelastic-cloud-paas/? and scale it for subscribe=success#blog_subscription-2) distribution. Here is the article as well: Introduction Today we’ll show you how to deploy ContentBox (http://www. to the . In this gocontentbox.org/) Jelastic Cloud (http://jelastic.com/) deployment, ContentBox is powered by Railo, an open source CFML engine that can be deployed to any Java Servlet Container. Moreover, you’ll see how to use its embedded Railo CFML cluster cache by the Memcached implementation and how it can help to create a fast and scalable caching layer for ContentBox. In our case, the clustered cache offers shared session storage for all servers in a cluster. You can then store all the sessions in this cache that are available from all servers in the cluster. In other words, weâ €™ll use Memcached for session replication. So let’s take an easy example.

Upload: others

Post on 06-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

Oct 17, 2013

Running a ContentBox Cluster on the Jelastic Cloud PaaS (https://www.ortussolutions.com/blog/running-a-contentbox-cluster-on-the-jelastic-cloud-paas)

Luis Majano 

The folks at Jelastic have published an excellent article about how todeploy ContentBox in their Jelastic Cloud (http://blog.jelastic.com/2013/10/17/contentbox-cluster-on-jelastic-cloud-paas/?

and scale it forsubscribe=success#blog_subscription-2)distribution.  Here is the article as well:

IntroductionToday we’ll show you how to deploy  ContentBox (http://www.

  to the  . In thisgocontentbox.org/) Jelastic Cloud (http://jelastic.com/)deployment, ContentBox is powered by Railo, an open source CFMLengine that can be deployed to any Java Servlet Container. Moreover,you’ll see how to use  its embedded Railo CFML cluster cache bythe Memcached implementation and how it can help to create a fastand scalable caching layer for ContentBox.

In our case, the clustered cache offers shared session storage for allservers in a cluster. You can then store all the sessions in this cachethat are available from all servers in the cluster. In other words, we’ll use Memcached for session replication. So let’s take an easyexample.

Page 2: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

(http://i0.wp.com

/blog.jelastic.com/wp-content/uploads/2013/10/scheme3.jpg)

Our cluster has 2 servers and every one of them holds the sameapplication  and connects to the same MySQL database.ContentBox We use Memcached here to offer the opportunity to scale out hugeamounts of memory to a server farm and store large amounts of datain it.

Create environment1. Log into your Jelastic account and click on the Create environmentbutton.

2. Pick two   instances,  as the database you want to useTomEE MySQLand select node as your cache storage. Then specify theMemcache resource consumption for each node and enter the environmentname.

Page 5: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

Deploy ContentBox1. Go to the ContentBox official web (http://www.gocontentbox.org/)site and download the latest version of this CMS as a WAR archive.

(http://i2.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/ContentBox-Download.png)

2. Upload the archive to the Jelastic Deployment Manager.

(http://i0.wp.com/blog.

jelastic.com/wp-content/uploads/2013/10/ContentBox-Upload.png)

3. Deploy ContentBox to the Jelastic Cloud.

Page 6: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

(http://i2.wp.com/blog.

jelastic.com/wp-content/uploads/2013/10/ContentBox-Deploy.png)

Change Railo CFML Default PasswordsWe recommend that you change the default administrator passwordsfor the embedded Railo CFML engine.

1. Navigate to Railo CFML    using the following URLServer Adminformat  and loghttp://mydomain.com/railo-context/admin/server.cfm in using the following password:  .contentbox

2. Click on the menu item on the left hand sideSecurity > Password

Page 7: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

3. From this next screen you will be able to add a captcha to the loginscreen, change the administrator password and also set the defaultpassword for all web applications deployed to this server.  Werecommend changing the administrator password and the defaultpassword for all web administrators (Railo offers a server wideadministrator and a web context administrator).

 

Configure clustering1. Enable as it’s described in session replication via Memcachedthis tutorial (http://blog.jelastic.com/2012/10/03/session-replication-

.via-memcached/)

Page 8: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

2.  Navigate to Railo CFML    using the following URLServer Adminformat  and loghttp://mydomain.com/railo-context/admin/server.cfm in using the following password you setup in the before steps. If youdid not change it then the default password is: .contentbox

(http://i1.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/Railo-Server-Admin.png)

3. Navigate to the    tab from the left hand menu andApplicationsinstall the  .Railo Memcached driver

(http://i1.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/Railo-Memcached-Driver.png)

Page 9: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

4. Navigate to the  tab and create a new cache connection fromCachethe Railo CFML server to Memcached.

(http://i1.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/Railo-New-Cache3.png)

5. Enter your Memcached node IP address and port number,  whichcan be viewed by clicking the button for Memcached on theInfoJelastic dashboard. Set the flag  Allow to use  this cache as client

specify your connection settings and  submit the/session storage, connection creation.

Page 11: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

(http://i0.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/ContentBox-Config2.png)

8.  Navigate to  file from the deployed ContentBoxApplication.cfc application and add the following settings to distribute the sessionsvia Memcached:

this.sessionCluster = true;

this.sessionStorage="mycache";

(http://i2.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/ContentBox-Enable-Clustering1.png)

Page 12: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

9.  Enable ContentBox  to use the same cache for monitoringand  content/RSS  distribution.  You will then be able to not onlydistribute your sessions across the cluster but also multiple levels ofcontent caching and RSS feeds as well.  To do this you will need toopen the   file ( ) andCacheBox.cfc webapps/ROOT/config/CacheBox.cfcadd a new cache definition under the section:caches

Memcached = {

provider = "coldbox.system.cache.providers.RailoProvider",

properties = { cachename = "mycache" }

}

(http://i1.

wp.com/blog.jelastic.com/wp-content/uploads/2013/10/CacheBox-Settings.png)

Enable Java Agent (Optional Step)1. Extract   (contentbox-x.x.x.war/railo-inst.jar WEB-INF/railo/lib/railo-

) file from ContentBox WAR archive, which you downloadedinst.jarearlier.

2. Upload this jar library to the home directory of TomEE.

Page 13: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

(http://i0.wp.com/blog.jelastic.

com/wp-content/uploads/2013/10/Railo-Java-Agent.png)

3. Go to  file (server directory) and specify the path tovariables.confrailo-inst.jar according to the  environment variables (http://jelastic.

.com/docs/environment-variables)

(http://i0.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/Railo-Enable-Java-Agent.png)

4. Save all the changes for both instances and restart your servers inorder to apply the new settings.

Page 14: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

(http://i1.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/Restart-TomEE1.png)

Install ContentBox1. Click the button for your environment.Open in browser

(http://i2.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/ContentBox-Open-in-Browser1.png)

2.  Specify your data source connection using your Railo CFMLAdministrator password, MySQL user and database, which youcreated earlier.

Page 15: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

(http://i2.wp.

com/blog.jelastic.com/wp-content/uploads/2013/10/ConrentBox-Datasource.png)

Note: The default CFML Application password is contentbox if you didnot change it in our previous steps.

3. Verify the entered data and confirm the data source creation.ContentBox will then prompt you for your ContentBox administratoruser, site information, mail and rewrite settings.

On the rewrites installation screen, choose ContentBox ExpressNote:from the dropdown as ContentBox includes an embedded rewriteengine when deployed as a WAR.

Page 16: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

4. The final step is to tell ContentBox to use Memcached for storingcontent and RSS feeds. Go to the from the topSystem > Settingsmenu in ContentBox and click on the tab on the leftContent Optionshand side. From here you will have a drop down that says Content

, click on it and change it from “TEMPLATE†to âCache Provider€œMemcachedâ€.

5. You can then click on the tab and do the same forRSS Optionsgenerated RSS Feeds.

Page 17: Running a ContentBox Cluster on the Jelastic Cloud PaaS ... · 3. From this next screen you will be able to add a captcha to the login screen, change the administrator password and

www.ortussolutions.com (http://www.ortussolutions.com)© Copyright Ortus Solutions, Corp.

 

That’s all you have to do to get  a highly available ContentBoxcluster! You can  distribute your sessions without J2EE management,distribute your managed content objects and your RSS feeds and allof them will be available for your entire cluster. Enjoy!