diff --git a/docker/Dockerfile b/docker/Dockerfile index cbd89c8..f861415 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -117,4 +117,7 @@ RUN /librpma.sh COPY tz.sh / RUN /tz.sh -RUN rm /pmdk.sh /valgrind.sh /pmemobj-cpp.sh /pmemkv.sh /setup-maven-settings.sh /pmemkv-java.sh /pmemkv-python.sh /pmemkv-nodejs.sh /pmemkv-ruby.sh /memkind.sh /librpma.sh /tz.sh +COPY cachelib.sh / +RUN /cachelib.sh + +RUN rm /pmdk.sh /valgrind.sh /pmemobj-cpp.sh /pmemkv.sh /setup-maven-settings.sh /pmemkv-java.sh /pmemkv-python.sh /pmemkv-nodejs.sh /pmemkv-ruby.sh /memkind.sh /librpma.sh /tz.sh /cachelib.sh diff --git a/docker/cachelib.sh b/docker/cachelib.sh new file mode 100755 index 0000000..c7d81ca --- /dev/null +++ b/docker/cachelib.sh @@ -0,0 +1,9 @@ +#!/bin/bash -ex + +echo 'Defaults env_keep += "HTTPS_PROXY https_proxy HTTP_PROXY http_proxy NO_PROXY no_proxy"' >> /etc/sudoers + +git clone https://github.com/intel/CacheLib.git +cd CacheLib +git switch develop +./contrib/build.sh -d -j -v +cd .. diff --git a/templates/examples/M/body.tmpl b/templates/examples/M/body.tmpl new file mode 100644 index 0000000..25a1005 --- /dev/null +++ b/templates/examples/M/body.tmpl @@ -0,0 +1,46 @@ +{{top "CacheLib Multi-tier Example"}} + +

+This example creates a multi-tier cache with CacheLib + +{{template "scrollToContinue"}} + +

+Describe example + +{{step "Run-Time Environment"}} + +Describe example + +{{step "CacheLib multi-tier example in C++"}} + +

+This example creates a multi-tier cache using pmem as a secondary tier + +{{edit "main.cpp"}} + +

+Once you've made any edits to the +above source files, click the button +below to build the program on the server. +If you see any build errors, scroll back up +to the source editing window and fix them. + +{{build "build.sh"}} + +

+If the program built without errors, continue on to the next step below. + +{{step "Run Program"}} + +

+Now you can try running the program. + +{{run "./run.sh"}} + +{{summary}} + +

+This example demos how to create a multi-tier cache using Cachelib + +{{bottom}} diff --git a/templates/examples/M/description.tmpl b/templates/examples/M/description.tmpl new file mode 100644 index 0000000..b81dcfb --- /dev/null +++ b/templates/examples/M/description.tmpl @@ -0,0 +1,7 @@ +{{template "tocEntryStart" .}} +{{template "tocShortText" .}} +CacheLib Multi-tier Example +{{template "tocLongText" .}} +{{template "tocRecommended" .}} +This example shows how to create a multi-tier cache using pmem with cachelib +{{template "tocEntryEnd" .}}