142 次浏览

回顾会议 Retrospective 流程化工作指南

回顾会议工作指南 (90 分钟版)

1 在会前,
1.1 查看远程/其他 Scrum 团队最近的 Retro 会议记录
1.1.1 发现其中的共性痛点
1.1.2 发现与本团队相关的表扬或改善点
1.2 查看近期 Retro 的行动项,与团队成员同步状态
1.3 查看 Retro Board,确定近期大家的反馈
1.4 与 SM 等团队关键相关方,确认本次 Retro 关注的主题、目的(设定基调)、Retro 会议类型

2 在会前准备完成,
2.1 完成定量数据的收集
2.2 召开地点、零食、画板、计时器
2.3 提前打开所需的 Scrum Board、Burndown Chart、Metrics、Bowler 等页面或文件

3 在会议开始时(3 mins)
3.1 在每一个阶段使用计时器
3.2 指定好第二主持人 / 记录员
3.3 快速地说明高效会议纪律、团队章程、回顾宣言
3.4 强调这是一个宽松、安全的时间

4 启发:展示本次迭代的所有 Epic / Story(3 mins)
4.1 跟进 Review Meeting,让大家进行短暂的回想

5 启发:开始定量分析(10 mins)
6 启发:分享其它数据(5 mins)
6.1 其他团队 Retro 的反馈
6.2 遗留的 Action Item 状态更新

7 启发:开始定性分析(10 mins)
7.1 心情曲线、Sprint 评分
7.2 建立并填充 Liked-Sad-Thanks-Sharing 板

8 团队投票,聚焦要解决的话题(Top 3 / Top 1)(10 mins)

9 发散:展开讨论(40 mins)
9.1 随时记录可能的行动项、想法、问题
9.2 通过引导式提问充分讨论:通过 5 Why、苏格拉底式提问,引导团队寻找原因
9.3 促成收敛:得出结论

10 明确高优先级行动项(5 mins)
10.1 创建相关任务或承诺提供时间

63 次浏览

Azure VM 虚拟机的系统盘占用空间过大,如何裁剪节省成本?

我们在创建 Azure 云的 VM 虚拟机时,其自带的系统盘(C:)往往占用了过大的空间,产生很多额外的开销,我们可以通过如下的 PowerShell 脚本进行空间的裁剪,以优化节约花费!

具体操作步骤,请参考: https://jrudlin.github.io/2019-08-27-shrink-azure-vm-osdisk/

Shrink Azure VM System Disk PowerShell Script:

# Variables
$DiskID = "TODO: 形式如同: /subscriptions/203bdbf0-69bd-1a12-a894-a826cf0a34c8/resourcegroups/rg-server1-prod-1/providers/Microsoft.Compute/disks/Server1-Server1"
$VMName = "TODO: Azure VM NAME VVVVVV"
$DiskSizeGB = 32
$AzSubscription = "TODO: Azure Subscription NAME SSSSSS"

# Script
# Provide your Azure admin credentials
Connect-AzAccount

#Provide the subscription Id of the subscription where snapshot is created
Select-AzSubscription -Subscription $AzSubscription

# VM to resize disk of
$VM = Get-AzVm | ? Name -eq $VMName

#Provide the name of your resource group where snapshot is created
$resourceGroupName = $VM.ResourceGroupName

# Get Disk from ID
$Disk = Get-AzDisk | ? Id -eq $DiskID

# Get VM/Disk generation from Disk
$HyperVGen = $Disk.HyperVGeneration

# Get Disk Name from Disk
$DiskName = $Disk.Name

# Get SAS URI for the Managed disk
$SAS = Grant-AzDiskAccess -ResourceGroupName $resourceGroupName -DiskName $DiskName -Access 'Read' -DurationInSecond 600000;

#Provide the managed disk name
#$managedDiskName = "yourManagedDiskName" 

#Provide Shared Access Signature (SAS) expiry duration in seconds e.g. 3600.
#$sasExpiryDuration = "3600"

#Provide storage account name where you want to copy the snapshot - the script will create a new one temporarily
$storageAccountName = "shrink" + [system.guid]::NewGuid().tostring().replace('-','').substring(1,18)

#Name of the storage container where the downloaded snapshot will be stored
$storageContainerName = $storageAccountName

#Provide the key of the storage account where you want to copy snapshot. 
#$storageAccountKey = "yourStorageAccountKey"

#Provide the name of the VHD file to which snapshot will be copied.
$destinationVHDFileName = "$($VM.StorageProfile.OsDisk.Name).vhd"

