hanghoavacongluan.vn
  • Trang chủ
  • Thời sự
  • Kinh doanh
    • Doanh nghiệp
    • Chứng khoán
    • Ngân hàng
    • Nhà đất
  • Thị trường
    • Năng lượng
    • Nguyên liệu
    • Nông sản
    • Vàng
    • Hàng thật – hàng giả
  • Đời sống
    • Ẩm thực
    • Du lịch
    • Giải trí
    • Làm đẹp
  • Sức khoẻ
  • Tiêu dùng
  • Công nghệ
  • Ô tô – Xe máy
  • Trang chủ
  • Thời sự
  • Kinh doanh
    • Doanh nghiệp
    • Chứng khoán
    • Ngân hàng
    • Nhà đất
  • Thị trường
    • Năng lượng
    • Nguyên liệu
    • Nông sản
    • Vàng
    • Hàng thật – hàng giả
  • Đời sống
    • Ẩm thực
    • Du lịch
    • Giải trí
    • Làm đẹp
  • Sức khoẻ
  • Tiêu dùng
  • Công nghệ
  • Ô tô – Xe máy
No Result
View All Result
hanghoavacongluan.vn
No Result
View All Result
Home Đời sống

How to keep Azure subscriptions clean | Azure Tips and Tricks

3 years ago
in Đời sống
How to keep Azure subscriptions clean | Azure Tips and Tricks

[MUSIC].

LIÊN QUAN

Làm thế nào để chọn một trang web cá cược phù hợp?

4 Lời khuyên để giành chiến thắng khi cá cược bóng đá

Xu hướng chơi game casino online, Tại sao? Lợi ích

>> One thing that Ithought was interesting here was going back tocleaning up resources.

If I look back at myresource group here, you'll find I will do a lot ofthings like start something, sometimes I'll put a test, or here's another example, I hope you-all can see that, but it's called “deleteMe.

” This was one where I wasjust playing around.

This one is taking acouple of runbooks, and then there's anautomation account.

So it really isn't costing me very much money to run this resource, but let's just say that Idid this before, sorry.

Azure.

I spun up one of these Azure, how is that pronounced? Hadoop? >> Hadoop.

>> Hadoop? >> Yeah.

>> I've spun up one of these fora research that I was looking at, and I left it running for two days.

Really, it was two days, and I was like, “Oh, crap.

I left that running.

” I had ran up a veryexpensive dual for two days.

So that is where I got into the point of always cleaning upthese resource groups.

I detailed this a coupleof different ways.

One of the things that I'mstarting to do is that, whenever I spin up one ofthese resource groups, there is this optionhere, that is “Tags.

” You can just think of these askey-value pairs of information.

For example, if you are goingto take a resource group, and let's say you've gottwo billing departments.

You've got your [inaudible]Tech Billing Department, and then you've got, let'sjust pretend there's an Accounting Team's Department.

Sometimes you may wantto split out the cost, and you want to say, “We will tag this oneto be for accounting.

This one will be for tech.

” People use these tags fora ton of different things.

I've done a coupleof tips and tricks, here's some examplesof what to use when.

One of the things that I foundthat was important here, and I do have an article that I'll probably bringup in just a second, but I would do something like here, inside of the “Name, ” I woulduse something like “expires.

” So I just start typing”ex, ” and so you can see this is oneof the default names, so it's “expiresOn” because a lot of people have been buildingadd-ons for this, and so with the “expiresOn”, there is typically a format, and so if I knew I'm only goingto need it for a day or two, then I would come in here and Iwould do something like “2020-04”, say I need it for these dates.

Then I could come over and Icould hit this “Save” button, and then once I hit “Save”down here at the bottom, we got this “expiresOn.

” Then from there, obviously I've got this one tag, everything is great, but then we need a way to automate that cleanup becauseeven tweets and stuff, I always forget, butI know if I automate, then I won't forget.

So there was a coupleof ways to do this, and so I usually post some of the things that I learnover on the “dev.

to”.

So this was a post that I made.

This was early March ofthis year, actually.

Again, it's more along thelines of I put this together because this issomething that I wanted, and so I'll show you a very quick version of whatI was thinking of doing, and then I'll show youa couple of other ones, and then I'll also give abig shout out here to yet another Cloud DeveloperAdvocate, Frank Boucher.

So inside of mine, I do the same thing, where I set tags.

I use this “expireOn”.

So one of the things that Iused was I used a PowerShell.

