Skip to content

Commit

Permalink
Add documentation site content (#92)
Browse files Browse the repository at this point in the history
* Added initial documentation for pages site
  • Loading branch information
jk-intuit authored Sep 15, 2021
1 parent 7527e85 commit 559368a
Show file tree
Hide file tree
Showing 22 changed files with 312 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ including CDK, Terraform and Cloud Formation via GitOps.

* [Get Started Here](/docs/quickstart.md)
* [Architecture](/docs/architecture.md)
* [API](/docs/api.md)
* [Development Setup](/docs/development.md)
* [API](/docs/developers/api.md)
* [Development Setup](/docs/developers/development-env.md)
8 changes: 4 additions & 4 deletions docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Architecture](/pictures/architecure.png)
![Architecture](./assets/architecure.png)

## Definitions

Expand Down Expand Up @@ -30,7 +30,7 @@ environment variable which is read by the service at startup. The admin token is
project. User tokens do not have the ability to manage the associated project or targets. User tokens have the format **PROVIDER:USER:SECRET**. User tokens are passed in the **Authorization** header to
the service.

* **Credential Tokens** Is used to obtain target credentials. Credential tokens are short lived and limited use tokens. They are generated and passed to the workflow during an operation. The token is then exchanged (via the credential provider) for target credentials (AWS credentials, etc). Credential tokens have a format based on the provider and should be considered opaque (for example vault **s.ABCDEFGHIJKLMNOPQRSTUVWXYZ**). Credentials tokens are
* **Credential Tokens** Are used to obtain target credentials. Credential tokens are short lived and limited use tokens. They are generated and passed to the workflow during an operation. The token is then exchanged (via the credential provider) for target credentials (AWS credentials, etc). Credential tokens have a format based on the provider and should be considered opaque (for example vault **s.ABCDEFGHIJKLMNOPQRSTUVWXYZ**). Credentials tokens are
passed from the credential provider to the service and then on to the workflow.

## State
Expand All @@ -53,13 +53,13 @@ Additionally you can define your own frameworks in **argo-cloudops.yaml**.

## Workflow

