2024-10-13 22:16:37 +08:00
|
|
|
::: navbar
|
2024-10-13 22:14:58 +08:00
|
|
|
<div>
|
|
|
|
|
2024-10-13 22:16:37 +08:00
|
|
|
[Home](../index.html)
|
2024-10-13 22:14:58 +08:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
2024-10-13 22:16:37 +08:00
|
|
|
[Blog](blog--01.html)
|
2024-10-13 22:14:58 +08:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
2024-10-13 22:16:37 +08:00
|
|
|
[Git](https://renraku.dingo-bramble.ts.net/clement)
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
2024-10-13 22:14:58 +08:00
|
|
|
|
2024-10-13 22:16:37 +08:00
|
|
|
[CV](../files/CV.pdf)
|
2024-10-13 22:14:58 +08:00
|
|
|
|
|
|
|
</div>
|
|
|
|
:::
|
|
|
|
|
2024-10-13 22:16:37 +08:00
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
# Migrating Everything to Proxmox - Part 1
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
It was almost inevitable that this would happen. After getting more
|
|
|
|
comfortable with Proxmox, I realized that I needed more reliability for
|
|
|
|
the applications running on my RPis. Things are running fine on my RPi,
|
|
|
|
but it was a matter of time before disaster struck. So begin my efforts
|
|
|
|
to move everything over to Proxmox.
|
|
|
|
|
|
|
|
## A Dance with Docker
|
|
|
|
|
|
|
|
While almost everything could run on or built for Docker one way or
|
|
|
|
another these days, running complicated applications on Docker will
|
|
|
|
eventually uncover some really esoteric behaviours. So I stuck to using
|
|
|
|
LXC containers for most of my applications. I used Docker for the
|
|
|
|
applications that I can deploy and leave them alone, hence Redis,
|
|
|
|
WikiJS, and WatchTower. WatchTower ensures that the containers stay
|
|
|
|
healthy and updated.
|
|
|
|
|
|
|
|
## Preparing The Base
|
|
|
|
|
|
|
|
With the easiest stuff out of the way, I started preparing the LXC
|
|
|
|
container templates. I opted for two templates: CentOS 7 and Debian 10.
|
|
|
|
I updated them, added my SSH public keys, installed the basic tools, and
|
|
|
|
it was good to go.
|
|
|
|
|
|
|
|
## Taking Apart Services on RPi
|
|
|
|
|
|
|
|
As a result of my messy installations on RPi, I had to scrounge around
|
|
|
|
for the configs and data for Gitea and Apache httpd. After that, it was
|
|
|
|
a quick tarball to be transferred over to their respective containers.
|
|
|
|
This time, I\'ve created a separate container dedicated for PostgreSQL
|
|
|
|
and MySQL. Doing so was somewhat liberating; I now know where I can
|
|
|
|
access and isolate my databases.
|
|
|
|
|
|
|
|
## The Disaster
|
|
|
|
|
|
|
|
What is a migration without a major data loss disaster? So, I lied
|
|
|
|
previously about the \'simple\' applications I run on Docker. I tried
|
|
|
|
migrating my Nextcloud instance to Docker. Sound simple right? Mount the
|
|
|
|
NFS directory on the Docker host, spin up the Nextcloud Docker image
|
|
|
|
with the directories and the already-migrated PostgreSQL user and tables
|
|
|
|
ready, and magic would take place. Turns out a new Nextcloud instance
|
|
|
|
would immediately nuke /data to set up a \'clean slate\'. My NFS
|
|
|
|
directory was clean enough, I\'ll say. To make things worse, I was
|
|
|
|
putting off scripting for my Btrfs snapshots and backups. With them, I
|
|
|
|
could\'ve easily rolled back my changes.
|
|
|
|
|
|
|
|
The silver lining was that I did not keep any important information on
|
|
|
|
the instance. As the old adage goes, backup before doing stupid things.
|
|
|
|
This cowboy move was a hard lesson for me.
|
|
|
|
|
|
|
|
## Conclusion
|
|
|
|
|
|
|
|
This concludes Part 1. Most of my time was spent untangling all the
|
|
|
|
services that I was experimenting on my RPi and deciding what gets to
|
|
|
|
live or not. So far, I\'ve learned a hard lesson and had to plan out my
|
|
|
|
migration before doing so. I only look forward for the rest to come.
|
|
|
|
|
|
|
|
------------------------------------------------------------------------
|
|
|
|
|
|
|
|
::: navbar
|
|
|
|
<div>
|
|
|
|
|
|
|
|
[Prev](blog-011.html)
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
[Next](blog-013.html)
|
|
|
|
|
|
|
|
</div>
|
2024-10-13 22:14:58 +08:00
|
|
|
:::
|
2024-10-13 22:16:37 +08:00
|
|
|
|
|
|
|
> For we each of us deserve everything, every luxury that was ever piled
|
|
|
|
> in the tombs of the dead kings, and we each of us deserve nothing, not
|
|
|
|
> a mouthful of bread in hunger. Have we not eaten while another
|
|
|
|
> starved? Will you punish us for that? Will you reward us for the
|
|
|
|
> virtue of starving while others ate? No man earns punishment, no man
|
|
|
|
> earns reward. Free your mind of the idea of deserving, the idea of
|
|
|
|
> earning, and you will begin to be able to think.\
|
|
|
|
> - Odo
|