This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# on se connecte à Azure | |
az login | |
# on définit le nom de l’application dans une variable | |
webappname=angledcli | |
# on se positionne sur le répertoire ‘dist’ de notre application: | |
cd /Users/belrarr/Desktop/code/angledcli/dist/angledcli | |
# on déploie l’application | |
az webapp up --location canadaeast --name $webappname | |
# on navigue vers l’application déployée |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# on crée l’application Angular | |
ng new angledcli | |
# on navigue dans le dossier qui vient d’être créé et qui contient le code de l’application | |
cd angledcli | |
# on met à jour Angular et Angular CLI | |
ng update @angular/cli @angular/core | |
# on installe les dépendances du projet | |
npm install | |
# on compile | |
ng b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mettre à jour Azure CLI | |
sudo chown -R $(whoami) /usr/local/share/man/man7 | |
brew update && brew upgrade azure-cli |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# créer l'application asp.net core | |
dotnet new mvc -o core2azure | |
# restaurer les paquets nuget | |
dotnet restore | |
# exécuter l'application en local | |
dotnet run |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
az group create --name core2azure_RG --location canadaeast | |
az appservice plan create --name core2azure_SP --location canadaeast --sku F1 --resource-group core2azure_RG | |
az webapp create --name core2azureweb --resource-group core2azure_RG --plan core2azure_SP --runtime "aspnet|v4.7" | |
az webapp browse --name core2azureweb --resource-group core2azure_RG | |
# http://core2azureweb.azurewebsites.net |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# initialiser le repo Git local | |
git init | |
# ajouter tous les fichiers de l'application .net core | |
git add -A | |
# archiver le code | |
git commit -m "archivage initial" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
gitdirectory="/Users/belrarr/Desktop/core2azure" | |
username=tidjani | |
password=core2azure! | |
webappname=core2azureweb | |
# Depuis VS Code, il faut faire un 'device login' en tapant: | |
az login |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Arrêter une VM Azure via un Runbook invoqué par Webhook</title> | |
</head> | |
<body> | |
<h1>Cliques sur le lien pour invoquer le Webhook qui arrêtera la VM:</h1> | |
<form action="https://s10events.azure-automation.net/webhooks?token=<TOKEN_DE_TON_WEBHOOK>" method="post"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[string]$NomVM, | |
[string]$NomGroupeRessources | |
) | |
# Authentification avec le compte de service Azure Run As | |
$Conn = Get-AutomationConnection -Name AzureRunAsConnection | |
Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID ` | |
-ApplicationID $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[string]$NomVM, | |
[string]$NomGroupeRessources | |
) | |
# Authentification avec le compte de service Azure Run As | |
$Conn = Get-AutomationConnection -Name AzureRunAsConnection | |
Add-AzureRMAccount -ServicePrincipal -Tenant $Conn.TenantID ` | |
-ApplicationID $Conn.ApplicationID -CertificateThumbprint $Conn.CertificateThumbprint | |