From 6f18990c11315bd4b93e544903fddca37ddeccb0 Mon Sep 17 00:00:00 2001 From: Brett Fowle Date: Sat, 13 Oct 2018 19:07:02 -0400 Subject: [PATCH] cleanup; update README to reflect what repo is --- .gitattributes | 4 +- README.md | 122 +++++++++++-------------------------- bin/bootstrap-openshift.sh | 6 -- helm-crb.yaml | 18 ------ 4 files changed, 38 insertions(+), 112 deletions(-) delete mode 100755 bin/bootstrap-openshift.sh delete mode 100644 helm-crb.yaml diff --git a/.gitattributes b/.gitattributes index 4e89d23..c4af508 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,2 +1,4 @@ *.yaml linguist-language=YAML linguist-detectable -jekyll/* linguist-generated +*.md linguist-language=Markdown linguist-detectable +docs/* linguist-documentation linguist-generated +jekyll/* linguist-documentation=false diff --git a/README.md b/README.md index 76bea3c..1d36bdb 100644 --- a/README.md +++ b/README.md @@ -1,103 +1,51 @@ # fim-k8s -## Running +This repository fronts the **fim-k8s** application suite. It includes several +components that make up the documentation, configuration files linked in the +docs, and a set of common examples to get you started. -#### Kubernetes +**tl;dr--** [get started +here](https://clustergarage.io/fim-k8s/docs/getting-started/)! -``` -kubectl apply -f https://raw.githubusercontent.com/clustergarage/fim-k8s/master/configs/fim-k8s.yaml -``` +## Purpose -#### OpenShift +The documentation files that build the [marketing +site](https://clustergarage.io/fim-k8s/) are hosted and maintained here. +Configuration files are hosted in order to be linked as raw YAML that can be +`apply`ed to your running cluster. In addition to those, a suite of common +examples that allow you to familiarize yourself with how to set up watchers on +common applications in both vanilla Kubernetes as well as OpenShift variants. -``` -# fimcontroller deployment requires scc: anyuid -# fimd daemonset requires scc: privileged +## Configuration Files -oc apply -f https://raw.githubusercontent.com/clustergarage/fim-k8s/master/configs/fim-openshift.yaml -``` +Located under: +- `configs/fim-k8s.yaml` — for vanilla Kubernetes clusters +- `configs/fim-openshift.yaml` — for OpenShift clusters -#### Helm +Presents the production configuration files to stand it up in your running +cluster; the steps to use these are summarized in the [getting +started](https://clustergarage.io/fim-k8s/docs/getting-started/) section of the +documentation. -``` -# install from tgz archive -helm install https://github.com/clustergarage/fim-k8s/releases/download/v0.1.0/fim-k8s-0.1.0.tgz +## Running Examples -# add to repo and install -helm repo add clustergarage -https://raw.githubusercontent.com/clustergarage/fim-k8s/master/helm/ -helm repo update -helm install clustergarage/fim-k8s -``` +Located under: +- `examples/*` -## Defining a FimWatcher component +Provides sample configurations to create and monitor FimWatchers with various +applications that will be outlined in the [examples and best +practices](https://clustergarage.io/fim-k8s/docs/examples/) documentation. -``` -apiVersion: fimcontroller.clustergarage.io/v1alpha1 -kind: FimWatcher -metadata: [...] -spec: - selector: - matchLabels: - run: myapp - subjects: - - paths: - - /var/log/myapp - events: - - open - - modify - ignore: - - .git - - .cache - - paths: - - /var/log/financialdata - events: - - all - onlyDir: true - recursive: true - maxDepth: 2 -``` +## Helm Repository -## Examples +If using the popular Kubernetes package manager Helm, we maintain and host a +Helm repository in this area as well. -#### Guestbook example (Kuberetes) +Located under: +- `helm/*` -``` -kubectl apply -f https://raw.githubusercontent.com/kubernetes/kubernetes/release-1.10/examples/guestbook/all-in-one/guestbook-all-in-one.yaml -kubectl apply -f examples/guestbook-fim-watch.yaml -``` +Further information on how to use the Helm variation of **fim-k8s** is also +located in the [getting +started](https://clustergarage.io/fim-k8s/docs/getting-started/) section of the +documentation. -#### NGiNX example (Kubernetes) - -``` -kubectl run nginx --image=nginx -kubectl apply -f examples/nginx-fim-watch.yaml -``` - -#### Django example (OpenShift) - -``` -oc new-app python:3.5~https://github.com/openshift/django-ex -oc apply -f examples/djangoex-fim-watch.yaml -``` - -##### Testing/Debugging - -``` -# tail logs of controller/daemon -oc logs -f -n fim fimcontroller.clustergarage.io-[...] -oc logs -f -n fim fimd.clustergarage.io-[...] - -# scale deployment up/down to see watchers get started/stopped -oc edit dc django-ex - -# generate create/modify message -oc rsh django-ex-[...] -echo "test" >> /opt/app-root/test.log -``` - -#### Sidecar example (OpenShift) - -``` -oc apply -f examples/sidecar/ -``` diff --git a/bin/bootstrap-openshift.sh b/bin/bootstrap-openshift.sh deleted file mode 100755 index 7128a38..0000000 --- a/bin/bootstrap-openshift.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -oc new-project fim -oc adm policy add-scc-to-user anyuid -n fim -z fim-admin -oc adm policy add-scc-to-user privileged -n fim -z fim-admin -oc apply -f configs/ diff --git a/helm-crb.yaml b/helm-crb.yaml deleted file mode 100644 index 05d1846..0000000 --- a/helm-crb.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: helm - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: helm -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin -subjects: - - kind: ServiceAccount - name: helm - namespace: kube-system