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

Need documentation for new developer getting started guide #231

Open
barney-s opened this issue Jan 29, 2025 · 2 comments
Open

Need documentation for new developer getting started guide #231

barney-s opened this issue Jan 29, 2025 · 2 comments

Comments

@barney-s
Copy link
Member

Documentation Issue

Location:
NA

Current State:
None

Suggested Changes:
Topics:

  • New developer getting started
  • How do you build and deploy to your cluster locally
  • How do you create new releases

Additional Context:
NA

@newtondev
Copy link
Contributor

Hi there, I currently use CodeSpaces here on GitHub for doing development as well of testing of kro. The nice thing is that most of the tools are pre-installed.

The base image it uses:

👋 Welcome to Codespaces! You are on our default image. 
   - It includes runtimes and tools for Python, Node.js, Docker, and more. See the full list here: https://aka.ms/ghcs-default-image
   - Want to use a custom image instead? Learn more here: https://aka.ms/configure-codespace

🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P or F1).

📝 Edit away, run your app as usual, and we'll automatically make it available for you to access.

Thereafter I tend to get a kubernetes cluster up and running using kind:

# install kind
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind

# create a kubernetes cluster
kind create cluster

# check the pods after installation
kubectl get pods -A

Generating and building kro:

# ensure kustomize is installed at the correct version
make kustomize

# generate dependencies and build kro
make build

# install kro to your cluster in kro-system namespace
kubectl apply -k config/default

# scale down the deployment
kubectl scale deployment kro-controller-manager -n kro-system --replicas=0

# start up kro connected to your cluster
make run

# install an example app definition
kubectl apply -f examples/kubernetes/webapp/rg.yaml
kubectl apply -f examples/kubernetes/webapp/instance.yaml

# get the CRDs
kubectl get crds
# NAME                               CREATED AT
# resourcegraphdefinitions.kro.run   2025-02-03T10:40:56Z
# webapps.kro.run                    2025-02-03T10:47:24Z

Output in the terminal:

@newtondev ➜ /workspaces/kro (main) $ make run
test -s /workspaces/kro/bin/controller-gen && /workspaces/kro/bin/controller-gen --version | grep -q v0.16.2 || \
GOBIN=/workspaces/kro/bin go install sigs.k8s.io/controller-tools/cmd/[email protected]
/workspaces/kro/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
cp config/crd/bases/* helm/crds
/workspaces/kro/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
go run ./cmd/controller/main.go
2025-02-03T10:44:45.708Z        INFO    dynamic-controller      Starting dynamic controller
2025-02-03T10:44:45.708Z        DEBUG   dynamic-controller      Waiting for all informers to sync
2025-02-03T10:44:45.708Z        DEBUG   dynamic-controller      Finished waiting for informers to sync  {"duration": "1.9µs"}
2025-02-03T10:44:45.708Z        INFO    controller-runtime.metrics      Starting metrics server
2025-02-03T10:44:45.708Z        INFO    controller-runtime.metrics      Serving metrics server  {"bindAddress": ":8078", "secure": false}
2025-02-03T10:44:45.708Z        INFO    starting server {"name": "health probe", "addr": "[::]:8079"}
2025-02-03T10:44:45.708Z        INFO    Starting EventSource    {"controller": "resourcegraphdefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "source": "kind source: *v1alpha1.ResourceGraphDefinition"}
2025-02-03T10:44:45.708Z        INFO    Starting Controller     {"controller": "resourcegraphdefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition"}
2025-02-03T10:44:45.814Z        INFO    Starting workers        {"controller": "resourcegraphdefinition", "controllerGroup": "kro.run", "controllerKind": "ResourceGraphDefinition", "worker count": 1}

You can now apply the resources to the cluster and see the output in the logs.

You can also build and ship the image to the kind cluster which requires some additional tools like finch to be installed.

Before creating the documentation page, it would be good to get more feedback from people actively working on the project. I would be happy to assist with this.

@barney-s
Copy link
Member Author

barney-s commented Feb 5, 2025

#266 is a first good step. Please add a docs/using-codespaces.md or docs/quickstart.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants