Thursday, January 18, 2018

Presentation - Continuous Integration with SharePoint

I presented regarding ALM with SharePoint in SharePoint Sri Lanka Forum on 10th January 2018.

26239066_10156123357012716_4941186543697729196_n

26229564_10214594227070477_8761087956115667399_n

Following is the presentation I did

Monday, January 15, 2018

Automate build and release for SharePoint Framework solution

This is the third part of the article series on how to manage SharePoint Framework solution in a team environment

  1. Configure SharePoint Framework solution with Git
  2. Integrate SharePoint Framework solution in to TFS project
  3. Automate build and release for SharePoint Framework solution

In this blog post I’ll explain how to automate build and release process for SharePoint Framework solutions. This uses ALM API which was released recently.

Configure Solution

Add following script to the root of the solution. This script will retract if previous version of the solution already exists. Then it will add the solution to App Catalog site and then to the SharePoint site that you wish your customization to be published.

Param(

[string]$username,

[string]$password

)

$packagePath = ".\release\sharepoint\solution\sp-fx-test.sppkg"

$encpassword = convertto-securestring -String $password -AsPlainText -Force

$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist $username, $encpassword

Connect-PnPOnline -Url "https://dinushaonline.sharepoint.com/sites/dev" -Credentials $cred

$appExist = Get-PnPApp | ? { $_.Title -eq 'SPFxTest' }

if ($appExist -ne $null) { 

Uninstall-PnPApp -Identity $appExist.Id

Unpublish-PnPApp -Identity $appExist.Id

Remove-PnPApp -Identity $appExist.Id

}

Add-PnPApp -Path $packagePath -Publish -Overwrite

$appAfterAdd = Get-PnPApp | ? { $_.Title -eq 'SPFxTest' }

Publish-PnPApp -Identity $appAfterAdd.id

Install-PnPApp -Identity $appAfterAdd.id

image

Configure Build

Create a new build definition in your TFS Online environment to perform continuous integration

image

image

We have to perform npm install, gulp bundle, ship and archive steps in following steps

image

image

image

image

image

image

Configure Release

Create variables for SharePoint online username and password which will be used in publishapp.ps1 script

image

image

image

image

image

image

Enable Continuous Deployment

This step will be used to automatically trigger a release as soon as a build is succeeded

image

Saturday, December 30, 2017

VPN connectivity to SharePoint server farm in Azure using OpenVPN

Recently I wanted to have a VPN connectivity to one of my SharePoint server farms hosted in Microsoft Azure. Although Microsoft Azure provides VPN gateway options, they were not suitable to this scenario.

Following are the steps I used to configure OpenVPN server

1. Provision Ubuntu VM

image 

2. Configure DNS name for the public IP

  • Select VM
  • Click on Public IP Address
  • Assign DNS address

image

3. Configure Inbound Security Rule

  • Allow UDP 1194

image

4. Connect to VM using PuTTY, update and upgrade

  • sudo su
  • apt-get update
  • apt-get upgrade

5. Install OpenVPN

  • Run following configuration script. You can get more information from this location
  • wget https://git.io/vpn -O openvpn-install.sh && sudo bash ./openvpn-install.sh

6.  Configure OpenVPN

  • IP : Provide default local IP address
  • Protocol : UDP
  • Port : 1194
  • DNS : Current system resolver
  • Specify external IP if the server is behind NAT : the DNS address we have assigned to our public IP (in step 2)

7. Download the  client.ovpn file using FileZilla

image

8. Download and configure VPN client (Windows)

image

9. Place the downloaded ovpn configuration in “C:\Program Files\OpenVPN\config” directory

image

10. Connect using OpenVPN GUI

image

image

image

Now I’m able to create a VPN connection to my SharePoint environment hosted in Azure. I can  access the environment using different platforms (Linux PC, Mobile devices, etc ..) by connecting via respective OpenVPN clients

Friday, December 15, 2017

