Commit Graph

34 Commits

Author SHA1 Message Date
stevenhorsman
216c066795 doc: Update the agent build
Update the agent build to get around the nix & glibc linker problems
by running the libseccomp installation first

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
stevenhorsman
3aebead189 doc: Update ccv0 doc and scripts
- Update the doc and scripts to reflect that skopeo isn't mandatory
for signature verification any longer
- Update the script to default the aa_kbc to offline_fs_kbc

Fixes: #4581
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-09-16 07:50:11 +02:00
Georgina Kinge
74a748f36e CCv0: Refactor ccv0.sh to remove duplicate code
Refactored ccv0.sh to remove rootfs code now in lib.sh

Fixes: #4512

Co-authored-by: Megan Wright Megan.Wright@ibm.com
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2022-06-28 14:09:23 +01:00
stevenhorsman
761786324e CCv0: Increase timeout
Increase crictl timout to stop pod creation failing on v1.24.1

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-06-27 10:19:05 +01:00
Fabiano Fidêncio
e52d6b1d0b Merge pull request #4529 from GeorginaKin/CCv0
CCv0: Refactor ccv0.sh to use bats test
2022-06-27 09:39:27 +02:00
stevenhorsman
305532db02 CCv0: Fix PS1 unbound error
export PS1, so it is bound

Fixes: #4531
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-06-24 17:27:43 +01:00
Georgina Kinge
20ef9e9f5c CCv0: Refactor ccv0.sh to use bats test
Refactored ccv0.sh to utilise new automated tests for pulling encrypted images and creating a pod.

Fixes: #4512
Depends-on: github.com/kata-containers/tests#4866

Co-authored-by: Megan Wright <Megan.Wright@ibm.com>
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
2022-06-24 15:43:15 +01:00
stevenhorsman
2e5c4a9245 CCv0: Update script to use new lib method
- Update `ccv0.sh` to use the new lib method which updates the CC pod config yaml
to add a a unique id
for compatibility with crictl 1.24.0+

Fixes: #4867
Depends-on: github.com/kata-containers/tests#4867
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-06-22 16:48:55 +01:00
Georgina Kinge
cfa3e1e933 Merge pull request #4354 from GeorginaKin/CCv0
CCv0: Refactor signature verification PoC changes
2022-06-20 13:01:07 +01:00
Georgina Kinge
a1e16ff6e0 CCv0: Refactor signature verification PoC changes
Removes signature verficiation files and related code

Fixes: #4111

Signed-off-by: Georgina Kinge <Georgina.Kinge@ibm.com>
Co-authored-by: Megan Wright <megan.wright@ibm.com>
2022-06-20 10:58:36 +01:00
stevenhorsman
b772cc6b45 CCv0: Fix permissions of kata-containers repo
- Solve `fatal: unsafe repository` ownership error by using `lib.sh`
code to check out the kata-containers repo
- Update `~/rustup` and repo directory ownership to `${USER}`
in order to allow subsequent build steps to work as a non-root
user

Fixes: #4241
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-05-30 16:53:31 +01:00
stevenhorsman
69122d2a05 CCv0: Fix ccv0.sh to install virtiofsd
- Add call to install_virtiofsd.sh
- Remove the qemu build in the cloud_hypervisor path

Fixes: #4286
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-05-19 18:22:16 +01:00
Georgina Kinge
d50f98b603 CCv0: Refactored ccv0.sh to use new shared library
Refactoring ccv0.sh to use integration/confidential/lib.sh

Fixes: #4132
Signed-off-by: Georgina Kinge <georgina.kinge@ibm.com>
Co-authored-by: Megan Wright <Megan.Wright@ibm.com>
2022-05-13 14:31:57 +01:00
stevenhorsman
b89af0b373 doc: Allow ccv0 to run as non-root user
Change all the tests repo interactions to be done as sudo

Fixes: #4241
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-05-12 18:20:55 +01:00
Fabiano Fidêncio
c5b39c5686 ccv0.sh: Expand to also using Cloud Hypervisor
Right now the script only support QEMU, but there's not a reason to do
that, mainly considering we already have the tests parity in the CIs
between QEMU and Clouud Hypervisor.

With this in mind, let's expand this script to also using Cloud
Hypervisor.

Whether this script should use QEMU or Cloud Hypervisor is defined
according to the KATA_HYPERVISOR environment variable.

Fixes: #4038

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-04-06 14:56:55 +02:00
Fabiano Fidêncio
5fdbdaafd3 ccv0: Don't use the QEMU process to get the sandbox ID
Instead, rely on the conntainerd-shim-kata-v2 process, as this makes
this script VMM agnostic.

Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
2022-04-05 19:39:17 +02:00
stevenhorsman
4e7b6306b4 CCv0: Refactor image verification doc and tests
Refactor image verification documentation to be more user
focussed, using crictl rather than agent-ctl and re-using the
integration test config files

Fixes: #3958
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-03-30 11:30:43 +01:00
stevenhorsman
6d5a329535 docs: Update to reflect logging changes
- We've updated the CC logging scripts to log to the journal
rather than a socket, so remove socat scripts and instructions
to reflect this

