Install CCF¶
Tip
The ccf-app-template repository can be used to quickly setup the environment necessary to build CCF apps.
Quickstart¶
CCF builds and runs on Linux. It is primarily developed and tested on Azure Linux 3.0. To build a CCF application, installing the ccf_<platform>-devel RPM package is sufficient. This package contains the libraries and headers required to build CCF applications.
CCF releases are available on the GitHub repository release page. They can be installed as follows, for the SNP
and Virtual
platforms:
# Set CCF_VERSION to most recent LTS release
$ export CCF_VERSION=$(curl -ILs -o /dev/null -w %{url_effective} https://github.com/microsoft/CCF/releases/latest | sed 's/^.*ccf-//')
# Alternatively, set this manually, e.g.:
# export CCF_VERSION=6.0.0
$ wget https://github.com/microsoft/CCF/releases/download/ccf-${CCF_VERSION}/ccf_snp_${CCF_VERSION}-devel_x86_64.rpm
$ sudo tdnf install ./ccf_snp_${CCF_VERSION}-devel_x86_64.rpm
The following commands can be run to verify that CCF was installed successfully:
$ /opt/ccf_snp/bin/cchost --version
CCF host: ccf-<version>
Platform: SNP
$ /opt/ccf_snp/bin/sandbox.sh
No package/app specified. Defaulting to installed JS logging app
Setting up Python environment...
Python environment successfully setup
[16:10:16.552] Starting 1 CCF node...
[16:10:23.349] Started CCF network with the following nodes:
[16:10:23.350] Node [0] = https://127.0.0.1:8000
...
# Set CCF_VERSION to most recent LTS release
$ export CCF_VERSION=$(curl -ILs -o /dev/null -w %{url_effective} https://github.com/microsoft/CCF/releases/latest | sed 's/^.*ccf-//')
# Alternatively, set this manually, e.g.:
# export CCF_VERSION=6.0.0
$ wget https://github.com/microsoft/CCF/releases/download/ccf-${CCF_VERSION}/ccf_virtual_${CCF_VERSION}-devel_x86_64.rpm
$ sudo tdnf install ./ccf_virtual_${CCF_VERSION}-devel_x86_64.rpm
Warning
Virtual mode does not provide any security guarantees and should be used for development purposes only.
The following commands can be run to verify that CCF was installed successfully:
$ /opt/ccf_virtual/bin/cchost --version
CCF host: ccf-<version>
Platform: Virtual
$ /opt/ccf_virtual/bin/sandbox.sh
No package/app specified. Defaulting to installed JS logging app
Setting up Python environment...
Python environment successfully setup
[16:10:16.552] Starting 1 CCF node...
[16:10:16.552] Virtual mode enabled
[16:10:23.349] Started CCF network with the following nodes:
[16:10:23.350] Node [0] = https://127.0.0.1:8000
...
The CCF install notably contains:
The
cchost
binary required to spin up a CCF applicationThe
cmake
files required to build CCF applicationsHeader files and libraries to build CCF applications (under
include/
andlib/
)A limited set of Python utilities to start a basic CCF service for local testing
Various utility scripts (see Running CCF Applications)
Uninstall¶
To remove an installation of CCF, run:
$ sudo tdnf remove ccf_snp
$ sudo tdnf remove ccf_virtual
From Source¶
To build and install CCF from source, please see Build CCF from Source.