Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0fb32e8

Browse files
committed
2 parentse787ea2 +cb1812b commit0fb32e8

11 files changed

+1187
-48
lines changed

‎_config.yml‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,30 +115,35 @@ analytics:
115115
author:
116116
name:"Nicola Delfino"
117117
avatar:"/assets/images/bio-photo.jpg"
118-
bio:"I meet people, I do things for @Microsoft. My opinions and my tweets are my own, not the views of my employer and should NEVER be taken seriously."
118+
bio:"I meet people, I do things for @Microsoft :). My opinions and my tweets are my own, not the views of my employer and should NEVER be taken seriously."
119119
location:"Italy"
120120
email:"nicola.delfino@outlook.com"
121121
uri:
122122
home:# null (default), "absolute or relative url to link to author home"
123123
links:
124-
-label:"Twitter"
125-
icon:"fab fa-fw fa-twitter-square"
126-
url:"https://twitter.com/nicoltwit"
127-
-label:"Facebook"
128-
icon:"fab fa-fw fa-facebook-square"
129-
url:"https://facebook.com/nicola.delfino"
124+
-label:"Buy me a coffee"
125+
icon:"fas fa-fw fa-coffee"
126+
url:"https://www.buymeacoffee.com/nicolcoffee"
130127
-label:"GitHub"
131128
icon:"fab fa-fw fa-github"
132129
url:"https://github.com/nicolgit"
130+
-label:"Linkedin"
131+
icon:"fab fa-fw fa-linkedin"
132+
url:"https://www.linkedin.com/in/nicoladelfino"
133+
-label:"X"
134+
icon:"fab fa-fw fa-twitter"
135+
url:"https://x.com/nicoltwit"
136+
-label:"Facebook"
137+
icon:"fab fa-fw fa-facebook-square"
138+
url:"https://facebook.com/nicola.delfino"
133139
-label:"Instagram"
134140
icon:"fab fa-fw fa-instagram"
135141
url:"https://instagram.com/nicolgramm"
136142
-label:"Flickr"
137143
icon:"fab fa-fw fa-flickr"
138144
url:"https://flickr.com/photos/15216811@N06"
139-
-label:"Linkedin"
140-
icon:"fab fa-fw fa-linkedin"
141-
url:"https://www.linkedin.com/in/nicoladelfino"
145+
146+
142147
# Site Footer
143148
footer:
144149
links:
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title:"Converting JPEG Images to Animated GIF using PowerShell and FFmpeg"
3+
date:2025-08-08 10:00
4+
tags:[powershell, ffmpeg, gif, automation, image-processing]
5+
excerpt:"Learn how to create animated GIFs from a sequence of JPEG images using a PowerShell script and FFmpeg. Perfect for creating smooth animations from image sequences."
6+
7+
header:
8+
overlay_image:https://live.staticflickr.com/65535/54686926861_527ec886b1_h.jpg
9+
caption:"Photo credit: [**nicola since 1972**](https://www.flickr.com/photos/15216811@N06/54686926861)"
10+
---
11+
Creating animated GIFs from a sequence of images is a common task in digital content creation, whether you're building tutorials, showcasing animations, or creating engaging social media content. In this post, I'll walk you through a PowerShell script that automates the conversion of JPEG images to animated GIFs using FFmpeg.
12+
13+
##Prerequisites
14+
15+
You'll need FFmpeg installed on your system.
16+
17+
```
18+
winget install --id=Gyan.FFmpeg
19+
```
20+
21+
##The Complete Script
22+
23+
Here's the PowerShell script that handles the entire conversion process:
24+
25+
```powershell
26+
27+
function Convert-JpegsToGif {
28+
param(
29+
[Parameter(Mandatory = $true)]
30+
[string]$SourceDir,
31+
[Parameter(Mandatory = $true)]
32+
[string]$OutputDir,
33+
[Parameter(Mandatory = $true)]
34+
[string]$OutputFileName,
35+
[Parameter(Mandatory = $true)]
36+
[float]$FramesPerSecond
37+
)
38+
39+
$inputPattern = Join-Path $SourceDir "%02d.jpeg"
40+
$outputMp4 = Join-Path $OutputDir "$OutputFileName.mp4"
41+
$outputGif = Join-Path $OutputDir "$OutputFileName.gif"
42+
43+
ffmpeg -framerate $FramesPerSecond -i $inputPattern -c:v libvpx-vp9 -lossless 1 -vf "scale=1024:768" -y $outputMp4
44+
$palette = "palette.png"
45+
$filters = "fps=12,scale=1072:-1:flags=lanczos"
46+
ffmpeg -v warning -i $outputMp4 -vf "$filters,palettegen" -y $palette
47+
ffmpeg -v warning -i $outputMp4 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $outputGif
48+
Remove-Item $palette
49+
Remove-Item $outputMp4
50+
}
51+
52+
53+
```
54+
55+
##Usage Example
56+
57+
To use this script, ensure your JPEG files are numbered sequentially (01.jpeg, 02.jpeg, etc.) in the source directory, then call:
58+
59+
```powershell
60+
Convert-JpegsToGif -SourceDir "welcome" -OutputDir "../video" -OutputFileName "welcome" -FramesPerSecond 0.5
61+
```
62+
63+
This creates a slow-motion GIF (0.5 fps) from images in the "welcome" directory.
64+
65+
##Conclusion
66+
Whether you're creating technical documentation, social media content, or presentation materials, this script can save you significant time while ensuring consistent, high-quality results.
67+
68+
>**Pro tip**: For best results, ensure your source images have consistent dimensions and naming conventions before running the script!
69+
```

‎_posts/2021-09-21-provision-a-test-vm-webserver-on-azure.md‎

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title:How to quickly deploy a test web server on an Azure VM
3+
date:2025-06-15 10:00
4+
tags:[Azure, Virtual Machine, Portal, web server, custom script extension]
5+
---
6+
7+
For my**Labs**, I often need to create and build virtual machines.**Many virtual machines** :-). One of the most "popular" machine recently is for me the web server. The requirement for my needs is often very simple:**create a web server that responds on port 80, that is able to make me understand "what machine I’m interacting with"**, so, the ideal response message to the request*http://my-machine-ip* should be "*myMachineName*".
8+
9+
10+
#Windows machine
11+
Once the machine is created, go to Azure Portal > virtual machines >`vmname` > run command > run powershell script
12+
13+
type:
14+
15+
```powershell
16+
Install-WindowsFeature -name Web-Server -IncludeManagementTools
17+
Remove-Item -Path 'C:\inetpub\wwwroot\iisstart.htm'
18+
Add-Content -Path 'C:\inetpub\wwwroot\iisstart.htm' -Value $($env:computername)
19+
```
20+
21+
click**Run**
22+
23+
After a couple of minutes the script will be executed, and IIS will be provisioned and working.
24+
25+
![browser output](../../assets/post/2021/install-iis-output.png)
26+
27+
#Linux machine
28+
Once the machine is created, go tpo Azure Portal > virtual machines >`vmname` > run command > run linux shell script
29+
30+
type:
31+
32+
```shell
33+
sudo apt-get update
34+
sudo apt-get install -y nginx
35+
sudo rm /var/www/html/index.html
36+
echo$HOSTNAME| sudo tee /var/www/html/index.html
37+
```
38+
39+
click**Run**
40+
41+
After a couple of minutes the script will be executed, and IIS will be provisioned and working.
42+
43+
44+
45+
![browser output](../assets/post/2021/install-iis-output.png)
46+
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title:"Azure Private Endpoint Routing in Hub-and-Spoke Networks: Understanding the hidden behavior"
3+
date:2025-09-01 10:00
4+
tags:[Azure, Networking, Private Endpoint, Hub-and-Spoke, Security]
5+
excerpt:"Discover why Azure private endpoints behave unexpectedly in hub-and-spoke networks by creating implicit routes across peered VNets, and learn effective solutions to maintain centralized traffic control through Azure Firewall."
6+
7+
header:
8+
overlay_image:https://live.staticflickr.com/65535/54686926861_527ec886b1_h.jpg
9+
caption:"Photo credit: [**nicola since 1972**](https://www.flickr.com/photos/15216811@N06/54686926861)"
10+
---
11+
12+
Recently, I helped a customer understand a puzzling behavior related to a private endpoint deployed in a classic Azure hub-and-spoke network topology.
13+
14+
##TL;DR
15+
16+
The reason for the apparently anomalous behavior of private endpoints is that, although a private endpoint appears in the Azure portal as a network interface (NIC) connected to a subnet,**it's actually implemented completely differently under the hood**.
17+
18+
When Azure creates a private endpoint and attaches it to a subnet, what actually happens is that Azure creates explicit routes on all NICs connected to the VNet where the private endpoint is activated.
19+
20+
**These same routes are also added to the NICs of all virtual machines connected to networks that are peered with the one where the private endpoint is exposed.**
21+
22+
Let me walk you through the details.
23+
24+
##The Network Scenario
25+
26+
The situation is shown in the following diagram: there are 2 spoke VNets connected to a hub VNet. The hub contains an Azure Firewall configured to allow any-to-any traffic. The requirement was to avoid exposing the private endpoint externally to spoke networks, and the idea was to not attach any route table to the private endpoint subnet.
27+
28+
![schema-01](../../assets/post/2025/private-endpoint-routing/schema-01.png)
29+
30+
In this configuration, we would expect the following connectivity to the storage account:
31+
32+
##Expected vs. Actual Behavior
33+
34+
**Expected connectivity:**
35+
* spoke-01-vm HTTPS to storage-01: ❌ FAIL (missing return route)
36+
* spoke-02-vm HTTPS to storage-01: ✅ OK (same subnet)
37+
* hub-vm-01 HTTPS to storage-01: ✅ OK (direct peering exists)
38+
39+
**Actual connectivity:**
40+
* spoke-01-vm HTTPS to storage-01: ✅ OK
41+
* spoke-02-vm HTTPS to storage-01: ✅ OK
42+
* hub-vm-01 HTTPS to storage-01: ✅ OK
43+
44+
WHY ?!?!? :-)
45+
46+
##Understanding the Root Cause
47+
48+
When examining the effective routes of`hub-vm-01`, we find the following route:
49+
50+
![effective route](../../assets/post/2025/private-endpoint-routing/effective-routes.png)
51+
52+
The same route is present on the NICs of the firewall VMs as well. This means it's**as if storage-01 is connected to both spoke-02 and the hub network**.
53+
54+
![schema-02](../../assets/post/2025/private-endpoint-routing/schema-02.png)
55+
56+
###How the Traffic Actually Flows
57+
58+
When`spoke-01-vm` tries to contact the storage account:
59+
60+
1.**Outbound traffic**: Thanks to the route table on its subnet, traffic reaches the firewall and then goes directly to the private endpoint (pip-01), without passing through the peering to spoke-02
61+
2.**Return traffic**: Since the private endpoint behaves "as if" it's also connected to the hub, the response from pip-01 can reach spoke-01-vm without needing the routing table and without passing through the firewall, because it only traverses one peering instead of two.
62+
63+
![schema-03](../../assets/post/2025/private-endpoint-routing/schema-03.png)
64+
65+
##The Solution: Centralized Firewall Control
66+
67+
One effective way to solve this is:
68+
69+
1.**Add a route table to the private endpoint subnet** that redirects traffic to the firewall
70+
2.**Manage access control at the firewall level** to block or allow access to that subnet
71+
72+
![schema-04](../../assets/post/2025/private-endpoint-routing/schema-04.png)
73+
74+
>⚠️Warning⚠️: when a route table is associated with a subnet, by default it is not applied to private endpoints as well, so it's necessary to remember to enable the option Network Policy for Private Endpoints > Private endpoint network policy >`route tables` on the subnet.
75+
76+
###Why This Approach Works
77+
78+
Centralizing control at the firewall level is an approach I've seen applied in numerous contexts, and from a management perspective, it's generally a good compromise because:
79+
80+
-**Centralized security policies**: All traffic rules are managed in one place
81+
-**Consistent logging and monitoring**: All traffic flows through a single inspection point
82+
-**Simplified troubleshooting**: Network issues can be diagnosed from a central location
83+
-**Scalability**: New spokes can be added without complex routing configurations
84+
85+
##Key Takeaways
86+
87+
1.**Private endpoints create implicit routes** across all peered VNets, not just the VNet where they're deployed
88+
2.**Portal representation is misleading**: While they appear as NICs in a subnet, their routing behavior is different
89+
3.**Route tables alone aren't sufficient** for controlling private endpoint access in hub-and-spoke topologies
90+
4.**Firewall-centric control** provides better security and management capabilities
91+
92+
##Related Resources
93+
94+
For more detailed information on this specific topic, check out
95+
96+
- 🔝[Private endpoints are an illusion](https://blog.cloudtrooper.net/2025/01/20/private-link-reality-bites-private-endpoints-are-an-illusion/)
97+
-[Azure Private Link documentation](https://learn.microsoft.com/en-us/azure/private-link/)
98+
-[Hub-spoke network topology in Azure](https://learn.microsoft.com/en-us/azure/architecture/reference-architectures/hybrid-networking/hub-spoke)
99+
-[Azure Firewall in a hub-spoke network](https://learn.microsoft.com/en-us/azure/firewall/firewall-faq)
7.51 KB
Loading

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp