generated from riscv-admin/template-docs-rtd
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 02488c4
Showing
58 changed files
with
5,950 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: 1e1fa9dffe0ce62d769806e304ef907b | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
========================================== | ||
Becoming an RISC-V Ecosystem Labs Partner | ||
========================================== | ||
|
||
Yada yada... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
====================================================== | ||
Hosting a Continuous Integration (CI) Project at a Lab | ||
====================================================== | ||
|
||
Hosting a continuous integration project at a lab means providing RISC-V hardware or emulated compute instances as CI runners/agents for public use. CI compute instances can be integrated with version control systems such as GitHub, GitLab, etc. and can automate the build process of the source code for developers. | ||
|
||
Following version control systems currently support RISC-V CI: | ||
|
||
#. Jenkins | ||
#. GitLab | ||
|
||
.. toctree:: | ||
:hidden: | ||
:maxdepth: 2 | ||
|
||
hosting_jenkins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
================================== | ||
Hosting RISC-V CI through Jenkins | ||
================================== | ||
|
||
This page describes how users can host RISC-V CI via Jenkins. For hosting CI through Jenkins, follow the steps described below. | ||
|
||
Installing Jenkins | ||
=================== | ||
|
||
Jenkins install instructions are given at `this link <https://www.jenkins.io/doc/book/installing/>`_. | ||
|
||
If you wish to build Jenkins from source, the repository is available at `<https://github.com/jenkinsci/jenkins>`_ | ||
|
||
Adding RISC-V agents in Jenkins | ||
=============================== | ||
|
||
Agents are the compute instances in Jenkins on which CI builds are run. | ||
Once Jenkins is installed, the next step is to add RISC-V agents in Jenkins. They are also referred to as slaves, build executors, or runners. | ||
|
||
Make sure that Jenkins Master (the compute instance on which Jenkins web server is running) is accessible by the RISC-V compute instance you wish to add as a slave. | ||
|
||
*For the sake of simplicity, it is assumed that RISC-V compute instances have Linux operating installed on them (preferably Ubuntu) and are accessible through SSH* | ||
|
||
Install prerequisites | ||
--------------------- | ||
|
||
Compute instances need OpenJDK 17 or newer installed on them to be hosted on Jenkins. | ||
|
||
.. code:: | ||
sudo apt install openjdk-17-jdk | ||
Set up agent in Jenkins | ||
----------------------- | ||
|
||
* In the Jenkins web server, go to :code:`Build Executor Status > New Node` | ||
|
||
.. image:: assets/hosting_jenkins_1.png | ||
|
||
.. image:: assets/hosting_jenkins_2.png | ||
|
||
* Add a Node name (this will be displayed in the build executor list) and select Permanent Agent | ||
|
||
* Add a suitable description for users who will be using that compute instance | ||
|
||
.. image:: assets/hosting_jenkins_3.png | ||
|
||
* Add the number of executors (this indicates how many builds can run concurrently) | ||
* Change :code:`Launch method` to :code:`Launch agents via SSH` since our agent is accessible via SSH | ||
* In :code:`Host`, add the IP or URL which can be used to access the compute instance | ||
* In :code:`Credentials`, click on :code:`Add` if you have not created the credentials yet and add the credentials :code:`Kind` as :code:`Username with password` (these are the credentials which you can use to SSH to your RISC-V compute instance) | ||
* In :code:`Host Key Verification Strategy`, select :code:`Manually trusted key Verification strategy` and also check :code:`Require manual verification of initial connection` | ||
* If you access the RISC-V compute instance through a port other than 22, click on :code:`Advanced` and enter :code:`Port` | ||
* Leave other settings as is and click save | ||
|
||
Once the settings are saved, you will see :code:`Trust SSH Host Key` on the left bar. Click on it and grant permission to use the compute instance to the Jenkins controller. | ||
|
||
.. image:: assets/hosting_jenkins_4.png | ||
|
||
.. image:: assets/hosting_jenkins_5.png | ||
|
||
Now the Jenkins agent is added and can be used. For using Jenkins as mentioned above instance, use the name which you gave it at the start in your build pipelines of Jenkins. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# RISC-V Sample Document | ||
|
||
This is a **sample** document text. | ||
|
||
Type `make html` in the `docs` directory to build the document. | ||
|
||
The resulting HTML will be found in `build/html/` directory. | ||
|
||
For more information on using Markdown, see the | ||
[MyST Project documetation](https://myst-parser.readthedocs.io/en/latest/index.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
========================================== | ||
RISC-V Labs Best Practices Documentation | ||
========================================== | ||
|
||
TBD overview... | ||
|
||
Documents | ||
|
||
.. toctree:: | ||
:includehidden: | ||
:maxdepth: 2 | ||
|
||
becoming_lab_partner | ||
ci_hosting |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
/* Compatability shim for jQuery and underscores.js. | ||
* | ||
* Copyright Sphinx contributors | ||
* Released under the two clause BSD licence | ||
*/ | ||
|
||
/** | ||
* small helper function to urldecode strings | ||
* | ||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL | ||
*/ | ||
jQuery.urldecode = function(x) { | ||
if (!x) { | ||
return x | ||
} | ||
return decodeURIComponent(x.replace(/\+/g, ' ')); | ||
}; | ||
|
||
/** | ||
* small helper function to urlencode strings | ||
*/ | ||
jQuery.urlencode = encodeURIComponent; | ||
|
||
/** | ||
* This function returns the parsed url parameters of the | ||
* current request. Multiple values per key are supported, | ||
* it will always return arrays of strings for the value parts. | ||
*/ | ||
jQuery.getQueryParameters = function(s) { | ||
if (typeof s === 'undefined') | ||
s = document.location.search; | ||
var parts = s.substr(s.indexOf('?') + 1).split('&'); | ||
var result = {}; | ||
for (var i = 0; i < parts.length; i++) { | ||
var tmp = parts[i].split('=', 2); | ||
var key = jQuery.urldecode(tmp[0]); | ||
var value = jQuery.urldecode(tmp[1]); | ||
if (key in result) | ||
result[key].push(value); | ||
else | ||
result[key] = [value]; | ||
} | ||
return result; | ||
}; | ||
|
||
/** | ||
* highlight a given string on a jquery object by wrapping it in | ||
* span elements with the given class name. | ||
*/ | ||
jQuery.fn.highlightText = function(text, className) { | ||
function highlight(node, addItems) { | ||
if (node.nodeType === 3) { | ||
var val = node.nodeValue; | ||
var pos = val.toLowerCase().indexOf(text); | ||
if (pos >= 0 && | ||
!jQuery(node.parentNode).hasClass(className) && | ||
!jQuery(node.parentNode).hasClass("nohighlight")) { | ||
var span; | ||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); | ||
if (isInSVG) { | ||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); | ||
} else { | ||
span = document.createElement("span"); | ||
span.className = className; | ||
} | ||
span.appendChild(document.createTextNode(val.substr(pos, text.length))); | ||
node.parentNode.insertBefore(span, node.parentNode.insertBefore( | ||
document.createTextNode(val.substr(pos + text.length)), | ||
node.nextSibling)); | ||
node.nodeValue = val.substr(0, pos); | ||
if (isInSVG) { | ||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); | ||
var bbox = node.parentElement.getBBox(); | ||
rect.x.baseVal.value = bbox.x; | ||
rect.y.baseVal.value = bbox.y; | ||
rect.width.baseVal.value = bbox.width; | ||
rect.height.baseVal.value = bbox.height; | ||
rect.setAttribute('class', className); | ||
addItems.push({ | ||
"parent": node.parentNode, | ||
"target": rect}); | ||
} | ||
} | ||
} | ||
else if (!jQuery(node).is("button, select, textarea")) { | ||
jQuery.each(node.childNodes, function() { | ||
highlight(this, addItems); | ||
}); | ||
} | ||
} | ||
var addItems = []; | ||
var result = this.each(function() { | ||
highlight(this, addItems); | ||
}); | ||
for (var i = 0; i < addItems.length; ++i) { | ||
jQuery(addItems[i].parent).before(addItems[i].target); | ||
} | ||
return result; | ||
}; | ||
|
||
/* | ||
* backward compatibility for jQuery.browser | ||
* This will be supported until firefox bug is fixed. | ||
*/ | ||
if (!jQuery.browser) { | ||
jQuery.uaMatch = function(ua) { | ||
ua = ua.toLowerCase(); | ||
|
||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || | ||
/(webkit)[ \/]([\w.]+)/.exec(ua) || | ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || | ||
/(msie) ([\w.]+)/.exec(ua) || | ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || | ||
[]; | ||
|
||
return { | ||
browser: match[ 1 ] || "", | ||
version: match[ 2 ] || "0" | ||
}; | ||
}; | ||
jQuery.browser = {}; | ||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; | ||
} |
Oops, something went wrong.