Skip to content

posts: Add GSoC posts from Marcelo Spessoto #7

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarceloSpessoto
Copy link

Add Google Summer of Code blog posts from contributor Marcelo Spessoto.

Signed-off-by: Marcelo Mendes Spessoto Junior <[email protected]>
Copy link
Contributor

@davidbtadokoro davidbtadokoro left a comment

Choose a reason for hiding this comment

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

Hi @MarceloSpessoto, sorry for the delay, and thank you for these great posts! They are both really well explained and technical at the same time.

You may have noticed that there is a great volume of comments, but the great majority of them are about style (and hence are more suggestions than required changes) or simple errors, which should be easy to consider/apply. I don't have much to add to the overall content, as it looks refined and with great readability, IMHO.

There are two comments about the rendering of the posts:

The lack of a summary/blank start at the top of most posts doesn't render well. Also, adding a summary paragraph to the start of posts is a good idea.
Some images are not rendering. I imagine troubleshooting it won't be hard, but I confess I didn't dig the cause.

In any case, reading your posts gave me a great understanding of your project and how you've dedicated yourself through these past 3-4 months. Excellent job! 👏

tags: [jenkins, ci, kcov, code coverage]
---

# My first steps of community bonding in Google Summer of Code
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment may be the only one not related to the content but about the "style" that won't be transferable to your blog.

Because of the style used in the kw blog, you can see in the first print below that the top-level heading you use at the start of your posts gets a little weird. I recommend you to (1) remove the starting headings and use the first paragraphs as the summary of the post to follow the "pattern" of the blog (as you do in the "[GSoC] My post midterm evaluation progress on GSoC" post), or (2) add a &nbsp; line between the file headers and the top level headings to make a blank summary (would look like the second print below).

Overall, I would recommend always having a summary paragraph at the start, as it serves as a top-down view of the post and accounts for other feeds that can subscribe to your blog and have a similar display as the kw blog.

2024-08-20-180413_1894x1027_scrot

2024-08-20-180401_1894x1027_scrot

---

# My first steps of community bonding in Google Summer of Code
I've been accepted into GSoC program for the kworkflow project this year! My proposal is to implement a self-owned server that will host a CI pipeline in Jenkins (replacing the actual GitHub Actions pipeline) and manage data telemetry. Let's see what I've done in the first two weeks.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think an owned makes more sense than a self-owned, and change actual GitHub Actions to current GitHub Actions.

## Studying the Jenkins capabilities
Jenkins is an open-sourced tool for providing automation, especially for Continuous Integration and other DevOps practices. It is a very solid and consolidated project that offers a variety of different plugins, allowing easier integration with different automation infrastructures. It is meant to be structured as a distributed system with a central Jenkins controller, which will manage the automation requests and schedule them to its different computing nodes (known as agents).

Therefore, one of the most important first tasks is to implement a first Jenkins agent to deal with the CI tasks. I've gone through the [official Jenkins agent tutorial](https://www.jenkins.io/doc/book/using/using-agents/). The agent worked fine, but a bit more refining will be done next days.
Copy link
Contributor

Choose a reason for hiding this comment

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

I recommend phrasing the first sentence as:

"Therefore, implementing an initial Jenkins agent to deal with the CI tasks is one of the most critical first tasks."


This is the starting point for developing the basic pipeline for code coverage generation.

I've started by understanding how kworkflow initially generated their code coverage using GitHub Actions. It appears that the [kcov](https://github.com/SimonKagstrom/kcov) software is used, and the output is then integrated with CodeCov. By reading their documentation, I've found out that kcov also generates output in XML Cobertura format, which can then be parsed by Jenkins by using the Cobertura Plugin. Finding out how to use the cobertura command in the Groovy-scripted Jenkinsfile was not that hard, since Jenkins offers a Snippet Generator.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use italics for the Cobertura part, as it may be interpreted as typo for people that don't know what it is (like me, before searching it 😅)


In Jenkins, create the Multibranch pipeline. With the Branch Source Plugin, VCS hosts integration options will be displayed on the pipeline settings. Then, give the appropriate branch required information, including the private key.

I've done these steps in a kworkflow's fork of mine. Then, following the suggestions of the maintainers, I implemented the first required task for the pipeline: The code coverage.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the first sentence will look better as:

I've done these steps in my kworkflow fork.


## The basic configuration of the Cloud

The first step was to install the Docker Plugin ( with id `docker-plugin` ) in the Jenkins controller. The basic configuration setup can be found on the latest GSoC post about Jenkins Agents.
Copy link
Contributor

Choose a reason for hiding this comment

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

"the last GSoC post about" and maybe add a link to it


### Pushing the images to Docker Hub

It is straightforward to push your custom Docker images onto the Docker Hub online registry. First of all, create an account on Docker Hub.
Copy link
Contributor

Choose a reason for hiding this comment

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

"First" instead of "First of all" to vary

It is straightforward to push your custom Docker images onto the Docker Hub online registry. First of all, create an account on Docker Hub.
Then, create a repository. Ensure it is public, otherwise, you will have to manually configure a credential in Jenkins to pull the private repository.

After setting up the repository properly, you have to build the image locally and push it with `docker push <image-name>`.
Copy link
Contributor

Choose a reason for hiding this comment

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

"push it to Docker Hub"

Then, create a repository. Ensure it is public, otherwise, you will have to manually configure a credential in Jenkins to pull the private repository.

After setting up the repository properly, you have to build the image locally and push it with `docker push <image-name>`.
But first, ensure that you are logged into your Docker Hub account on the docker CLI, so you can get the push permission. Run `docker login -u <your-dockerhub-user>` and insert your password.
Copy link
Contributor

Choose a reason for hiding this comment

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

Just "Ensure that you are logged"

The `marcelospe/kw-install-and-setup` repository was created while experimenting a little bit, but, in the
end, I decided to use `marcelospe/kw-basic` for the `test_setup_and_docs.yml` workflow.

![Image]({{site.url}}/images/kw-docker-cloud/docker_hub_images.png)
Copy link
Contributor

Choose a reason for hiding this comment

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

This image isn't rendering on my end

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

Successfully merging this pull request may close these issues.

2 participants