一千萬個為什麽

搜索

如何在Amazon Web Services和Azure中使用標簽



我目前正在Azure上構建解決方案(盡管問題應該與AWS相同),並且我使用 UniqueId 標記來定位和使用對象。

例如,我們有一個用於緩存應用程序Blob的存儲帳戶。存儲帳戶使用隨機名稱創建,但通過其 UniqueId = AppCache 標簽找到並呈現給應用程序。

目前我正在采取的方法是,隨著更多標簽變得有用,我將開始添加它們。

最終,我們正在尋找“ChatOps”風格解決方案。所以創建的所有東西應該是自動的

我是否應該考慮采用結構化的方法來標記標簽(以及它的外觀)還是有機方法更明智?

轉載註明原文: 如何在Amazon Web Services和Azure中使用標簽

一共有 1 個回答:

我將首先建立一個基本分類法,您可以在您的資產中使用自動化,以確保所有資源都遵循分類法。您可以選擇簡單地刪除不符合要求的資源或向負責追查和教育業主的中央團隊報告資源。

我遵循了最佳實踐的規定由微軟為Azure和亞馬遜提供:

  • Owner - normally this is a team distribution list although sometimes it is an individual if it is a "10% time" project. To make sure that the e-mail address entered is valid we run a hourly scan of our estate to detect if there are new e-mail addresses in this field then send an e-mail with an activation link, failing to activate results in deletion after three days.
  • CostCenter - the numeric cost centre, we use this to feed into the end of month reconciliation.
  • SDLCPhase - one of Development, Test, SIT, UAT, PerfTest, PreProduction, Production. We use this to define different automated behavour:
    • Development and Test: deleted overnight and at weekends to save on costs. Teams are responsible for reprovisioning using the automation in the morning.
    • SIT, UAT and PerfTest: deleted when the cost center in our finance system is closed down.
    • PreProduction: scaled down overnight and when the cost center is closed down.
    • Production: we validate that all resources deployed to the production subscription have this tag, if they don't we send out e-mails extensively.
  • DropDeadDate - for us, this is a required field for everything except Production. We run a nightly scan and send e-mails to the owner 7 days and 1 day before the DropDeadDate then delete the resource after it has passed.

在這方面的自動化方面,我傾向於使用 Janitor Monkey 和一些定制機器人是Azure函數,它們位於Slack Channels中並執行我的出價。