Code Monkey home page Code Monkey logo

ocm-ramen-samples's Introduction

ocm-ramen-samples

OCM Stateful application samples, including Ramen resources.

Initial setup

  1. Clone this git repository to get started:
    • https://github.com/RamenDR/ocm-ramen-samples.git cd ocm-ramen-samples
  2. Switch kubeconfig to point to the OCM Hub cluster
  3. Setup the common OCM channel resources on the hub:
    • kubectl apply -k subscriptions/
    • The above creates:
      • A channel resource in the ramen-samples namespace and can be viewed using:
        • kubectl get channel -n ramen-samples ramen-gitops
      • A DRPolicy resource in the cluster namespace and can be viewed using:
        • kubectl get drpolicy

Sample application deployment

  1. Deploy an OCM application and its related resources on the hub, for example:
    • kubectl apply -k subscriptions/busybox/
    • The above creates the required Subscription, PlacementRule and DRPlacementControl resources for the busybox application in the busybox-sample namespace and can be viewed using:
      • kubectl get placementrule -n busybox-sample
      • kubectl get -n busybox-sample subscriptions
      • kubectl get drplacementcontrol -n busybox-sample
  2. Inspect subscribed resources from the channel created in the same namespace on the ManagedCluster selected by the PlacementRule, for example:
    • The busybox sample PlacementRule status can be viewed on the hub using:
      • kubectl get placementrule -n busybox-sample busybox-placement
    • Busybox subscribed resources, like the pod and the PVC can be viewed on the ManagedCluster using (example ManagedCluster cluster1):
      • kubectl --context=cluster1 get pods busybox-sample
      • kubectl --context=cluster1 get pvc -n busybox-sample

Testing failover

Under construction

Testing failback

Under construction

ocm-ramen-samples's People

Contributors

prsurve avatar netzzer avatar shyamsundarr avatar shylesh avatar hatfieldbrian avatar

Watchers

James Cloos 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.