Skip to content

Commit

Permalink
docs: Add cli.guance.io as Homepage (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
yufeiminds authored Dec 1, 2023
1 parent 0b701b0 commit 0d50a4c
Show file tree
Hide file tree
Showing 66 changed files with 4,520 additions and 394 deletions.
63 changes: 5 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,68 +5,15 @@
[![Downloads](https://img.shields.io/github/downloads/GuanceCloud/guance-cli/total.svg)](https://github.com/GuanceCloud/guance-cli/releases)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=GuanceCloud_guance-cli&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=GuanceCloud_guance-cli)

A command-line tool to help users interact with Guance Cloud.
Your toolkit for Guance Cloud control-plane

![cover](./artwork/cover.png)

## Features
## Quickstart

| Topic | Feature | Proposals | Spec | State | Related Projects |
| --------------------------------------- | ----------------- | --------------------------------------------------------- | -------------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 🔧 _Command-line Interface_ | **Core** | [A001](./proposals/A001-guance-cli-overview.md) | [View](specs/guance.spec.md) | Stable | - |
| 🚅 _Resource Exporter_ | **Console** | - | [View](specs/iac/import/console/console.spec.md) | Beta | [![terraform-guance-dashboard](https://img.shields.io/badge/guance-terraform--guance--dashboard-blue?style=flat-square&logo=github)](https://github.com/GuanceCloud/terraform-guance-dashboard)<br/>[![terraform-guance-monitor](https://img.shields.io/badge/guance-terraform--guance--monitor-blue?style=flat-square&logo=github)](https://github.com/GuanceCloud/terraform-guance-monitor) |
| | **Grafana** | [C002](./proposals/C002-importer-grafana.md) | [View](specs/iac/import/grafana/node-exporter/README.md) | Alpha | [![json-model](https://img.shields.io/badge/guance-json--model-blue?style=flat-square&logo=github)](https://github.com/GuanceCloud/json-model) |
| 🚀 _Continuation Integration / Testing_ | **JMeter** | [C001](./proposals/C001-continuous-integration-jmeter.md) | WIP | WIP | [![jmeter](https://img.shields.io/badge/apache-jmeter-blue?style=flat-square&logo=github)](https://github.com/apache/jmeter) |
| | **JUnit** | WIP | WIP | WIP | [![junit](https://img.shields.io/badge/junit--team-junit5-blue?style=flat-square&logo=github)](https://github.com/junit-team/junit5) |
| 📦 _Components Installer_ | **DataKit** | WIP | WIP | WIP | [![DataKit](https://img.shields.io/badge/guance-DataKit-blue?style=flat-square&logo=github)](https://github.com/GuanceCloud/DataKit) |
| | **SCheck** | WIP | WIP | WIP | [![SCheck](https://img.shields.io/badge/guance-SCheck-blue?style=flat-square&logo=github)](https://github.com/GuanceCloud/SCheck) |
| 🔭 _Ecosystem Integration_ | **GitHub Action** | - | WIP | WIP | [![setup-guance](https://img.shields.io/badge/guance-setup--guance-blue?style=flat-square&logo=github)](https://github.com/GuanceCloud/setup-guance) |
| | **DevContainer** | - | WIP | WIP | WIP |

References:

1. For more details about the proposal governance mechanism, see [Guance CLI Proposals](./proposals/README.md).
2. For more details about user specification, see [Guance CLI User Specification](./specs/README.md).

## Installation

### Mac OSX

```shell
brew tap GuanceCloud/homebrew-tap
brew install GuanceCloud/tap/guance
```

### Ubuntu or Debian

```shell
echo "deb [trusted=yes] https://releases.guance.io/apt/ /" | sudo tee /etc/apt/sources.list.d/guance.list
sudo apt update
sudo apt install guance
```

### CentOS or RHEL

```shell
cat <<EOF | sudo tee /etc/yum.repos.d/guance.repo
[guance]
name=Guance Cloud Repo
baseurl=https://releases.guance.io/yum/
enabled=1
gpgcheck=0
EOF
sudo yum install -y guance
```

### Binary

See the [release page](https://github.com/GuanceCloud/guance-cli/releases) to download the latest release.

### Verify Installation

```shell
guance version
```
* [Documentation](https://cli.guance.io)
* [Features & Roadmap](https://cli.guance.io/features)
* [Online Trainings](https://cli.guance.io/trainings)

## Feedback

Expand Down
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.next
node_modules
21 changes: 21 additions & 0 deletions docs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Shu Ding

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
12 changes: 10 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Documentation

## Table of Contents
This is a documentation folder for Guance CLI.

- [References](./references/guance.md)
## Local Development

First, run `pnpm i` to install the dependencies.

Then, run `pnpm dev` to start the development server and visit localhost:3000.

## License

This project is licensed under the MIT License.
13 changes: 13 additions & 0 deletions docs/components/button/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
interface ButtonProps {
href: string
title: string
type: string
}

export default function Button(props: ButtonProps) {
return <div className="mt-6">
<a href={props.href} target="_blank">
<button className={`btn btn-${props.type}`}>{props.title}</button>
</a>
</div>
}
25 changes: 25 additions & 0 deletions docs/components/card/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
interface CardProps {
title: string
children: JSX.Element,
type?: "future" | "complete" | "beta"
}

export const Cards = function(props: {children: JSX.Element[]}) {
return <div className="grid grid-cols-3 gap-4">
{props.children}
</div>
}

export const Card = function(props: CardProps) {
return <div className="card w-96 bg-base-100 border mt-4 shadow-sm">
<div className="card-body">
<h2 className="card-title">
{props.title}
{props.type == "future" && <span className="badge badge-lg badge-primary">FUTURE</span>}
{props.type == "complete" && <span className="badge badge-lg badge-success">COMPLETE</span>}
{props.type == "beta" && <span className="badge badge-lg badge-accent">BETA</span>}
</h2>
{props.children}
</div>
</div>
}
19 changes: 19 additions & 0 deletions docs/components/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export default function Footer() {
return <footer className="footer footer-center p-10 text-base-content rounded">
<nav className="grid grid-flow-col gap-4">
<a className="link link-hover" href="https://guance.io/" target="_blank">Community</a>
<a className="link link-hover" href="https://github.com/GuanceCloud/guance-cli" target="_blank">GitHub</a>
</nav>
<nav>
<div className="grid grid-flow-col gap-4">
<a href="https://github.com/GuanceCloud/guance-cli" target="_blank">
<svg width="24" height="24" fill="currentColor" viewBox="3 3 18 18"><title xt-marked="ok">GitHub</title><path d="M12 3C7.0275 3 3 7.12937 3 12.2276C3 16.3109 5.57625 19.7597 9.15374 20.9824C9.60374 21.0631 9.77249 20.7863 9.77249 20.5441C9.77249 20.3249 9.76125 19.5982 9.76125 18.8254C7.5 19.2522 6.915 18.2602 6.735 17.7412C6.63375 17.4759 6.19499 16.6569 5.8125 16.4378C5.4975 16.2647 5.0475 15.838 5.80124 15.8264C6.51 15.8149 7.01625 16.4954 7.18499 16.7723C7.99499 18.1679 9.28875 17.7758 9.80625 17.5335C9.885 16.9337 10.1212 16.53 10.38 16.2993C8.3775 16.0687 6.285 15.2728 6.285 11.7432C6.285 10.7397 6.63375 9.9092 7.20749 9.26326C7.1175 9.03257 6.8025 8.08674 7.2975 6.81794C7.2975 6.81794 8.05125 6.57571 9.77249 7.76377C10.4925 7.55615 11.2575 7.45234 12.0225 7.45234C12.7875 7.45234 13.5525 7.55615 14.2725 7.76377C15.9937 6.56418 16.7475 6.81794 16.7475 6.81794C17.2424 8.08674 16.9275 9.03257 16.8375 9.26326C17.4113 9.9092 17.76 10.7281 17.76 11.7432C17.76 15.2843 15.6563 16.0687 13.6537 16.2993C13.98 16.5877 14.2613 17.1414 14.2613 18.0065C14.2613 19.2407 14.25 20.2326 14.25 20.5441C14.25 20.7863 14.4188 21.0746 14.8688 20.9824C16.6554 20.364 18.2079 19.1866 19.3078 17.6162C20.4077 16.0457 20.9995 14.1611 21 12.2276C21 7.12937 16.9725 3 12 3Z"></path></svg>
</a>

</div>
</nav>
<aside>
<p>This project is under MIT License</p>
</aside>
</footer>
}
4 changes: 4 additions & 0 deletions docs/components/integration/index.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* .card img {
aspect-ratio: 12/6.3;
object-fit: cover;
} */
58 changes: 58 additions & 0 deletions docs/components/integration/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import {Cards} from 'nextra/components'
import './index.module.css'
import Image from "next/image";
import killerCoda from "../../public/killercoda.svg";


interface TrainingsProps {
title: string
description: string
items: Training[]
}

interface Training {
title: string
href: string
}

export default function Trainings(props: TrainingsProps) {
return <>
<h1 className="mt-10 mb-4 text-center text-[2.5rem] font-bold tracking-tight">
{props.title}
</h1>

<p className="mb-16 text-center text-lg text-gray-500 dark:text-gray-400">
{props.description}
</p>

<Integrations>
{props.items.map((item, index) => {
return <Item key={index} title={item.title} href={item.href}>
<div className="bg-black p-10">
<Image src={killerCoda} alt="KillerCoda"/>
</div>
</Item>
})}

</Integrations>
</>
}
export const Integrations = (props) => {
return <Cards {...props} />
}

export const Item = ({children, ...props}) => {
const cardProps = {
...props, ...{
title: props.title || '未知',
href: props.href || '',
icon: props.icon || '',
image: true,
arrow: true,
target: '_blank',
}
}
return <Cards.Card {...cardProps}>
<div className="bg-white">{children}</div>
</Cards.Card>
}
69 changes: 69 additions & 0 deletions docs/components/landing/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { ChevronRightIcon } from '@heroicons/react/20/solid'

export default function Example() {
return (
<div className="bg-white">
<div className="relative isolate overflow-hidden bg-gradient-to-b from-indigo-100/20">
<div className="mx-auto max-w-7xl pb-24 pt-10 sm:pb-32 lg:grid lg:grid-cols-2 lg:gap-x-8 lg:px-8 lg:py-40">
<div className="px-6 lg:px-0 lg:pt-4">
<div className="mx-auto max-w-2xl">
<div className="max-w-lg">
<img
className="h-11"
src="/icon.png"
alt="Guance Cloud"
/>
<div className="mt-24 sm:mt-32 lg:mt-16">
<a href="/docs/how-to-guides/grafana" className="inline-flex space-x-6">
<span className="rounded-full bg-indigo-600/10 px-3 py-1 text-sm font-semibold leading-6 text-indigo-600 ring-1 ring-inset ring-indigo-600/10">
What's new
</span>
<span className="inline-flex items-center space-x-2 text-sm font-medium leading-6 text-gray-600">
<span>
🎉 Grafana importer is released.
</span>
<ChevronRightIcon className="h-5 w-5 text-gray-400" aria-hidden="true" />
</span>
</a>
</div>
<h1 className="mt-10 text-4xl font-bold tracking-tight text-gray-900 sm:text-6xl">
Your toolkit for Guance Cloud control-plane
</h1>
<p className="mt-6 text-lg leading-8 text-gray-600">
Developer-first toolkit to manage / export / import cloud resources on Guance.
</p>
<div className="mt-10 flex items-center gap-x-6">
<a
href="/features"
className="rounded-md bg-indigo-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
View all features
</a>
<a href="/docs/tutorials/quickstart" className="text-sm font-semibold leading-6 text-gray-900">
Read documentation <span aria-hidden="true"></span>
</a>
</div>
</div>
</div>
</div>
<div className="mt-20 sm:mt-24 md:mx-auto md:max-w-2xl lg:mx-0 lg:mt-0 lg:w-screen">
<div className="mockup-code min-h-full">
<pre data-prefix="$">guance login</pre>
<pre data-prefix=">" className="text-success">Login as [email protected]!</pre>
<pre></pre>
<pre data-prefix="#" className="text-neutral-500">Import from external system</pre>
<pre data-prefix="$">guance iac import grafana --search --search-tags o11y</pre>
<pre data-prefix=">" className="text-warning">Found 42 dashboards.</pre>
<pre data-prefix=">" className="text-success">Generate Guance code files.</pre>
<pre></pre>
<pre data-prefix="#" className="text-neutral-500">Manage cloud resources</pre>
<pre data-prefix="$">guance api create-resource pipeline ...</pre>
<pre data-prefix=">" className="text-success">Done!</pre>
</div>
</div>
</div>
<div className="absolute inset-x-0 bottom-0 -z-10 h-24 bg-gradient-to-t from-white sm:h-32" />
</div>
</div>
)
}
6 changes: 6 additions & 0 deletions docs/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[[plugins]]
package = "@netlify/plugin-nextjs"

[build]
publish = ".next"
command = "npm run build"
5 changes: 5 additions & 0 deletions docs/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
11 changes: 11 additions & 0 deletions docs/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const withNextra = require('nextra')({
theme: 'nextra-theme-docs',
themeConfig: './theme.config.tsx',
defaultShowCopyCode: true,
})

/**
* @type {import('next').NextConfig}
*/
module.exports = withNextra({
})
Loading

0 comments on commit 0d50a4c

Please sign in to comment.