All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Krishnan, Neelima" <neelima.krishnan@intel.com>
To: Guillaume Tucker <guillaume.tucker@collabora.com>
Cc: "kernelci@groups.io" <kernelci@groups.io>
Subject: Re: Kernel CI setup
Date: Wed, 7 Apr 2021 01:35:02 +0000	[thread overview]
Message-ID: <MWHPR11MB1679269692B2F44C908CC2AB8C759@MWHPR11MB1679.namprd11.prod.outlook.com> (raw)
In-Reply-To: <b7b039ff-cd75-3f60-912f-5b4414420115@collabora.com>


[-- Attachment #1.1: Type: text/plain, Size: 5602 bytes --]

Hi Guillaume,

Thank you for the quick reply. I was able to go forward with backend installation. The problem was setting of the url I had set in the curl command.
curl -v -XPOST -H "Content-Type: application/json" -H "Authorization: master-key" "http://localhost:8888/token" -d '{"email": "xxxx@xx.xx", "username": "xxx", "admin": 1}'
I had set this to point to http://api.mydomain.local:8888.
I got a token from the backend.

For setting up the front end, do I use the https://github.com/kernelci/kernelci-frontend-config.git ? Do I use the same VM as the one I had set up for back end or do I create a new VM "kernelci-frontend"?

Either way, when I run the ansible command I get this:

TASK [install-deps : Centos 7.3 nodejs Hack (bug 1481008 / 1481470)] ******************************************************************************************
fatal: [kernelci-frontend]: FAILED! => {"msg": "The conditional check 'ansible_distribution == \"CentOS\" and ansible_distribution_major_version == \"7\" and ansible_distribution_version | search(\"7.3\")' failed. The error was: template error while templating string: no filter named 'search'. String: {% if ansible_distribution == \"CentOS\" and ansible_distribution_major_version == \"7\" and ansible_distribution_version | search(\"7.3\") %} True {% else %} False {% endif %}\n\nThe error appears to be in '/home/labuser/kernelci/kbc/kernelci-frontend-config/roles/install-deps/tasks/main.yml': line 28, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Centos 7.3 nodejs Hack (bug 1481008 / 1481470)\n  ^ here\n"}
I did update the secret.yml with the token I for from backend.
Neelima

From: Guillaume Tucker <guillaume.tucker@collabora.com>
Sent: Tuesday, April 6, 2021 1:29 AM
To: Krishnan, Neelima <neelima.krishnan@intel.com>
Cc: kernelci@groups.io
Subject: Re: Kernel CI setup

+kernelci@groups.io<mailto:+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



[cid:image001.jpg@01D72B13.8D005060]



[-- Attachment #1.2: Type: text/html, Size: 11423 bytes --]

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

  reply	other threads:[~2021-04-07  1:35 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 ` Kernel CI setup Guillaume Tucker
2021-04-07  1:35   ` Krishnan, Neelima [this message]
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=MWHPR11MB1679269692B2F44C908CC2AB8C759@MWHPR11MB1679.namprd11.prod.outlook.com \
    --to=neelima.krishnan@intel.com \
    --cc=guillaume.tucker@collabora.com \
    --cc=kernelci@groups.io \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.