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

Update creating.adoc #30

Merged
merged 6 commits into from
May 21, 2024
Merged

Update creating.adoc #30

merged 6 commits into from
May 21, 2024

Conversation

Chr1st1anSears
Copy link
Contributor

First commit to add adoc content

Copy link

🚀 Preview is available at

Few copy edits
Copy link

🚀 Preview is available at

Copy link

🚀 Preview is available at


. In the GitHub repository for your application, install your organization’s {ProductName} GitHub application.
. In the repository for your instance of {ProductName}, you need to replace two `url` values in the relevant YAML file for your namespace. The path for this file is `/test/resources/demo-users/user/<namespace>/application-and-component.yaml`. Replace the two `url` values as follows:
Copy link
Member

Choose a reason for hiding this comment

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

The procedure we're working on in konflux-ci repo is focusing on user2. We're not making sure user1 has valid configs at this point. If this document is about following that procedure, then it should just mention user2.

If it supposed to be generic, then the resources (e.g. application and component) cannot be used as-is from the files used for that procedure, but they can act as references.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I responded to your feedback in the doc as best I can, given that we're documenting the planned downstream, not the current upstream. But I'm least certain about this part.

Whenever you have the time (no worries if you want to leave it for tomorrow), please let me know if the latest revision addresses this concern. Or if it doesn't, how I can fix it.

Thanks!

Copy link

🚀 Preview is available at

Copy link

🚀 Preview is available at

. In the GitHub repository for your application, install your organization’s {ProductName} GitHub App.
. In the repository for your instance of {ProductName}, prepare an `application-and-component.yaml` file for your namespace.
.. If it your namespace does not already have this YAML file, create it with the following path: `/test/resources/demo-users/user/ns2/application-and-component.yaml`. Use the namespace 2 file as a template.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.. If it your namespace does not already have this YAML file, create it with the following path: `/test/resources/demo-users/user/ns2/application-and-component.yaml`. Use the namespace 2 file as a template.
.. If your namespace does not already have this YAML file, create it with the following path: `/test/resources/demo-users/user/ns2/application-and-component.yaml`. Use the namespace 2 file as a template.

Copy link
Member

Choose a reason for hiding this comment

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

We're mentioning to create the file in ns2 path while we're also asking to user namespace 2 as a reference.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yep my bad. I replaced "ns2" with "" so I think it makes sense now. Is there anything else? Can we merge the doc?

Copy link
Member

Choose a reason for hiding this comment

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

Not sure I'm the authority here, but I'm ok with merging this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok--if I was supposed to ask someone else, that'll be on me. But if the doc looks technically accurate to you, then I'm pretty confident that's all we need. Thanks!

Copy link

🚀 Preview is available at

@Chr1st1anSears Chr1st1anSears merged commit 9db3473 into main May 21, 2024
2 checks passed
Comment on lines +7 to +18

.Prerequisites:

* Install link:https://github.com/konflux-ci/konflux-ci/tree/main[{ProductName}]
* Read/write access to your {ProductName} instance’s repository

.Procedure:

. Start a new link:https://smee.io/[smee] channel.
. In the repository for your instance of {ProductName}, edit the file /smee/smee-client.yaml. Replace `<smee-channel>` with the webhook proxy URL from the previous step.
. Create a GitHub App according to link:https://pipelinesascode.com/docs/install/github_apps/#manual-setup[these Pipelines as Code instructions]. For the *Webhook URL* field, use the webhook proxy URL for your smee channel.
Copy link
Member

Choose a reason for hiding this comment

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

This is intended for the platform engineer to complete while users would complete later ones, right?

Comment on lines +20 to +60

At the time of publication, to create applications in {ProductName}, you need to manually maintain their configurations by editing YAML files. This might change, in favor of maintaining those configurations in the {ProductName} UI.

.Prerequisites:

* link:https://kubernetes.io/docs/tasks/tools/[kubectl] CLI tool
* The following values from your {ProductName} GitHub App:
** The private key
** The App ID
** The webhook secret
* A GitHub repository with source code for your application
** It must have the same basic structure as our example repository
* Read/write access to the repository for your instance of {ProductName}

.Procedure:

. In the GitHub repository for your application, install your organization’s {ProductName} GitHub App.
. In the repository for your instance of {ProductName}, prepare an `application-and-component.yaml` file for your namespace.
.. If your namespace does not already have this YAML file, create it with the following path: `/test/resources/demo-users/user/<namespace>/application-and-component.yaml`. Use the namespace 2 file as a template.
.. Replace the two `url` values in that YAML file as follows:
... For the `url` value beneath `git`, provide the URL that you would use to locally clone your application’s repository. This URL ends with `.git`.
... For the `url` value beneath `spec`, at the end of the file, provide the URL for your application’s repository that you see in your browser, without `.git` at the end.
+
NOTE: To add other components to the same namespace, reference the example YAML file beneath this procedure.
. Login to the Kubernetes cluster where Konflux is deployed.
. Run the following command. Be sure to replace <namespace> with your actual namespace.
+
`kubectl create -f /test/resources/demo-users/user/<namespace>/application-and-component.yaml`
. Run the following command. But first, be sure to export as variables or hard code the values for `PATH_PRIVATE_KEY`, `APP_ID`, and `WEBHOOK_SECRET`.
+
[source]
--
kubectl -n pipelines-as-code create secret generic pipelines-as-code-secret \
--from-literal github-private-key="$(cat $PATH_PRIVATE_KEY)" \
--from-literal github-application-id="APP_ID" \
--from-literal webhook.secret="WEBHOOK_SECRET"
--
. Still in the context of your {ProductName} repository, run `kubectl create -f smee/smee-client`.
. Now, you can trigger your application’s first build pipeline. In the git repository for your application, using your preferred text editor, open a pull request against the `/.tekton/pull-request.yaml` file.
.. Specifically, replace any existing value for the `git-url` field with the git URL for your application’s repository. (This is the URL you would use to clone the repository locally; it ends with `.git`.)
Copy link
Member

Choose a reason for hiding this comment

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

This looks like the process to create the GitHub application, not to create Components and Applications.

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

Successfully merging this pull request may close these issues.

3 participants