Help talk:Toolforge/Kubernetes

Rendered with Parsoid
From Wikitech
Latest comment: 9 months ago by BryanDavis in topic Errors

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

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
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

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 docker-registry.tools.wmflabs.org. Will I get notified of the deprecation, and the removal, and if so, how? -- Rillke (talk) 11:11, 3 March 2019 (UTC)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

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

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

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
@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
NAME   SCHEDULE     SUSPEND   ACTIVE   LAST SCHEDULE   AGE
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
@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

Errors

Hi, what does it mean when I got this error:

tools.leksem-indonesia@tools-sgebastion-10:~/leksem-indonesia$ webservice stop                         Stopping webservice
tools.leksem-indonesia@tools-sgebastion-10:~/leksem-indonesia$ webservice --back                       end=kubernetes php7.4 start
Could not find a public_html folder or a .lighttpd.conf file in your tool home.

and this error:

tools.leksem-indonesia@tools-sgebastion-10:~/leksem-indonesia$ webservice --back                       end=kubernetes php5.6 start
type must be one of:
buildservice
 * golang1.11
 * jdk17
 * node16
 * node18
 * perl5.32
 * php7.4
 * python3.11
 * python3.9
 * ruby2.1
 * ruby2.7
 * ruby3.1
 * tcl8.6

Thanks. bennylin (talk) 10:13, 9 July 2023 (UTC)Reply

The first means exactly what it says: the webservice process did not find a $HOME/public_html directory to serve content from nor a $HOME/.lighttpd.conf configuration file that would possibly setup a different web root for the lighttpd process.
The second looks like a bug to me. The php5.6 image is certainly deprecated (see Help:Toolforge/Kubernetes#Available_container_types), but it should still be possible to use it. -- BryanDavis (talk) 20:00, 10 July 2023 (UTC)Reply