#Generate the SAS for the managed disk
#$sas = Grant-AzureRmDiskAccess -ResourceGroupName $resourceGroupName -DiskName $managedDiskName -Access Read -DurationInSecond $sasExpiryDuration

#Create the context for the storage account which will be used to copy snapshot to the storage account 
$StorageAccount = New-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName -SkuName Standard_LRS -Location $VM.Location
$destinationContext = $StorageAccount.Context
$container = New-AzStorageContainer -Name $storageContainerName -Permission Off -Context $destinationContext

#Copy the snapshot to the storage account and wait for it to complete
Start-AzStorageBlobCopy -AbsoluteUri $SAS.AccessSAS -DestContainer $storageContainerName -DestBlob $destinationVHDFileName -DestContext $destinationContext
while(($state = Get-AzStorageBlobCopyState -Context $destinationContext -Blob $destinationVHDFileName -Container $storageContainerName).Status -ne "Success") { $state; Start-Sleep -Seconds 20 }
$state

# Revoke SAS token
Revoke-AzDiskAccess -ResourceGroupName $resourceGroupName -DiskName $DiskName

# Emtpy disk to get footer from
$emptydiskforfootername = "$($VM.StorageProfile.OsDisk.Name)-empty.vhd"

# Empty disk URI
#$EmptyDiskURI = $container.CloudBlobContainer.Uri.AbsoluteUri + "/" + $emptydiskforfooter

$diskConfig = New-AzDiskConfig `
    -Location $VM.Location `
    -CreateOption Empty `
    -DiskSizeGB $DiskSizeGB `
    -HyperVGeneration $HyperVGen

$dataDisk = New-AzDisk `
    -ResourceGroupName $resourceGroupName `
    -DiskName $emptydiskforfootername `
    -Disk $diskConfig

$VM = Add-AzVMDataDisk `
    -VM $VM `
    -Name $emptydiskforfootername `
    -CreateOption Attach `
    -ManagedDiskId $dataDisk.Id `
    -Lun 63

Update-AzVM -ResourceGroupName $resourceGroupName -VM $VM

$VM | Stop-AzVM -Force


# Get SAS token for the empty disk
$SAS = Grant-AzDiskAccess -ResourceGroupName $resourceGroupName -DiskName $emptydiskforfootername -Access 'Read' -DurationInSecond 600000;

# Copy the empty disk to blob storage
Start-AzStorageBlobCopy -AbsoluteUri $SAS.AccessSAS -DestContainer $storageContainerName -DestBlob $emptydiskforfootername -DestContext $destinationContext
while(($state = Get-AzStorageBlobCopyState -Context $destinationContext -Blob $emptydiskforfootername -Container $storageContainerName).Status -ne "Success") { $state; Start-Sleep -Seconds 20 }
$state

# Revoke SAS token
Revoke-AzDiskAccess -ResourceGroupName $resourceGroupName -DiskName $emptydiskforfootername

# Remove temp empty disk
Remove-AzVMDataDisk -VM $VM -DataDiskNames $emptydiskforfootername
Update-AzVM -ResourceGroupName $resourceGroupName -VM $VM

# Delete temp disk
Remove-AzDisk -ResourceGroupName $resourceGroupName -DiskName $emptydiskforfootername -Force;

# Get the blobs
$emptyDiskblob = Get-AzStorageBlob -Context $destinationContext -Container $storageContainerName -Blob $emptydiskforfootername
$osdisk = Get-AzStorageBlob -Context $destinationContext -Container $storageContainerName -Blob $destinationVHDFileName

$footer = New-Object -TypeName byte[] -ArgumentList 512
write-output "Get footer of empty disk"

$downloaded = $emptyDiskblob.ICloudBlob.DownloadRangeToByteArray($footer, 0, $emptyDiskblob.Length - 512, 512)

$osDisk.ICloudBlob.Resize($emptyDiskblob.Length)
$footerStream = New-Object -TypeName System.IO.MemoryStream -ArgumentList (,$footer)
write-output "Write footer of empty disk to OSDisk"
$osDisk.ICloudBlob.WritePages($footerStream, $emptyDiskblob.Length - 512)

Write-Output -InputObject "Removing empty disk blobs"
$emptyDiskblob | Remove-AzStorageBlob -Force


#Provide the name of the Managed Disk
$NewDiskName = "$DiskName" + "-new"

#Create the new disk with the same SKU as the current one
$accountType = $Disk.Sku.Name

# Get the new disk URI
$vhdUri = $osdisk.ICloudBlob.Uri.AbsoluteUri

# Specify the disk options
$diskConfig = New-AzDiskConfig -AccountType $accountType -Location $VM.location -DiskSizeGB $DiskSizeGB -SourceUri $vhdUri -CreateOption Import -StorageAccountId $StorageAccount.Id -HyperVGeneration $HyperVGen

