GithubHelp home page GithubHelp logo

anshulbehl / ansopdemo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ansible-getting-started/ansopdemo

0.0 1.0 0.0 46 KB

Building an Ansible SDK operator for Kubernetes

Shell 28.48% Dockerfile 71.52%

ansopdemo's Introduction

AnsOpDemo

This repo contains the Mcrouter Ansible Operator. Mcrouter uses memcache as backend and the operator written for memcache deployment by Dylan Murray @dymurray helped as a reference for this. This operator was created using the Operator-SDK and is intended for PoC/small scale demos in their current form.

Instructions to Run

Requirements

  • minikube
  • kubectl
  • operator-sdk

Connect to minikube docker environment

eval $(minikube docker-env)

Create the custom resource definition for mcrouter

kubectl create -f deploy/crds/mcrouter_v1alpha2_mcrouter_crd.yaml

Build the mcrouter-operator docker image

operator-sdk build mcrouter-operator:v0.0.1

Create service account, role and role_bindings

kubectl create -f deploy/service_account.yaml
kubectl create -f deploy/role.yaml
kubectl create -f deploy/role_binding.yaml

Deploy the Operator

kubectl create -f deploy/operator.yaml

Create the custom resources for mcrouter

You can change the pods to be deployed inside the files

kubectl create -f deploy/crds/mcrouter_v1alpha2_mcrouter_cr.yaml

Once everything is deployed you can use the kubectl get all command to check of mcrouter-operator and memcache and deployed mcrouter are working

Use the below testing scenario to check if mcrouter and memcached are working as expected

Connect to mcrouter using the telnet container and send the following commands to see if you get expected output

kubectl run -it --rm telnet --image=jess/telnet --restart=Never <mcrouter_pod_ip> 5000

In the telnet prompt send below commands

    set mykey 0 0 5
    hello
    get mykey
    quit

Connect to memcached service using the telnet container and send the stats command to see if it gives you output.

Helpful articles and referenced content below:

ansopdemo's People

Contributors

anshulbehl avatar johnlieske 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.