Git Product home page Git Product logo

demo-programmability's Introduction

Demo Programmability for GUARD

Requirements

  • bash as shell.
  • kubectl.

Installation Steps

  1. Go to the directory.

    cd demo-programmability
  2. Apply configuration.

    source bin/config.sh
  3. Start demo

    k8s-start
  4. Open Kibana the browser at http://localhost:5601. In Management > Saved Object import the JSON demo-programmability/resources/context-broker/kibana/saved-objects-$elk_version.json where $elk_version is the version of Elastic stack (at this moment: 6.8.1 or 7.0.1).

Traffic Generator

Apache

k8s-gen-apache -n <number of request per second>

Mysql

Generate x requests per second.

k8s-gen-mysql -c <number of commands per second per user> -u <number of users>

SynFlood

Generate requests.

k8s-gen-synflood -n <number of requests per seconds>

Log Collector period

Set the period to collect data by the agents.

Apache

  • Filebeat

    k8s-period-filebeat -p deploy/apache - s <period>

    E.g.: k8s-period-filebeat -p deploy/apache -s 10s

Mysql

  • Metricbeat

    k8s-period-metricbeat -p deploy/mysql -m mysql -s <period>

    E.g.: k8s-period-metricbeat -p deploy/mysql -m mysql -s 10s

SSH Server

  • Cubebeat

    k8s-period-cubebeat -p deploy/ssh-server -s <period>

    E.g.: k8s-period-cubebeat -p deploy/ssh-server -s 10s

System

  • Metricbeat

    k8s-period-metricbeat -p deploy/apache -m system -s <period>
    k8s-period-metricbeat -p deploy/mysql -m system -s <period>
    k8s-period-metricbeat -p deploy/ssh-server -m system -s <period>

    E.g.:

    k8s-period-metricbeat -p deploy/apache -m system -s 10s
    k8s-period-metricbeat -p deploy/mysql -m system -s 10s
    k8s-period-metricbeat -p deploy/ssh-server -m system -s 10s

Useful commands

  • Update pods (works only if the pods are already create).

    kubectl replace -f ./pod
  • Delete all pods instance (they will be recreated automatically by k8s)

    kubectl delete pod -all -n guard-kube
  • Delete all pods (they will NOT be recreated automatically by k8s)

    kubectl delete deployment -all -n guard-kube
  • Delete all configMaps

    kubectl delete configmap -all -n guard-kube
  • Delete all services

    kubectl delete service -all -n guard-kube

Utilties

  • k8s - shortcut for kubectl -n guard-kube.

  • k8s-get - shortcut for k8s get -o wide.

  • k8s-desc - shortcut for k8s describe pods.

  • k8s-log - shortcut for k8s logs.

  • k8s-pod - shortcut for k8s-get pods.

  • k8s-serv - shortcut for k8s-get services.

  • k8s-map - shortcut for k8s-get configmaps.

  • k8s-start - Start the demo.

  • k8s-frwd -t - port forwarding for . Possible values: elastic, kibana.

period

  • k8s-period-filebeat -p -s - sets the (e.g. 10s) for filebeat in .

  • k8s-period-metricbeat -p -m -s - sets the (e.g. 10s) for of metricbeat in .

  • k8s-period-cubebeat -p -s - sets the (e.g. 10s) for cubebeat in .

  • k8s-period-filebeat -p - gets the period (e.g. 10s) for filebeat in .

  • k8s-period-metricbeat -p -m - gets the period (e.g. 10s) for of metricbeat in pod.

  • k8s-period-cubebeat -p - gets the period (e.g. 10s) for cubebeat in .

demo-programmability's People

Contributors

alexcarrega avatar

Stargazers

 avatar

Watchers

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