Comment on page
Deploy your apps and services to test, staging and production. View the deploy history, and manage solution snapshots.
Appfarm Create has one-click deploy, so that you can push your apps and services to Production with one click of the big blue button. Deploys to the Development environment are instant and the Appfarm Client will hot reload by default. You can also revert deployed changes through the use of snapshots and rollback.
The Deploy view in Appfarm Create
Up to four deployment environments are available. The environments available in your solution depend on your subscription tier. Deploys are sequential across environments, so you will need to deploy to Test and Staging (if they are active in your solution) before you can deploy to Production. The environments are:
- The Staging environment uses the Production database. Any changes made to data in staging will be reflected in Production.
If there are changes to be deployed from one environment to the next, the Big blue button will be active. Click this button to open the Deploy dialog.
In the Deploy dialog you can select when you'd like to run your deploy:
- In 15 minutes
- At midnight (CET)
- Other (select a specific time)
Additionally you can provide a comment that will be shown to users with an app open, before and after the deploy. This is specified in the Custom deploy message to users. By toggling the switch Show user avatar and name with deploy message, you give the deploy message a more personal touch.
When deploying to Production, you may want to write down the key highlights inside the Internal deploy note, for tracking purposes.
Occasionally Appfarm Create will deploy a new version of the Appfarm Client alongside your deploy. This process takes just a couple of minutes and ensures your environments receive the latest features and bug fixes. If a new version will be deployed, it will be noted in the deploy dialog.
If the deploy button is disabled, there are no changes to deploy.
If you have undeployed changes in Development you can view a list of what has changed. Click Change Details to see an overview of:
- New apps and services
- New and changed actions, data sources and views by app/service
- New and changed themes and schedules
- New and changed enums and object classes
- Number of deleted apps and services
- Number of deleted actions, data sources, and views
- Number of deleted themes and schedules
- Number of deleted enums and object classes
When there is something to Deploy, you may see
Appfarm Create is upgraded with new releases many times a year. Sometimes the releases are patched as well, resulting in minor upgrades.
Appfarm is responsible for thorough testing of new versions before Appfarm Create is upgraded, but when such upgrades has been done - this will affect the next deployment for all solutions: See screenshot below.
In the example above, Appfarm Create has been upgraded to Appfarm Version 22-4-33. When Appfarm Create has been upgraded, so has your Develop environment (the client). The Test and Production environments, however, are still on version 22-4-32. The next deployment from Dev to Test will automatically upgrade Test environment to 22-4-33 as well.
Appfarm Upgrades are mandatory and cannot be removed from the Deploy. The reason is that they may contain important bug fixes, or new Appfarm features that require new Appfarm code.
Note that such upgrades of the Test or Production environment are only experienced as an information dialog followed by a refresh for the end user. But we recommend to schedule such deploys to midnight.
A snapshot is a copy of your solution model at a point in time. Your solution model contains the definition of your global data model, apps, services, and other solution-specific metadata generated from Appfarm Create.
A snapshot does not contain any data from the database, such as objects you create and persist via data sources. It contains only the definition of your solution in Appfarm Create.
You can take a snapshot of model currently in Development at any time by clicking + next to Snapshots. Snapshots should be used as a regular part of your development process to protect against unintended changes and avoid data loss. It is often a good idea to take a snapshot before beginning on large scale or destructive changes.
To rollback your model to a previous snapshot, open the three-dot menu for the snapshot you wish to use and select Apply Snapshot to Develop.
Automatic snapshots is enabled in most Solutions. These will be taken roughly every 5-20 minutes when there is activity and changes made in the solution. A systematic clean-up is performed in order to spread out the snapshots so that there is more time between the stored snapshots the further back in time you go. If you do not have Automatic snapshots enabled, please contact [email protected].
Rollback to a snapshot means to restore the solution (Apps, Service, Global Data Model) in Develop back to a previous state. This may be used for disaster recovery if you delete or break a part of your application, or to perform a controlled rollback if you have been experiencing with a feature and would like to roll everything back. Note that only the solution (everything created in Appfarm Create) will be rolled back - not the application data.
You may rollback to both manual and automatic snapshots.
Rollback to a manual snapshot:
Rollback to an automatic snapshot:
Combining rollback to snapshot with the Copy to clipboard feature will also allow you to rollback a view etc. to a previous state:
- 1.Take a new manual snapshot (give it a proper name)
- 2.Rollback to a previous snapshot. Refresh Appfarm Create.
- 3.Locate the View, right-click and Copy to clipboard
- 4.Rollback to the manual snapshot created in 1). Refresh Appfarm Create.
- 5.Paste the View into your App.
As you deploy across environments, a deploy history is generated. This provides a record of who made the deploy, the solution model version deployed, and when the deploy occurred. If you run into issues on a new deploy, you can easily rollback to a previous deploy listed in the history. To do so, open the three-dot menu for the deploy you wish to rollback to and select Rollback to this version.