So I had Taylor from thePowerShell team on last week.

Anyway, he knows I enjoyworking with PowerShell, and I found this scriptwas already created.

So this script, here'sthe connection name, and we'll go into Azure Automation, which is what I was using for this.

There's many other ways to do that.

But long story short, it connects up to my account, and then from there, if it's not there, then it gives [inaudible]out an exception message.

But then where it actually startsto do the magic is right here, where it searches throughAzGraph or where the date, the time is tags.

expireOn, and then does a comparison betweenthe current date and then it runs “Azure-AZResource, ” andso if you work with the CLR, you work with other automation waves, it's fairly easy to go in and use PowerShell or usewhatever you want.

Azure CLR, your various languages, and then it willdelete that resource.

A couple of the otherthings that's in here is, that I've used personally, Azure Automation.

I found Azure Automationgives you, I think, up to 100 runs per monthfor completely free, and that for my use, again, in this instance, I'm justan individual using it, so it'd be totally differentif you've got a bowl of 1, 000 people maybe inyour subscription ID, but I set up an AzureAutomation account, and then down in here, you couldstart using things like runbooks.

So with runbooks and PowerShell, they link into it.

I set it to create a scheduleand the start date of 07:00 AM, and then to recur every one day, and then I actually had arunbook that was completed.

This using runbook and PowerShell, I can clean this up everysingle day.

It's not in here.

I thought there was a comment, and then somewhere else, somebody asked me about the cost of Azure Automation becauseI thought it was funny.

So you're trying to save money, yet we're spinning out new resources, and so Frank, shoutout to Frank there, he also has put together something that I found extremelyuseful as well, and that is he also automatically deletes the useless resourcesin your subscription group.

So in this project, Frank is using Azure Functions.

He also has this really nice”Deploy to Azure” button, where this is in the “Serverless Library, ” and so youcan click on this and you can deploy it veryquickly to where you're at.

So his solution waswith Azure Functions, and then this is the solutionthat I had with Azure Automation.

So you can go into this, but what this does is by default it gets triggeredevery morning at 05:00 AM and it searches for theseresources with expireOn, which I'm really thankful thatthe team has went ahead and put that as a tag where you don't have toeven type that in anymore.

It's just there as you start.

Once all the expiredresources are deleted, it searches for the emptyresource groups as well.

Now, I've never done a comparison on the charge for anempty resource group, so that could be interestingif there is that.

There's a couple ofinformation here in regards to the same name, the value.

This is a variation ofa PowerShell script.

But I did want to at least mentionthis option as well because with Azure Functions you also get a certain amount ofcompute time per month.

But that's just another way.

What would be interesting, in my opinion, would be to run both ofthese for a month or two, and see that the Azure Automation with runbooks or the Azure Functions, which one costs the most money.

I still think thatwould be [inaudible].

>> Yeah.

It's fine, I was just was lookingat the picture.

He looks really trainedon that picture, and I don't know if heis really that trained, but on that one, helooks really worked out.

You're actually right.

The wholeAzure Automation part, and again, as you said, the question thatgets how much does it cost? As you said, the first couple ofminutes every month for free, and so you don't end up in a huge amount of cost if youuse Azure Automation at all.

I like it as well.

I use it in my subscriptionsto do similar things, and I think for a long time, it was basically the only way alsoto automate shutdowns of VMs.

I think nowadays this is anative feature in Azure, but for a long time, we had these shutdown runbooks, which basically went out andshut down the resources, and then also next day probably started the Resources automatically.

>> Yeah, exactly.

I've beenin a lot of different worlds.

I've been a Linux user fora long time, a Mac user, and I actually worked onWindows and was one of the people that got the Ship Itawards for shipping Windows 10, but I still love my Bash, and I know you can getWSL and everything, I've been using it in mystream too for Windows, but I just love thosetypes of environments.

So what I did before allof that functionality existed was that I created aCRON job on all my Linux VM in Azure to shut down itself every day at a certaintime in order to do that, and now you can do that automatically in serial on access and more.

I run a PowerShell AzureFunction collecting my weather data every five minutesand it cost five bucks a month.

Wow, that's amazing.

That's really a nice thing.

I didn't even know because Idid not have a clue with that.

So I run a few of those, I mean, not in my account.

I've got a bunch ofdifferent functions.

It's running this wayfor a period of time.

[MUSIC] >> I believe we're just aboutout of time for the day today.

.

Related Posts

