Giter Club home page Giter Club logo

jiro's People

Contributors

adambrousseau avatar andrew-m-leonard avatar cwesmills avatar eclipsewebmaster avatar fbricon avatar ffendt avatar fredg02 avatar gdams avatar hanneswell avatar heurtematte avatar jdekonin avatar jfaltermeier avatar jonahgraham avatar mahdipub avatar mbarbero avatar msohn avatar nicoprediger avatar pdulth avatar pshipton avatar pstankie avatar pzygielo avatar rajdeepsingh1 avatar reinhapa avatar rgrunber avatar sebastianschildt avatar smlambert avatar sravanlakkimsetti avatar sxa avatar tortmayr avatar vsebe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jiro's Issues

Fix warning about access control for builds

Warning says

Builds in Jenkins run as the virtual SYSTEM user with full permissions by default. This can be a problem if some users have restricted or no access to some jobs, but can configure others. If that is the case, it is recommended to install a plugin implementing build authentication, and to override this default.
โŒ No implementation of access control for builds is present. It is recommended that you install Authorize Project Plugin or another plugin implementing the QueueItemAuthenticator extension point

with a link to https://jenkins.io/doc/book/system-administration/security/build-authorization/

Add smartness around project using gerrit/github/(gitlab)

Some projects use a mix, some are only on a given kind of hosting. Permissions and installed plugins needs to be handled differently depending on the use case.

Determining which project does what could rely on projects.eclipse.org API.

Xvfb plugin requires global tool configuration

We have installed an xvfb plugin, https://github.com/eclipse-cbi/jiro/blob/master/instances/technology.openj9/jenkins/plugins-list#L15

Based on eclipse-openj9/openj9#8376 (comment), it is not enough to just add the xvfb plugin, you additionally have to add a default installation in global tool configuration view in Jenkins.

To resolve this error on a Jenkins server we have admin access to, one would go to Manage Jenkins -> Global Tool Configuration (at the bottom of the page) and add a default xvfb installation (as shown):

xvfbPluginConfig

Deploying a new instance fails, since the latest templates are used by default

The latest templates are pulled in, even though jenkins.master-base/latest does not point to the newest version (yet). In this case 2.176.1.

Workaround: Specifying the Jenkins version (2.176.1) explicitly in the config.json file.

During deployment the templates should be pulled in according to "actualVersion".

Do not switch to maintenance mode during Jenkins safe restart

If there are issue during deployment, especially while waiting for a Jenkins instance to come online during/after a safe restart, it requires extra work to fix the routes, etc manually.
Since the benefit of "dropping the curtain" during a (in most cases) relatively short safe restart, I'd recommend that we only switch to maintenance mode on demand (e.g. if we work on a JIPP for a longer time and want to avoid interruptions).

Run agents with separate service account and in their own (project specific) namespaces

Currently, agents are started in the same namespace and with the same service account as the master. It means several things that we would like to avoid:

  • Secrets that should only be readable by masters are readable by agents.
  • Quotas are set globally, so it's hard to track. Ideally, if we would run in separate namespaces, we would not need to set quotas on master's namespace, only specifying master resources requests/limits would be enough, and then only set limitrange/quotas on agent ns.
  • Agents service account have more permissions than necessary (e.g. they can create other pods, it highly undesirable)

Store quotas information in config.json

Resource quotas usable by project should be stored in the config.json. Currently, it's only the "sponsorshipLevel". It should be more explicit. Cluster quotas should be computed from these information (e.g. it will add the resources required for the jnlp container etc...).

Unable to checkout jiro on Windows

When I tried to checkout the current master of this repo on my Windows computer, the checkout fails with the following message:

An internal error occurred during: "Checking out eclipse.cbi.jiro - refs/heads/pref".
Invalid path: performance-tests/results/local/Darth Plagueis/guava-2021-06-17T14:03:51+02:00.log

This is probably because the colon is forbidden as file name on Windows:
https://stackoverflow.com/a/31976060

Removing the files in performance-tests/results/ (via a GH codespace) allows me to checkout those files.
Since you already ignore new result files, I wonder if you are fine to delete the old once too?

[Performance] Use OpenJ9 CDS capability

Class Data Sharing may help improve startup time and memory consumption for both masters and agents (jnlp).