SharePoint framework– “Syntax error: Unexpected token = ” for Yeoman SharePoint Generator

When I executed “yo @microsoft/sharepoint” to generate a SharePoint extension, I got following error message

image

Attempt - 01

First I tried to uninstall and install SharePoint Framework Yeoman generator by executing following command

npm uninstall -g generator-@microsoft/generator-sharepoint

npm install -g @microsoft/generator-sharepoint

This could not resolve the issue

Attempt - 02

Tried uninstalling and installing both Gulp and Yeoman using following commands

npm uninstall -g gulp

npm uninstall –g yeoman

npm install -g yo gulp

Still the issue persisted

Attempt – 03 (Success!!)

  • Uninstall Gulp and yeoman

npm uninstall -g gulp

npm uninstall –g yeoman

  • Uninstall NodeJs
  • Install NodeJS v6.11.5
  • Install Gulp and Yeoman

npm install -g yo gulp

  • Install Yeoman generator

npm install -g @microsoft/generator-sharepoint

That’s it.

Wednesday, November 15, 2017

SharePoint Online : “2013 experience version will be used” when creating a Site Collection

Recently one of my customers asked whether we have SharePoint 2013 or 2016 in SharePoint Online. This was due to the label “2013 experience version will be used” which is visible when creating new site collections.

It’s true that the following notification is bit confusing

image

What is the meaning of this message?

Currently a fork of SharePoint 2016 is being used in SharePoint Online. However it uses SharePoint 2013 compatibility level to avoid any compatibility issues in site templates.

How to check the current compatibility level?

Get-SPOSite -Identity https://dinushaonline.sharepoint.com/sites/dev -detailed |fl

image

How to check the currently installed SharePoint version?

Navigate to a SharePoint Online site and inspect Response Headers. 16.0.0.7514 means a SharePoint 2016 implementation

image

Conclusion

Currently we have SharePoint 2016 in SharePoint Online with SharePoint 2013 compatibility mode to avoid compatibility issues. Microsoft will gradually upgrade to SharePoint 2016 experience near future.

Wednesday, November 1, 2017

Collab365 Conference 2017 : Join my session on Single Page Applications with SharePoint

Have you heard about the virtual Collab365 Global Conference 2017 that’s streaming online November 1st – 2nd?

Join me and 120 other speakers from around the world who will be bringing you the very latest content around SharePoint, Office 365, Flow, PowerApps, Azure, OneDrive for Business and of course the increasingly popular Microsoft Teams. The event is produced by the Collab365 Community and is entirely free to attend.

Places are limited to 5000 so be quick and register now.

image

During the conference I'd love you to watch my session which is called : 'Rich single page applications with SharePoint'

There are lots of ways to develop applications on top of SharePoint. You can build full trust farm solutions, SharePoint add-ins or SharePoint framework based apps. But can we do customizations without limiting to any of these frameworks? In this session, I will explain how to build and package Single Page Applications (SPA) on top of SharePoint and embrace client-side technologies. Furthermore, I will explain how to involve continuous integration and unit testing whenever possible​

If you join me, you will learn:

  • Single Page Applications (SPA) concepts
  • AngularJS, SharePoint REST API
  • Packaging
  • Further improvements

Topic(s):

  • SharePoint

Audience :

  • Developer

Time (in UTC) :

  • Thursday, November 2 2017 2:00 PM ( 7.30PM IST)

How to attend :

  1. Register here.
  2. At the time listed above go here to watch my session. (you can also add me to your own personal planner from the agenda.
  3. Be ready to take notes!

Wednesday, October 11, 2017

Create Teams under teams managed path instead of sites path

When you create a team, your SharePoint site collection will be provisioned under “sites” managed path by default.

How to create those site collections under “teams” path. It is easy.

Navigate to SharePoint Admin Center in Office365

image

Navigate to Settings

image

Do the adjustment under Site Creation section

image