The new app model gives us some additional options around bulk deployment. This first post explores tenant-scoped deployment. A future post will look at using PowerShell scripts.
SharePoint 2013 provides a mechanism for automating app deployment to site collections and sites. This is called a tenant-scoped app.
App deployment can be automated against several criteria:
- Deployment to named site collections
- Deployment to all sites under a particular managed path
- Deployment to all sites created from a certain site template
It works for existing sites, and newly created site collections and sites.
Note there is a limitation in using this approach, custom ribbon actions cannot be deployed. This means that the app will get deployed, and the app start page will be accessible for configuration and site management. however, the following features will not be available:
- Item and list ribbon menu actions
- Search app parts
Why is this useful?
- Combined with Lifetime Management Policies applied at the Site Collection default, you can manage content on newly created site collections and sites, without any user interaction whatsoever!!
- You can provide configuration options for existing and new sites, without exposing the ribbon actions, all content can be managed through policies
- You can constrain deployment of the app to certain URLs or site templates
- Deploy the app to large numbers of site collections and sites, only manually add the app where you require ribbon commands for manual management tasks
So, this is a very powerful solution for automating governance! Consider this approach in these types of scenarios:
- Where access to configuration options (RMOs, LMOs etc.) and site management is required, and you do not want to rely on site owners adding the app manually.
- Automatically adding the app to new sites and site collections without user intervention, whilst preventing it from unauthorised removal.
- Where manual management of items is not required, and management of content is driven through Lifetime Management Policies
Walkthrough - Example deployment steps
Here's an example, deploying the app to all sites under the managed path /sites/.
- Open a browser and navigate to the app catalog site where the HPRM Governance and Compliance app has been uploaded, then navigate to Site Contents
- Click on add an app
- Click on the HPRM Governance and Compliance app to add it
- On the app permissions dialog, click on Trust it
- Once added to the app catalog site, click on the ellipsis next to the app, and then choose Deployment
- On the Manage App Deployments - HPRM Governance and Compliance page, under the Managed Paths section, add the sites managed path
- Click on the OK button at the bottom of the page to save the deployment options
- You will be prompted in relation to app permissions again. Click on Trust it
- To test the deployment options are working, create a new sub site on an existing site collection under the /sites/ managed path. The URL is critical, as the deployment was configured to add the app for sites under this URL
- Navigate to an appropriate site collection and click on Site Contents
- Under the Subsites section, click new subsite
- Fill in the required sections. In this example I'm creating a team site called Test app Deployment. Click on OK to create the test site
- Once the new test site has been created, click on Site Contents
- If deployment is working correctly, you should see the HPRM Governance and Compliance app already added to the site. Click on the app to go to the app start page (Note this will work for newly created site collections too!)
- The app start page is displayed, you can configure options as normal
- The app will also be deployed to any existing sites under the .../sites/ path. However, bear in mind this may take up to 30 minutes to complete, so be patient.
I plan to add a short video post showing this in action, watch this space!