updated readme
This commit is contained in:
@@ -1,33 +1,3 @@
|
|||||||
# Blog
|
|
||||||
## What
|
|
||||||
Repository for the blog
|
|
||||||
Features of using gitlab:
|
|
||||||
- version control
|
|
||||||
- CI/CD pipelines
|
|
||||||
- gitlab container image repository
|
|
||||||
|
|
||||||
The CI/CD pipeline builds the blog into both arm64 so I can host the site on my [Pi cluster](https://blog.ahmza.com/posts/building-a-docker-swarm-with-pis/) as well as amd64 to host on other platforms i.e eks
|
|
||||||
|
|
||||||
## Why
|
|
||||||
# Pros of static sites
|
|
||||||
* Security
|
|
||||||
* Reliability
|
|
||||||
* Speed
|
|
||||||
* Scalability
|
|
||||||
* Low Resource overhead
|
|
||||||
|
|
||||||
I had rack mounted servers running my website and decided that the power hungry machines were consuming way too much power
|
|
||||||
so I decided to migrate to a cluster of raspberry pis which you can find a post on my site. A static site made the most sense
|
|
||||||
for reasons mentioned above
|
|
||||||
|
|
||||||
## How
|
|
||||||
* Hugo compiles markdown into static files.
|
|
||||||
* Gitlab CI/CD builds the docker image.
|
|
||||||
* Kubernetes Cluster serves static files.
|
|
||||||
|
|
||||||
## Do list
|
|
||||||
[] ...
|
|
||||||
|
|
||||||
## Notes
|
## Notes
|
||||||
|
|
||||||
# When Pulling / Cloning
|
# When Pulling / Cloning
|
||||||
@@ -40,3 +10,70 @@ git clone --recurse-submodules https://gitlab.com/ahmza/blog
|
|||||||
git submodule update --remote --merge
|
git submodule update --remote --merge
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Blog
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This repository contains the source code for my personal blog hosted at [blog.ahmza.com](https://blog.ahmza.com).
|
||||||
|
|
||||||
|
## Features
|
||||||
|
Using GitLab provides several advantages:
|
||||||
|
- **Highly Customizable CI/CD Pipelines**: Automated processes for building and deploying the blog.
|
||||||
|
- **GitLab Container Image Repository**: Efficient management and storage of container images.
|
||||||
|
- **Custom GitLab Runners**: Flexibility in managing the CI/CD environment.
|
||||||
|
|
||||||
|
The CI/CD pipeline is configured to build the blog for both amd64 and arm64
|
||||||
|
architectures, allowing me to host the site on my [Pi cluster](https://blog.ahmza.com/posts/pi-docker-swarm/)
|
||||||
|
as well as on other x86 platforms.
|
||||||
|
|
||||||
|
## Motivation
|
||||||
|
My previous homelab setup included rack-mounted, power-hungry servers, which
|
||||||
|
were expensive to run. By migrating to a Raspberry Pi cluster, I significantly
|
||||||
|
reduced costs and improved efficiency. You can read more about this migration on
|
||||||
|
my [site](https://blog.ahmza.com/posts/building-a-docker-swarm-with-pis/).
|
||||||
|
|
||||||
|
A static site generator was the best choice for my needs, as I don't require a
|
||||||
|
dynamically updating site. It provides simplicity and efficiency without
|
||||||
|
sacrificing performance.
|
||||||
|
|
||||||
|
## Benefits of Static Sites
|
||||||
|
- **Security**: Reduced attack surface due to the absence of a server-side backend.
|
||||||
|
- **Reliability**: Less prone to downtime and issues.
|
||||||
|
- **Speed**: Faster load times since content is pre-rendered.
|
||||||
|
- **Scalability**: Easily handle large amounts of traffic.
|
||||||
|
- **Flexibility**: Greater control over content and design.
|
||||||
|
- **Low Resource Overhead**: Minimal resource consumption compared to dynamic sites.
|
||||||
|
|
||||||
|
## Implementation
|
||||||
|
- **Hugo**: Converts Markdown files into static HTML/CSS/JS files.
|
||||||
|
- **GitLab CI/CD**: Automates the build process and creates Docker images.
|
||||||
|
- **Kubernetes Cluster**: Serves the static files to users.
|
||||||
|
|
||||||
|
## To-Do List
|
||||||
|
- [x] Migrate to Kubernetes
|
||||||
|
- [x] Migrate to Blowfish theme
|
||||||
|
- [x] Make repo private to ensure all keys etc are hidden
|
||||||
|
- [x] Update docker file
|
||||||
|
- [x] Migrate to hugo modules for the theme
|
||||||
|
- [ ] Continue to write awesome posts
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
### Cloning the Repository
|
||||||
|
To clone this repository along with its submodules, use the following command:
|
||||||
|
```bash
|
||||||
|
git clone git@gitlab.com:ahmza/blog.git
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user