KernelCI discussions
 help / color / mirror / Atom feed
From: "Guillaume Tucker" <guillaume.tucker@collabora.com>
To: "Krishnan, Neelima" <neelima.krishnan@intel.com>
Cc: "kernelci@groups.io" <kernelci@groups.io>
Subject: Re: Kernel CI setup
Date: Tue, 6 Apr 2021 09:29:27 +0100	[thread overview]
Message-ID: <b7b039ff-cd75-3f60-912f-5b4414420115@collabora.com> (raw)
In-Reply-To: <MWHPR11MB167972C23BB767F62F00B1CE8C769@MWHPR11MB1679.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 3746 bytes --]

+kernelci@groups.io

Hello,

On 06/04/2021 05:47, Krishnan, Neelima wrote:
>
> Guillaume,
>
>  
>
> I am trying to setup the kernel ci local instance in my lab, as per instructions from: https://github.com/kernelci/kernelci-doc/wiki/Setting-up-a-local-development-instance
>
This documentation should still be mostly correct although it
might have a few inaccuracies and gaps to fill.  Also, the
installation steps are quite lengthy and complicated even for
someone familiar with the code.  Having new people like you
trying to install it and providing feedback is a great way of
improving things.
>
> I am not using dockers for installation. Instead I am trying out the VM method. I was able to use the kernelci-backend-config git to install the backend on a VM. Now I am trying to generate the tokens as per instructions in the INSTALL.md @ https://github.com/kernelci/kernelci-doc/wiki/Setting-up-a-local-development-instance
>
>  
>
> Here is what I get.. This is not a proxy issue. I am not sure how to move forward. Can you please advise on how to proceed
>
>  
>
> * Connected to api.mydomain.local (127.0.0.1) port 8888 (#0)
>
> > POST /token HTTP/1.1
>
> > Host: api.mydomain.local:8888
>
> > User-Agent: curl/7.64.0
>
> > Accept: */*
>
> > Content-Type: application/json
>
> > Authorization: master-key
>
> > Content-Length: 63
>
> > 
>
> * upload completely sent off: 63 out of 63 bytes
>
> < HTTP/1.1 403 Operation not permitted: provided token is not authorized
>
> < Content-Length: 12
>
> < Vary: Accept-Encoding
>
> < Server: TornadoServer/3.2.2
>
> < Date: Tue, 06 Apr 2021 01:45:25 GMT
>
> < Access-Control-Allow-Headers: authorization
>
> < Content-Type: application/json; charset=UTF-8
>
> < 
>
> * Connection #0 to host api.mydomain.local left intact
>
A few things to check:

** Is the kernelci-backend server process running?*

To start it manually (for example, on port 5001):

cd kernelci-backend/app
python server.py --port=5001

To start the Celery process manually:

cd kernelci-backend/app
sudo python \
    -OO \
    -R \
    /srv/.venv/kernelci-backend/bin/celery worker \
    -Ofair \
    --without-gossip \
    -autoscale=24,6 \
    --loglevel=INFO \
    --app=taskqueue \
    --pidfile=/tmp/kernelci-celery.pid

If you start them manually, you'll see the logs directly in the
terminals and that should help debugging issues.  On a real
deployment, these services are typically run with systemd and the
backend is behind a web server such as nginx.

** Is the Mongo DB service running?*

$ sudo systemctl | grep mongo
mongod.service  loaded active running   MongoDB Database Server
*
*** Which API tokens have been created?*

$ mongo kernel-ci
> db['api-token'].find({}, {token: 1, properties: 1})
{ "_id" : ObjectId("5bc51d7bb8d49ee75dbd5a6e"), "properties" : [ 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0 ], "token" : "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }
{ "_id" : ObjectId("5dd80903469d6ddc79e7f7cc"), "token" : "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX", "properties" : [ 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 ] }
*
*** Can the token be used with the API?*

$ curl -X GET -H "Authorization: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" http://localhost:5001/version
{"code":200,"result":[{"full_version":"2020.11.2","version":"2020.11.2"}]}

If all these things work, then it's possible to start sending
build and test results to it manually.  Setting up a frontend
instance would be a logical next step, and potentially Jenkins to
have a fully automated pipeline although that's not really needed
in a local development setup.

Hope this helps!

Best wishes,
Guillaume


>  
>


[-- Attachment #2: image003.jpg --]
[-- Type: image/jpeg, Size: 44480 bytes --]

       reply	other threads:[~2021-04-06  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <MWHPR11MB167972C23BB767F62F00B1CE8C769@MWHPR11MB1679.namprd11.prod.outlook.com>
2021-04-06  8:29 ` Guillaume Tucker [this message]
2021-04-07  1:35   ` Kernel CI setup Krishnan, Neelima
2021-04-07 23:32     ` Krishnan, Neelima
2021-04-12  8:13       ` Guillaume Tucker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b7b039ff-cd75-3f60-912f-5b4414420115@collabora.com \
    --to=guillaume.tucker@collabora.com \
    --cc=kernelci@groups.io \
    --cc=neelima.krishnan@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox