From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kHUOGW7+cmJMEwAAbAwnHQ (envelope-from ) for ; Thu, 05 May 2022 00:30:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id yM3iGG7+cmLrtgAA9RJhRA (envelope-from ) for ; Thu, 05 May 2022 00:30:06 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C32833CBAA for ; Thu, 5 May 2022 00:30:04 +0200 (CEST) Received: from localhost ([::1]:50246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmNVT-0002BR-Te for larch@yhetil.org; Wed, 04 May 2022 18:30:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmNVC-0002Ag-ES for help-guix@gnu.org; Wed, 04 May 2022 18:29:47 -0400 Received: from mout02.posteo.de ([185.67.36.66]:52697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmNV9-0007cy-UG for help-guix@gnu.org; Wed, 04 May 2022 18:29:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 7907D240108 for ; Thu, 5 May 2022 00:29:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1651703379; bh=8kh/whtQsAd8rbQC4hMP9n/fxA5Nvsd3Fpe2LhRowsY=; h=From:To:Subject:Date:From; b=bq4uznUw4rVEdJycU9u/Pnfnc4nHT/xOXQHdWZpbhlc3cW+SjV1hj8239DalEGWpV HdKFz2+zMtBxdIF3udE1X20RAvHY+LUT6oOg9DXYsVYG1JK+TQN9VBfvlPKHfnOMFJ AQIHY30q16LTHRAl/+DkOp5m27SHYPhN3Gi2GOlg4ajtiUJpf7WNu+eA+16a68wqqt 9sZa1zngPAqNmWReBmYsZNqMj3SXSbD+RLQqROherr2VeNYWLXPsnt+oUokP6Ih4O3 uhF20pwKaoSKQCxbcLkCQ011vRs8gbrHsEl7GLiU43Lfi5eev7uxpLt5OF9Tdu2eb6 r4LuNwgwgidmA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Kts2V3fCLz9rxK; Thu, 5 May 2022 00:29:38 +0200 (CEST) References: <87a6c6boqq.fsf@posteo.de> <87y1zq2wv2.fsf@elephly.net> <875ymub4zi.fsf@posteo.de> From: Mekeor Melire To: help-guix@gnu.org Subject: Show: Minimal Working Example of hpcguix-web Date: Wed, 04 May 2022 22:25:21 +0000 In-reply-to: <875ymub4zi.fsf@posteo.de> Message-ID: <87mtfxx796.fsf@posteo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.66; envelope-from=mekeor@posteo.de; helo=mout02.posteo.de X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NUMERIC_HTTP_ADDR=1.242, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, WEIRD_PORT=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651703406; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=D4mbuTF8HP3Ljlhg0eUdKyOJdatFSeqo5i8OFShxmdA=; b=bis3pFSyEFPnYwDNJWr8tLIKcxMgOkKWaqRmGi7MbKqrXtMtATDMPOLkf0cy74Qba+pnRS 7LonRGGQ2WoAv4oIuWomWL/RkKxhkV3yY/yakMZj30UfxB7byEG5fNPGNlPNFWg87k+yDn fPW06F5U++DKg5+wOB18LJtEZFAvU0OF6LhHDyQlPa2daW2n2AU7VKzpsxxYeuDvEPbVhz cHXi5j5OJ8CVlPSYf6KlhxTCEIYOHqnlpw4d0KuU1Stn5p/wlaAG1PlV0nsqF+pLVyOxap 30Rw8SZd6J5X3opPO5lRp9Xrb6V9lDR1uZpd1RfQzzmLrRxGo3tHLcApH6UGTw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651703406; a=rsa-sha256; cv=none; b=FKlKJQL32NQmgwhN62cHO7Gr/8MMBSp4JemyC5IKKhiusvR9i9/ofZMLziP0Zxzq4z9JMh a039CGn53Pd7aIKBZiw/Hi6yTMaqRFD8kDBBoAc42Ofl6abzJWVh9bV9CZUsSoevhawO1V wPuUBFghAnp06AOc3T33FF72RevmkIB6WSB0R4a8YDGCXeK6hADkZ2yqNoDxVSaF4PdyBz h1OwNCkW6ojf1ZCDmLNF5Xl29uYoXVtw2O7yRJUybn6JLcx1iwslSJcCT2RIYuPjrBOrku k8TTm49GpzVuyh4w5F59FFxizYS5sRqvVugliCW18peVgbgAuZkwGnH6ZCyjlA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=bq4uznUw; dmarc=pass (policy=none) header.from=posteo.de; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.19 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.de header.s=2017 header.b=bq4uznUw; dmarc=pass (policy=none) header.from=posteo.de; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: C32833CBAA X-Spam-Score: -5.19 X-Migadu-Scanner: scn1.migadu.com X-TUID: bLjXwrMfFH0I By the way, I got it working. Here's a minimal working example of hpcguix-web (meant to be run in a Docker container): --8<---------------cut here---------------start------------->8--- (use-modules (guix channels) ;; channel (for hpcguix-web) (gnu packages certs) ;; nss-certs (gnu services networking) ;; dhcp-client-service-type (gnu services ssh) ;; openssh-service-type (gnu services web) ;; hpcguix-web-service-type (gnu system image) (gnu)) (operating-system ;; this will be ignored (bootloader (bootloader-configuration (bootloader grub-bootloader) (targets '()) (terminal-outputs '()))) ;; this will be ignored (file-systems '()) (firmware '()) (host-name "host-name") ;; hpcguix-web requires pulling channels via git which requires nss-cers (packages (cons nss-certs %base-packages)) (services (cons* (service hpcguix-web-service-type (hpcguix-web-configuration (specs #~(begin (use-modules (guix channels)) (define site-config (hpcweb-configuration (channels (cons* ;; TODO: add channels here %default-guix-channel)))))))) (service dhcp-client-service-type) %base-services)) ;; TODO: set timezone (timezone "Etc/UTC") (users (list ;; un-comment this user when you want to debug this os-declaration: ;; (user-account ;; (name "debug") ;; (password "debug") ;; (group "users") ;; (supplementary-groups ;; (list "wheel" "netdev" "audio" "video"))) ))) --8<---------------cut here---------------end--------------->8--- 2022-04-27 / 21:07 / mekeor@posteo.de: > Thank you for the hint. hpcguix-web is awesome! I installed it locally > with the following declaration: > > --8<---------------cut here---------------start------------->8--- > ;; added modules: (guix channels) (gnu services web) > (service hpcguix-web-service-type > (hpcguix-web-configuration > (specs > #~(define site-config > (hpcweb-configuration > (channels > (cons* > ;; ... > %default-channels > ))))))) > --8<---------------cut here---------------end--------------->8--- > > When I open the website (http://127.0.0.1:5000) in the browser, no > packages are listed and the browser console shows 404-errors occurring > for the following routes: > > http://127.0.0.1:5000/static/css/code.css > http://127.0.0.1:5000/static/images/h-separator-darker.png > http://127.0.0.1:5000/packages.json > http://127.0.0.1:5000/static/images/favicon.png > > Does hpcguix-web depend on a web-server (like nginx) to server a certain > folder? Or what am I missing? > > > > 2022-04-27 / 20:37 / rekado@elephly.net: > >> Hi Mekeor, >> >>> it would be nice to be able to search for a package (and/or a service) >>> by name or description etc. through many channels. AFAIK, there's no >>> such search engine yet. Please correct me if I'm wrong. >>> >>> I'm considering to implement it. I'd suggest to approach it with a >>> server where (1) Guix is installed; (2) a long list of channels is >>> activated; (3) a cron-job or so which regularly runs `guix pull`; (4) a >>> web-api-service written in Guile which leverages the Guix-library in >>> order to search for packages (-- I guess it'd be calling the >>> `guix-package*` function from /guix/scripts/package.scm?); (5) a >>> simplistic front-end web-site which talks to the web-api. >> >> See https://github.com/UMCUGenetics/hpcguix-web. It handles the >> constant updates to all Guix channels and the search. You=E2=80=99re we= lcome to >> contribute to it, e.g. to add an API, suggest changes in how results are >> displayed, etc. >> >> An example deployment can be found at https://guix.mdc-berlin.de >> >> Guix has a service for it that makes deployment easy. >> >> You=E2=80=99ll see that it lists packages from guix-science and other ch= annels, >> e.g. https://guix.mdc-berlin.de/package/rstudio-server