Help talk:Toolforge/Kubernetes

From Wikitech
Jump to navigation Jump to search

How installing additional dependencies into a "available container type" works

If a web service depends on a package providing a particular tool, e.g. rsvg-convert or pdf2svg, what is the correct process to install it into the container of a special flavor? --- Rillke (talk) 10:58, 3 March 2019 (UTC)Reply[reply]

And there is no mechanism for a user to install system packages inside of a container. - So the correct procedure is to send a merge/pull/change-request on the SCM/VCS or add a Phab-Task? -- Rillke (talk) 11:08, 3 March 2019 (UTC)Reply[reply]
See Packages to be installed in Toolforge Kubernetes Images (Tracking) on Phabricator. We have been having various debates about adding some packages like the ones mentioned in the original question. The tension is between keeping the images physically small and focused on a general language runtime, and providing specialized support for particular tools (image processing, text translation, etc). The final recommendation for a particular software package request may ultimately be to use the job grid for now until a system for using customized containers is created. --BryanDavis (talk) 23:49, 3 March 2019 (UTC)Reply[reply]

How can I see if I am running scripts on a soon-to-be-removed image?

Let's imagine I decide to start my web service with webservice --backend=kubernetes php7.2 start. 7.2 will be unsupported from 30 Nov 2020 on. Before this happens, I guess, the docker images with 7.2 are removed from Will I get notified of the deprecation, and the removal, and if so, how? -- Rillke (talk) 11:11, 3 March 2019 (UTC)Reply[reply]

We do not currently have a policy or procedure for this, but it is a topic that should be discussed. Phab task T213641 looks like the most directly related open task. --BryanDavis (talk) 23:53, 3 March 2019 (UTC)Reply[reply]

Is there an automatically generated/ up-to-date list of Docker Image Tags?

Yes, it is called catalog -- Rillke (talk) 11:13, 3 March 2019 (UTC)Reply[reply]

cronjobs still active after deleting

@BryanDavis, JJMC89: Hello. I am not sure if this is the correct venue for this question. Up until few days ago, I was having difficulties with setting up cronjobs on kubernetes (migrating from buster grid to kubernetes). While I was attempting, I named my jobs task1, then exp1, exp2, exp3 and so on. My successful setup was on task12. All of these experiments pointed to the same .sh file. Till then, I tried various methods: using yaml file, and the command given here. I had tried the yaml files from here, and from here. The latter is my current format. But the problem is, I tried kubectl delete jobs --all, toolforge-jobs flush, and toolforge-jobs delete <job name> (all commands a several times). But three of previous jobs are still active as can be seen here. Out of these, either exp4 or exp5 was making successful edits on mrwiki. As of writing this comment, I have renamed the .sh file, so the edits should stop. I have also created a new cronjob by the name run1. My question is, how to remove these previous jobs completely? The three commands above dont seem to remove them, if you provide a name of non-existent job with toolforge-jobs delete <job name> command, it still doesn't give out "invalid job name" or something similar. As stated loading jobs from a file flushes all previously defined jobs. apparently doesn't flush the previous jobs. Any suggestions how to get rid of the previous jobs? —usernamekiran (talk) 04:00, 22 October 2022 (UTC)Reply[reply]

update: kubectl delete cronjob <job name> deleted the cronjob, also, Error from server (NotFound): cronjobs.batch "exp5" not found was returned after repetition. But I couldnt find a way to list active cronjobs from terminal itself. —usernamekiran (talk) 05:31, 22 October 2022 (UTC)Reply[reply]
@Usernamekiran kubectl show cronjobs would be one way to list the cronjob objects tracked by Kubernetes in your tool's namespace:
tools.kiranbot4@tools-sgebastion-11:~$ kubectl get cronjobs
run1   5 9 * * *    False     0        <none>          7h18m
run2   5 11 * * *   False     0        <none>          7h18m
toolforge-jobs list seems to show the same list:
tools.kiranbot4@tools-sgebastion-11:~$ toolforge-jobs list
Job name:    Job type:             Status:
-----------  --------------------  ---------------------------
run1         schedule: 5 9 * * *   Last schedule time: unknown
run2         schedule: 5 11 * * *  Last schedule time: unknown
I would suggest filing bugs tagged with #toolforge-jobs about the issues you had running toolforge-jobs flush and toolforge-jobs delete <job name>. -- BryanDavis (talk) 20:37, 23 October 2022 (UTC)Reply[reply]
@BryanDavis: Thanks. I had used a few different methods, so I am not sure which one caused the issue. But all is good now. If I encounter something next time, I will file a bug accordingly. Thanks again. See you around :-) —usernamekiran (talk) 04:32, 27 October 2022 (UTC)Reply[reply]