Canvas maintenance approach


#1

Hi all,

Not sure what’s the best approach to put Canvas site into a “maintenance mode”, for say upgrade or key file replacement.
Can we somehow redirect all the visitors to a maintenance page?
As I understand during the upgrade the service could be down for seconds right?


#2
app.controller('YourController', ['$scope',  '$state', function($scope, $state) {
   $scope.maintenance = false; //or true
   if($scope.maintenance == true) {
    	$state.go('your_maintenance_page_state');
    };

}]);

#3

Hi Eugene,

Will this work when Canvas will need to restart, if we use $state.go while the application server is down, will it still work?

Regards

Tat


#4

Hi @twong,

Cubewise Application Server should be up. tm1 instance may be down. That what you have asked?

Regards,
Eugene


#5

Hi Eugene,

I think the question was specifically for a CWAS upgrade, but I think both TM1 server unavailable and Canvas application server unavailable (due to maintenance, upgrade, or whatever) are valid use case. It would be great feature to have an easy and immediate redirect switch to a simple landing page that where a message can be displayed.


#6

Hi @eugene,

I think that’s the other way around, TM1 Instance still up, but Cubewise Application Server is down.

Regards

Tat


#7

@cw-ch,
I see your point, by why not create another application app_name_upgrade by copying existing app_name application, after upgrade the app_name_upgrade application, test it well and stop Cubewise App Server, rename the old app_name application to app_name_old or even move it , rename new app_name_upgrade to app_name. User may wait 30 seconds while you ~upgrading i.e. restarting Cubewise App Server.

Regards,
Eugene


#8

Hi @eugene

Understood your idea.
Do you know any way around to avoid showing error page while the service restart? (THE 30 seconds)


#9

I guess this is a question not Canvas related. This is more tomcat server related question.
that what I found in google:
http://www.avajava.com/tutorials/lessons/how-do-i-create-a-custom-error-page-for-when-tomcat-is-down-for-maintenance.html


#10

Hi @eugene

I think you are right it’s a Apache tomcat question.
I found this post as well, but i am not sure for Canvas, where can i find this http.config file?

Or as i saw on another post, i can create my own .htaccess file to config apache behavior, but where should i put it?


#11

Hi @twu,

Apache HTTP Server and Apache Tomcat are actually two separate servers. The .htaccess file is used by Apache HTTP Server and not applicable with Apache Tomcat as of the version that we are using.

As for maintenance and showing or redirecting to another page, that would normally depends on what is available on your environment and how you would like to approach it. Like if it is behind a load balancer or a web server, it can be temporarily directed to a simple server serving that maintenance announcement page.

Or If you think that you will need a longer time, i.e. 30 minutes or more, to conduct test first. You can use some lightweight HTTP server out there which temporarily will accept the requests and server them with a maintenance page announcement. You would need to change the port of the server of Canvas temporarily as two(2) servers on the same machine cannot have the same port.

Another alternative approach is to inform users before hand. You can incorporate some form of announcement corner or section on your Canvas application and use it for something else later too (i.e. start of Budgeting Cycle until MMM 20YY, Maintenance Works on MMM DD, YYYY from HH:MM to HH:MM, etc.), that is being pulled from TM1 for example.


Paul