Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding cachelib multi-tier example #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 9 additions & 0 deletions docker/cachelib.sh
Original file line number Diff line number Diff line change
@@ -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 ..
46 changes: 46 additions & 0 deletions templates/examples/M/body.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{top "CacheLib Multi-tier Example"}}

<p class="intro">
This example creates a multi-tier cache with CacheLib

{{template "scrollToContinue"}}

<p>
Describe example

{{step "Run-Time Environment"}}

Describe example

{{step "CacheLib multi-tier example in C++"}}

<p>
This example creates a multi-tier cache using pmem as a secondary tier

{{edit "main.cpp"}}

<p>
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"}}

<p>
If the program built without errors, continue on to the next step below.

{{step "Run Program"}}

<p>
Now you can try running the program.

{{run "./run.sh"}}

{{summary}}

<p>
This example demos how to create a multi-tier cache using Cachelib

{{bottom}}
7 changes: 7 additions & 0 deletions templates/examples/M/description.tmpl
Original file line number Diff line number Diff line change
@@ -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" .}}