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: Fix local test setup scripts #1446

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

c-pius
Copy link
Contributor

@c-pius c-pius commented Apr 4, 2024

Description

Changes proposed in this pull request:

  • some minor fixes on the scripts for building KLM and deploying module templates

Related issue(s)

@c-pius c-pius requested a review from a team as a code owner April 4, 2024 06:46
@kyma-bot kyma-bot added cla: yes Indicates the PR's author has signed the CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 4, 2024
@c-pius c-pius force-pushed the docs/fix-local-test-setup branch from 556c8df to 38915b2 Compare April 4, 2024 06:46
@kyma-bot kyma-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 4, 2024
@c-pius c-pius force-pushed the docs/fix-local-test-setup branch from 38915b2 to ec9ca66 Compare April 4, 2024 06:51
@kyma-bot kyma-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Apr 4, 2024
@c-pius c-pius force-pushed the docs/fix-local-test-setup branch from ec9ca66 to ef34f7a Compare April 4, 2024 07:04
Comment on lines 77 to 82
# build your local image
make docker-build IMG=k3d-registry.localhost:5111/<your-image-name>:<your-image-tag>
# push it to the local registry
make docker-push IMG=k3d-registry.localhost:5111/<your-image-name>:<your-image-tag>
# deploy using the image (note the change to port 5000 which is exposed in the cluster)
make local-deploy-with-watcher IMG=k3d-registry.localhost:5000/<your-image-name>:<your-image-tag>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: I think we need to provide the registry and especially the port change for it to work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines 94 to 101
cd <local path to template operator repository>

# generates the manifests and saves them to a template-operator.yaml file
make build-manifests

# create the a ModuleTemplate CR and saves it to a template-yaml file
kyma alpha create module -p ./ --version 1.2.3 \
--registry k3d-registry.localhost:5111 --insecure --module-config-file ./module-config.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: at least on my machine I cannot just create the module specifying a path to the template operator repo. Therefore I changed this to cd into the needed directory.

E.g. (../template-operator is my local way to the repo):

kyma alpha create module -p ../template-operator --version 1.2.3 \
   --registry k3d-registry.localhost:5111 --insecure --module-config-file ../template-operator/module-config.yaml
CAUTION: You're using an outdated version of the Kyma CLI (2.20.1). The latest released version is: 2.20.3

WARNING: This command is experimental and might change in its final version. Use at your own risk.
- Module built (8ms)
- Default CR validation succeeded (9.595s)
- component descriptor created (1ms)
X Configuring security scanning... (5ms)
Error: component.resources.0: Must validate at least one schema (anyOf);component.resources.0.version: Does not match pattern '^[v]?(0|[1-9]\d*)(?:\.(0|[1-9]\d*))?(?:\.(0|[1-9]\d*))?(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kyma-bot kyma-bot added the lgtm Looks good to me! label Apr 8, 2024
@c-pius c-pius force-pushed the docs/fix-local-test-setup branch from ef34f7a to 17b8377 Compare April 8, 2024 07:02
@kyma-bot kyma-bot removed the lgtm Looks good to me! label Apr 8, 2024
# generates the manifests and saves them to a template-operator.yaml file
make build-manifests

# create the a ModuleTemplate CR and saves it to a template-yaml file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# create the a ModuleTemplate CR and saves it to a template-yaml file
# create a ModuleTemplate CR and save it to a template YAML file

In the previous set of comments, you used the second-person singular (user perspective), now third-person singular (command perspective), let's unify.

make local-deploy-with-watcher IMG=<image-name>:<image-tag>
# build your local image
make docker-build IMG=k3d-registry.localhost:5111/<your-image-name>:<your-image-tag>
# push it to the local registry
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# push it to the local registry
# push the image to the local registry

make docker-build IMG=k3d-registry.localhost:5111/<your-image-name>:<your-image-tag>
# push it to the local registry
make docker-push IMG=k3d-registry.localhost:5111/<your-image-name>:<your-image-tag>
# deploy using the image (note the change to port 5000 which is exposed in the cluster)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# deploy using the image (note the change to port 5000 which is exposed in the cluster)
# deploy Lifecycle Manager using the image (note the change to port 5000 which is exposed in the cluster)

--registry k3d-registry.localhost:5111 --insecure --module-config-file ../template-operator/module-config.yaml
cd <local path to template operator repository>

# generates the manifests and saves them to a template-operator.yaml file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# generates the manifests and saves them to a template-operator.yaml file
# generate the manifests and save them to a template-operator.yaml file

In the previous set of comments, you used the second-person singular (user perspective), now third-person singular (command perspective), let's unify.

@kyma-bot kyma-bot added the lgtm Looks good to me! label Apr 9, 2024
@kyma-bot kyma-bot merged commit ba1d580 into kyma-project:main Apr 9, 2024
42 checks passed
@c-pius c-pius deleted the docs/fix-local-test-setup branch April 9, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Indicates the PR's author has signed the CLA. lgtm Looks good to me! size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants