Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Make https://argoproj.github.io/argo/ #3369

Merged
merged 38 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
928b457
docs: Add automation doc
alexec Jun 26, 2020
20226b5
docs: Move docs onto mkdocs
alexec Jun 26, 2020
760f974
mkdocs
alexec Jun 26, 2020
1fe52f6
mkdocs
alexec Jun 26, 2020
bfa2d79
mkdocs
alexec Jun 29, 2020
d802f62
mkdocs
alexec Jun 29, 2020
850bd91
mkdocs
alexec Jun 29, 2020
05f1248
mkdocs
alexec Jun 29, 2020
7e37f96
Update automation.md
alexec Jun 29, 2020
b008611
Merge branch 'master' into mkdocs
alexec Jun 29, 2020
9ac67c0
mkdocs
alexec Jun 30, 2020
7e38992
mkdocs
alexec Jun 30, 2020
331cfb4
mkdocs
alexec Jun 30, 2020
ccb98f7
Merge branch 'master' into auto
alexec Jun 30, 2020
d459542
auto
alexec Jun 30, 2020
9302b9a
Merge branch 'auto' of github.com:alexec/argo into auto
alexec Jun 30, 2020
8e21cba
Merge branch 'auto' into mkdocs
alexec Jun 30, 2020
df9b0c8
mkdocs
alexec Jun 30, 2020
f0d3bc4
Merge branch 'master' into mkdocs
alexec Jun 30, 2020
3b809a1
mkdocs
alexec Jun 30, 2020
a80f4e9
mkdocs
alexec Jun 30, 2020
c3879c4
build: Update codegen
alexec Jun 30, 2020
7f1c072
mkdocs
alexec Jun 30, 2020
f271ff0
Merge branch 'master' into mkdocs
alexec Jun 30, 2020
d475083
mkdocs
alexec Jun 30, 2020
d8fbd6c
Merge branch 'master' into mkdocs
alexec Jul 1, 2020
59b3912
Merge branch 'master' into mkdocs
alexec Jul 1, 2020
86a5281
mkdocs
alexec Jul 1, 2020
56f7ee6
mkdocs
alexec Jul 1, 2020
938158f
mkdocs
alexec Jul 1, 2020
458f6af
mkdocs
alexec Jul 1, 2020
5403d8c
mkdocs
alexec Jul 1, 2020
893acf7
mkdocs
alexec Jul 2, 2020
b58cd73
Merge branch 'master' into mkdocs
alexec Jul 8, 2020
e02f58a
Merge branch 'master' into mkdocs
alexec Jul 8, 2020
e53861b
Merge branch 'master' into mkdocs
alexec Jul 8, 2020
344c6bf
mkdocs
alexec Jul 8, 2020
1ac71d0
mkdocs
alexec Jul 8, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

automatically publish docs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is great


on:
push:
branches:
- mkdocs
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.x
- name: build
run: |
pip install mkdocs==1.0.4 mkdocs_material==4.1.1
mkdocs build
mkdir ./site/.circleci && echo '{version: 2, jobs: {build: {branches: {ignore: gh-pages}}}}' > ./site/.circleci/config.yml
- name: deploy
uses: peaceiris/actions-gh-pages@v2.5.0
env:
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ git-ask-pass.sh
/pkg/apiclient/workflow/workflow.swagger.json
/pkg/apiclient/workflowarchive/workflow-archive.swagger.json
/pkg/apiclient/workflowtemplate/workflow-template.swagger.json
/site/
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ pkg/apiclient/workflow/workflow.swagger.json: proto
pkg/apiclient/workflowarchive/workflow-archive.swagger.json: proto
pkg/apiclient/workflowtemplate/workflow-template.swagger.json: proto

pkg/apiclient/_.secondary.swagger.json: hack/secondaryswaggergen.go pkg/apis/workflow/v1alpha1/openapi_generated.go dist/kubernetes.swagger.json
pkg/apiclient/_.secondary.swagger.json: hack/secondaryswaggergen.go server/static/files.go pkg/apis/workflow/v1alpha1/openapi_generated.go dist/kubernetes.swagger.json
go run ./hack secondaryswaggergen

