App Distribution Deployment
Different methods of initiating deployment:
-
When a group is added as a target, and the group is already targeted to a different App which has been previously resolved, target resolution for that app starts immediately.
-
When the group is not currently targeted and has not been previously resolved within App Distribution, target resolution will not continue against the newly targeted group until the backend targeting service does a tenant group resolve. This resolves all targeted groups in all distributions in the tenant’s apps and might take up to 24 hours depending on when the group was targeted in relation to the schedule of the backend service. The 'resolve' process determines the devices that are ultimately assigned with the apps.
-
Once the targeted group(s) in each distribution are resolved to devices, the next stage is determining the devices that receive the App. For any given app, the highest priority Distribution a device is a member of is used. This means the highest priority Distribution’s schedule and App configuration settings are used over lower priority Distribution’s settings if the device is targeted to more than one distribution of the App. Devices targeted to the Excluded Distribution of the App will not have the App installed regardless of other Distribution targeting.
This is done for all Apps and all targeted devices of each App.
-
The next stage is adding or updating each device's packages.json (policy) file as stored in cloud device, adding, or updating all targeted data, while also determining if any Apps were de-targeted (removed).
-
The next stage is setting the status records for each targeted device for each App to Pending.
-
With the packages.json files stored in the cloud, the next time the SWD Engine on the client runs, it downloads the file and runs through each App's actions as defined in the JSON file.
-
All SWD Engines in a tenant will run at the same time every 4 hours plus a 0 to 30 minute random interval added on. Each time the engine runs, it downloads the packages.json file and runs the actions of each app found within for these three cases:
-
Run-once apps that have already been successfully installed.
-
Run-once apps that have already reached the three-try limit.
-
Always-install apps whose detection rules determine that app is already installed and will not re-run the action or send any status to the cloud. For the remaining apps, the engine attempts to run the actions and their results will be sent to the cloud for viewing in Deployment Status.
-
-
Complete the steps as in Groups and/or devices added to a user-created Distribution, but with the following caveat:
If the highest-priority Distribution that the device was targeted for an app had a Scheduled time configured, the engine will not run the app’s actions, which usually includes installing the app, until the current time on the device (UTC or local, depending on the schedule’s configuration) is equal to or past the time of the scheduled time.
Run Now is a right click menu option found by clicking the three-dot menu on the right of the distribution in the distribution list. It provides immediate resolution of devices for an App.
-
Even if a group is new or is already being used in App Distribution, group resolution processing against all targeted groups in the Distribution begin immediately.
-
The target resolution begins. Only devices that are part of the targeted distribution are further processed.
-
The packages.json files are updated in cloud.
-
The pending deployment status records are created.
-
Finally, messages are sent to each device that are resolved to the Distribution to trigger the Agent to start the SWD Engine and install the app.
-
If a Schedule is configured in the Distribution, the schedule will still be enforced by the Engine, which means that the app will not be installed until after the scheduled time has been reached or passed.
The settings and schedule (if applicable) from the highest priority distribution the device is part of will be used if that device is also in the desired distribution. Thus, it is possible the settings and schedule of the desired distribution may not be used.
-
If the device is not powered on or not connected to the internet, the app will be installed the next time the engine is run on its normal schedule and the device has internet access.
On-Demand is similar to Run Now in which an action takes place immediately.
-
Only individual devices can be added to an On-demand Distribution and not groups.
-
There is effectively no difference between manually adding devices to an App’s On-demand Distribution versus doing an Install app action in the Device View. These methods add the device to the Distribution, and notify a backend App Distribution service to start processing it.
-
Once the backend service receives the message, target resolution immediately begins. The device is resolved against all Distributions to determine which Distribution is the highest priority it is assigned to.
-
The packages.json files are updated in Azure Blob Storage.
-
The Pending status records are created.
-
The messages are sent to each device to start the SWD Engine and install the app.
-
While On-demand Distributions cannot have a schedule configured for them, if the app is assigned to a higher priority Distribution that does contain a Schedule, the Engine enforces the schedule.
-
If the device is not on the network, the app will be installed the next time the engine is run on its normal schedule and the device has internet access.
Retry App Installation
Retry is similar to On-Demand, however, it is called differently from the UI.
-
Check the status of an app installation in the Deployment status screen.
-
Use the three-dot menu on the right of the specific device app row and select Retry.
Alternatively, select multiple rows and click the Retry button. -
Any updated information is included in packages.json since the last time any target resolution was run.
-
A message is sent to the SWD Engine and a new attempt to install (or reinstall) the app is performed.
-
When Neurons Assistant is configured to install an app in one of its stages, it is essentially doing the same thing as the Install app action in the Device View against the devices. This adds the devices to the specified app’s On-demand Distribution, followed by a message being sent to a backend App Distribution services to start processing.