Argo CloudOps uses Argo Workflows as it's workflow engine. To execute the provided command, an Argo workflow
Argo CloudOps uses [Argo Workflows](https://argoproj.github.io/argo-workflows/) as its workflow engine. To execute the provided command, an Argo workflow
is submitted by the service. Ordinary users should not need to access Argo workflows directly. Workflows
are stored as Argo Workflow Templates. Currently there is one generic workflow for all commands which
performs one step which executes the image provided with the command, arguments and environment variables.

## Config

The config file contains the commands executed by different frameworks. The example config in
[/examples/argo-cloudops.yaml](/examples/argo-cloudops.yaml) contains the default commands to
[argo-cloudops.yaml](https://github.com/argoproj-labs/argo-cloudops/blob/main/argo-cloudops.yaml) contains the default commands to
run **cdk** and **terraform**.
File renamed without changes
32 changes: 32 additions & 0 deletions docs/cli/argo-cloudops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## argo-cloudops

argo-cloudops is the command line interface to Argo CloudOps

```
argo-cloudops [command]
```

### Options

```
Available Commands:
completion generate the autocompletion script for the specified shell
diff Diff a project target using a manifest in git
get Gets status of workflow
help Help about any command
list List workflow executions for a given project and target
logs Gets logs from a workflow
sync Syncs a project target using a manifest in git
version Reports the version
workflow Creates a workflow execution with provided arguments
Flags:
-h, --help help for argo-cloudops
```

### SEE ALSO

* [argo-cloudops logs](argo-cloudops_logs.md) - gets logs from a workflow



16 changes: 16 additions & 0 deletions docs/cli/argo-cloudops_diff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## argo-cloudops diff
Diff a project target using a manifest in git

```
argo-cloudops diff [flags]
```

### Flags

```
-h, --help help for diff
-p, --path string Path to manifest within git repository
-n, --project_name string Name of project
-s, --sha string Commit sha to use when creating workflow through git
-t, --target string Name of target
```
12 changes: 12 additions & 0 deletions docs/cli/argo-cloudops_get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## argo-cloudops get
Gets status of workflow

```
argo-cloudops get [workflow name] [flags]
```

### Flags

```
-h, --help help for get
```
14 changes: 14 additions & 0 deletions docs/cli/argo-cloudops_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## argo-cloudops list
List workflow executions for a given project and target

```
argo-cloudops list [flags]
```

### Flags

```
-h, --help help for list
-n, --project_name string Name of project
-t, --target_name string Name of target
```
14 changes: 14 additions & 0 deletions docs/cli/argo-cloudops_logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## argo-cloudops logs

Gets logs from a workflow

```
argo-cloudops logs [workflow name] [flags]
```

### Flags

```
-f, --follow Follow workflow logs and stream to standard out until workflow is complete
-h, --help help for logs
```
17 changes: 17 additions & 0 deletions docs/cli/argo-cloudops_sync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## argo-cloudops sync

Syncs a project target using a manifest in git

```
argo-cloudops sync [flags]
```

### Flags

```
-h, --help help for sync
-p, --path string Path to manifest within git repository
-n, --project_name string Name of project
-s, --sha string Commit sha to use when creating workflow through git
-t, --target string Name of target
```
20 changes: 20 additions & 0 deletions docs/cli/argo-cloudops_workflow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## argo-cloudops workflow
Creates a workflow execution with provided arguments

```
argo-cloudops workflow [flags]
```

### Flags

```
-a, --arguments string CSV string of equals separated arguments to pass to command (-a Arg1=ValueA,Arg2=ValueB).
-e, --environment_variables string CSV string of equals separated environment variable key value pairs (-e Key1=ValueA,Key2=ValueB)
-f, --framework string Framework to execute
-h, --help help for workflow
-p, --parameters string CSV string of equals separated parameters name and value (-p Param1=ValueA,Param2=ValueB).
-n, --project_name string Name of project
-t, --target string Name of target
--type string Workflow type to execute
-w, --workflow_template_name string Name of the workflow template
```
24 changes: 24 additions & 0 deletions docs/developers/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing

## How To Provide Feedback

Please [raise an issue in Github](https://github.com/argoproj-labs/argo-cloudops/issues).

## Code of Conduct

See [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/master/code-of-conduct.md).

## How To Contribute

We're always looking for contributors.

* Documentation - something missing or unclear? Please submit a pull request!
* Code contribution - investigate an [issue](https://github.com/argoproj-labs/argo-cloudops/issues)

### Local Development Environment

To run Argo CloudOps locally for [development](development-env.md).

### Test Policy

Changes without unit tests are unlikely to be accepted.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/development.md → docs/developers/development-env.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,4 @@ project and target. This returns the **ARGO_CLOUDOPS_USER_TOKEN** for the new pr
# Get the status / logs
./build/argo-cloudops get $TERRAFORM_WORKFLOW_NAME
./build/argo-cloudops logs $TERRAFORM_WORKFLOW_NAME
```
```
File renamed without changes.
7 changes: 7 additions & 0 deletions docs/developers/static-code-analysis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Static Code Analysis

We use the following static code analysis tools:

* [golangci-lint](https://github.com/argoproj-labs/argo-cloudops/blob/main/.golangci.yaml) for compile time linting

This is run on each pull request.
7 changes: 7 additions & 0 deletions docs/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# FAQ

> Argo CloudOps server returns "INTERNAL ERROR" when following logs
This happens when a deployment executes for a long time. Just reissue the logs command to retry. Team is tracking an [issue](https://github.com/argoproj-labs/argo-cloudops/issues/93) to resolve


23 changes: 23 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[![build](https://github.com/argoproj-labs/argo-cloudops/actions/workflows/build.yaml/badge.svg)](https://github.com/argoproj-labs/argo-cloudops/actions/workflows/build.yaml)


## What Is Argo CloudOps?

Argo CloudOps is a service for running infrastructure as code software tools
including CDK, Terraform and Cloud Formation via GitOps.

* Separate build and deployment
* Isolate cloud credentials
* Separate access by project and targets

## Why Argo CloudOps?

* GitOps opperating model
* Multi cloud support (AWS, GCP, etc)
* Multi framework support (CDK, Terraform, etc)
* Pluggable components (Workflows, Frameworks, Credentials Providers, etc)

# Argo Documentation

### Getting Started
For set-up information and running your first Workflows, please see our [Getting Started](quickstart.md) guide.
3 changes: 3 additions & 0 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Roadmap


20 changes: 20 additions & 0 deletions docs/users/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# CLI

The CLI allows to (amongst other things) manage projects, sync, watch, and list deployments, e.g.:

```sh
WFNAME=`argo-cloudops sync -n project1 -t target1 -p git_path -s git_sha`
argo-cloudops logs $WFNAME -f
```

## Reference

You can find [detailed reference here](/cli/argo-cloudops)

## Help

Most help topics are provided by built-in help:

```
argo-cloudops --help
```
29 changes: 29 additions & 0 deletions docs/users/coreconcepts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Core Concepts

This page serves as additional information in addition to the [Argo CloudOps Architecture](/architecture).


## Project

A project is a logical collection of all deployment targets.

### Properties
| Name | Description |
|-----------------|---------------------------------------------------------------------------------------------------------------|
| name | name for the project |
| repository | link to the github repository with [all project manifests](https://github.com/argoproj-labs/argo-cloudops/blob/main/manifests/cdk_manifest.yaml). Should match the auth method being used (HTTPS, SSH). |

## Target

A target represents a unique deployment for a project. It contains information related to cloud account access mechanism & policies for scoping permissions. Currently the only type of cloud account supported is AWS.

### Properties

| Name | Description |
|-----------------|-----------------------------------------------------------------------|
| credential_type | the type of credential mechanis to use. Currently only "assumed_role" |
| role_arn | the role that the service assumes |
| policy_arns | A list of AWS policy ARNs to use for permissions scope limiting |
| policy_document | An inline document to scope down permissions |


23 changes: 23 additions & 0 deletions docs/users/envvars.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Environment Variables

Argo CloudOps uses a number of environment variables for configuration. In addition to the table below, you can review the [start_local.sh](https://github.com/argoproj-labs/argo-cloudops/blob/main/scripts/start_local.sh) script for examples.

| Name | Description |
|--------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
| ARGO_CLOUDOPS_ADMIN_SECRET | Secret for the Argo CloudOps API |
| VAULT_ROLE | Role for accessing Vault API |
| VAULT_SECRET | Secret for access Vault instance |
| VAULT_ADDR | Endpoint for the Vault instance |
| ARGO_ADDR | Argo Endpoint |
| ARGO_CLOUDOPS_WORKFLOW_EXECUTION_NAMESPACE | Namespace to use to execute the deployments in Argo Workflows (Default: argo) |
| ARGO_CLOUDOPS_CONFIG | File that contains argo cloudops command configuration. [Example](https://github.com/argoproj-labs/argo-cloudops/blob/main/argo-cloudops.yaml) |
| SSH_PEM_FILE | PEM file to use for GITHUB access authentication |
| ARGO_CLOUDOPS_GIT_AUTH_METHOD | A value of SSH or HTTPS depending on which authentication method prefered. |
| ARGO_CLOUDOPS_GIT_HTTPS_USER | User name for GITHUB access authentication via HTTPS. |
| ARGO_CLOUDOPS_GIT_HTTPS_PASS | Password for GITHUB access authentication via HTTPS. |
| ARGO_CLOUDOPS_DB_HOST | Database Host |
| ARGO_CLOUDOPS_DB_USER | Database User |
| ARGO_CLOUDOPS_DB_PASSWORD | Database Password |
| ARGO_CLOUDOPS_DB_NAME | Database name |
| ARGO_CLOUDOPS_LOG_LEVEL | The configured log level for Argo CloudOps service (Default: Info) |
| ARGO_CLOUDOPS_PORT | Port which the Argo CloudOps service listens (Default: 8443) |
44 changes: 44 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
site_name: Argo CloudOps - The engine for cloud deployments
repo_url: https://github.com/argoproj-labs/argo-cloudops
strict: true
theme:
name: material
palette:
primary: blue
font:
text: Work Sans
markdown_extensions:
- codehilite
- admonition
- pymdownx.superfences
- pymdownx.details
- toc:
permalink: true
nav:
- Overview: index.md
- Architecture: architecture.md
- Quick Start: quickstart.md
- User Guide:
- Beginner:
- Core Concepts: users/coreconcepts.md
- CLI: users/cli.md
- Environment Variables: users/envvars.md
- Examples: https://github.com/argoproj-labs/argo-cloudops/blob/master/examples/README.md
- CLI Reference:
- argo-cloudops: cli/argo-cloudops.md
- argo-cloudops sync: cli/argo-cloudops_sync.md
- argo-cloudops diff: cli/argo-cloudops_diff.md
- argo-cloudops get: cli/argo-cloudops_get.md
- argo-cloudops list: cli/argo-cloudops_list.md
- argo-cloudops workflow: cli/argo-cloudops_workflow.md
- argo-cloudops logs: cli/argo-cloudops_logs.md
- Developer Guide:
- Local Development Environment: developers/development-env.md
- Contributing: developers/CONTRIBUTING.md
- Static Code Analysis: developers/static-code-analysis.md
- API: developers/api.md
- Releasing: developers/releasing.md
- FAQ: faq.md
- Releases ⧉: https://github.com/argoproj-labs/argo-cloudops/releases
- Roadmap: roadmap.md
- Appendix: appendix.md

0 comments on commit 559368a

Please sign in to comment.