There are some common questions to ask yourself about your existing Silverstripe CMS website codebase to determine its compatibility to work correctly on Silverstripe Cloud Stacks when undertaking a migration.
Here is a list of common considerations.
What version of Silverstripe CMS does your website run?
Silverstripe Cloud supports websites using Silverstripe CMS 3.7 and upwards (please use the most recent stable security release). If your website is using a version lower than this you may need to consider an upgrade alongside your migration.
Are you using Composer to manage your addon/module dependencies?
We utilise the Composer dependency management tool as part of our deployment process. You will need to ensure your project is not storing module code directly in the project git repository. Instead, using composer generates composer.json and composer.lock files which should be committed into your project Git repository. These are meta data that reference modules to be deployed alongside your project code rather than storing them in the project.
Is your website configured using an Environment file?
You never need to know the database credentials for running Silverstripe websites on a Silverstripe Cloud Stack environment. These are pre-configured on each server using the Silverstripe CMS Environment Management technique (an environment file).
As long as your project also uses one of these environment files, rather than having database credentials stored in the mysite/_config.php file the site will correctly connect to the Stack environment database. Further configuration key/value pairs can be added on a per environment basis in Silverstripe Cloud.
Have you included the mandatory modules and meta data for Silverstripe Cloud websites?
See Required modules as there are two mandatory modules that must be included in your project via Composer. You will also need to include a Silverstripe Cloud configuration file (.platform.yml) in the root of your project code.
NOTE: Virtual stacks do not require the .platform.yml file, as the infrastructure configuration is set on the base stack.
Do you have integrations with your internal systems on your website?
In this case you may need to enquire about a VPN on your Stack to your other system’s network. Please ensure you enquire about VPN early on in your Silverstripe Cloud on-boarding if you think you require it. For security’s sake, we provision your Silverstripe Cloud Stack as a separate server cluster and must be factored in early.
Do you have any regular running tasks or scripts on your website?
If these are currently bash/shell scripts, you’ll need to convert these into Silverstripe BuildTasks and set up a CronTask configuration to trigger the CronJob to run on the Silverstripe Cloud. CronJobs are self-service and defined in your codebase using CronTask module, a cronjob is automatically setup to trigger CronTask during the creation of your stack. If you need to use other queuing systems such as the QueuedJobs module requiring additional Cronjobs, you can contact the Silverstripe Cloud Support team and they can action this for you.
There is no direct SSH access to Silverstripe Cloud servers to manually trigger scripts, it is best to either schedule these as CronTasks or trigger via the browser (By visiting http://yourwebsite/dev/tasks/).
For help with converting scripts, see Common refactoring for migrations.
Note: Due to the infrastructure setups on Silverstripe Cloud (Nginx in front of Apache webserver), tasks run through the browser may appear to timeout however will continue running if you get a white screen.
Are you using any search modules?
Silverstripe Cloud supports Solr and does require an extra server per environment to set this up (there is additional costs for these). You will need to make use of the FulltextSearch module to connect to Solr search. We have an example configuration you can adapt in our Common migration refactoring documentation.
When using search tools other than Solr (for example Elastic Search or others) you may opt to use your own external server and configure your website appropriately to connect to this. If you require any ports to be opened on your Stack environments, contact the Silverstripe Cloud Support team and they can action this for you.
Are any third parties regularly uploading content to your website via FTP or similar process?
Silverstripe Cloud does not allow direct access to the filesystem via SFTP/FTP. In this case you may need to refactor your application with some form of upload feature or work out an alternative way for this content to be added by the third party.