We are now ready with CI/CD in our solution. All resources are now defined and implemented via arm templates, it improves the deployment process to the different environments.
We defined first our build pipeline in DevOps:
Once the build is completed, the RELEASE pipeline runs and deploys resources to our Resource Group
Iterating on the light/dark theme upload scripts TMNT IT management has added the capability to iterate over all SharePoint sites and apply the dark theme as default.
The updated script https://github.com/EivindBerge/PIZZA-TIME-ACDC-2022/blob/main/theming/site-theme-management-tmnt.ps1 is running in a scheduled Azure Run Book using PowerShell Core 7.1. SharePoint Online Credentials are as runbook credentials, which is sufficient for this scenario. Key Vault could of course be an option, or even better using a certificate – but as IT is very centralized this works for the time being.
CredentialRunbookA job well doneInverted theme applied!
We have also added more code and security scanning tools to also cover PowerShell scripts and find more general security issues.
Etter mye klabb og babb har vi endelig fått satt opp Raspberry Pie’en vår med Python, Vs code, ssh-tilkobling til git-repo og selvfølgelig et fungerende webkamera!
Ved hjelp av et lite bash-script, Azure’s egne pythonmoduler får vi lastet opp og analysert bildene innen få sekunder, med en liste over alle objekter i bildet. Etter litt testing er vi veldig imponert over presisjonen, selv om Azure insisterer på at klementin vår er et eple. Svaret sendes videre til en Power Automate flow som oppdaterer data verse.
Arbeid utført. Pull request til godkjenning
Når arbeidstempoet er såpass høyt, er det fort gjort å glemme skikkelig testing eller linting der det trengs, så før det merges inn i develop branchen, må endringene godkjennes av en av teammedlemmene. Konfigfiler og nøkler skal for eksempel ikke inn i kildekoden.
For å rulle ut kode og infrastruktur tar vi i bruk Devops pipelines og ruller ut løsningen ved hjelp av Bicep. Bicep er et DSL (domain-specific language) hvor man deklarativt kan deploye Azure-ressurser.
Vi bygger kildekoden i azure devops ved hjelp av en yaml fil som etter fullført og vellykket bygg utfører en deploy av en azure function og opprettet tilhørende infrastruktur.
Følgende infrastruktur blir opprettet
APIM
Key Vault
Azure Function
Storage
På denne måten sørger vi for at ved hver innsjekking av kode, som for eksempel en azure function, vil koden valideres, bygges og løsmningen deployes trygt.
Vi claimer ACDC Craftsman og Hipster (på grunn av at vi bruker Bicep som er forholdsvis nytt 😉 )
For å få en god start på prosjektet setter vi i Bouvet Shredders opp en Github repository og Azure Devops. Med Azure Devops kan vi jobbe på tvers av teamet på best mulig måte.
Alle som ønsker å følge med på vår progresjon er hjertelig velkommen til å ta en titt på vår Github Repository:
https://github.com/bricenocar/acdc-2022
Vi tar i mot inspill med åpne armer, så ikke vær redd for å si ifra hvis du ser noe som kan gjøres bedre måte!
TMNT love to share and have setup a public github repository at https://github.com/EivindBerge/PIZZA-TIME-ACDC-202.
First order of business is to ensure security is handled by adding a security policy, enabling security advisories on code and artifacts committed as well as some code scanning in case Michelangelo has a brain fart and publish secret information or crappy code.
And 2022 is a good year to be in as scanning modules are free of charge for the turtles to re-use 🤩
Like humans, turtles have mediocre vision. This also applies to our toxic waste turned turtles into humanoid-like beings. When technology enters their world it’s important to ensure color contrast is optimal, thus TMNT Corp mandates all tools to meet the highest accessibility grade possible.
Living in the sewer, going for a dark based scheme makes all the sense in the world.
Being inclusive is is a certainly a turtle powers, thus a light scheme is made available.
Repo in Azure DevOpsConnected to a Pipeline and ReleaseDeployes to a Azur Function App, With HTTP TriggersClient Id and Secret is stored in Key VaultHowto referance Key Valut value from ConfigurationCreated an AD Identity to talk to KeyVaultKey Vault The function App is given access to the Key VaultAnd the 2 values in the key vault
Contoso Domain
App registert for the function App to access the Contoso DomainPermissions given for the app in App RegistrationsYou need to give Admin Consent to the permissions under Enterprise Applications
API Managment
Base information about the backend this api is calling. For now there is no authorizationThe API is defined in API Managment (APIM)Setting a parameter for all endpoints, the value is stored under Named Values. The code value can be obtained from the Function App, using the Master key you can use the same Code for all functions in that app. Define the products that should be available in the APICreate a user that is given a way to access your APIHer we can see that the user Kai has been granted access to the product Family
Then we wil try to call the API
This is about it, now we have an API exposed through APIM backed by a Function App reacting on HTTPTriggers.
The function app uses the Graph API to read Groups and Members in the Contoso domain from the Slevik Vel dominan.
We are wrapping Groups and Users as Family and Family Members.
External Apps
The Family Engagement API is available for remote applications and apps that want to develop and use the family engagement platform. As an example: The family engagement web application is intend to use the API to fetch family members and calendar events from the Microsoft Graph API and statistics from The Family Graph API.
It’s important to keep branding consistent across SharePoint Sites. Family members can create travel sites and it will be provisioned with the correct colors, icons and travel lists.
We have crated a Site Script and a site design and deployed it to the SharePoint site for D365 Family Engagement Hub. When a family is planing a new vaication or travel they can create a new site that already have lists they need to plan their stay.
Site Script
First we set the script by identifying the lists with name, description and fields.
Then the final line to add the script
Add-SPOSiteScript -Title “Family Travel Site” -Content $site_script -Description “Create a list for to keep up with traveling family memebers”
The response was a site script with ID
The ID we used in the adding a site design with the site script
Add-SPOSiteDesign -Title “D365 Family Engagement Hub – Travel Site” -WebTemplate “64” -SiteScripts “1131785c-864c-4262-a3ae-b2c9664bfcb6” -Description “The travel site is for planning a trip or travel for the family”
Response
The result was a site design that we can use from the user interface or use another live of powershell to set on a site:
This script will exclude access to all users but those who are members of this specific user group (email enabled) “family Members”
Doing the Get to validate that the permissions were set.
When the users NOT in this group try to use the site design they will not see it – making it possible to family users only to access the site script and site design.