forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make argocd gitpod friendly (argoproj#5973)
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
- Loading branch information
Alexander Matyushentsev
authored
Apr 6, 2021
1 parent
1bc3348
commit 92c7ca0
Showing
10 changed files
with
159 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ test-results | |
.scannerwork | ||
.scratch | ||
node_modules/ | ||
.kube/ | ||
|
||
# ignore built binaries | ||
cmd/argocd/argocd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM gitpod/workspace-full | ||
|
||
USER root | ||
|
||
RUN curl -o /usr/local/bin/kubectl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ | ||
chmod +x /usr/local/bin/kubectl | ||
|
||
RUN curl -L https://go.kubebuilder.io/dl/2.3.1/$(go env GOOS)/$(go env GOARCH) | \ | ||
tar -xz -C /tmp/ && mv /tmp/kubebuilder_2.3.1_$(go env GOOS)_$(go env GOARCH) /usr/local/kubebuilder | ||
|
||
RUN apt-get install redis-server -y | ||
RUN go get github.com/mattn/goreman | ||
|
||
USER gitpod | ||
|
||
ENV ARGOCD_REDIS_LOCAL=true | ||
ENV KUBECONFIG=/tmp/kubeconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
image: | ||
file: .gitpod.Dockerfile | ||
|
||
tasks: | ||
- init: make mod-download-local dep-ui-local && GO111MODULE=off go get github.com/mattn/goreman | ||
command: make start-test-k8s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -548,3 +548,6 @@ dep-ui: test-tools-image | |
|
||
dep-ui-local: | ||
cd ui && yarn install | ||
|
||
start-test-k8s: | ||
go run ./hack/k8s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Use Gitpod | ||
|
||
[Gitpod](https://www.gitpod.io/) is an open-source platform for automated and ready-to-code development environments. | ||
GitPod is probably the easiest way to get ready to use development environment with the most tools that are required | ||
for Argo CD development. | ||
|
||
## How To Use It | ||
|
||
1. Fork [https://github.com/argoproj/argo-cd](https://github.com/argoproj/argo-cd) repository | ||
1. Create Gitpod workspace by opening the following url in the browser: | ||
https://gitpod.io/#https://github.com/<USERNAME>/argo-cd | ||
`The <USERNAME> is your Github username` | ||
|
||
1. Once workspace is created you should see VSCode editor in the browser as well as workspace initialization | ||
logs in the VSCode terminal. The initialization process downloads all backend and UI dependencies as well | ||
as starts K8S control plane powered by Kubebuilder [envtest](https://book.kubebuilder.io/reference/envtest.html). | ||
Please wait until you see `Kubeconfig is available at /tmp/kubeconfig` message: | ||
|
||
 | ||
|
||
1. You are ready to go! | ||
|
||
Once your workspace is ready you can use VS Code to make code changes. Run `goreman start` to start Argo CD components | ||
and test your changes. Use the Gitpod user interface or [CLI](https://www.gitpod.io/docs/command-line-interface/) to | ||
access Argo CD API/UI from your laptop. | ||
|
||
## Why/When To Use It? | ||
|
||
Gitpod is a perfect tool in following cases: | ||
|
||
* you are a first-time contributor and eager to start coding; | ||
* you are traveling and don't want to setup development tools on your laptop; | ||
* you want to review pull request and need to quickly run code from the PR without changing your local setup; | ||
|
||
## Limitations | ||
|
||
There are some known limitations: | ||
|
||
* You can only use VS Code | ||
* Free plan provides 50 hours per month | ||
* [Envtest](https://book.kubebuilder.io/reference/envtest.html) based Kubernetes is only control plane. | ||
So you won't be able to deploy Argo CD applications that runs actual pods. | ||
* Codegen tools are not available. E.g. you won't be able to use `make codegen-local`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.