For masters, it would mean mounting a folder from the host (https://kubernetes.io/docs/concepts/storage/volumes/#hostpath) and use it as the cache. It requires some changes in scc/podsecuritypolicy as today hostPath volumes cannot be mounted by masters' service accounts. It's not wise to give more permissions to this service account until we split masters and agents as specified in #5.

For agents, it's TBD. Regarding security, it may be unsafe to allow agents to mount hostPath (e.g. /var/lib/docker).

Note:
PodSecurityPolicy offers fine grain policy that let specifies a whitelist of host paths that are allowed to be used by hostPath volumes. PodSecurityPolicies are not available on OpenShift 3.9 (but is a beta feature in 3.11). There is only SecurityContextConstraint which provide hostPath access on a all or nothing basis

Move some labels as annotations

Currently, all metadata about k8s resources are labels

org.eclipse.cbi.jiro/project.shortname: "{{project.shortName}}"
org.eclipse.cbi.jiro/project.fullName: "{{project.fullName}}"
org.eclipse.cbi.jiro/jenkins.version: "{{jenkins.version}}"
org.eclipse.cbi.jiro/jenkins.actualVersion: "{{jenkins.actualVersion}}"
org.eclipse.cbi.jiro/kubernetes.master.namespace: "{{kubernetes.master.namespace}}"
org.eclipse.cbi.jiro/project.sponsorshipLevel: "{{project.sponsorshipLevel}}"

We should only keep

org.eclipse.cbi.jiro/project.shortname: "{{project.shortName}}"
org.eclipse.cbi.jiro/project.fullName: "{{project.fullName}}"

and move other metadata as simple annotations as they will probably won't be use by any selectors.

Also, we may want to add org.eclipse.cbi.jiro/kind: "master" or org.eclipse.cbi.jiro/kind: "agent"
To differentiate agents' artifacts from masters'.

Change default timezone from `America/Toronto` to UTC-0 to align with docker image timezone

The Jiro default timezone is America/Toronto set in code here

The main problem with this setting is when it comes to deal with job based on a docker image with a different timezone.
So there is a difference between the UI and the job log generated by the docker image, which can quickly lead to confusion.

I.E: jenkins UI with job #46 started at 07:28
image

Job log start at: 13:28
image

It might be great to align the jenkins timezone with something more in common, and understandable by all like UTC-0 with no DST.

role binding : apiGroup definition instead of namespace

As part of the definition of "rbac.authorization.k8s.io/v1", namespace attribute doesn't exist on RoleRef and Subjects attributes definition. Instead it must be the attribut "apiGroup".

Example : https://github.com/eclipse-cbi/jiro/blob/master/instances/automotive.mdmbl/target/k8s/role-binding.json
should be :

"roleRef": {
      "kind": "Role",
      "name": "jenkins-master-owner",
      "apiGroup": "my_api_group"    <=== here
   },
   "subjects": [
      {
         "kind": "ServiceAccount",
         "name": "mdmbl",
         "apiGroup": "my_api_group"         <=== here
      }
   ]

And apiGroup should have a name: https://github.com/eclipse-cbi/jiro/blob/master/instances/automotive.mdmbl/target/k8s/role.json

   "rules": [
      {
         "apiGroups": [
            "my_api_group"             <=== here
         ],
         "resources": [
            "pods",
            "pods/exec"
         ],

Leverage Docker cache during build

Currently, docker cache is either used too much or not enough. We should force (no cache) rebuild images when system packages have been updated or when jenkins plugins have been upgraded.

Configure jobConfigHistory with sane default

  • Number of history entries to keep: 500
  • Max number of days to keep history entries: 60
  • Max number of history entries to show per page: 12
  • Do not save duplicate history: unticked

Jenkins CasC files should be version-able

When a new version of Jenkins is released, the JCasC files sometime need to be adapted (field renaming, removal of deprecated options... e.g., see #23 and #24).

It should be possible to have version specific templates and a default fallback being the current location.

Fix the spamming log message "ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path" on masters

It seems to be an issue with the OkHttp lib. See

Jetty describe a solution: add alpn to bootclasspath java -Xbootclasspath/p:libs/alpn-boot-8.1.9.v20160720.jar

List of matching versions are here https://www.eclipse.org/jetty/documentation/9.4.x/alpn-chapter.html#alpn-versions and binaries can be downloaded on maven central https://search.maven.org/search?q=g:org.mortbay.jetty.alpn%20a:alpn-boot

This won't be necessary anymore as soon as Jenkins will run on OpenJDK9+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.