Global Azure BootCamp 2018 !

Salut!

Le samedi 21 Avril aura lieu le Global Azure BootCamp 2018 ! Si vous n’êtes pas encore inscrit à la sixième édition du GABC Québec, je vous invite à consulter ce lien.

Samedi 21 avril 2018 à 08:30 – 16:30

École nationale d’administration publique
555, boulevard Charest Est
Québec City, QC G1K 9E5, Canada

AM Keynote- #1 Azure Update and RoadMap
Keynote- #2 Azure et l’Open Source
 11h45 à
13h00
Diner et Kiosques MVPs
PM Azure monitoring ( Edgenda ) Notions d’architectureinfonuagique
appliquées pour Azure (cofomo)
Azure IOT solution (DimOnOff)
Cloud Governance and onboarding (Microsoft) Azure dans le secteur manufacturier (CGI) Remplacement de SecurID par Azure MFA (Victrix)
Azure Stack et Stratégie Hyper-Convergence (Microsoft) Démo container et DevOps (MVP) Intelligence Artificielle avec Azure Cognitive Services et Bot Service (Hinault Donfack-MVP)
Kiosques MVPs et VR

Cette année, j’aurai le plaisir de donner une conférence avec Julien Maitrehenry sur les containers dans Azure.

Nous aurons également un stand : « Ask The Expert ». Je vous invite à passer nous voir, nous avons une série de goodies pour vous!

Au plaisir de vous croiser.

Serial Console dans vos VMs Azure

Salut!

Aujourd’hui, je tenais à vous présenter un nouvelle fonctionnalité que je trouve vraiment pratique : « Serial Console » dans Azure.

Plus concrètement, vous récupérez un accès console à vos machines depuis le portail Azure. Désormais, vous n’avez plus besoin de passer par « Boot diagnostics » pour regarder les logs de démarrage : vous bénéficiez d’une connexion via le port série de la vm directement depuis le portail Azure.

Principaux scénarios d’utilisation:

Scenario Actions in Serial Console OS Applicability
Broken FSTAB file Enter key to continue and fix fstab file using a text editor Linux
Incorrect firewall rules Access Serial Console and fix iptables or Windows firewall rules Linux/Windows
Filesystem corruption/check Access Serial Console and recover filesystem Linux/Windows
SSH/RDP configuration issues Access Serial Console and change settings Linux/Windows
Network lock down system Access Serial Console via portal to manage system Linux/Windows
Interacting with bootloader Access GRUB/BCD via serial console Linux/Windows

Activer le serial console sous Windows:

Par défaut, les images Windows Azure n’ont pas le Special Administrative Console (SAC) activé.

Étape 1: Se connecter sur la machine en RDP

Étape 2: Depuis une invite de commande (Administrateur) :

PS C:\Users\maxime> bcdedit /ems on
The operation completed successfully.
PS C:\Users\maxime> bcdedit /emssettings EMSPORT:1 EMSBAUDRATE:115200
The operation completed successfully.

Étape 3: Redémarrer le système pour activer SAC.

Note: pour les OS Ubuntu, CentOS et Oracle Linux, le serial console est activé par défaut.

Documentation : https://github.com/Microsoft/azserialconsole/blob/master/Azure-virtual-machine-serial-console.md 

Virtual Machine Serial Console: https://azure.microsoft.com/en-us/blog/virtual-machine-serial-console-access/

Azure AKS avec Terraform

Salut!

Aujourd’hui nous allons voir ensemble comment nous pouvons automatiser le déploiement de notre cluster AKS avec Terraform.

Je vous invite à lire l’article que j’avais pu écrire il y a quelques mois : Automatiser votre infrastructure Azure avec Terraform.

resource "azurerm_resource_group" "demok8s" {
 name = "k8sterraform"
 location = "East US" (Attention! Seules certaines régions sont pour le moment disponibles: East US, West Europe, Central US, Canada Central and Canada East.)
}

resource "azurerm_kubernetes_cluster" "demok8s" {
 name = "k8sterraform"
 location = "${azurerm_resource_group.demok8s.location}"
 resource_group_name = "${azurerm_resource_group.demok8s.name}"
 kubernetes_version = "1.8.2"
 dns_prefix = "k8sterraform"

linux_profile {
 admin_username = "acctestuser1"

ssh_key {
 key_data = "ssh-rsa AAAABCDE"
 }
 }

agent_pool_profile {
 name = "default"
 count = 1
 vm_size = "Standard_A0"
 os_type = "Linux"
 }

service_principal {
 client_id = "Client_Id_A_Remplacer"
 client_secret = "SP_Secret_A_Remplacer"
 }

tags {
 Environment = "Demo"
 }
}
maxime@Azure:~/aks-terrform$ terraform init

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.azurerm: version = "~> 1.1"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
maxime@Azure:~/aks-terrform$ terraform plan
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.


------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
 + create

Terraform will perform the following actions:

