doc/nwl-ci: added setup of hash equivalence server
Signed-off-by: Marc Mattmüller <marc.mattmueller@netmodule.com>
This commit is contained in:
parent
5313b9e4f1
commit
64c24ccfcb
|
|
@ -1302,6 +1302,86 @@ We have now prepared the repository for the setup of the CI environment. Let's i
|
|||
no tests and adaptions were made.
|
||||
|
||||
|
||||
Complement the SSTATE-Cache Mirror with a Hash Equivalence Server
|
||||
#################################################################
|
||||
In the previous section the sstate-cache mirror was set up. The NWL team requested a hash equivalence server in a proof
|
||||
of concept version. Thus, the following steps show how to set this server up:
|
||||
|
||||
* Log in to the (sstate-cache) server (10.115.101.100)
|
||||
* Create a directory, setup the hash equivalence server and start it
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# assuming you are logged in on 10.115.101.100 and located in HOME directory
|
||||
mkdir nwl
|
||||
cd nwl
|
||||
|
||||
# Get the bitbake directory from the build server:
|
||||
scp -r user@10.115.101.101:/home/user/nwl-ci/jenkins_home/workspace/nwl/nwl/coreos/bitbake .
|
||||
|
||||
# Now we start the hash equivalence server on the default port and put it in the background:
|
||||
./bin/bitbake-hashserv --bind 10.115.101.100:8686 &
|
||||
|
||||
|
||||
.. note::
|
||||
If the server is shut down or rebooted the hash equivalence server is not started automatically. You have to
|
||||
start it manually again. For this proof of concept version we did not setup a systemd unit.
|
||||
|
||||
* With a commit on the CI repository we enable the hash equivalence server using ``auto.conf``
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
diff --git a/jobs/Jenkinsfile_Common b/jobs/Jenkinsfile_Common
|
||||
index a790700..da83568 100644
|
||||
--- a/jobs/Jenkinsfile_Common
|
||||
+++ b/jobs/Jenkinsfile_Common
|
||||
@@ -11,14 +11,15 @@ env.BITBUCKET_URL = "https://${env.BITBUCKET_LOCAL}"
|
||||
|
||||
env.YOCTO_REPO_URL = "ssh://git@${env.BITBUCKET_LOCAL}:7999/nm-nsp/netmodule-wireless-linux.git"
|
||||
|
||||
-env.STORAGE_URL = "http://10.115.101.100"
|
||||
+env.HASH_SSTATE_SRV_IP = "10.115.101.100"
|
||||
+env.STORAGE_URL = "http://${env.HASH_SSTATE_SRV_IP}"
|
||||
env.SSTATE_STORAGE_SRV_WEB_ROOT_PATH = "/var/www/html"
|
||||
env.STORAGE_NWL_DIR = "nwl"
|
||||
env.SSTATE_STORAGE_DIR = "nwl-sstate"
|
||||
env.SSTATE_STORAGE_URL = "${env.STORAGE_URL}/${env.STORAGE_NWL_DIR}/${env.SSTATE_STORAGE_DIR}"
|
||||
env.BINARY_STORAGE_URL = "${env.STORAGE_URL}/downloads"
|
||||
|
||||
-//env.HASHSERVER = "172.16.70.254:8686"
|
||||
+env.HASHSERVER = "${env.HASH_SSTATE_SRV_IP}:8686"
|
||||
|
||||
|
||||
// Yocto build definitions
|
||||
@@ -154,14 +155,9 @@ def getDownloadDirConfig() {
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
def getSstateMirrorConfig() {
|
||||
- // ToDo: set the sstate-cache mirror and the HashEquivalance Server accordingly
|
||||
-
|
||||
-// def signatureHdl = "BB_SIGNATURE_HANDLER = \"OEEquivHash\""
|
||||
-// def hashSrv = "BB_HASHSERVE = \"${env.HASHSERVER}\""
|
||||
-
|
||||
def mirrorCfg = "SSTATE_MIRRORS = \"file://.* ${env.SSTATE_STORAGE_URL}/PATH\""
|
||||
- def signatureHdl = "BB_SIGNATURE_HANDLER = \"OEBasicHash\""
|
||||
- def hashSrv = "BB_HASHSERVE = \"\""
|
||||
+ def signatureHdl = "BB_SIGNATURE_HANDLER = \"OEEquivHash\""
|
||||
+ def hashSrv = "BB_HASHSERVE = \"${env.HASHSERVER}\""
|
||||
def sstateDir = "SSTATE_DIR=\"${env.SSTATE_CACHE}\""
|
||||
return "${signatureHdl}\n${hashSrv}\n${mirrorCfg}\n${sstateDir}"
|
||||
}
|
||||
|
||||
|
||||
# This gives us the following auto.conf content:
|
||||
MACHINE ?= "cn9130-cf-pro"
|
||||
SOURCE_MIRROR_URL = "http://10.115.101.100/downloads"
|
||||
DL_DIR = "/var/jenkins_home/downloads"
|
||||
BB_SIGNATURE_HANDLER = "OEEquivHash"
|
||||
BB_HASHSERVE = "10.115.101.100:8686"
|
||||
SSTATE_MIRRORS = "file://.* http://10.115.101.100/nwl/nwl-sstate/PATH"
|
||||
SSTATE_DIR="/var/jenkins_home/sstate-cache"
|
||||
NWL_IMAGE_EXTRACLASSES += "nwl-image-ci"
|
||||
|
||||
|
||||
Standardization of Project-Specific Jenkins Instances
|
||||
######################################################
|
||||
|
|
|
|||
Loading…
Reference in New Issue