aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/codesearch
AgeCommit message (Collapse)AuthorFilesLines
2021-07-14[CODESEARCH] Update documentationBartek Grzybowski1-10/+14
Change-Id: I1363c667da6e3764c397cbad5502934fcf0bdc69 Issue-ID: INT-1940 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-07-13[CODESEARCH] Always run the 'run_codesearch' provisionerBartek Grzybowski1-1/+1
This will automatically run the Hound engine after box reload. Change-Id: If9e2e186ab16f461b63e963a2ec189783cda0010 Issue-ID: INT-1940 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-07-13[CODESEARCH] Rework the nameserver provisioningBartek Grzybowski1-5/+7
Default OS resolver is set using native systemd-resolved facilities in a way that it will be persisted after box reload. Default nameserver is set within Vagrantfile and can be altered if needed. Vagrant-libvirt specific resolver settings were removed in favor of a general one. As of now it should be possible to also run this box using Virtualbox provider. Change-Id: Icdd1eb8bf3677c4616b1ac7d6b3387e0f4c7535a Issue-ID: INT-1940 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-07-12[CODESEARCH] Drop ssh authentication for Gerrit endpointBartek Grzybowski1-31/+2
Getting repo list does not require authentication so dropping it. Since create_config.py "--git" option was reworked it will now generate repo urls leveraging git protocol and git.onap.org service. Change-Id: I2d36392ea36016ee09e05417608fd5871fa0c074 Issue-ID: INT-1940 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-07-02[CODESEARCH] Rework how --git option worksBartek Grzybowski1-3/+7
"--git" will not only affect the "base-url" in Hound config for code browser but also the "url" for the repository clone string. This is the most sane behavior as git protocol is the most efficient one in terms of speed. "git" and "ssh" options are also set to be mutually exclusie as according to the above change using git protocol based clone and passing ssh credentials would not make sense as git protocol does not support any kind of authentication. Change-Id: I9897bc2aec2707ca4ed7543b1576686fb8e2b2da Issue-ID: INT-1940 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-07-01[CODESEARCH] Add option to define custom polling intervalBartek Grzybowski1-3/+6
The default polling interval is set to 1h. Refreshing too often might result in too many requests in time and a remote service disruption or denial of access for client (too many requests) Change-Id: I490792ddedeb7a2c13f1bbb0f11ec68ed8fc2d5b Issue-ID: INT-1942 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2021-07-01[CODESEARCH] Upgrade Vagrant box to utilise newest 20.04 LTSBartek Grzybowski1-1/+1
Change-Id: Ib8059e1c74ef460da0821f4403ab734c7a02b4f2 Issue-ID: INT-1941 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
2020-05-08Exclude code location from code base URLPawel Wieczorek1-5/+6
Python method str.format allows easy templating using substitutions identified by braces ('{' and '}'). Using two levels of nested substitutions can be achieved by doubling braces ("{{" and "}}"). Hound configuration creator script was supposed to use two levels of nested substitutions and still leave braced components within the templated string for further substitution by the Hound tool. This would require using multitude of braces which would decrease readability significantly. This is why code location template is appended to the code base URL at the latest. If there will be need for more levels of nested templates, this code shall be further refactored to use only named fields, str.format_map() (available in Python 3.2+) and SafeDict, e.g. >>> class SafeDict(dict): ... def __missing__(self, key): ... return '{' + key + '}' ... which would leave braced components within the processed template in case given key is missing. Issue-ID: ONAPARC-579 Change-Id: I420d076867aa891edb2a945a8cd58e168c892ac3 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-03-31fix integration doc warningmrichomme1-0/+1
Issue-ID: INT-1490 Signed-off-by: mrichomme <morgan.richomme@orange.com> Change-Id: I9153da660ae469c0bd3ed51cfebd912b6e4b9bf2 Signed-off-by: mrichomme <morgan.richomme@orange.com>
2020-01-10Add Hound code search environment quickstart documentationPawel Wieczorek1-0/+56
Issue-ID: ONAPARC-540 Change-Id: I618fcd994f2c6575ee4e388a78606ec59ec4fd02 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Add support for using SSHPawel Wieczorek2-23/+54
This patch changes "create_config.py" script interface and its behaviour: * by default anonymous Gerrit is used for repository cloning and code URLS, * external git mirror for code URLs might be provided but there is no default one, * SSH credentials might be provided for repository cloning. Cloning repository using SSH is required due to current ONAP infrastructure HTTPS bandwidth constraints. User wishing to use this setup should provide two environmental variables: 1) API_USER - Gerrit username for cloning repositories via SSH 2) API_KEY - Gerrit API key (User menu -> Settings -> HTTP Credentials) Be aware that a new RSA key will be generated and added to the user's Gerrit account for purposes of Hound code search operation inside a VM. Do remember to delete it (User menu -> Settings -> SSH keys) after evaluating this environment. Issue-ID: ONAPARC-540 Change-Id: I3e98dfa8582322d5b3bbbbf377d748faea0da57b Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Run Hound code search as tmux sessionPawel Wieczorek1-2/+8
Code search service can be accessed from host using forwarded port (i.e. at "localhost:6080"). Issue-ID: ONAPARC-540 Change-Id: Ia94956cfeca0af12a0f52ea43abae353c0ba8b1a Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Add support for using gitwebPawel Wieczorek1-6/+27
There are projects which do not provide git mirror for code URLs apart from Gerrit's gitweb interface (e.g. OpenDaylight [1]). [1] https://www.opendaylight.org Issue-ID: ONAPARC-540 Change-Id: I48c26b81f4886a12e5cdc4dfbfc99538f180449e Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Drop tool-specific naming convention (git hosting service)Pawel Wieczorek1-5/+5
Issue-ID: ONAPARC-540 Change-Id: Id1c8e94008752efd3d40d0e0eca44d81930c692a Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Make Gerrit and cgit URLs configurablePawel Wieczorek1-7/+19
Issue-ID: ONAPARC-540 Change-Id: I3d7f04379e31ab73964b8cc6184ca2e4413acb7b Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Drop dictionary comprehension from repository list creationPawel Wieczorek1-1/+11
Complex is better than complicated. Issue-ID: ONAPARC-540 Change-Id: I6dbc03166496049e92ff9401450b3ac563b3fb38 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Replace URLs to Gerrit repositories with their cgit mirrorsPawel Wieczorek1-1/+2
Hound does not provide support for linking to source code in Gerrit repositories. Support for cgit mirrors can be achieved by using URL patterns. Issue-ID: ONAPARC-540 Change-Id: Ib73b768d8a636680ab7e4d8d42463a16a9f45275 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Add Hound code search configuration generatorPawel Wieczorek4-0/+67
Configuration is generated from Gerrit-supplied data. Issue-ID: ONAPARC-540 Change-Id: I84d5b87580882926b916ed20dbcd2369be4c77f4 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Add Vagrant environment for Hound code searchPawel Wieczorek1-0/+24
This patch adds build dependencies and builds Hound binaries. Issue-ID: ONAPARC-540 Change-Id: I37b263b3e0c93a9ec08458ec2e08edd75b33d7b4 Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
2020-01-07Describe purpose of Hound code search environmentPawel Wieczorek1-0/+17
Issue-ID: ONAPARC-540 Change-Id: Ie7db4cb6925501fd44dc0372f0a1305463a7e7cc Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>