From b7c677c208d73d8211fa745e81eebb8af50da598 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Lazo Date: Thu, 1 Jun 2023 14:52:36 -0400 Subject: [PATCH] chore: improve contributing readme closes #78 --- INSTALL.md | 4 ++-- docs/CONTRIBUTING.md | 38 +++++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 613b8ba..dd3265d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -15,7 +15,7 @@ The following tools are need on the host: * docker (1.12+) or Docker for Mac (17+) * git * make -* golang +* golang (v1.18) * rsync (if you're using the build container on mac) * helm (v2.8.2+) * kubebuilder (v1.0.4+) @@ -97,4 +97,4 @@ For example, if you'd like to spin up a DigitalOcean Droplet, run the command ```console kubectl apply -f examples/compute ``` -and check your DigitalOcean account to see if the Droplet has been created. \ No newline at end of file +and check your DigitalOcean account to see if the Droplet has been created. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 808cf90..25cdd31 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -1,11 +1,35 @@ -# Local Environment Setup +# Contributing -We have included some makefile targets to ease the local development process. You will need the following tools installed to get started. +We have included some makefile targets to ease the local development process. You will need the following tools +installed to get started. -- [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/) -- [Kubectl](https://kubernetes.io/docs/tasks/tools/) -- [Crossplane CLI](https://crossplane.io/docs/v1.4/getting-started/install-configure.html#install-crossplane-cli) (Not required, but suggested) +## How-Tos -You can then run `make` which will build the project and setup the build submodule. Once this is finished you can then run `make dev` which will boot up a kind cluster, install Crossplane, any CRDs for the project, and then start the provider. +### Getting Started -You can run `make dev-clean` to then cleanup the cluster, or `make dev-restart` which will run the `dev-clean` and then the `dev` targets. +1. Install [Kind][0]. +2. Install [Kubectl][1]. +3. Install [Crossplane CLI][2] (Not required, but suggested). +4. Install `make`. +5. Install `go` version `1.18`. +6. Run `make submodules` to initialize the submodules. +7. Run `make dev` to start the cluster and install the provider. + +### Cleanup the Cluster + +1. Run `make dev-clean` to then clean up the cluster. +2. Run `make dev-restart` to then start the cluster again. Or run `make dev-restart` which will run the `make dev-clean` + and then the `make dev` targets. + +## Explanations + +### Makefile + +- `make dev` will boot up a `kind` cluster, install `Crossplane`, any `CRDs` for the project, and then start the + provider. + +[0]: https://kind.sigs.k8s.io/docs/user/quick-start/ + +[1]: https://kubernetes.io/docs/tasks/tools/ + +[2]: https://docs.crossplane.io/v1.10/getting-started/install-configure#install-crossplane-cli