# we always ignore the conflicts, so lets automated figuring out how many there will be and just use that
Expand All @@ -489,10 +489,13 @@ api/openapi-spec/swagger.json: dist/kubeified.swagger.json
swagger validate api/openapi-spec/swagger.json
go test ./api/openapi-spec

docs/swagger.md:
npm install -g swagger-markdown
swagger-markdown -i api/openapi-spec/swagger.json -o docs/swagger.md

.PHONY: docs
docs: swagger
go run ./hack docgen
go run ./hack readmegen
docs: api/openapi-spec/swagger.json docs/swagger.md
env ARGO_SECURE=false ARGO_INSECURE_SKIP_VERIFY=false ARGO_SERVER= ARGO_INSTANCEID= go run ./hack docgen

# pre-push

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ kubectl apply -n argo -f https://raw.githubusercontent.com/argoproj/argo/stable/
[Official Argo Workflows user list](USERS.md)

## Documentation
* [Get started here](docs/getting-started.md)
* [Get started here](docs/quick-start.md)
* [How to write Argo Workflow specs](examples/README.md)
* [How to configure your artifact repository](docs/configure-artifact-repository.md)

Expand Down
4 changes: 2 additions & 2 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Please [raise an issue in Github](https://github.com/argoproj/argo/issues).

## Code of Conduct

See [code of conduct](../CODE_OF_CONDUCT.md).
See [code of conduct](https://github.com/argoproj/argo/blob/master/CODE_OF_CONDUCT.md).

## How To Contribute

Expand All @@ -22,7 +22,7 @@ To run Argo Workflows locally for development: [running locally](running-locally

### Test Policy

Changes without either unit or e2e tests are unlikely to be accepted. See [the pull request template](../.github/pull_request_template.md).
Changes without either unit or e2e tests are unlikely to be accepted. See [the pull request template](https://github.com/argoproj/argo/blob/master/.github/pull_request_template.md).

### Contributor Workshop

Expand Down
55 changes: 2 additions & 53 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,12 @@

### Getting Started

For set-up information and running your first Workflows, please see our [Getting Started](getting-started.md) guide.
For set-up information and running your first Workflows, please see our [Getting Started](quick-start.md) guide.

### Examples

For detailed examples about what Argo can do, please see our [Argo Workflows: Documentation by Example](../examples/README.md) page.
For detailed examples about what Argo can do, please see our [documentation by example](examples/README.md) page.

### Fields

For a full list of all the fields available in for use in Argo, and a link to examples where each is used, please see [Argo Fields](fields.md).

### Features
Some use-case specific documentation is available:

* [Contributing](CONTRIBUTING.md)
* [Access Token](access-token.md)
Comment on lines -14 to -19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is this going to go? Is it getting removed entirely?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mkdocs will create an index from on mkdoc.yaml

* [Argo Workflow Architecture](architecture.md)
* [Argo Server Auth Mode](argo-server-auth-mode.md)
* [Argo Server SSO](argo-server-sso.md)
* [Argo Server](argo-server.md)
* [Artifact Repository Ref](artifact-repository-ref.md)
* [Asynchronous Job Pattern](async-pattern.md)
* [CLI](cli.md)
* [Cluster Workflow Templates](cluster-workflow-templates.md)
* [Configuring Your Artifact Repository](configure-artifact-repository.md)
* [Core Concepts](core-concepts.md)
* [Cost Optimisation](cost-optimisation.md)
* [Cron Backfill](cron-backfill.md)
* [Cron Workflows](cron-workflows.md)
* [Default Workflow Spec](default-workflow-specs.md)
* [Enhanced Depends Logic](enhanced-depends-logic.md)
* [Argo Fields](fields.md)
* [Getting Started](getting-started.md)
* [Links](links.md)
* [Managed Namespace](managed-namespace.md)
* [Prometheus Metrics](metrics.md)
* [Node Field Selectors](node-field-selector.md)
* [Offloading Large Workflows](offloading-large-workflows.md)
* [Public API](public-api.md)
* [Release Instructions](releasing.md)
* [Resource Duration](resource-duration.md)
* [REST API](rest-api.md)
* [Running Locally](running-locally.md)
* [Scaling](scaling.md)
* [Security](security.md)
* [Service Accounts](service-accounts.md)
* [Static Code Analysis](static-code-analysis.md)
* [Transport Layer Security](tls.md)
* [Workflow Variables](variables.md)
* [Versioning](versioning.md)
* [Windows Container Support](windows.md)
* [Work Avoidance](work-avoidance.md)
* [Workflow Archive](workflow-archive.md)
* [Workflow Controller Configmap](workflow-controller-configmap.md)
* [Workflow Creator](workflow-creator.md)
* [Workflow Events](workflow-events.md)
* [Workflow Executors](workflow-executors.md)
* [Workflow Notifications](workflow-notifications.md)
* [Workfow RBAC](workflow-rbac.md)
* [Workflow Restrictions](workflow-requirements.md)
* [Workflow Templates](workflow-templates.md)
11 changes: 7 additions & 4 deletions docs/access-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@ You now need to get a token:

```shell script
SECRET=$(kubectl -n argo get sa jenkins -o=jsonpath='{.secrets[0].name}')
ARGO_TOKEN=$(kubectl -n argo get secret $SECRET -o=jsonpath='{.data.token}' | base64 --decode)
ARGO_TOKEN="Bearer $(kubectl -n argo get secret $SECRET -o=jsonpath='{.data.token}' | base64 --decode)"
echo $ARGO_TOKEN
ZXlKaGJHY2lPaUpTVXpJMU5pSXNJbXRwWkNJNkltS...
Bearer ZXlKaGJHY2lPaUpTVXpJMU5pSXNJbXRwWkNJNkltS...
```

!!!NOTE
The `ARGO_TOKEN` should always start with "Bearer ".

Use that token with the CLI (you need to set `ARGO_SERVER` too):

```shell script
Expand All @@ -39,14 +42,14 @@ argo list
Use that token in your API requests, e.g. to list workflows:

```shell script
curl https://localhost:2746/api/v1/workflows/argo -H "Authorisation: Bearer $ARGO_TOKEN"
curl https://localhost:2746/api/v1/workflows/argo -H "Authorisation: $ARGO_TOKEN"
# 200 OK
```

You should check you cannot do things you're not allowed!

```shell script
curl https://localhost:2746/api/v1/workflow-templates/argo -H "Authorisation: Bearer $ARGO_TOKEN"
curl https://localhost:2746/api/v1/workflow-templates/argo -H "Authorisation: $ARGO_TOKEN"
# 403 error
```

Expand Down
11 changes: 1 addition & 10 deletions docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
# Argo Workflow Architecture

> v2.5 and after

From v2.5, you can run Argo WF in two modes: "local" and "hosted".

![diagram](assets/architecture-v2-5.png)

> v2.4 and before
# Architecture

## Argo Workflow Overview

![diagram](assets/overview.jpeg)


## Workflow controller architecture

![diagram](assets/architecture.jpeg)
Expand Down
59 changes: 56 additions & 3 deletions docs/argo-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Use this mode if:
* You want a drop-in replacement for the Argo UI.
* If you need to prevent users from directly accessing the database.

Hosted mode is provided as part of the standard [manifests](../manifests), [specifically in argo-server-deployment.yaml](../manifests/base/argo-server/argo-server-deployment.yaml) .
Hosted mode is provided as part of the standard [manifests](https://github.com/argoproj/argo/blob/master/manifests), [specifically in argo-server-deployment.yaml](https://github.com/argoproj/argo/blob/master/manifests/base/argo-server/argo-server-deployment.yaml) .

## Local Mode

Expand All @@ -32,7 +32,7 @@ To run locally:
argo server
```

This will start a server on port 2746 which you can view at [http://localhost:2746](http://localhost:2746]).
This will start a server on port 2746 which you can view at [http://localhost:2746](http://localhost:2746).

## Options

Expand All @@ -56,4 +56,57 @@ See [TLS](tls.md).

### SSO

See [SSO](argo-server-sso.md).
See [SSO](argo-server-sso.md).


## Access the Argo Workflows UI

```sh
kubectl -n argo port-forward deployment/argo-server 2746:2746
```

Then visit: http://127.0.0.1:2746

By default, the Argo UI service is not exposed with an external IP. To access the UI, use one of the
following:

### Method 1: kubectl port-forward

```
kubectl -n argo port-forward deployment/argo-server 2746:2746
```

Then visit: http://127.0.0.1:8001

### Method 2: kubectl proxy

```
kubectl proxy
```

Then visit: http://127.0.0.1:8001/api/v1/namespaces/argo/services/argo-ui/proxy/

NOTE: artifact download and webconsole is not supported using this method

### Method 3: Expose a LoadBalancer

Update the argo-ui service to be of type `LoadBalancer`.

```
kubectl patch svc argo-ui -n argo -p '{"spec": {"type": "LoadBalancer"}}'
```

Then wait for the external IP to be made available:

```
kubectl get svc argo-ui -n argo
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
argo-ui LoadBalancer 10.19.255.205 35.197.49.167 80:30999/TCP 1m
```

NOTE: On Minikube, you won't get an external IP after updating the service -- it will always show
`pending`. Run the following command to determine the Argo UI URL:

```
minikube service -n argo --url argo-ui
```
Binary file added docs/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions docs/async-pattern.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ In this case the ```job-cmd``` parameter can be a command that makes an http cal

On job completion the external job would need to call either resume if successful:

You may need an [access token](access-token.md).

```
curl --request PUT \
--url http://localhost:2746/api/v1/workflows/<NAMESPACE>/<WORKFLOWNAME>/resume
--header 'content-type: application/json' \
--header "Authorization: Bearer $ARGO_TOKEN" \
--data '{
"namespace": "<NAMESPACE>",
"name": "<WORKFLOWNAME>",
Expand All @@ -77,6 +80,7 @@ or stop if unsuccessful:
curl --request PUT \
--url http://localhost:2746/api/v1/workflows/<NAMESPACE>/<WORKFLOWNAME>/stop
--header 'content-type: application/json' \
--header "Authorization: Bearer $ARGO_TOKEN" \
--data '{
"namespace": "<NAMESPACE>",
"name": "<WORKFLOWNAME>",
Expand All @@ -94,3 +98,10 @@ Instead you need to use the `--restart-successful` option, eg if using the templ
```
argo retry <WORKFLOWNAME> --restart-successful --node-field-selector templateRef.template=run-external-job,phase=Failed
```

See also:

* [access token](access-token.md)
* [resuming a workflow via automation](resuming-workflow-via-automation.md)
* [submitting a workflow via automation](submit-workflow-via-automation.md)
* [one workflow submitting another](workflow-submitting-workflow.md)
23 changes: 16 additions & 7 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,29 @@
# CLI

Most help topics are provided using built-in help
The CLI allows to (amongst other things) submit, watch, and list workflows, e.g.:

```sh
argo submit my-wf.yaml
argo list
```

## Reference

You can find [detailed reference here](cli/argo.md)

## Help

Most help topics are provided by built-in help:

```
argo --help
```

# Argo Server

![GA](assets/ga.svg)

> v2.5 and after
## Argo Server

You'll need to configure your commands to use the Argo Server if you have [offloaded node status](offloading-large-workflows.md) or are trying to access your [workflow archive](workflow-archive.md).

To do so, set the ARGO_SERVER environment variable, e.g.:
To do so, set the `ARGO_SERVER` environment variable, e.g.:

```
export ARGO_SERVER=localhost:2746
Expand Down
Loading