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: docs and hacks improvements #6310

Merged
merged 3 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 19 additions & 1 deletion docs/running-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,43 @@
* [Go](https://golang.org/dl/) (The project currently uses version 1.15)
* [Yarn](https://classic.yarnpkg.com/en/docs/install/#mac-stable)
* [Docker](https://docs.docker.com/get-docker/)
* [Kustomize](https://github.com/kubernetes-sigs/kustomize/blob/master/docs/INSTALL.md)
* [Kustomize](https://kubectl.docs.kubernetes.io/installation/kustomize/)
* [protoc](http://google.github.io/proto-lens/installing-protoc.html) `brew install protobuf`
* [`jq`](https://stedolan.github.io/jq/download/)
* A local Kubernetes cluster

### 1. Set up a local cluster

We recommend using [K3D](https://k3d.io/) to set up the local Kubernetes cluster since this will allow you to test RBAC set-up and is fast. You can set-up K3D to be part of your default kube config as follows:

k3d cluster start --wait

Alternatively, you can use [Minikube](https://github.com/kubernetes/minikube) to set up the local Kubernetes cluster. Once a local Kubernetes cluster has started via `minikube start`, your kube config will use Minikube's context automatically.


### 2. Set up local service aliases

Add to /etc/hosts:

127.0.0.1 dex
127.0.0.1 minio
127.0.0.1 postgres
127.0.0.1 mysql

### 3. Install Argo and start the controller

To install into the “argo” namespace of your cluster: Argo and MinIO (for saving artifacts and logs):

make start

### 4. (Optional) Set up a DB for the Workflow archive

If you want MySQL for the workflow archive:

make start PROFILE=mysql

### 5. Check out the Argo services running locally

You’ll now have

* Argo Server API on https://localhost:2746
Expand All @@ -44,6 +55,13 @@ Either:

At this point you’ll have everything you need to use the CLI and UI.


### 6. Build Argo images

Before submitting/running workflows, build all Argo images, so they're available for the workflow.

make build

## Troubleshooting Notes

If you get a similar error when running one of the make pre-commit tests `make: *** [pkg/apiclient/clusterworkflowtemplate/cluster-workflow-template.swagger.json] Error 1`, ensure you are working within your $GOPATH (YOUR-GOPATH/src/github.com/argoproj/argo-workflows).
Expand Down
12 changes: 7 additions & 5 deletions hack/recurl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ set -eux -o pipefail
file=$1
url=$2

# loop forever
while ! curl -L -o "$file" -- "$url" ;do
echo "sleeping before trying again"
sleep 10s
done
if [ ! -f "$file" ]; then
# loop forever
while ! curl -L -o "$file" -- "$url" ;do
echo "sleeping before trying again"
sleep 10s
done
fi

chmod +x "$file"