Làm thế nào để chọn một trang web cá cược phù hợp?

Làm thế nào để chọn một trang web cá cược phù hợp?

by Hàng hoá và công luận
December 14, 2021
0
0

Nếu bạn đang tìm kiếm một nhà cái đáng tin cậy tại Việt Nam để xem tỷ lệ kèo Ngoại...

4 Lời khuyên để giành chiến thắng khi cá cược bóng đá

4 Lời khuyên để giành chiến thắng khi cá cược bóng đá

by Hàng hoá và công luận
December 21, 2021
0
0

Tất cả những ai đã từng tham gia cá cược bóng đá chắc chắn đều mơ tưởng về việc cá...

Xu hướng chơi game casino online, Tại sao? Lợi ích

by Hàng hoá và công luận
April 12, 2021
0
0

Ở thời đại công nghệ 4.0 lên ngôi như hiện nay, việc chơi game casino online đang dần trở thành...

Hướng dẫn cách chơi Poker tại 12Bet

by Hàng hoá và công luận
November 12, 2020
0
0

Poker là game online được xếp vào Top 10 trò chơi online đình đám nhất năm 2020 có thể kiếm...

RUPRISE S12E06 – WELCYUM TO SNATCH GAME

RUPRISE S12E06 – WELCYUM TO SNATCH GAME

by
August 25, 2020
0
0

don't let me in the bottom no but uh how did you feel about being towards the bottom but I...

Next Post
What Parental Burnout Looks Like (and How to Avoid It)

What Parental Burnout Looks Like (and How to Avoid It)

How to Survive Social Isolation

How to Survive Social Isolation

RECOMMENDED

Dự đoán kết quả bóng đá cho các trận đấu EPL sắp tới

Dự đoán kết quả bóng đá cho các trận đấu EPL sắp tới

January 4, 2022
0
Làm thế nào để chọn một trang web cá cược phù hợp?

Làm thế nào để chọn một trang web cá cược phù hợp?

December 14, 2021
0

HIỆP HỘI CHỐNG HÀNG GIẢ VÀ BẢO VỆ THƯƠNG HIỆU VIỆT NAMTRUNG TÂM TƯ VẤN, HỖ TRỢ DOANH NGHIỆP VÀ PHÁT TRIỂN THƯƠNG HIỆU (GBC) Giấy phép số 131/GP - TTDT, Cục Phát thanh truyền hình và Thông tin điện tử - Bộ Thông tin và Truyền thông cấp ngày 8/9/2015 Văn phòng Hà Nội: số 930, đường Trương Định, phường Giáp Bát, quận Hoàng Mai, Hà Nội Văn phòng đại diện tại Hải Phòng: Số 3 Lê Thánh Tông - Quận Ngô Quyền - Tp Hải Phòng. Điện thoại: 024.6260.1324 - 098 111 5848- 0904 658575Email: trungtamgbc@gmail.com Độc giả có thể gửi bài viết qua email: hanghoavacongluan.vn@gmail.com© Ghi rõ nguồn "Hàng hóa và Công luận" khi phát hành lại thông tin từ Website này. (Mọi thông tin lấy từ hanghoavacongluan.vn phải ghi rõ nguồn cấp)

CATEGORY

  • Ẩm thực
  • Chứng khoán
  • Công nghệ
  • Doanh nghiệp
  • Du lịch
  • Đời sống
  • Giải trí
  • Hàng thật – hàng giả
  • Kinh doanh
  • Làm đẹp
  • Ngân hàng
  • Nhà đất
  • Nông sản
  • Ô tô – Xe máy
  • Sức khoẻ
  • Thị trường
  • Thời sự
  • Tiêu dùng
  • Vàng

Đối tác liên kết

Foot.vn - Review giày


Nhiet.vn - Đánh giá sản phẩm

© 2020 Hanghoavacongluan.vn -Trung Tâm Tư Vấn, Hỗ Trợ Doanh Nghiệp Và Phát Triển Thương Hiệu (GBC)

No Result
View All Result
  • Doanh nghiệp
  • Nguyên liệu
  • Chứng khoán
  • Đời sống
  • Ngân hàng
  • Vàng
  • Thị trường
  • Hàng thật – hàng giả
  • Công nghệ
  • Nông sản
  • Food

© 2020 Hanghoavacongluan.vn -Trung Tâm Tư Vấn, Hỗ Trợ Doanh Nghiệp Và Phát Triển Thương Hiệu (GBC)