Fixes: #3928
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-03-25 11:33:49 +00:00
Megan Wright
ead111abf7 CCv0: Refactor CCv0.sh to use integration test lib.sh
Updates ccv0.sh to remove duplicated code
Fixes: #3898
Signed-off-by: Megan Wright <megan.wright@ibm.com>
Signed-off-by: Georgina Kinge  <georgina.kinge@ibm.com>
2022-03-18 15:31:02 +00:00
stevenhorsman
fe52465bdb doc: Fix typo
Fix typo in script

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-03-02 17:25:36 +00:00
stevenhorsman
e636e67e92 doc: Add doc and script for ssh-demo sample
- Add scripts and documentation to build, configure and test
the ssh-demo encrypted image sample in Kubernetes

Fixes: #3637

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-02-14 19:52:36 +00:00
stevenhorsman
9d4cd77560 doc: Add k8s e2e doc and scripts
- Add scripts and documentation to build, configure and test
created a Kata CC unencrypted container using Kubernetes
- Switch test images to quay.io as image_rpc.rs has some
problems with docker.io?
- Update documentation to better fit the kata documentation
requirements and fix typos

- Fixes: #3511

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-02-07 17:44:00 +00:00
stevenhorsman
f68f73a849 CCv0: Add network debug packages
Add extra packages for debugging purposes

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-01-31 18:31:15 +00:00
stevenhorsman
f19811df43 doc: Improve ccv0.sh and CCv0 how-to document
General doc enchancements including:
- Change `cd`s for `pushd` and `popd`s
- Remove hard coded architectures
- Tighten up the security where we `chmod 777`
- Add support for not running as source
- Updates so it doesn't do `ctr pull` if the image is on the
 local system already
- Doc and Test running as non-root user (covered by #2879)
- Update doc to match image_rpc changes

Fixes: #3549
Fixes: #2879
Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-01-31 09:33:05 +00:00
stevenhorsman
c68f0360f0 doc: Add crictl e2e cc doc
- Add scripts and documentation to build, configure and test
created a Kata CC unencrypted container using crictl
- Update documentation to better fit the kata documentation requirements

- Fixes: #3510

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2022-01-28 09:35:45 +00:00
stevenhorsman
bf6b1102db doc: Update ccv0
- Update script to reflect merge of directory changes

- Fixes: #3295

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-12-17 11:00:33 +00:00
stevenhorsman
95ab38ae54 doc: Stop skopeo being installed by default
With the new rust image pull service skopeo we can parameterise whether to build
and install skopeo and turn it off by default if we don't need
signature verification support

Fixes: #3170

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-12-03 14:53:39 +00:00
stevenhorsman
6f1bdd7079 doc: Add PoC container signature validation
- Document how to test the signature validation with
a number of different scenarios and test images
- Update ccv0.sh to add policy_path to kernel_params

Fixes: #2682

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-22 11:51:05 +01:00
Jakob Naucke
13f6418c46 osbuilder: Build Skopeo, umoci, attestation-agent
When the environment variable $SKOPEO_UMOCI is set to "yes", Skopeo and
umoci are built inside the guest build container and installed to the
guest rootfs. The respective build- and runtime dependencies are added.
This respects the (existing) $LIBC variable (gnu/musl) and avoids issues
with glibc mismatches.
This is currently only supported for Ubuntu guests, as the system Golang
packages included in the versions of other distros that we use are too
old to build these packages, and re-enabling installing Golang from
golang.org is cumbersome, given especially that it is unclear how long
we will keep using Skopeo and umoci.

Additionally, when the environment variable $AA_KBC is set,
attestation-agent (with that KBC) is included.

This replaces some logic in ccv0.sh that is removed.

Fixes: #2907
Signed-off-by: Jakob Naucke <jakob.naucke@ibm.com>
2021-11-09 18:04:21 +01:00
stevenhorsman
d57648eb13 doc: Add pull image support to shim
- Add a ctr shim pull image function to CCv0.sh
- Add information on how to use it in the how-to doc

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-05 14:50:32 +00:00
stevenhorsman
f2bdd846fd doc: Update base rootfs to be ubuntu
- Update the CCv0 demo script to use ubuntu instead of fedora
- Update the extra packages to reflect the apt vs dnf namings
- Build and add the skopeo binary to the rootfs image
- Minor kubernetes init fix

Fixes #2849

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-05 14:49:45 +00:00
stevenhorsman
522b9e33c3 doc: Add doc for authenticated pull image
Add support for a new source credentials environment variable in the
test script
Add documentation of it into the how-to guide

Fixes #2653

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-05 14:49:45 +00:00
stevenhorsman
500356ace1 doc: Add Create Container test and doc
Refactor ccv0.sh so it's easier to add agent-ctl commands
Add agent create container agent-ctl method to ccv0.sh
Update doc to reflect changes

Fixes #2617

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-05 14:49:20 +00:00
stevenhorsman
76b70a7a82 doc: Add doc and scripts for CCv0 agent PullImage
This commit add documentation and a script to help people to build, run,
test and demo the CCv0 changes around PullImage on guest.
It is currently limited to the Agent pullimage, but can be expanded
as more code is shared.

Fixes #2574

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
2021-11-05 14:49:20 +00:00