Skip to content

Commit

Permalink
feat: add aboutme page and kubernetes guide
Browse files Browse the repository at this point in the history
  • Loading branch information
teresalves committed Aug 4, 2024
1 parent 7429167 commit e34f960
Show file tree
Hide file tree
Showing 55 changed files with 3,218 additions and 275 deletions.
3 changes: 2 additions & 1 deletion config/_default/hugo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title = "My Docs"
title = "Teresa Alves"
baseurl = "http://localhost/"
canonifyURLs = false
disableAliases = true
Expand Down Expand Up @@ -59,6 +59,7 @@ copyRight = "Copyright (c) 2020-2024 Hyas"
[permalinks]
blog = "/blog/:slug/"
docs = "/docs/:sections[1:]/:slug/"
aboutme = "/aboutme/:sections[1:]/:slug/"
# docs = "/docs/1.0/:sections[1:]/:slug/"

[minify.tdewolff.html]
Expand Down
13 changes: 9 additions & 4 deletions config/_default/menus/menus.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

[[main]]
name = "Docs"
url = "/docs/guides/example-guide/"
url = "/docs/kubernetes/basic-commands/"
# url = "/docs/1.0/prologue/introduction/"
weight = 10

Expand All @@ -39,12 +39,17 @@
url = "/blog/"
weight = 30

[[main]]
name = "About Me"
url = "/aboutme/aboutme/quick-summary/"
weight = 5

# [[social]]
# name = "Twitter"
# pre = '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-x" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M4 4l11.733 16h4.267l-11.733 -16z"></path><path d="M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772"></path></svg>'
# url = "https://twitter.com/getdoks"
# weight = 10
#
#
# [[social]]
# name = "Discord"
# pre = '<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-brand-discord" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M8 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0"></path><path d="M14 12a1 1 0 1 0 2 0a1 1 0 0 0 -2 0"></path><path d="M8.5 17c0 1 -1.356 3 -1.832 3c-1.429 0 -2.698 -1.667 -3.333 -3c-.635 -1.667 -.476 -5.833 1.428 -11.5c1.388 -1.015 2.782 -1.34 4.237 -1.5l.975 1.923a11.913 11.913 0 0 1 4.053 0l.972 -1.923c1.5 .16 3.043 .485 4.5 1.5c2 5.667 2.167 9.833 1.5 11.5c-.667 1.333 -2 3 -3.5 3c-.5 0 -2 -2 -2 -3"></path><path d="M7 16.5c3.5 1 6.5 1 10 0"></path></svg>'
Expand All @@ -62,12 +67,12 @@
# name = "Guides"
# pageRef = "/docs/guides"
# weight = 10
#
#
# [[sidebar_docs]]
# name = "Reference"
# pageRef = "/docs/reference"
# weight = 20
#
#
# [[sidebar_docs]]
# name = "Resources"
# pageRef = "/docs/resources"
Expand Down
8 changes: 4 additions & 4 deletions config/_default/params.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Hugo
title = "My Docs"
title = "Teresa Alves"
description = "Congrats on setting up a new Doks project!"
images = ["cover.png"]

# mainSections
mainSections = ["docs"]
mainSections = ["docs", "aboutme"]

[social]
twitter = "getdoks"
Expand Down Expand Up @@ -44,7 +44,7 @@ mainSections = ["docs"]
bootstrapJavascript = false # false (default) or true

