-
Notifications
You must be signed in to change notification settings - Fork 165
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
A few updates to the getting started docs #1330
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
### Local Development Install | ||
|
||
#### When using public registries | ||
#### Create a cluster | ||
|
||
Access to a Kubernetes cluster is needed in order to install the kpack controllers. | ||
|
||
An easy way to get a cluster up and running is to use [`kind`](https://kind.sigs.k8s.io/docs/user/quick-start/). | ||
|
||
You'll also need: | ||
* [`go`](https://go.dev/doc/install) | ||
* [`pack`](https://buildpacks.io/docs/tools/pack/) | ||
* [`docker`](https://docs.docker.com/get-docker/) | ||
* [`ytt`](https://carvel.dev/ytt/docs/v0.44.0/install/) | ||
|
||
#### When using public registries | ||
|
||
```bash | ||
kubectl cluster-info # ensure you have access to a cluster | ||
./hack/apply.sh <IMAGE/NAME> # <IMAGE/NAME> is a writable and publicly accessible location | ||
docker login <registry namespace> # must be writable and publicly accessible; e.g., your Docker Hub username or gcr.io/<some-project> | ||
./hack/apply.sh <registry namespace> | ||
``` | ||
|
||
#### When using private registries | ||
|
||
Create a kubernetes secret with the registry creds | ||
|
||
```bash | ||
kubectl create secret docker-registry regcreds -n kpack --docker-server=gcr.io --docker-username=_json_key --docker-password="$(cat gcp.json)" | ||
kubectl create secret docker-registry regcreds -n kpack --docker-server=gcr.io/<some-project> --docker-username=_json_key --docker-password="$(cat gcp.json)" | ||
``` | ||
|
||
Create an overlay to use those registry creds | ||
|
@@ -65,64 +76,29 @@ EOF | |
### Running Unit Tests | ||
|
||
```bash | ||
go test ./pkg/... | ||
make unit | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using |
||
``` | ||
|
||
### Running End-to-end Tests | ||
```bash | ||
go test ./test/... | ||
``` | ||
|
||
* To run the e2e tests, kpack must be installed and running on a cluster | ||
|
||
* The KPACK_TEST_NAMESPACE_LABELS environment variable allows you to define additional labels for the test namespace, e.g. | ||
|
||
```bash | ||
export KPACK_TEST_NAMESPACE_LABELS="istio-injection=disabled,purpose=test" | ||
``` | ||
|
||
* The IMAGE_REGISTRY environment variable must point at a registry with local write access | ||
* 🍿 These tests can take anywhere from 20-30 minutes depending on your setup | ||
|
||
```bash | ||
IMAGE_REGISTRY=gcr.io/<some-project> go test ./test/... | ||
IMAGE_REGISTRY=gcr.io/<some-project> \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Side note, while There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ya there are some weirdisms but I forget the exact config needed for running the e2e tests against dockerhub |
||
IMAGE_REGISTRY_USERNAME=_json_key \ | ||
IMAGE_REGISTRY_PASSWORD=$(cat gcp.json) \ | ||
make e2e | ||
``` | ||
|
||
### Libgit2 v1.3.0 Dependency and Installation | ||
* The IMAGE_REGISTRY environment variable must point at a registry with local write access - e.g. | ||
|
||
Several unit tests depend upon libgit2 v1.3.0. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems to no longer be true |
||
|
||
__macOS Installation Instructions (Intel):__ | ||
|
||
1. Install `cmake` and `pkg-config` | ||
```bash | ||
brew install cmake pkg-config | ||
``` | ||
2. Verify no conflicting version of `libgit2` is installed | ||
|
||
```bash | ||
pkg-config --print-provides libgit2 | ||
``` | ||
|
||
You should expect output which reads either: `Package libgit2 was not found in the pkg-config search path` or `libgit2 = 1.3.0`. If a version of `libgit2` other than `1.3.0` is reported as installed, consider uninstalling `1.3.0` or running the unit tests in a different environment. | ||
|
||
3. Download `libgit2 v1.3.0` source code | ||
```bash | ||
mkdir libgit2-install && cd libgit2-install | ||
curl -L -O https://github.com/libgit2/libgit2/archive/refs/tags/v1.3.0.tar.gz | ||
export IMAGE_REGISTRY="gcr.io/<some-project>" | ||
``` | ||
|
||
4. Compile and Install | ||
```bash | ||
tar -zxf libgit2-1.3.0.tar.gz | ||
cd libgit2-1.3.0 | ||
mkdir build && cd build | ||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_OSX_ARCHITECTURES="x86_64" | ||
cmake --build . --target install | ||
``` | ||
* The KPACK_TEST_NAMESPACE_LABELS environment variable allows you to define additional labels for the test namespace, e.g. | ||
|
||
5. Verify installation | ||
```bash | ||
pkg-config --print-provides libgit2 | ||
export KPACK_TEST_NAMESPACE_LABELS="istio-injection=disabled,purpose=test" | ||
``` | ||
|
||
You should expect output which reads: `libgit2 = 1.3.0` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An image "name" such as some-docker-username/random-image causes the tests to fail