Hey all!

I’m seeking guidance. I have a lot of apps that use ORMs like Mongoose or Sequelize or Sqlalchemy, or even just init-db scripts with raw SQL. Point is a lot of apps have changes to the data layer. When we program and make apps they tend to describe how they need to see a database. Sometimes its no trivial feat to do an upgrade - and even if you have a CI/CD pipeline in place what does that look like to have something like even lemmy upgrade in a container.

If you have these apps in production how are you handling these apps? Both developer perspective and devops welcomed.

I see the devs offering insight into maybe how the backend recognizes database state, while the devops perhaps either describing process and implementation.

  • Sparrow_1029@programming.dev
    link
    fedilink
    arrow-up
    4
    ·
    1 year ago

    Though we are moving to kubernetes & helm soon, currently we use migration scripting tools (like alembic) for schema and data migration on app start, and our infrastructure/devops team uses ansible for deployment. Currently, we don’t have CI/CD straight to production—it’s still a manual process—but I hope to change that as our organization starts using k8s.

    • Gnubyte@lemdit.comOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      Godspeed. I hope the transition goes well. If you need to baby step towards it, I felt like docker swarm was easier to approach but kubernetes is far more standard. I recommend budgeting training into the rollout if your shop can afford it. For CI/CD I recently had a great experience with github and github actions but I had a coworker setup on-premise gitlab in the past too.

      Somewhat of a tangent - My experience with alembic of over four years is that it is leagues better than manual SQL dealings, and also very easy to understand what you’re looking at. But I have to say that when I used sequelize in NodeJS, it has an autosync and autoupgrade schema that made alembic look silly.

      In regards to my own post I think for now what I’m mostly seeing is that for each new deployment - is going to have to have an internal smoke test, then staggered rollout of updates.

      • Sparrow_1029@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        I’ll look into sequelize! Also, we are undergoing a training right now. I have some previous experience from $lastJob with k8s, but I’m sure my knowledge is out of date so glad to be doing it.