# Nav
sectionNav = ["docs"] # ["docs"] (default) or list of sections (e.g. ["docs", "guides"])
sectionNav = ["docs", "aboutme"] # ["docs"] (default) or list of sections (e.g. ["docs", "guides"])
toTopButton = false # false (default) or true
breadcrumbTrail = false # false (default) or true
headlineHash = true # true (default) or false
Expand Down Expand Up @@ -104,7 +104,7 @@ mainSections = ["docs"]
[hyas_images]
[hyas_images.defaults]
decoding = "async" # sync, async, or auto (default)
fetchpriority = "auto" # high, low, or auto (default)
fetchpriority = "auto" # high, low, or auto (default)
loading = "lazy" # eager or lazy (default)
widths = [480, 576, 768, 1025, 1200, 1440] # [640, 768, 1024, 1366, 1600, 1920] for example
sizes = "auto" # 100vw (default), 75vw, or auto for example
Expand Down
15 changes: 15 additions & 0 deletions content/aboutme/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "Docs"
description: ""
summary: ""
date: 2023-09-07T16:12:03+02:00
lastmod: 2023-09-07T16:12:03+02:00
draft: false
weight: 999
toc: true
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Guides"
title: "About me"
description: ""
summary: ""
date: 2023-09-07T16:06:50+02:00
Expand Down
51 changes: 51 additions & 0 deletions content/aboutme/aboutme/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: "Quick Summary"
description: "Introduction to me"
summary: ""
date: 2023-09-07T16:04:48+02:00
lastmod: 2023-09-07T16:04:48+02:00
draft: false
weight: 810
toc: true
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---
## Introduction

Hello and welcome!
I am Teresa Alves, a Software Engineer from Portugal 🇵🇹
I have a background in Control and Automation (aka Math and Robots) and I have professional experience as a backend, platform and systems engineer.

