Skip to main content

Posts

Autoscaling Publishers in AWS

This series of blog posts presents in detail the setup of Tridion Publishers autoscaling as implemented for Amazon Web Services (AWS) infrastructure. Originally, I was inspired by Julian's post about  Using AWS to Scale SDL Web Publishers . I used this post to have an initial setup and then I completed it with more features like license management and more monitoring. These are the steps that I took: Publishing Queue metrics in CloudWatch CloudWatch alarms Launch Configuration License management Auto Scaling Group Scaling Policies Terminate Lifecycle Hook

Running sp_updatestats on AWS RDS database

Part of the maintenance tasks that I perform on a MSSQL Content Manager database is to run stored procedure sp_updatestats . exec sp_updatestats However, that is not supported on an AWS RDS instance. The error message below indicates that only the sa  account can perform this: Msg 15247 , Level 16 , State 1 , Procedure sp_updatestats, Line 15 [Batch Start Line 0 ] User does not have permission to perform this action. Instead there are several posts that suggest using UPDATE STATISTICS instead: https://dba.stackexchange.com/questions/145982/sp-updatestats-vs-update-statistics I stumbled upon the following post from 2008 (!!!), https://social.msdn.microsoft.com/Forums/sqlserver/en-US/186e3db0-fe37-4c31-b017-8e7c24d19697/spupdatestats-fails-to-run-with-permission-error-under-dbopriveleged-user , which describes a way to wrap the call to sp_updatestats and execute it under a different user: create procedure dbo.sp_updstats with execute as 'dbo' as...

AWS RDS Backup Restore

This post describes a backup/restore procedure for the Content Manager database in an Amazon Web Services (AWS) environment). The database is a MSSQL instance running on as Amazon Relational Database Service (RDS). The existing database is from an SDL Tridion 2013 environment, and as such, after the restore in the new SDL Web 8.5 environment, it will have to be upgraded to SDL Web 8.5. Performing the backup implies taking the database offline and executing the stored procedure: exec msdb.dbo.rds_backup_database 'Tridion_cm_2013' , 'arn:aws:s3:::mybackup/Tridion_cm_2013.bak' The procedure is described in http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQLServer.Procedural.Importing.html Performing the restore implies executing the following stored procedure in the new RDS database: exec msdb.dbo.rds_restore_database 'Tridion_cm_2013' , 'arn:aws:s3:::mybackup/Tridion_cm_2013.bak' , '' While the restore is running, you ...

Unattended SDL Web 8.5 Installation

In a recent project, we had the requirement to install the SDL Web 8.5 Content Manager and the Publisher using script only (aka an unattended installation). I knew about the existence of such an unattended installation, but I for one, have never attempted it. The feature is clearly documented in http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v5/GUID-CE873235-5FE0-489D-A63C-B979919D8F9E . All the prerequisites must still be fulfilled before the actual unattended installation can take place: In Server Manager: Server Roles: Web Server (IIS) Features: .NET Frameowrk 4.6 ASP.NET 4.6 WCF Services (all of them, including other features needed as dependencies) Web Server Role (IIS) Role Services Common HTTP Features (all of them) Health & Diagnostics (all) Performance (all) Security (all) Install Java Runtime Environment Content Manager DB must be created in advance. MTS user must be created in advance. Once all prerequisites are met, I was...

Toolkit - Tricks with Memory Byte Buffer

This post if part of a series about the  File System Toolkit  - a custom content delivery API for SDL Tridion. In previous post Writing My Own Database Engine , I quickly mentioned the use of Memory Byte Buffer from Jana NIO that provides fast access to a file by mapping its content to memory. This post goes into more detail over some tricks that occurred with that implementation. There is an issue with Memory Byte Buffer. Namely, once it is created by calling FileChannel.map method, it cannot be unmapped, closed or discarded. The byte buffer will exist until it is garbage collected. From the JavaDoc: A mapping, once established, is not dependent upon the file channel that was used to create it. Closing the channel, in particular, has no effect upon the validity of the mapping. A mapped byte buffer and the file mapping that it represents remain valid until the buffer itself is garbage-collected. The issue is affects Windows OS Java implementations, in the sens...

Toolkit - Writing My Own Database Engine

This post if part of a series about the  File System Toolkit  - a custom content delivery API for SDL Tridion. In the previous post  Criteria for Dynamic Queries , I presented index classes that allow us to execute performant lookups for keys in indexes on the file system. This post presents the logic behind these indexes. The requirement for the Toolkit API was not to use a database or a third party product such as search engines or indexers. In order to do searches for content on a file system where we had JSON files filled with properties we want to search on, we need to have indexes of those properties. It would be impossible to do performant searches without such indexes. This meant creating my own indexes and indexing logic (put, get) backed by a fast searching algorithm. In other words, it meant writing my own simple database engine. The rationale looks like this: Each query must be as fast as possible. The fastest way to query would be to lookup a key in a...

Toolkit - Criteria for Dynamic Queries

This post if part of a series about the  File System Toolkit  - a custom content delivery API for SDL Tridion. In the previous post  Dynamic Content Queries , I presented a Query class that performs CustomMeta queries on JSON models published to the file system. This post presents the logic that actually queries for results and applies different boolean operators for different Criteria. The base class for each criteria is Criterion, which defines the base methods each criteria must implement: public abstract class Criterion { public Set < String > executeQuery () { return executeQuery ( FilterImpl . EMPTY_FILTER ); } public abstract Set < String > executeQuery ( Filter filter ); } The Filter class contains a set of allowed Publication ids, the item type and whether to include the range boundaries or not. The Filter is used in modifying the results retrieved for each criteria from the indexes. Each criteria uses...