From 0d5acfe8bc6c06ba8f84b6d511342096807516f1 Mon Sep 17 00:00:00 2001 From: Mustafa Gundogdu <103361276+mustafagundogdu80@users.noreply.github.com> Date: Thu, 20 Mar 2025 02:24:24 +0100 Subject: [PATCH 1/2] Update README.md --- README.md | 69 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index 8a73d8e..3ca50d5 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,52 @@ # Cloud_Module_Week_12 -![image](https://github.com/user-attachments/assets/0faf7cce-ca8a-4995-a692-baf3afb09fd7) +1- Create a Resource Group +![RG_Create](https://github.com/user-attachments/assets/5483ce48-dc01-4b1d-9e26-7f578c34aa74) +- I entered the resource group creation page with the menu marked in the picture above. +- On the following page, I selected the Resource Group name and region in the marked fields and created my resource group by clicking the "review and create" button + ![RG_Create02](https://github.com/user-attachments/assets/99742cb2-63ba-4653-a80b-d317b6ecae72) -## Assignment: Set Up an Azure Virtual Machine with a Free Account - -## Objective +2- Set Up a Virtual Network + - Aşağıdaki resimde görüldüğü gibi; arama alanına "Virtual" yazarak gelen listededen "Virtual Networks" seçeneğinden "Create" seçeneğini seçtim. + ![VNet01](https://github.com/user-attachments/assets/a367a346-3016-4f6c-9ac0-5c44f6831ed9) + + - Sanal ağ oluşturma sayfasında "Temel bilgiler" kısmında Kaynak grubunu seçtim ve sanal ağımın adını verdim. + ![VNet02](https://github.com/user-attachments/assets/54880b62-242a-435a-bac5-2221759d2d83) -#### Create a basic Azure infrastructure using a free Azure account. This infrastructure should include: + - Sanal ağ oluşturma sayfasında "IP Adresleri" sanal ağımın ip adres grubunu ayarladım. 10.1.0.0 / 16 + ![VNet03](https://github.com/user-attachments/assets/ac57abcd-354f-4204-8b76-d3b998c98724) -* An Azure Virtual Machine (Windows Server) -* A Public IP Address for RDP access -* A Virtual Network with a default subnet -* An Azure Disk attached to the VM -* All resources grouped under a single Resource Group + - To create a default subnet, I created a 10.1.1.0/24 subnet using the settings in the menu in the picture. + ![SubNet01](https://github.com/user-attachments/assets/16712f35-f02f-4996-a78e-83f311cc488a) -## Steps to Complete +3- Deploy a Windows Virtual Machine +- I clicked on the virtual machines tab on the home page. + ![VM01](https://github.com/user-attachments/assets/28bf47d6-dbbf-455b-bb3a-aca62b45105b) -1- Create a Resource Group -* Use the Azure Portal to create a new Resource Group. +- I selected the Azure virtual machine option under the create option shown in the picture. + ![VM02](https://github.com/user-attachments/assets/83d9abdc-69bf-4126-bac0-a6f447be1fc4) -2- Set Up a Virtual Network -* Create a Virtual Network with a default subnet. +- In the "Basic Settings" section on the incoming virtual machine creation page, I filled in the Resource group, Virtual machine name, Region, Security type, Image options as shown in the picture. + ![VM03](https://github.com/user-attachments/assets/ae0a22be-a4c0-4878-96aa-899e813fd164) -3- Deploy a Windows Virtual Machine -* Choose a free-tier eligible Windows Server. -* Assign a Public IP for RDP access. -* Place the VM in the previously created Virtual Network. +- On the "Networking" page, I selected the Virtual network, Subnet, General port as shown in the picture below. + ![VM04](https://github.com/user-attachments/assets/262b0fea-ce26-4c99-b223-fcfc007914e6) 4- Attach a Data Disk to the VM -* Add an Azure Disk to the created Virtual Machine. +- From the "Disks" section I chose Create a new disk and add it + ![Disk01](https://github.com/user-attachments/assets/65734248-8ab9-4a5c-b2db-470467075486) + +- I chose the name of the disk, the source type, its size, the share, and the maximum share amount. + ![disk02](https://github.com/user-attachments/assets/677c8527-2ecb-4565-ac78-987afdced17e) 5- Connect to the VM -* Use Remote Desktop Protocol (RDP) to connect to the VM using the public IP. - -6- Optional: Clean Up Resources -* Delete the Resource Group after completion to avoid unnecessary charges. - -## Submission Instructions - -* Create a GitHub repository named azure-vm-assignment. -* Include a brief README with a summary of your setup and screenshots. -* Share the GitHub repository link for review. +- The information about the VM I created is below. + ![VM_Last](https://github.com/user-attachments/assets/101b9f8c-c396-4783-8396-2360b60150a0) + +- The remote desktop connection image I made according to this information is below. + ![server01-rdp](https://github.com/user-attachments/assets/223f9952-940f-45ae-b199-7fde98e7af54) + +* The source group image is in the picture below. + ![RG_Topoloji](https://github.com/user-attachments/assets/a67c15d6-cccd-4c55-bc03-1b30bcf8101a) + +* The source group json files I created are also located in the repository. From a84afcb5a5b825c5f8c74971c3dfd919cf53a069 Mon Sep 17 00:00:00 2001 From: Mustafa Gundogdu <103361276+mustafagundogdu80@users.noreply.github.com> Date: Thu, 20 Mar 2025 02:26:21 +0100 Subject: [PATCH 2/2] Add files via upload --- parameters.json | 21 ++++ template.json | 323 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 344 insertions(+) create mode 100644 parameters.json create mode 100644 template.json diff --git a/parameters.json b/parameters.json new file mode 100644 index 0000000..f2e220f --- /dev/null +++ b/parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualNetworks_Week12_VN_name": { + "value": null + }, + "virtualMachines_Server01_RDP_name": { + "value": null + }, + "publicIPAddresses_Server01_RDP_ip_name": { + "value": null + }, + "networkInterfaces_server01_rdp870_z3_name": { + "value": null + }, + "networkSecurityGroups_Server01_RDP_nsg_name": { + "value": null + } + } +} \ No newline at end of file diff --git a/template.json b/template.json new file mode 100644 index 0000000..f4b0d0b --- /dev/null +++ b/template.json @@ -0,0 +1,323 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualNetworks_Week12_VN_name": { + "defaultValue": "Week12-VN", + "type": "String" + }, + "virtualMachines_Server01_RDP_name": { + "defaultValue": "Server01-RDP", + "type": "String" + }, + "publicIPAddresses_Server01_RDP_ip_name": { + "defaultValue": "Server01-RDP-ip", + "type": "String" + }, + "networkInterfaces_server01_rdp870_z3_name": { + "defaultValue": "server01-rdp870_z3", + "type": "String" + }, + "networkSecurityGroups_Server01_RDP_nsg_name": { + "defaultValue": "Server01-RDP-nsg", + "type": "String" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2024-05-01", + "name": "[parameters('networkSecurityGroups_Server01_RDP_nsg_name')]", + "location": "westeurope", + "properties": { + "securityRules": [ + { + "name": "RDP", + "id": "[resourceId('Microsoft.Network/networkSecurityGroups/securityRules', parameters('networkSecurityGroups_Server01_RDP_nsg_name'), 'RDP')]", + "type": "Microsoft.Network/networkSecurityGroups/securityRules", + "properties": { + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "3389", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 300, + "direction": "Inbound", + "sourcePortRanges": [], + "destinationPortRanges": [], + "sourceAddressPrefixes": [], + "destinationAddressPrefixes": [] + } + } + ] + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2024-05-01", + "name": "[parameters('publicIPAddresses_Server01_RDP_ip_name')]", + "location": "westeurope", + "sku": { + "name": "Standard", + "tier": "Regional" + }, + "zones": [ + "3" + ], + "properties": { + "ipAddress": "20.82.105.154", + "publicIPAddressVersion": "IPv4", + "publicIPAllocationMethod": "Static", + "idleTimeoutInMinutes": 4, + "ipTags": [] + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2024-05-01", + "name": "[parameters('virtualNetworks_Week12_VN_name')]", + "location": "westeurope", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "10.1.0.0/16" + ] + }, + "encryption": { + "enabled": false, + "enforcement": "AllowUnencrypted" + }, + "privateEndpointVNetPolicies": "Disabled", + "subnets": [ + { + "name": "default", + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_Week12_VN_name'), 'default')]", + "properties": { + "addressPrefixes": [ + "10.1.0.0/24" + ], + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + }, + { + "name": "default-subnet", + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_Week12_VN_name'), 'default-subnet')]", + "properties": { + "addressPrefixes": [ + "10.1.1.0/24" + ], + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + }, + "type": "Microsoft.Network/virtualNetworks/subnets" + } + ], + "virtualNetworkPeerings": [], + "enableDdosProtection": false + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2024-07-01", + "name": "[parameters('virtualMachines_Server01_RDP_name')]", + "location": "westeurope", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_server01_rdp870_z3_name'))]" + ], + "zones": [ + "3" + ], + "properties": { + "hardwareProfile": { + "vmSize": "Standard_D2s_v3" + }, + "additionalCapabilities": { + "hibernationEnabled": false + }, + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "2022-datacenter-azure-edition", + "version": "latest" + }, + "osDisk": { + "osType": "Windows", + "name": "[concat(parameters('virtualMachines_Server01_RDP_name'), '_disk1_a5786bd44dd74d0a950bbf7560c27d46')]", + "createOption": "FromImage", + "caching": "ReadWrite", + "managedDisk": { + "storageAccountType": "Premium_LRS", + "id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_Server01_RDP_name'), '_disk1_a5786bd44dd74d0a950bbf7560c27d46'))]" + }, + "deleteOption": "Delete", + "diskSizeGB": 127 + }, + "dataDisks": [ + { + "lun": 0, + "name": "[concat(parameters('virtualMachines_Server01_RDP_name'), '_DataDisk_0')]", + "createOption": "Attach", + "caching": "None", + "writeAcceleratorEnabled": false, + "managedDisk": { + "storageAccountType": "Premium_LRS", + "id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_Server01_RDP_name'), '_DataDisk_0'))]" + }, + "deleteOption": "Detach", + "diskSizeGB": 32, + "toBeDetached": false + } + ], + "diskControllerType": "SCSI" + }, + "osProfile": { + "computerName": "[parameters('virtualMachines_Server01_RDP_name')]", + "adminUsername": "MustafaGundogduAdmin", + "windowsConfiguration": { + "provisionVMAgent": true, + "enableAutomaticUpdates": true, + "patchSettings": { + "patchMode": "AutomaticByOS", + "assessmentMode": "ImageDefault", + "enableHotpatching": false + } + }, + "secrets": [], + "allowExtensionOperations": true, + "requireGuestProvisionSignal": true + }, + "securityProfile": { + "uefiSettings": { + "secureBootEnabled": true, + "vTpmEnabled": true + }, + "securityType": "TrustedLaunch" + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_server01_rdp870_z3_name'))]", + "properties": { + "deleteOption": "Detach" + } + } + ] + }, + "diagnosticsProfile": { + "bootDiagnostics": { + "enabled": true + } + } + } + }, + { + "type": "Microsoft.Network/networkSecurityGroups/securityRules", + "apiVersion": "2024-05-01", + "name": "[concat(parameters('networkSecurityGroups_Server01_RDP_nsg_name'), '/RDP')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_Server01_RDP_nsg_name'))]" + ], + "properties": { + "protocol": "TCP", + "sourcePortRange": "*", + "destinationPortRange": "3389", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*", + "access": "Allow", + "priority": 300, + "direction": "Inbound", + "sourcePortRanges": [], + "destinationPortRanges": [], + "sourceAddressPrefixes": [], + "destinationAddressPrefixes": [] + } + }, + { + "type": "Microsoft.Network/virtualNetworks/subnets", + "apiVersion": "2024-05-01", + "name": "[concat(parameters('virtualNetworks_Week12_VN_name'), '/default')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_Week12_VN_name'))]" + ], + "properties": { + "addressPrefixes": [ + "10.1.0.0/24" + ], + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + }, + { + "type": "Microsoft.Network/virtualNetworks/subnets", + "apiVersion": "2024-05-01", + "name": "[concat(parameters('virtualNetworks_Week12_VN_name'), '/default-subnet')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_Week12_VN_name'))]" + ], + "properties": { + "addressPrefixes": [ + "10.1.1.0/24" + ], + "delegations": [], + "privateEndpointNetworkPolicies": "Disabled", + "privateLinkServiceNetworkPolicies": "Enabled" + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2024-05-01", + "name": "[parameters('networkInterfaces_server01_rdp870_z3_name')]", + "location": "westeurope", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_Server01_RDP_ip_name'))]", + "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_Week12_VN_name'), 'default-subnet')]", + "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_Server01_RDP_nsg_name'))]" + ], + "kind": "Regular", + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "id": "[concat(resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_server01_rdp870_z3_name')), '/ipConfigurations/ipconfig1')]", + "type": "Microsoft.Network/networkInterfaces/ipConfigurations", + "properties": { + "privateIPAddress": "10.1.1.4", + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_Server01_RDP_ip_name'))]", + "properties": { + "deleteOption": "Detach" + } + }, + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_Week12_VN_name'), 'default-subnet')]" + }, + "primary": true, + "privateIPAddressVersion": "IPv4" + } + } + ], + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": false, + "disableTcpStateTracking": false, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_Server01_RDP_nsg_name'))]" + }, + "nicType": "Standard", + "auxiliaryMode": "None", + "auxiliarySku": "None" + } + } + ] +} \ No newline at end of file