+ azurerm_kubernetes_cluster.demok8s
 id: <computed>
 agent_pool_profile.#: "1"
 agent_pool_profile.0.count: "1"
 agent_pool_profile.0.dns_prefix: <computed>
 agent_pool_profile.0.fqdn: <computed>
 agent_pool_profile.0.name: "default"
 agent_pool_profile.0.os_type: "Linux"
 agent_pool_profile.0.vm_size: "Standard_A0"
 dns_prefix: "k8sterraform"
 kubernetes_version: "1.8.2"
 linux_profile.#: "1"
 linux_profile.0.admin_username: "acctestuser1"
 linux_profile.0.ssh_key.#: "1"
 linux_profile.0.ssh_key.0.key_data: "ssh-rsa AAAABCDEF"
 location: "eastus"
 name: "k8sterraform"
 resource_group_name: "k8sterraform"
 service_principal.#: "1"
 service_principal.2388863275.client_id: "0c1484fa-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
 service_principal.2388863275.client_secret: <sensitive>
 tags.%: "1"
 tags.Environment: "Demo"

+ azurerm_resource_group.demok8s
 id: <computed>
 location: "eastus"
 name: "k8sterraform"
 tags.%: <computed>


Plan: 2 to add, 0 to change, 0 to destroy.

------------------------------------------------------------------------

Note: You didn't specify an "-out" parameter to save this plan, so Terraform
can't guarantee that exactly these actions will be performed if
"terraform apply" is subsequently run.
maxime@Azure:~/aks-terrform$ terraform apply

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
 + create

Terraform will perform the following actions:

+ azurerm_kubernetes_cluster.demok8s
 id: <computed>
 agent_pool_profile.#: "1"
 agent_pool_profile.0.count: "1"
 agent_pool_profile.0.dns_prefix: <computed>
 agent_pool_profile.0.fqdn: <computed>
 agent_pool_profile.0.name: "default"
 agent_pool_profile.0.os_type: "Linux"
 agent_pool_profile.0.vm_size: "Standard_A0"
 dns_prefix: "k8sterraform"
 kubernetes_version: "1.8.2"
 linux_profile.#: "1"
 linux_profile.0.admin_username: "acctestuser1"
 linux_profile.0.ssh_key.#: "1"
 linux_profile.0.ssh_key.0.key_data: "ssh-rsa AAAABCD"
 location: "eastus"
 name: "k8sterraform"
 resource_group_name: "k8sterraform"
 service_principal.#: "1"
 service_principal.2388863275.client_id: "0c1484fa-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
 service_principal.2388863275.client_secret: <sensitive>
 tags.%: "1"
 tags.Environment: "Demo"

+ azurerm_resource_group.demok8s
 id: <computed>
 location: "eastus"
 name: "k8sterraform"
 tags.%: <computed>


Plan: 2 to add, 0 to change, 0 to destroy.

Do you want to perform these actions?
 Terraform will perform the actions described above.
 Only 'yes' will be accepted to approve.

Enter a value: yes

azurerm_resource_group.demok8s: Creating...
 location: "" => "eastus"
 name: "" => "k8sterraform"
 tags.%: "" => "<computed>"
azurerm_resource_group.demok8s: Creation complete after 0s (ID: /subscriptions/7db5e03c-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/k8sterraform)
azurerm_kubernetes_cluster.demok8s: Creating...
 agent_pool_profile.#: "" => "1"
 agent_pool_profile.0.count: "" => "1"
 agent_pool_profile.0.dns_prefix: "" => "<computed>"
 agent_pool_profile.0.fqdn: "" => "<computed>"
 agent_pool_profile.0.name: "" => "default"
 agent_pool_profile.0.os_type: "" => "Linux"
 agent_pool_profile.0.vm_size: "" => "Standard_A0"
 dns_prefix: "" => "k8sterraform"
 kubernetes_version: "" => "1.8.2"
 linux_profile.#: "" => "1"
 linux_profile.0.admin_username: "" => "acctestuser1"
 linux_profile.0.ssh_key.#: "" => "1"
 linux_profile.0.ssh_key.0.key_data: "" => "ssh-rsa AAAABCDE"
 location: "" => "eastus"
 name: "" => "k8sterraform"
 resource_group_name: "" => "k8sterraform"
 service_principal.#: "" => "1"
 service_principal.2388863275.client_id: "" => "0c1484fa-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
 service_principal.2388863275.client_secret: "<sensitive>" => "<sensitive>"
 tags.%: "" => "1"
 tags.Environment: "" => "Demo"
azurerm_kubernetes_cluster.demok8s: Still creating... (10s elapsed)
azurerm_kubernetes_cluster.demok8s: Still creating... (20s elapsed)
azurerm_kubernetes_cluster.demok8s: Still creating... (30s elapsed)
...
azurerm_kubernetes_cluster.demok8s: Still creating... (9m0s elapsed)
azurerm_kubernetes_cluster.demok8s: Creation complete after 9m4s (ID: /subscriptions/7db5e03c-xxxx-xxxx-xxxx-...erService/managedClusters/k8sterraform)

Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

Documentation: https://www.terraform.io/docs/providers/azurerm/r/kubernetes_cluster.html