#Create Managed disk
$NewManagedDisk = New-AzDisk -DiskName $NewDiskName -Disk $diskConfig -ResourceGroupName $resourceGroupName

$VM | Stop-AzVM -Force

# Set the VM configuration to point to the new disk  
Set-AzVMOSDisk -VM $VM -ManagedDiskId $NewManagedDisk.Id -Name $NewManagedDisk.Name

# Update the VM with the new OS disk
Update-AzVM -ResourceGroupName $resourceGroupName -VM $VM

$VM | Start-AzVM

start-sleep 180
# Please check the VM is running before proceeding with the below tidy-up steps

# Delete old Managed Disk
Remove-AzDisk -ResourceGroupName $resourceGroupName -DiskName $DiskName -Force;

# Delete old blob storage
$osdisk | Remove-AzStorageBlob -Force

# Delete temp storage account
$StorageAccount | Remove-AzStorageAccount -Force
37 次浏览

低碳理念与软件研发的关系?

对于可持续性(Sustainability)、环保、低碳的概念,我们总会局限于包装、环境污染、材料等等主题。然而,其实作为软件研发或产品设计者,我们的细心思考或优化同样能够带来对于低碳理念的实际践行。

您可以参考近期由 Wunderman Thompson 发布的《2022全球百大趋势》(Topic 13,page 32)有关“碳中和网页”(Carbon-Neutral Net)的概念。根据有关电子邮件污染的报告指出,如果互联网是一个国家,那么电子邮件就是世界第六大污染源。无用邮件每年仅仅在英国就相当于产生 200 万吨的二氧化碳排放。

通过对网页/软件/逻辑设计的优化,可以显著减少站点平均每次浏览产生的二氧化碳量。许多企业正在尝试对其网站、电子邮件进行持续地改进,以减少其在线活动的碳足迹。

你可以通过这个网站,估算您当前所关心的 Website 的碳足迹。

86 次浏览

NIST 及 NSA 对于加密和摘要算法的要求

NIST 和 NSA 对于项目中使用的消息摘要、加密等算法和对应的密钥长度都有一定的要求,在此进行整理,可以作为标杆对照进行参考。

NIST 标准:NIST.SP.800-131Ar2_Transitioning the Use of Cryptographic Algorithms and Key Lengths 中规定:

AES 128、192、256 均允许
RSA ≥ 2048-bits
ECC ≥ 224-bits
SHA ≥ family 2
MAC 则不允许使用 Key < 112-bits 的实现,且应使用 SHA 算法
DES/3DES 应在 2023 年前完全禁用
MD5 和 SHA-1 禁用

NSA 的规定则是更胜一筹
NSA Cryptographic Algorithms Requires

相关参考

131 次浏览

OAuth 2.0 Implicit Grant Flow “隐式授权流” 不再被推荐!

Apple Safari 已经提供默认启用的隐私保护功能,称为智能跟踪保护 (ITP)。 ITP 会阻止“第三方”的 Cookie – 包含在跨域请求中的 Cookie。
常见的用户跟踪形式是:在后台将一个 iframe 加载到第三方站点,并使用 Cookie 在整个 Internet 中关联用户。【遗憾的是,此模式也是单页应用 (SPA) 中实现Oauth 2.0 的隐式流(Implicit Grant Flow)的标准方式】

当浏览器阻止第三方 Cookie 以阻止用户跟踪时,SPA 也会中断。【并非只有 Safari】通过阻止第三方 Cookie 来增强用户隐私保护。Brave 默认已阻止第三方 Cookie,而 Chromium(基于 Google Chrome 和 Microsoft Edge 的平台)也已宣布,在 2023 年年底停止支持第三方 Cookie。

因为上述的从浏览器中删除第三方 Cookie 的行为,隐式授权流不再是合适的身份验证方法。 如果没有第三方 Cookie,隐式流的无提示 SSO 功能将不起作用,导致应用程序在尝试获取新令牌时中断。 强烈建议你让所有新的应用程序都使用 【授权代码流(Authorization Code Flow)】,并让现有的单页应用也开始迁移到授权代码流。

这对于所有基于 SPA 开发并包含联合认证登录方式的网站,【都会产生重大影响】,需要你对项目进行重大重构和修改。

相关参考

Apple Safari 已经启用此限制,Chromium 将在 2023 年底前启用。这是一个类似于“微软将会从 Windows 中移除 IE” 一个级别的信息,请大家务必注意。

166 次浏览
137 次浏览
244 次浏览