Skip to content

Commit

Permalink
chore: doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Jun 27, 2024
1 parent 753104d commit a148afc
Show file tree
Hide file tree
Showing 18 changed files with 274 additions and 116 deletions.
14 changes: 9 additions & 5 deletions canary-checker/docs/scripting/cel.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
title: CEL Expressions
---

`expr` expressions in canary checker use the [Go Common Expression Language (CEL)](https://github.com/google/cel-go).
See [Language Definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md#overview)
`expr` expressions use the [Common Expression Language (CEL)](https://cel.dev/)

:::tip
The [CEL playground](https://playcel.undistro.io/) lets you quickly test CEL expressions
:::


```yaml title=http-check-expr.yaml
apiVersion: canaries.flanksource.com/v1
Expand Down Expand Up @@ -950,7 +954,7 @@ urldecode("hello+world+%3F") // 'hello world ?'
`filepath.Base` returns the last element of path.
Trailing path separators are removed before extracting the last element.
If the path is empty, Base returns ".".
If the path is empty, Base returns `.`.
If the path consists entirely of separators, Base returns a single separator.
```javascript
Expand All @@ -971,7 +975,7 @@ filepath.Clean("/foo/bar/../baz") // Evaluates /foo/baz
`filepath.Dir` returns all but the last element of path, typically the path's directory.
After dropping the final element, Dir calls Clean on the path and trailing
slashes are removed.
If the path is empty, Dir returns ".".
If the path is empty, Dir returns `.`.
If the path consists entirely of separators, Dir returns a single separator.
The returned path does not end in a separator unless it is the root directory.
Expand Down Expand Up @@ -1008,7 +1012,7 @@ are ignored. The result is Cleaned. However, if the argument
list is empty or all its elements are empty, Join returns
an empty string.
On Windows, the result will only be a UNC path if the first
non-empty element is a UNC path.
non-empty element is a UNC path addict.
```javascript
filepath.Join(["/home/flanksource", "projects", "gencel"]; // /home/flanksource/projects/gencel
Expand Down
8 changes: 3 additions & 5 deletions common/src/components/Step.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@ import React from 'react';

import MDXContent from '@theme/MDXContent';

export default function Step({ name, step, children, style = "tutorial", anchor }) {
export default function Step({ name, step, children, style = "tutorial", anchor, from }) {
return <MDXContent >

<span className="step-anchor" id={anchor} />
<span class="flex flex-row items-center gap-2 my-2 p-2 rounded-md bg-zinc-100 step-container">
<span class="flex flex-row items-center gap-2">
<img
src={`/img/icons/circled-${step}.svg`}
// style={{ height: { height } }}
className={style == "tutorial" ? "inline-block object-center h-7" : "inline-block object-center h-6"} />
<span className="number-dark-gray">{(from || 0) + step}</span>

</span>
<span className={style == "tutorial" ? "text-lg text-gray-700 " : "text-md text-gray-700 "}>{name}{anchor &&
<a href={`#${anchor}`} class="hash-link" />
Expand Down
37 changes: 37 additions & 0 deletions common/src/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,43 @@

@tailwind utilities;

.number {
@apply bg-gray-200;
display: inline-block;
border-radius: 50%;
font-weight: 600;
height: 1.7em;
line-height: 1.6em;
padding: 0;
text-align: center;
margin-right: 3px;
width: 1.7em;
}

.number-dark-gray {
@apply number;
@apply bg-gray-600;
@apply text-white;
}

.number-red {
@apply number;
@apply bg-red-400;
@apply text-white;
}

.number-green {
@apply number;
@apply bg-green-400;
@apply text-white;
}

.number-blue {
@apply number;
@apply bg-blue-400;
@apply text-white;
}

:root {
--docsearch-hit-active-color: blue;
--docusaurus-highlighted-code-line-bg: rgb(229, 229, 229);
Expand Down
7 changes: 0 additions & 7 deletions mission-control/docs/config-db/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ pagination_prev:
sidebar_position: 1
---

import useBaseUrl from '@docusaurus/useBaseUrl';

import ConceptURL from "/img/config-db.svg";



<img src="/img/config-db.svg" width="900px" className='pb-10'></img>

The Mission Control Catalog is a centralized repository that automatically discovers, transforms and tracks infrastructure, applications and configuration across many environments.
Expand All @@ -31,7 +25,6 @@ Some key benefits include:
Under the hood the catalog is powered by [github.com/flanksource/config-db](https://github.com/flanksource/config-db).
:::


The catalog is comprised of:

* **Config Items** are individual resources e.g. `Pod`, `EBS`, `IAM Role`, `postgres.conf` scraped from external sources like [AWS](/config-db/scrapers/aws), [Kubernetes](/config-db/scrapers/kubernetes), [Azure](/config-db/scrapers/azure), [Azure Devops](/config-db/scrapers/azure-devops) , [Github](/config-db/scrapers/github)
Expand Down
2 changes: 1 addition & 1 deletion mission-control/docs/config-db/tutorials/date-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Date Mapping

In this tutorial, you'll use the config-db CLI to scrape a file that consists of a list of virtual machines.

## 1. Create the config files
## Create the config files

```json title="web-server.json"
{
Expand Down
53 changes: 44 additions & 9 deletions mission-control/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ pagination_prev: null
---


import { SlClose, SlCheck } from "react-icons/sl"

Flanksource Mission Control is an Internal Developer Platform that helps teams improve developer productivity and operational resilience.

![](/img/how-it-works.svg)
Expand All @@ -24,19 +26,52 @@ With Mission Control you can:
* [Notify People and Systems](./notifications) about changes in health and configuration.


### When not to use Mission Control

Mission Control is best suited for medium to large teams with complex infrastructure and applications. If you have a simple setup with just a few servers, tools like Ansible, Terraform and Prometheus may be enough.

* **Your primary concern is Develop**_**ment**_ **Experience & Maturity**. Mission Control is focused on improving the **operational experience for develop*ers***, enabling them to quickly understand, troubleshoot and operate on complex systems.
* **You prefer ClickOps to GitOps**. Mission Control is built on a GitOps first principle, and configured using Kubernetes Custom Resource Defintions. While there is a configuration UI, it is primarily for rapid prototyping and testing.
* **Your application / team has no dependencies across multiple teams or services**. Mission Control is best suited for distributed systems with dependencies across teams and services that need to be visualized and tracked.
<div className="flex flex-col gap-8 my-10 md:flex-row">
<div className="rounded-lg bg-primary-300 p-4 pt-6 pb-8 text-black md:w-1/2" style={{
border: "1px solid #0c63db"
}}>

<div className=" w-full justify-center flex mb-4">
<SlCheck size="48px" style={{strokeWidth: "1px"}} color="#0c63db" />
</div>
<h2 className="mb-6 text-center font-basier text-2xl font-semibold">When to use Mission Control?</h2>
<ul className="ml-4 flex list-disc flex-col gap-y-2 ">
<li>You prefer GitOps and Kubernetes</li>
<li>You want to adopt GitOps and IDP's incrementally</li>
<li>You prefer self-hosted</li>
<li>You have a mix of on-premise, cloud and legacy</li>
</ul>
</div>
<div className="rounded-lg border-gray-500 border p-4 pt-6 md:w-1/2" style={{
border: "1px solid #cbd5e1"
}}>

<div className="w-full justify-center flex mb-4">
<SlClose size="48px" color="#64748b" />
</div>

<h2 className="mb-6 text-center font-basier text-2xl font-semibold">When NOT to use Mission Control?</h2>
<ul className="ml-4 flex list-disc flex-col gap-y-2 ">
<li>You prefer ClickOps to GitOps</li>
<li>You have dedicated full-stack Platform Engineers</li>
<li>You are mostly serverless</li>
<li>You want to track team/app maturity</li>
</ul>
</div>
</div>

## Unified Catalog

Mission Control automatically builds a comprehensive view of your infrastructure, spanning across cloud providers and technologies. It goes beyond simple discovery by collecting detailed service metadata from various sources. This dynamic catalog is enriched with real-time events, change tracking, and insights from leading security and cost management tools. A powerful graph visualization further enhances understanding by revealing dependencies and system health at a glance.

## GitOps Orchestrator / Playbooks

Mission Control makes it easy to adopt GitOps incrementally. With its intuitive web console, you can edit resources managed by Flux, Argo, Terraform while submitting changes as Git Pull Requests - all without writing a single Git command or pipline. This lets you benefit from GitOps without the steep learning curve.

:::tip
While YAML is preferred for configuration, Mission Control does provide highly optimized UI for viewing, navigating and operating on the catalogs and playbooks defined in YAML/CRDs.
:::
Mission Control also enables you to build meta control planes by reacting to changes in health and state and then running playbooks that commit changes back to git.

* Your system is very simple with few applications, dependencies and changes.


## Getting Started
Expand Down
9 changes: 5 additions & 4 deletions mission-control/docs/reference/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ e.g.

Pattern matching suports the following operations

- Use `*` to exclude all.
- Prefix matching. Example: `Added*,Deleted*`
- Suffix matching. Example: `*Terminated`
- Negation will match everything but the pattern: Example: `!PodCrashLooping`
- `*` - Match anything
- `Added,Deleted` - Match either `Added` or `Deleted`
- `Added*` Match anything starting with `Added`
- `*Terminated` Match anything ending with `Added`
- `!PodCrashLooping` - Match everthing except `PodCrashLooping`
2 changes: 1 addition & 1 deletion mission-control/docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ Thank you for your contribution to the security of this project!
* Vulnerabilities in third-party applications or services unless they pose a direct risk to Flanksource.
* Physical security controls unless they can be directly exploited to compromise our systems.
* Social engineering attacks, phishing attempts, or spamming activities.
* Denial of service attacks or brute-force attacks againstFlanksource infrastructure.
* Denial of service attacks or brute-force attacks.
* Any activity that violates laws or regulations, or that disrupts the normal operation of Flanksource services.
15 changes: 15 additions & 0 deletions mission-control/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions mission-control/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"prism-react-renderer": "^2.3.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-icons": "^5.2.1",
"react-markdown": "^9.0.1",
"tailwindcss": "^3.4.3",
"url-loader": "4.1.1"
Expand Down
16 changes: 16 additions & 0 deletions styles/Flanksource/Condescending.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
extends: existence
message: Using '%s' may come across as condescending.
link: https://css-tricks.com/words-avoid-educational-writing/
level: error
ignorecase: true
tokens:
- obvious
- obviously
- simple
- simply
- easy
- easily
- of course
- clearly
- everyone knows
30 changes: 0 additions & 30 deletions styles/Flanksource/Contractions.yml

This file was deleted.

40 changes: 0 additions & 40 deletions styles/Flanksource/DateNumerals.yml

This file was deleted.

8 changes: 0 additions & 8 deletions styles/Flanksource/DateSpellMonth.yml

This file was deleted.

17 changes: 17 additions & 0 deletions styles/Flanksource/DictateFeelings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
extends: existence
message: "Don't tell people how they feel with words like '%s'."
link: https://docs.digitalocean.com/style/pdocs/tone#empathize-with-the-reader
ignorecase: false
level: error
action:
name: remove
tokens:
- '[Ee]asy'
- simple
- '[Jj]ust'
- '[Oo]bvious(ly)?'
- '[Ss]imply'
- '[Ee]as(y|ily)'
- '[Oo]f course'
- '[Cc]learly'
- '[Ee]veryone knows'
12 changes: 12 additions & 0 deletions styles/Flanksource/FutureTense.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends: existence
message: "Use present tense verbs, not future tense verbs like '%s'. Say '(event) happens' instead of '(event) will happen'."
link: https://docs.digitalocean.com/style/digitalocean/language/verbs
ignorecase: true
action:
name: remove
tokens:
- will
- shall
- won't
- shan't
- "[A-Za-z]*'ll"
Loading

0 comments on commit a148afc

Please sign in to comment.