Giter Site home page Giter Site logo

rails_on_argocd's Introduction

Rails On ArgoCD

Prepare

  1. Kubernetes cluster
  2. ArgoCD

Demo

  1. Clone this repo git clone [email protected]:agate/rails_on_argocd.git

  2. Apply V1

    kubectl apply -f versions/v1/argocd/argocd-application.yaml

    What we can learn from this version?

    1. How ArgoCD sync wave works.
      1. You can see the namespace get created first.
      2. Then the DB deployment and then the DB service.
      3. The migration job will be triggered after DB ready. And it will be destroyed after it completes.
      4. At the end all the other manifest files get synced.
    2. How to wait when database ready before start the application container.
    3. How to run database init script to create database / tables

    After ArgoCD synced. Run kubectl port-forward -n rails-on-argocd svc/rails-on-argocd-app 3000:3000 and access http://localhost:3000. You should see the default rails welcome page.

  3. Apply V2

    kubectl apply -f versions/v2/argocd/argocd-application.yaml

    What we can learn in this version?

    1. Before the database migrate be executed. The rails server still running in the old version. The new container will be created after the all the migrations are executed.

    After ArgoCD synced. Stop the previous port-forward command and restart the port-forward by running kubectl port-forward -n rails-on-argocd svc/rails-on-argocd-app 3000:3000 and access http://localhost:3000. You should see a json output which contains all two users data (sam / dean)

rails_on_argocd's People

Contributors

agate avatar

Stargazers

Milan Thapa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.