Linux Foundation Wiki

project collaboration site

User Tools

Site Tools


civilinfrastructureplatform:ciptestingboardatdeskdingledevdeployment

B@D Virtual Machine Deployment (1/5)

These instructions download a pre-provisioned and pre-configured Virtual Machine (VM) that contains Kernel CI and LAVA. Kernel CI is used to build, boot and report results whereas LAVA is used to offer a robust automated testing language, a testing engine and reporting results.

This is the page on which, you should start to create your own CIP B@D Virtual Machine.

Note: Please make sure your development machine has all of the prerequisites spelled out on the features page.

B@D Deployment Method #1 - Download The Standalone Virtual Machine Box

1. Create a clean directory to hold the files for the Virtual Machine (VM). We will use the /home/user/cip directory in these instructions, but you can replace it with whatever works for you.

2. In a terminal, change to the ~/cip directory

user@host:~$ cd ~/cip

user@host:cip$

3. Download the latest version of the pre-provisioned box using the command line as shown or by simply clicking the given link below.

user@host:cip$ wget https://s3-us-west-2.amazonaws.com/download.cip-project.org/ciptesting/b%40d/b%40d_v0_9_1/box/cip_board_at_desk_v0.9.1.box

4. Download the latest version of the VM's sha256sum so we can confirm that what we received was not modified.

user@host:cip$ wget https://s3-us-west-2.amazonaws.com/download.cip-project.org/ciptesting/b%40d/b%40d_v0_9_1/box/cip_board_at_desk_v0.9.1.sha256sum

Note: You may need to install the sha256sum program using your distro's package manager.

5. Download the VM's signature so we can verify the VM signature matches.

user@host:cip$ wget https://s3-us-west-2.amazonaws.com/download.cip-project.org/ciptesting/b%40d/b%40d_v0_9_1/box/cip_board_at_desk_v0.9.1.box.sig

6. Download the CIP VM signer's public key

user@host:cip$ wget https://s3-us-west-2.amazonaws.com/download.cip-project.org/ciptesting/b%40d/b%40d_v0_9_1/sources/pubkey.txt

Using SHA256sum and GPG to check integrity and signature of pre-provisioned box

7. Import the public key into your keyring.

user@host:cip$ gpg --import pubkey.txt

 gpg: key 73715D37: "Robert Marshall (Codething) <robert.marshall@codethink.co.uk>" added
 gpg: Total number processed: 1

8. Calculate the SHA256 sum of the Virtual Machine box file

user@host:cip$ sha256sum --check cip_board_at_desk_v0.9.1.sha256sum

cip_board_at_desk_v0.9.1.box: OK

We are looking for the line that says OK. This tells us that the sha256sum's are the same.

9. Verify the signature of the CIP VM

user@host:cip$ gpg --verify cip_board_at_desk_v0.9.1.box.sig cip_board_at_desk_v0.9.1.box

 gpg: Signature made Thu 25 May 2017 09:27:45 BST using RSA key ID 73715D37
 gpg: Good signature from "Robert Marshall (Codething) <robert.marshall@codethink.co.uk>"
 gpg: WARNING: This key is not certified with a trusted signature!
 gpg: There is no indication that the signature belongs to the owner.
 Primary key fingerprint: 8B2E 53ED 058B 79F3 E162  A001 33D8 9A05 7371 5D37

We are looking for the 2nd line stating that this is a Good signature…

Note: The Warnings shown above are normal, as they depend on your setup and configuration. Here are explanations for the warnings you might encounter:

 gpg: no ultimately trusted keys found

This means that the specific key is not “ultimately trusted” by you or your web of trust, which is okay for the purposes of verifying file signatures.

 WARNING: This key is not certified with a trusted signature! 
 There is no indication that the signature belongs to the owner.

This refers to your level of trust in your belief that you possess our real public key. This is a personal decision. Ideally, a CIP developer would hand you the key in person, but more commonly, you downloaded it. Was the download tampered with? Probably not, but this decision is up to you. Setting up a web of trust is one method for trusting them. See the GPG documentation for more information on how to work with public keys: http://www.gnupg.org/gph/en/manual/x334.html

Import the box into Vagrant and launch the Virtual Machine

10. Clone the board-at-desk-single-dev GitLab Project

