Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 15ce64e

Browse files
authoredAug 10, 2024··
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.

‎static/styles/style.css

Lines changed: 53 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ body {
1717
font-size: 16px;
1818
}
1919

20-
body.light{
20+
body.light {
2121
--bg: #dee4eb;
2222
--text: #1a2237;
2323
}
@@ -55,6 +55,7 @@ a {
5555
position: sticky;
5656
top: 0;
5757
background-color: var(--bg);
58+
flex-wrap: wrap;
5859
}
5960

6061
.logo {
@@ -165,7 +166,7 @@ a {
165166
font-size: 14px;
166167
}
167168

168-
.pagination{
169+
.pagination {
169170
display: flex;
170171
gap: 10px;
171172
list-style: none;
@@ -176,7 +177,7 @@ a {
176177
margin-bottom: 30px;
177178
}
178179

179-
.page-item{
180+
.page-item {
180181
border: 1px solid gray;
181182
width: 30px;
182183
height: 30px;
@@ -186,11 +187,12 @@ a {
186187
border-radius: 5px;
187188
}
188189

189-
.page-item.active{
190+
.page-item.active {
190191
background-color: var(--text);
191192
color: var(--bg);
192193
}
193-
.page-item.disabled{
194+
195+
.page-item.disabled {
194196
background-color: #313845;
195197
cursor: not-allowed;
196198
}
@@ -226,6 +228,7 @@ a {
226228
display: flex;
227229
align-items: center;
228230
gap: 20px;
231+
flex-wrap: wrap;
229232
}
230233

231234
.single-avatar {
@@ -251,9 +254,10 @@ a {
251254

252255
.single-bottom {
253256
display: flex;
254-
justify-content: space-between;
257+
justify-content: center;
255258
gap: 50px;
256259
margin-top: 50px;
260+
max-width: 1136px !important;
257261
}
258262

259263
.single-content {
@@ -269,11 +273,6 @@ a {
269273
margin: 20px 0px;
270274
}
271275

272-
.single-content img {
273-
width: 100%;
274-
object-fit: cover;
275-
}
276-
277276
.single-content pre {
278277
width: 100%;
279278
overflow-x: scroll;
@@ -282,21 +281,47 @@ a {
282281

283282
/* SINGLE END */
284283

284+
285+
/* Markdown Styles START */
286+
287+
.md-img__a {
288+
display: flex;
289+
justify-content: center;
290+
}
291+
292+
.md-img {
293+
display: block;
294+
width: 100%;
295+
border-radius: 15px;
296+
box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
297+
border: 1px solid rgba(0, 0, 0, .5);
298+
max-width: 850px;
299+
height: auto;
300+
box-sizing: border-box;
301+
}
302+
303+
304+
/* Markdown Styles END */
305+
306+
285307
@media (max-width: 1536px) {
286308
.container {
287309
max-width: 1366px;
288310
}
289311
}
312+
290313
@media (max-width: 1366px) {
291314
.container {
292315
max-width: 1280px;
293316
}
294317
}
318+
295319
@media (max-width: 1280px) {
296320
.container {
297321
max-width: 1024px;
298322
}
299323
}
324+
300325
@media (max-width: 1024px) {
301326
.container {
302327
max-width: 768px;
@@ -312,33 +337,36 @@ a {
312337
flex-direction: column-reverse;
313338
}
314339
}
340+
315341
@media (max-width: 768px) {
316342
.container {
317343
max-width: 640px;
318344
}
345+
319346
.links {
320347
font-size: 14px;
321348
}
322349

323350
.list-Item__image {
324351
display: none;
325352
}
326-
}
327-
@media (max-width: 640px) {
328-
.container {
329-
max-width: 475px;
330-
}
331-
}
332353

354+
.links a {
355+
display: none;
356+
}
333357

334-
/* Markdown Styles START */
358+
.md-img {
359+
max-width: 100%;
360+
width: auto;
361+
}
335362

336-
.md-img {
337-
display: block;
338-
max-width: 100%;
339-
box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
340-
border: 1px solid rgba(0, 0, 0, .5);
341-
border-radius: 15px;
363+
.single-head__title {
364+
font-size: 20px;
365+
}
342366
}
343367

344-
/* Markdown Styles END */
368+
@media (max-width: 640px) {
369+
.container {
370+
max-width: 475px;
371+
}
372+
}

0 commit comments

Comments
 (0)
Please sign in to comment.