GULP

The Future of SharePoint in AZURE/LINUX

Posted on Updated on

INTRO

Today we live in a world of of “Services”, The real deal is have focus on a Service and integrate our products. Microsoft AZURE It’s a really example of this new way of making global deals, innovate, learn and execute..

What is a “Servicizing”?

“Servicizing” is a transaction through which value is provided by a combination of products and services in which the satisfaction of customer needs is achieved either by selling the function of the product rather than the product itself, or by increasing the service component of a product offer. The concept is based on the idea that what customers want from products is not necessarily ownership, but rather the function that the product provides or the service the product can deliver. This means that the provider of “servicizing solutions” may get paid by the unit-of-service (or product function) delivered, as opposed to the (more traditional) unit-of-products sold…

Credit: Wikipedia

When Microsoft decide to open SPFx, vscode, and now SQL Server for Linux and Windows as “open source”, a light came out to me right away.

This means, in terms of  PROFICT & LOST PROJECTIONS a major step to Corporations realize that the CLOUD is Important, and have to be demystified. I remember a few years ago, I didn’t see any constructive brainstorm with “Open Source” and “Microsoft”, you simple give your opinion and 20 people reply as you were a “virus” or someone from another world.

My Azure VM is a Standard F2 (2 cores, 4 GB memory) = ~1,51€ day (8h) West Europe, so 1,51×22 = ~33,22€ month. A Corporation with 100 SP Developers = ~3,322 month based on 1 month ~90€ (Azure Calculator)

PS: Using 1 SSD 32GB + 1 HDD disk with 1TB

SCOPE

  1. Benefits of using Linux VM’s in Azure in order to improve profits, keeping in mind the future of SharePoint.
  2. Know how prepare and configure environments for SPFx,
  3. POC your SPFx WebParts.

TO DO

  1. Profits vs benefit
  2. Azure templates
  3. Linux configuration/connection
  4. SPFx WebParts on Linux, configuration and POCs

1. Profits vs benefit

  1. Mindset on Open Source Technologies (Projection of Azure VM’s – less is more) , more profit;
  2. Open Source Challenge for newly graduates, interns and students, more opportunities, more profit;
  3. Open mind Multidisciplinary Teams – more know-how, more value, more qualification, more profit.

As a consequence you can choose more assertively what’s best for your business and have more flexibility for AZURE budget.

2. Azure templates

  1. .Variety of Linux Templates (Debian, Ubuntu, RedHat, CentoOS, openSUSE, …)
  2. Open Source Tools like azure-cli the Source, and AzureRM PowerShell on Linux and Open Source, the Source

3. Linux configuration/connection

You can use azure-cli or create a VM from several templates on Microsoft AZURE

You can connect using puTTY. My opinion goes to Debian, in this case (8 Jessie) latest stable.

After Login via puTTY run the commands bellow

Bash

I’m using MATE DESKTOP and installing GParted to manage my 1 TB HDD disk

# LINUX ROOT AND ADMINS
sudo passwd root
# UBUNTU
sudo usermod -G admin spfx

# INSTALL MATE DESKTOP
sudo apt-get update
sudo apt-add-repository ppa:ubuntu-mate-dev/ppa
sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate
sudo apt-get install mate-desktop-environment-core
sudo apt-get install mate-desktop-environment
#sudo apt-get install mate-desktop-environment-extras
sudo apt-get update && sudo apt-get upgrade

# INSTALL XRDP
sudo apt-get install xrdp
sudo apt-get update 
echo mate-session >~/.xsession
sudo service xrdp restart

# INSTALL GPARTED
sudo apt-get update && sudo apt-get install gparted

LIN

NEXT STEPS

Overview of the SharePoint Framework OFFICE DEV CENTER

Overview of the SharePoint Framework GIT DOCS

SharePoint Framework client-side web part samples & tutorial materials

Code samples and developer content targeted towards SharePoint Framework client-side web parts

DROP 5 USERS (LINUX)

Error – ‘tslint’ sub task errored after 871 ms
Error in plugin ‘gulp-cache’
Message:
Cannot find module ‘./h6’
Details:
code: MODULE_NOT_FOUND

https://github.com/SharePoint/sp-dev-docs/issues/246#issuecomment-255311473

Advertisements

Cannot find module ‘./h6’ (DROP 5)

Posted on Updated on

Error - 'tslint' sub task errored after 871 ms 
 Error in plugin 'gulp-cache'
Message:
    Cannot find module './h6'
Details:
    code: MODULE_NOT_FOUND

After compile node.js #SPFx

“It seems like H6 is the only rule written in uppercase. Renaming the file to lowercase fixes the bug.”

https://github.com/SharePoint/sp-dev-docs/issues/246#issuecomment-255311473

Git Ingnore vscode for (SPFx)

Posted on Updated on

.gitignore file

# Logs
logs
*.log
npm-debug.log*

# Dependency directories
node_modules

# Build generated files
dist
lib
solution
temp
*.spapp

# Coverage directory used by tools like istanbul
coverage

# OSX
.DS_Store

# Visual Studio files
.ntvs_analysis.dat
.vs
bin
obj

# Resx Generated Code
*.resx.ts

# Styles Generated Code
*.scss.ts 

.npmignore file

# Folders
.vscode
coverage
node_modules
sharepoint
src
temp

# Files
*.csproj
.git*
.yo-rc.json
gulpfile.js
tsconfig.json

SFPx on Debian 8

Posted on Updated on

Debian 8 is a minimum consuming resources. Comparing with Ubuntu (Mate) i have allocated < 1 GB instead of 1.6 GB on MATE. This is very nice because with 12 GB of ram, i can allocate 6GB to Windows 10 on VirtualBox and 3 vCores, instead of 2.

screenshot

The real pain is configuring the environment to run npm and gulp so, here it is some tips:

 

sudo npm cache clean -f
sudo npm install -g n
sudo n stable
node -v
sudo npm rebuild node-sass

MORE FIXES

#Pnp JS Core Typings Related
sudo npm install typings -g
#Now CLONE and
sudo npm install

#INSTALL VSCODE NOW

 

CONCLUSIONS

  1. With Debian I have 65% of RAM instead of 80% in MATE;
  2. Windows 10 will not push your vCores to 100%

Read the rest of this entry »

SPFx CRUD & Populating Options

Posted on Updated on

This article will help you to create a SharePoint WebPart using the new Framework SPFx and the PnP JS Core. My first though was how populate my PropertyPaneDropdown in the Properties Panel. After some research, there is and Interface, the IPropertyPaneDropdownOption that must be imported from the preview of ‘@microsoft/sp-client-preview’ This is great because you can populate OnInit before the DOM render. The other big deal is CRUD among Typescript. SPFx is flexibly enough to use your favorite Framework, but the preferred is React. All source code is in my Repository on GitHub, if i need help somehow please, comment here or Clone my project for SPFx demos CLONE

git clone https://github.com/jtlivio/jl-spfx-project-webparts.git

INSTRUCTIONS

https://github.com/jtlivio/jl-spfx-project-webparts

DEMO

Erros after upgrade node.js version (SPFx)

Posted on Updated on

I just recently upgrade node.js on Linux for version v6.6.0, so all my #SPFx webparts stoped working, try to run the command bellow, worked for me @OfficeDev #SPFx-webparts

sudo npm rebuild node-sass

image 1

Finally

image 2