• 1 Post
  • 9 Comments
Joined 3 years ago
cake
Cake day: August 6th, 2022

help-circle
  • If that’s true, then great, and learning with cloud-native technology is perfectly fine. The critical comments were probably made because the post does not indicate that this is just an idea for production architecture or a form of learning, but rather the actual deployment that should be carried out (at least that is how I see it), which in this subreddit could be perceived as a proposal for self-hosting for private individuals (as self-hosting is associated with private individuals).


  • I would not go with managed NC, because you can’t control nothing and provider raise prices over and over. Even with serverless Nextcloud deployment, the architecture is still like LEGO, and if something will go bad or price will be too high, then you can exchange those LEGO bricks, ie. migrate from Fargate to EC2 w/ ECS, migrate from Aurora to RDS Postgres or Postgres installed on EC2 and so one.


  • I started counting, and only with Fargate two ECS tasks (with not much CPU power) and with first Aurora DB it is almost 200 USD per month (in Frankfurt). If we will add another services, the cost will be higher and higher.

    Did you learn stuff?

    Yeah, learning is great and if you will deploy it and kill it in the same day, the cost will be quite low. But if you want to really use it, it is too much, it is better to use hostable alternatives, ie Load Balancer == Haproxy, Fargate Task == Docker on EC2/VPS (even with ECS), Aurora == burstable tier RDS or DB hosted on VPS/EC2. I know, in business area, you should not host DB on EC2 or use clean Docker on EC2 (without ECS) (and that production Nextcloud deployment could be more extended, because availability and scalability is more important that saving some dollars), but in private zone, where every penny is important, it is overkill for everyday use.


  • Yes, just like I said, when running it for personal use, going with SLA 99,(9) is too expensive. As far as long we say about serverless solutions, they can be great and helpful (I can say that from both SysOps and DevOps perspective that work on many projects), but I don’t think they should be used in homelab form, as they do not provide that much customisations, and homelabs are the place where we want to experiment and have some fun, not just deploy something in a way that will “just work”.



  • Finally found someone who uses OpenTofu for Docker too. I saw many opinions and thinking that dropping Compose for OpenTofu/Terraform is silly, because Compose is “more native”. I use OpenTofu for Docker too, but I structured code in other way, I have a module that mimics compose in some way, but is simpler for me to use. I published module here: https://codeberg.org/cichy1173/cichyform

    I do not published my IaC, but I can show how code looks like for service:

    module "adguard" {
      source = "git::ssh://[email protected]/cichy1173/mylab-opentofu.git//modules/docker_service?ref=docker_service-v1.1"
      service_name = "adguardhome"
      image_name   = "adguard/adguardhome:latest"
    
      volumes = [
        {
          host_path      = "/home/cichy/docker/adguard/adguard/conf"
          container_path = "/opt/adguardhome/conf"
        },
        {
          host_path      = "/home/cichy/docker/adguard/adguard/work"
          container_path = "/opt/adguardhome/work"
        }
      ]
      
      ports = [
        {
          internal = 53
          external = 53
          protocol = "udp"
        },
        {
          internal = 80
          external = 80
        },
        {
          internal = 443
          external = 443
        },
        {
          internal = 853
          external = 853
        },
        {
          internal = 3000
          external = 3000
        }
      ]
    
      environment_variables = []
    }
    

    I also created an Forgejo Action to run plan on stacks with this module to check if there is a new image under the tag :latest. Oh, and also I manage Adguard Home using OpenTofu, it is very powerful: https://codeberg.org/cichy1173/adguard-home-cm-repository





  • Not exactly. Yunohost offers solution to host services openly to the internet thanks to simplified configuration of domains (and it even offers free domains) and reverse proxy. Also it has built in email server (not client, but the server). Apps are packaged in its own format and with unique configuration, it is not just some wrapper for Docker Conpose