Skip to content

Commit 15ce64e

Browse files
authored
Merge pull request #1 from civilcoder55/master
Deploy 🚀
2 parents 04046e8 + 00a4a11 commit 15ce64e

23 files changed

+201
-60
lines changed

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ languageCode = 'en-us'
33
title = 'OMAR.A'
44

55

6-
paginate = 4
6+
paginate = 10
77

88
[params]
99
description = "My Tech Blog"

content/journey/journey.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "My Software Journey: Intro"
3+
date: 2024-07-01T19:11:50+03:00
4+
draft: false
5+
description: "My Software Journey"
6+
image: "/images/journey/1.jpg"
7+
imageBig: "/images/journey/1.jpg"
8+
categories: ["journey"]
9+
avatar: "/images/avatar.webp"
10+
---
11+
12+
I'm starting a journey to build random stuff, and apply and practice Backend Engineering, I will go from a Monolithic application to a Microservices exploring and building cool stuff and Proof of Concepts. 🚀💻
13+
14+
![incantogamus](/images/journey/discover.webp)

content/journey/mission-1.md

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
---
2-
title: "Sw Journey: Mission 1"
3-
date: 2024-08-06T19:11:50+03:00
4-
draft: true
5-
description: "Software Journey Mission 1"
6-
image: "/images/journey/1.jpg"
7-
imageBig: "/images/journey/1.jpg"
8-
categories: ["journey", "k8s", "kubernetes"]
2+
title: "My Journey: K8s and Helm"
3+
date: 2024-08-05T19:11:50+03:00
4+
draft: false
5+
description: "Discovering Kubernetes and Helm Charts"
6+
image: "/images/journey/k8s.png"
7+
imageBig: "/images/journey/k8s.png"
8+
categories: ["journey", "k8s", "kubernetes", "helm", "helm-charts", "docker"]
99
avatar: "/images/avatar.webp"
1010
---
1111

12-
I'm starting a journey to build random stuff, and apply and practice Backend Engineering, I will go from a Monolithic application to a Microservices exploring and building cool stuff and Proof of Concepts. 🚀💻
13-
1412
## Mission 1
1513

1614
during this week I will discover and learn Kubernetes, and how to deploy a simple application to k8s.
@@ -48,25 +46,4 @@ the API will be a **Incantogamus app** a simple CRUD application for video games
4846
- The Helm Chart is accessible at: https://civilcoder55.github.io/learning-helm-charts/
4947
- updated the application readme to include the Helm Chart usage. https://github.com/civilcoder55/incantogamus
5048

51-
## Mission 2
52-
53-
- [x] Discover Prometheus and Grafana
54-
55-
- I discovered Prometheus, understanding its functionality and how to use it for monitoring applications. Additionally, I learned about Grafana and how to visualize the metrics collected by Prometheus.
56-
- I also gained knowledge on creating and using an Exporter to gather metrics from an application and expose them to Prometheus.
57-
58-
- [x] Collect and Visualize Asterisk Metrics
59-
60-
- I collected metrics from an Asterisk server using the Asterisk `res_prometheus` module and exposed them to Prometheus.
61-
- I visualized these metrics using a simple Grafana dashboard.
62-
- Additionally, I used `node_exporter` to collect metrics from the Asterisk server node.
63-
64-
![incantogamus](/images/journey/prom-1.png)
65-
66-
![incantogamus](/images/journey/prom-2.png)
67-
68-
![incantogamus](/images/journey/prom-3.png)
6949

70-
- [ ] Collect K8s Cluster Metrics Using Prometheus
71-
- [ ] Visualize the Metrics Using Grafana
72-
- [ ] Create Alerts using Prometheus Alertmanager

content/journey/mission-2.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: "My Journey: Prometheus and Grafana"
3+
date: 2024-08-06T19:11:50+03:00
4+
draft: false
5+
description: "Discovering Prometheus and Grafana"
6+
image: "/images/journey/prom.png"
7+
imageBig: "/images/journey/prom.webp"
8+
categories:
9+
[
10+
"journey",
11+
"prometheus",
12+
"grafana",
13+
"monitoring",
14+
"metrics",
15+
"asterisk",
16+
"observability",
17+
"dashboard",
18+
]
19+
avatar: "/images/avatar.webp"
20+
---
21+
22+
## Mission 2
23+
24+
- [x] Discover Prometheus and Grafana
25+
26+
- I discovered Prometheus, understanding its functionality and how to use it for monitoring applications. Additionally, I learned about Grafana and how to visualize the metrics collected by Prometheus.
27+
- I also gained knowledge on creating and using an Exporter to gather metrics from an application and expose them to Prometheus.
28+
29+
- [x] Collect and Visualize Asterisk Metrics
30+
31+
- I collected metrics from an Asterisk server using the Asterisk `res_prometheus` module and exposed them to Prometheus.
32+
- I visualized these metrics using a simple Grafana dashboard.
33+
- Additionally, I used `node_exporter` to collect metrics from the Asterisk server node.
34+
35+
![incantogamus](/images/journey/prom-1.png)
36+
37+
![incantogamus](/images/journey/prom-2.png)
38+
39+
![incantogamus](/images/journey/prom-3.png)
40+
41+
- [ ] Collect K8s Cluster Metrics Using Prometheus
42+
- [ ] Visualize the Metrics Using Grafana
43+
- [ ] Create Alerts using Prometheus Alertmanager