I am also a volunteer for [As Raparigas do Código](https://raparigasdocodigo.pt/), a volunteer organization focused including women in the tech world, and to get young childrens interested in technology.

This website will share my quick guides to certain technologies, that will help me not forget things, and might help you learn them.

Feel free to add me on [LinkedIn](https://www.linkedin.com/in/teresalves/)!

## Need help with life?

If you need help with things, I can help with the following technical things:
- basics of programming;
- what is backend, frontend, devops?;
- setting up your first API
- mock technical interviews;
- System design;
- Observability;
- Other platform related things (feel free to ask);


Non technical stuff:
- Starting a career in tech;
- building a CV;
- how to show confidence in interviews;
- how to deal with anxious dogs;

Feel free to contact me on LinkedIn with any questions

## Can I contribute?

These notes represent things I know or have studied so I don't really want external contributions for whole new modules. However, feel free to add new issues in this repo for doc requests or propose fixes for somethign I already have that seems incorrect or incomplete!

15 changes: 15 additions & 0 deletions content/aboutme/events/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "About me"
description: ""
summary: ""
date: 2023-09-07T16:06:50+02:00
lastmod: 2023-09-07T16:06:50+02:00
draft: false
weight: 800
toc: true
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---
27 changes: 27 additions & 0 deletions content/aboutme/events/summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: "Public Speaking Events"
description: "Public Speaking and stuff"
summary: ""
date: 2023-09-07T16:04:48+02:00
lastmod: 2023-09-07T16:04:48+02:00
draft: false
weight: 810
toc: true
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---
### Diversity and Inclusion in the tech world
###### 27/06/2024

I was a guest in an event for Career Management in Tech where I spoke about the importance of diversity and inclusion in the workplace, as a representative of [As Raparigas do Código](https://raparigasdocodigo.pt/).

I believe that diversity is important for innovation and to achieve the best solutions. However, we do not currently have enough women in tech to have a 50/50 distribution of men and women in these roles. Because of that, we strive to have more girls interested in the area and we want to make sure that the women (and the other tech minorities) that are already in here feel included and have their voices heard. Being empathetic, respectful and inclusive to your coworkers is much more important than hitting quotas. This last part will come eventually, if the overall environment is pleasant and accepting.

You can read the summary of the discussion and listen to the whole thing [here](https://visao.pt/exame/2024-06-27-diversidade-e-quotas-podemos-estar-a-ir-a-um-extremo-para-tentar-encontrar-um-meio/) (in Portuguese).




17 changes: 17 additions & 0 deletions content/aboutme/resources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "Resources"
description: ""
summary: ""
date: 2024-02-27T09:30:56+01:00
lastmod: 2024-02-27T09:30:56+01:00
draft: false
weight: 999
toc: true
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---

Link to valuable, relevant resources.
21 changes: 0 additions & 21 deletions content/docs/guides/example.md

This file was deleted.

15 changes: 15 additions & 0 deletions content/docs/kubernetes/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: "Kubernetes"
description: ""
summary: ""
date: 2023-09-07T16:06:50+02:00
lastmod: 2023-09-07T16:06:50+02:00
draft: false
weight: 800
toc: true
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---
95 changes: 95 additions & 0 deletions content/docs/kubernetes/example.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: "Basic Commands"
description: "Guides lead a user through a specific task they want to accomplish, often with a sequence of steps."
summary: ""
date: 2023-09-07T16:04:48+02:00
lastmod: 2023-09-07T16:04:48+02:00
draft: false
weight: 810
toc: true
seo:
title: "" # custom title (optional)
description: "" # custom description (recommended)
canonical: "" # custom canonical URL (optional)
noindex: false # false (default) or true
---

## Baseline commands

`kubectl get pods` - check if the pods are starting correctly. You can add `| grep -c <deployment-name>` to count how many pods you have at a current time. You can also filter by label: \
`kubectl get pods -l 'labelname=labelvalue'`

`kubectl get deploy -o wide` - tells you which version it is getting from the repo, so you can be sure that you are deploying to the correct one. You can also check how many replicas are updated.

`kubectl get configmap <config-map-name>` (or `kubectl get cm` for lazy people like me) - check the config maps that exist. BUT they all already exist basically, so what you usually want to check is what’s inside them with: \
`kubectl describe cm <config-map-name>`.

Note that if you update the configmap, the values read by the pod don’t change automatically. The cm are read at the beginning of the deploy so in order to have it read you need to restart the pods.

`kubectl get quota` - if you see your pods are not starting and your deployment is stuck, it might be because you ran out of quota. You can also check errors in the events


## Getting logs and events

If you need to check events:

`kubectl get events --sort-by='.metadata.creationTimestamp'`

And now logs:

`kubectl get logs -f <pod_name>`

Or for pods that have been restarted:

`kubectl get logs <pod_name> —previous`


## Creating Secrets

Secrets are objects that generally contain sensitive information, such as tokens or secrets. They behave similarly to a configmap but they are used only for sensitive information, so it’s not hardcoded in the application code.

Each secret can have several keys, and therefore, several passwords or other pieces of information. You can therefore have a secret called `credentials` where inside you have two keys `password` and `user` with each respective value. Don’t forget that when reading a secret in your pod.yaml configs you need to specify both the secret name and the key from which you need the value:

```
- name: ENV_VAR_NAME
valueFrom:
secretKeyRef:
name: secret_name
key: password # or whatever your key is
```


## Reading secrets:

`kubectl edit secret <secret—name>` and you can see the secret value there (but don’t edit it!)

but it will show you the secret info and the value encoded in base64. To read it back you must do:

`kubectl get secret <SECRET_NAME> "--template={{.data.password}}" | base64 --decode`

Note that if you do want to edit it like that, you need to convert it to base64 before that.

## Accessing other services:
From inside the cluster:

`curl <service-name>.<namespace-name>:<port>`

If the service you are trying to access is in the namespace as your pod currently is, then you can omit the namespace name and just do\
`<service-name>:<port>`

Or just use the internal ingress associated with the service. Get it with:

`kubectl get ingress`

## Going inside the pod

`kubectl exec -it <pod-name> bash` → if you have only one container in your pod, it will go inside that container. Otherwise, you will have to specify which container in that pod you are trying to access by using `-c <container-name>`.

`printenv` - run this command while inside the container to print all the environment variables that this is reading. It is particularly useful to verify if the config map and secrets are being correctly read in the pod.

`ping <url>` or `curl <url>` - some services are not accessible through your local machine, but only inside the cluster. You can run this inside a pod.

## Requesting without an ingress

`kubectl port-forward <pod-name> <local-port:pod-port>` - useful to do testing curls from your local machine

4 changes: 2 additions & 2 deletions content/docs/reference/example.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Example Reference"
description: "Reference pages are ideal for outlining how things work in terse and clear terms."
title: "Basic Commands"
description: "Basic Guide for common commands that are not all in common guides"
summary: ""
date: 2023-09-07T16:13:18+02:00
lastmod: 2023-09-07T16:13:18+02:00
Expand Down
Loading

0 comments on commit e34f960

Please sign in to comment.