/forge
- Documentation
This is the documentation for the /forge
project.
Note: This documentation is a work in progress. It is not complete and may contain errors.
Deployment
This part is about the deployment of the infrastructure.
Requirements
This part is about the requirements for the deployment.
Pre Deployment
This part is about the pre deployment configuration.
Deployment
This part is about the deployment of the infrastructure.
Requirements
Local Configuration
To deploy the /forge
infrastructure, you will need:
This three tools must be installed on your local machine.
The installation process installs the following tools on the remote machine:
Host Configuration
The configuration is tested only for Debian
, I can't guarantee that it will work on other distributions.
There are few requirements for the remote hosts:
- All the hosts must have the same user with root privileges.
- All the IPs address must be written in the
ansible/hosts.yml
file. - All the hosts must have SSH keys and the host machine must have the public key.
Clone repository
On the host machine, clone the repository:
git clone https://github.com/Xavier2p/infra-as-code.git && cd infra-as-code
Pre-deploy configuration (using Ansible)
Quick Pre Deployment
ansible-playbook -i ansible/hosts.yml -u <USER> -b ansible/playbook.yml
Where <USER>
is the user you want to use to connect to the hosts.
Deploy infrastructure (using Terraform)
Quick Deployment
terraform init
terraform apply
Deploy infrastructure
You can use the -target=module.<module_name>
option to deploy only a specific module or a specific host.
Infrastructure
In this part, you will find all the information about the infrastructure of my homelab.
Hosts
scariff
: My main server, a Raspberry Pi 4.exegol
: My laptop, a MacBook Air M1.eadu
: A simple Debian VM, used for testing.mandalore
: My development server, a Dell PowerEdge R710 (upcoming...).
Sections
Infrastructure as Nix
This part is for the system running on the hosts, a custom NixOS configuration.
Infrastructure as Code
This part is for deploying the services on the hosts, using Terraform.
System
Not implemented yet
As Code
My Infrastructure as Code is based on Terraform
.
All the files are publicly available on GitHub.
Structure
./forge
├── ansible # Ansible configuration, pre-deployment
├── hosts # Hosts configuration
│ ├── common # Common configuration for all hosts
│ ├── exegol
│ ├── eadu
│ └── scariff
├── stacks # Stacks of services
│ ├── admin
│ ├── cloud
│ ├── monitoring
│ ├── media
│ └── services
├── hosts.tf # Hosts configuration
├── main.tf # Entry point
├── modules # Terraform modules
├── providers.tf
├── outputs.tf
├── variables.tf
└── forge.tfvars # Private variables
Media
Concept
The idea behind the media part of the /forge
is to provide a self-hosted Netflix alternative.
Services
MeTube
Downloader for YouTube videos.
Jellyfin
Frontend for the media library.
Jellyseerr
Video On Demand service.
MeTube
This service can be accessed at: ytdl.xavier2p.fr.
The source code is available on GitHub.
Description
MeTube is a web interface for youtube-dl. It's a simple downloader for YouTube videos and playlists.
Usage
Paste your URL on the homepage, choose your format/quality and click on the download button. The download will start automatically.
At the end of the download, you will be redirected to the download page. You can download the file.
Please ensure you delete the downloaded files after you get them. The /forge
team isn't not responsible for the content you download.
Jellyfin
Not implemented yet
Jellyseerr
Not implemented yet
Cloud
Concept
The idea behind the cloud part of the /forge
is to provide a self-hosted alternative to the Google Suite.
We can now ensure that our data is not used by Google to make money.
Services
NextCloud
Alternative to Google Drive, Dropbox, etc.
OnlyOffice
Alternative to Google Docs, Microsoft Office, etc.
PhotoPrism
Alternative to Google Photos, Apple Photos, etc.
Nextcloud
Not implemented yet
OnlyOffice
Not implemented yet
PhotoPrism
Not implemented yet
Others
Other services, not really related to media or cloud, but still useful.
Services
Homer
Dashboard for public services.
Status
Uptime monitor for all the services.
FreshRSS
RSS reader.
Speedtest
Speedtest for the internet connection.
Public Dashboard - Homer
This service can be accessed at public.xavier2p.fr.
The source code is available on GitHub.
Description
This dashboard is a simple, static, HTML page. It's a simple way to access all the public services.
Usage
Just go to public.xavier2p.fr and click on the service you want to access.
If a service is not implemented yet, the tag will be red.
Status - Uptime Kuma
This service can be accessed at status.xavier2p.fr.
The source code is available on GitHub.
Description
Uptime Kuma is a fancy self-hosted monitoring tool. It's a simple way to monitor all the services. It's used to monitor the whole infrastructure.
Usage
You have only access to the external status page. You can't access the admin page.
Just go to status.xavier2p.fr and check the status of the services.
FreshRSS
Not implemented yet
Speedtest
Not implemented yet
Links
Not implemented yet
License - MIT
Copyright (c) 2023 Xavier2p
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contributing
Not implemented yet
Credits
Not implemented yet