content/journey/mission-3.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: "Managing authorizations in microservices."
3+
date: 2024-08-09T20:11:50+03:00
4+
draft: false
5+
description: "Discovering a way to manage authorizations and permissions in a microservices architecture using authorizations-as-service."
6+
image: "/images/journey/auth-as-service.png"
7+
imageBig: "/images/journey/auth-as-service.png"
8+
categories:
9+
["journey", "authorization", "permissions", "permify", "microservices"]
10+
avatar: "/images/avatar.webp"
11+
---
12+
13+
## Authorizations in Microservices
14+
15+
While developing a monolithic application, managing authorizations and permissions is a bit easier, as you can have a single point of control for all the authorizations and permissions. However, microservices have become a bit more complex.
16+
17+
In a microservices architecture, each service has its own database and logic for handling permissions. This can lead to a lot of duplication and inconsistency in the way permissions are managed across services. also, there will be an issue of sharing the permissions across services.
18+
19+
One way to solve this issue is to use an authorization-as-service. This means that you have a separate service that is responsible for managing all the authorizations for all the services in your architecture.
20+
21+
22+
### POC
23+
24+
Today I will do a quick proof of concept. I will use an open source that provide this functionality, there are a lot,
25+
26+
#### Some of Open source solutions
27+
- perimfy
28+
- openfga
29+
- casbin
30+
- topaz
31+
32+
#### Cloud solutions
33+
- there are good cloud solutions like [Permit.io](https://www.permit.io)
34+
35+
For today poc I will use [Permify](https://permify.co/).
36+
37+
![permify](https://user-images.githubusercontent.com/34595361/196884110-147862c9-3657-4f07-831c-3e0d0e39eccf.png)
38+
---
39+
40+
1. Run the permify service on docker and expose HTTP and GRPC ports.
41+
42+
![step](/images/journey/auth-1.png)
43+
---
44+
45+
2. Created a new tenant at permify to store our policies
46+
47+
![step](/images/journey/auth-2.png)
48+
---
49+
50+
3. Created our schema, I used here the traditional RBAC model for simplicity. but in the real world and complex apps, there are a lot of models for complex use cases. Actually, Permify is considered as fine-grained access control service inspired by `Google’s Zanzibar`.
51+
52+
Permify has a gread article about their solution [Here](https://docs.permify.co/permify-overview/authorization-service)
53+
54+
![step](/images/journey/auth-3.png)
55+
---
56+
![step](/images/journey/auth-4.png)
57+
---
58+
59+
4. Attached roles to our users
60+
61+
![step](/images/journey/auth-5.png)
62+
---
63+
64+
5. Created a simple nodejs services to test check user permissions using GRPC via permify sdk.
65+
66+
![step](/images/journey/auth-6.png)
67+
---
68+
![step](/images/journey/auth-7.png)
69+
---
70+
71+
6. Created a wrapper to check user permissions.
72+
73+
![step](/images/journey/auth-8.png)
74+
---
75+
76+
7. Final Test
77+
78+
![step](/images/journey/auth-9.png)
79+
---
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<a href="{{ .Destination | safeURL }}" class="lightbox-image current gallery">
1+
<a href="{{ .Destination | safeURL }}" class="lightbox-image current gallery md-img__a">
22
<img class='md-img' src="{{ .Destination | safeURL }}" {{- with .Text }} alt="{{ . }}" {{ end -}} {{- with .Title }}
33
title="{{ . }}" {{ end -}}>
44
</a>

layouts/_default/baseof.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<link href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap"
1212
rel="stylesheet">
1313
<link rel="stylesheet" href="/styles/style.css">
14-
<link rel="icon" href="/images/favicon.png" />
14+
<link rel="icon" href="/images/avatar.webp" />
1515
<title>{{ .Title }}</title>
1616
</head>
1717

layouts/partials/footer.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</div>
77

88
<div class="social">
9-
<a href="{{ .Site.Params.social.linkedin }}" title="LinkedIn">
9+
<a href="{{ .Site.Params.social.linkedin }}" title="LinkedIn" target="_blank">
1010
<svg height="20" width="20" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;"
1111
version="1.1" viewBox="0 0 512 512" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
1212
xmlns:serif="http://www.serif.com/" xmlns:xlink="http://www.w3.org/1999/xlink">
@@ -27,7 +27,7 @@
2727
</svg>
2828
</a>
2929

30-
<a href="{{ .Site.Params.social.github }}" title="GitHub">
30+
<a href="{{ .Site.Params.social.github }}" title="GitHub" target="_blank">
3131
<svg enable-background="new -1163 1657.697 56.693 56.693" height="20" width="20" id="Layer_1" version="1.1"
3232
viewBox="-1163 1657.697 56.693 56.693" width="56.693px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"
3333
xmlns:xlink="http://www.w3.org/1999/xlink">

static/images/journey/auth-1.png

27.9 KB
Loading

static/images/journey/auth-2.png

94.6 KB
Loading

static/images/journey/auth-3.png

137 KB
Loading

static/images/journey/auth-4.png

51.1 KB
Loading

static/images/journey/auth-5.png

301 KB
Loading

static/images/journey/auth-6.png

242 KB
Loading

static/images/journey/auth-7.png

248 KB
Loading

static/images/journey/auth-8.png

565 KB
Loading

static/images/journey/auth-9.png

73.8 KB
Loading
17.4 KB
Loading

static/images/journey/discover.webp

227 KB
Binary file not shown.

static/images/journey/k8s.png

32 KB
Loading

static/images/journey/prom.png

4.15 KB
Loading

static/images/journey/prom.webp

24.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)