user@host:cip$ git clone https://gitlab.com/cip-project/cip-testing/board-at-desk-single-dev

 Cloning into 'board-at-desk-single-dev'...
 remote: Counting objects: 465, done.
 remote: Compressing objects: 100% (171/171), done.
 remote: Total 465 (delta 291), reused 463 (delta 290)
 Receiving objects: 100% (465/465), 15.06 MiB | 16.92 MiB/s, done.
 Resolving deltas: 100% (291/291), done.
 Checking connectivity... done.

11. Change to the newly created board-at-desk-single-dev directory.

user@host:cip$ cd board-at-desk-single-dev

user@host:board-at-desk-single-dev$

12. Import the Virtual Machine into Vagrant and launch the VM

user@host:board-at-desk-single-dev$ ./importbox.sh ../cip_board_at_desk_v0.9.1.box cip-bad-sd0_91

 ==> box: Box file was not detected as metadata. Adding it directly...
 ==> box: Adding box 'cip-bad-sd0_91' (v0) for provider: 
     box: Unpacking necessary files from: file:///home/user/cip/cip_board_at_desk_v0.9.1.box
 ==> box: Successfully added box 'cip-bad-sd0_91' (v0) for 'virtualbox'! 
 ...
 the VM will begin to boot
 ...
 user@host:board-at-desk-single-dev$ 

Note: One Ethernet port on the VM is Bridged, so it will ask you which one of the Ethernet Adapters on the host machine you wish to bridge. You can automate this by adding your desired Ethernet port to the Vagrantfile. e.g. change the config.vm.network line to
config.vm.network “public_network”, use_dhcp_assigned_default_route: true, :bridge ⇒ 'eth0'

Note: If you see an error message stating: The SSH command responded with a non-zero exit status. You can safely ignore this error, we will be connecting to the VM using SSH in the next step.

13. Next, you will move on to the B@D Setup and Configuration wiki page


B@D Deployment Method #2 - Building VM From Scratch Using Vagrant (1/5)

These instructions clone a set of scripts that build the Virtual Machine, that contains Kernel CI and LAVA, from scratch. Kernel CI is used to build, boot and report results whereas LAVA is used to offer a robust automated testing language, a testing engine and reporting results.

Prerequisites

This tutorial needs the same list of prerequisites as those listed on the features page.

Clone the CIP B@D Repo, Build the Virtual Machine and Run Example Tests

1. Create a clean directory to hold the Vagrant files needed to build the Virtual Machine (VM) from scratch. We will use the /home/user/v_cip directory in these instructions, but you can replace it with whatever makes the most sense for you.

2. In a terminal, change to the ~/v_cip directory

user@host:~$ cd ~/v_cip

user@host:v_cip$

Clone the CIP Vagrant Repo and launch the Virtual Machine

3. Clone the board-at-desk-single-dev GitLab Project

user@host:cip$ git clone https://gitlab.com/cip-project/cip-testing/board-at-desk-single-dev

 Cloning into 'board-at-desk-single-dev'...
 remote: Counting objects: 465, done.
 remote: Compressing objects: 100% (171/171), done.
 remote: Total 465 (delta 291), reused 463 (delta 290)
 Receiving objects: 100% (465/465), 15.06 MiB | 16.92 MiB/s, done.
 Resolving deltas: 100% (291/291), done.
 Checking connectivity... done.

4. Change to the newly created board-at-desk-single-dev directory.

user@host:v_cip$ cd board-at-desk-single-dev

user@host:board-at-desk-single-dev$

5. If you wish to use the 0.9.1 release version rather than the git master then do:

git checkout v0.9.1 Note that the 0.9.1 release will not work for the Windows 10 version of Board at Desk, you need the git master.

6. launch the Virtual Machine using Vagrant

user@host:board-at-desk-single-dev$ vagrant up

Example output from the launch is available in the CIP-kernel-test-logs repos.

Note: One Ethernet port on the VM is Bridged, so it will ask you which one of the Ethernet Adapters on the host machine you wish to bridge. You can automate this by adding your desired Ethernet port in the Vagrantfile. e.g. change the config.vm.network line to
config.vm.network “public_network”, use_dhcp_assigned_default_route: true, :bridge ⇒ 'eth0'

Warnings and Errors during Vagrant Up Process

Please see the B@D Known Issues, Workarounds and Troubleshooting Guide page for any errors or warnings you may encounter.

6. Next, you will move on to the B@D Setup and Configuration wiki page

civilinfrastructureplatform/ciptestingboardatdeskdingledevdeployment.txt · Last modified: 2017/07/18 15:11 by rajmarshall