]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Add instructions to run
authorAlberto Leiva Popper <ydahhrk@gmail.com>
Mon, 25 Mar 2019 21:08:12 +0000 (15:08 -0600)
committerAlberto Leiva Popper <ydahhrk@gmail.com>
Mon, 25 Mar 2019 21:08:12 +0000 (15:08 -0600)
docs/_layouts/default.html
docs/css/screen.css
docs/doc/index.md
docs/doc/installation.md
docs/doc/intro-fort.md
docs/doc/rtr-server.md
docs/doc/run.md [new file with mode: 0644]
docs/doc/validator.md
docs/img/warn.svg [new file with mode: 0644]
docs/index.md

index 8d7616bada6d8da0254bb4bc798e6269c0b54b10..25384c2e85c7112be5ca57a5124c951b6bdb8c3a 100644 (file)
@@ -4,10 +4,17 @@
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>{{ page.title }}</title>
        <link href="../css/screen.css" rel="stylesheet" type="text/css">
+
+       <!-- Site is still under construction, so don't index it -->
+       <meta name="robots" content="noindex,nofollow">
 </head>
 
 <body>
 
+<blockquote><strong>
+<img src="../img/warn.svg" alt="WARNING" /> Warning: This documentation is still under construction. A good chunk of it will already be obsolete by the time FORT v1.0.0 is released.
+</strong></blockquote>
+
 {{ content }}
 
 </body>
index 431d372564ddeb88051804eff5f8827861ad8956..5cca87536448615a633ab493801175863484c518 100644 (file)
@@ -1,3 +1,13 @@
+blockquote {
+       padding: 1em;
+       border-radius: 3px;
+       border: 1px solid #ddd;
+       color: #404040;
+       background-color: #f0f6ff;
+       margin-left: 3em;
+       margin-right: 3em;
+}
+
 code {
        background-color: #f8f8f8;
 }
index 0be75e1987cb811d7c6438799614af8d3078a2a5..b445e8b6da5f6b032e7ee60964c58535f9d585ae 100644 (file)
@@ -1,10 +1,12 @@
 ---
+title: Documentation Index
 ---
 
-# Documentation Index
+# {{ page.title }}
 
 1. [Introduction to RPKI](intro-rpki.html)
 2. [Introduction to Fort](intro-fort.html)
 3. [Compilation and Installation](installation.html)
-4. [Validator usage](validator.html)
-5. [RTR Server usage](rtr-server.html)
+4. [Running the package](run.html)
+5. [Validator usage](validator.html)
+6. [RTR Server usage](rtr-server.html)
index 0524135cc8cfb5ddc24bfd61abf83bbf0719b31c..75092cc661171f639fda75dcef15eea5d49da8e5 100644 (file)
@@ -1,7 +1,8 @@
 ---
+title: Compilation and Installation
 ---
 
-# Compilation and Installation
+# {{ page.title }}
 
 ## Index
 
index bbc4e1c11d1d9948eed9bb52a9925b5721e304ad..5cf92873dee769cf917adb2e054fbfb8f5220916 100644 (file)
@@ -1,7 +1,8 @@
 ---
+title: Introduction to FORT
 ---
 
-# Introduction to FORT
+# {{ page.title }}
 
 ## Design
 
index 3996059972000ec2bf113a579f604aa06a43cb01..607c7cbd7b6c5f17cd0d340fcd83b0f35b02c65a 100644 (file)
@@ -1,5 +1,6 @@
 ---
+title: RTR Server arguments
 ---
 
-# 
+# {{ page.title }}
 
diff --git a/docs/doc/run.md b/docs/doc/run.md
new file mode 100644 (file)
index 0000000..d5e2293
--- /dev/null
@@ -0,0 +1,102 @@
+---
+title: Running the package
+---
+
+# {{ page.title }}
+
+> Note: The separation between Validator and RTR server is a temporal arrangement for the Beta version.
+> 
+> For the sake of performance and ease of use, the two binaries will be merged by the time version 1.0.0 is released. These instructions will become obsolete then.
+
+Create file `~/fort/update-rpki.sh`, and drop the following content into it:
+
+{% highlight bash %}
+#!/bin/bash
+
+# TODO I'm assuming the file names will not contain whitespace for now.
+
+# First argument: Directory containing all the TALs
+TAL_DIRECTORY=$1
+# Second argument: File we share with the RTR server
+# (The script will also temporarily manage a file called
+# "$OUTPUT_FILE.tmp")
+OUTPUT_FILE=$2
+# Third argument: Working directory.
+# We'll store the repository and temporal files here.
+WORKING_DIR=$3
+
+# Directory where we'll store temporal ROA files, used to assemble
+# $OUTPUT_FILE.tmp.
+TMP_ROA_DIR=$WORKING_DIR/roa
+# The local repository cache
+CACHE_DIR=$WORKING_DIR/repository
+
+
+mkdir -p $TMP_ROA_DIR
+mkdir -p $CACHE_DIR
+
+echo "Updating and validating the repository..."
+# TODO we'd probably gain a lot of performance by running these in
+# parallel
+for TAL_FILE in $TAL_DIRECTORY/*; do
+       echo "  Handling TAL $TAL_FILE..."
+       /usr/local/bin/rpki_validator \
+               --tal $TAL_FILE \
+               --local-repository $CACHE_DIR \
+               --roa-output-file $TMP_ROA_DIR/$(basename $TAL_FILE .tal).roa.tmp \
+               > /dev/null
+done
+
+echo "Joining all the generated ROA files..."
+
+# Make sure it exists. Otherwise the mv explodes
+touch $OUTPUT_FILE.tmp
+# Make sure $TMP_ROA_DIR/*.tmp expands, even if there are no files.
+shopt -s nullglob
+
+for TMP_ROA_FILE in $TMP_ROA_DIR/*.tmp; do
+       echo "  Joining file $TMP_ROA_FILE..."
+       cat $TMP_ROA_FILE >> $OUTPUT_FILE.tmp
+       rm $TMP_ROA_FILE
+done
+
+echo "Replacing old ROA file with new one..."
+# (Needs to be done last for the sake of atomicity.)
+mv $OUTPUT_FILE.tmp $OUTPUT_FILE
+
+echo "Done."
+{% endhighlight %}
+
+Grant it executable permissions:
+
+{% highlight bash %}
+$ chmod +x ~/fort/update-rpki.sh
+{% endhighlight %}
+
+Place your `.tal` files in `~/fort/tal`:
+
+{% highlight bash %}
+$ mv <?> ~/fort/tal
+{% endhighlight %}
+
+Then create a cron job (`crontab -e`), running the script above every hour:
+
+       0 * * * * ~/fort/update-rpki.sh ~/fort/tal /tmp/fort/roas.csv /tmp/fort
+
+Now the RTR Server can serve the ROAs:
+
+{% highlight bash %}
+$ cat rtr-config.json
+{
+       "listen": {
+               "address": "::1",
+               "port": "8323",
+               "queue": 10
+       },
+       "vrps": {
+               "location": "/tmp/fort/roas.csv",
+               "checkInterval": 60
+       }
+}
+$ rtr_server -f rtr-config.json
+{% endhighlight %}
index b49016386e93bcca84277d5b5255d082afa8fcee..8e7a125d734c02e95e9ac8e4669d2756c5450b3e 100644 (file)
@@ -1,8 +1,9 @@
 ---
+title: Validator Usage
 command: rpki_validator
 ---
 
-# Validator Usage
+# {{ page.title }}
 
 ## Index
 
diff --git a/docs/img/warn.svg b/docs/img/warn.svg
new file mode 100644 (file)
index 0000000..2ef3cba
--- /dev/null
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="24"
+   height="24"
+   id="svg2"
+   version="1.1"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="New document 1">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient3755">
+      <stop
+         style="stop-color:#fbfa7a;stop-opacity:1;"
+         offset="0"
+         id="stop3757" />
+      <stop
+         style="stop-color:#e5bd24;stop-opacity:1;"
+         offset="1"
+         id="stop3759" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3755"
+       id="linearGradient3761"
+       x1="12"
+       y1="3.457854"
+       x2="12"
+       y2="19.332785"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.0000221,0,0,0.99999946,-3.8416352e-5,1028.3621)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3755"
+       id="linearGradient3773"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,1028.3622)"
+       x1="12"
+       y1="2"
+       x2="12"
+       y2="23" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.313709"
+     inkscape:cx="12.265397"
+     inkscape:cy="8.5654643"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="1028"
+     inkscape:window-x="0"
+     inkscape:window-y="24"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(0,-1028.3622)">
+    <path
+       sodipodi:nodetypes="zzzz"
+       inkscape:connector-curvature="0"
+       id="path3775"
+       d="m 13.000921,1031.6621 c -1.003337,0 -10.5029573,17.63 -10.0006718,18.5 0.5022857,0.87 19.5001038,0.8664 20.0004418,-2e-4 0.500338,-0.8666 -8.996433,-18.4998 -9.99977,-18.4998 z"
+       style="fill:#b3b3b3;fill-opacity:1;stroke:#b3b3b3;stroke-width:1.00001085px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+    <path
+       style="fill:url(#linearGradient3761);fill-opacity:1;stroke:#f0db4f;stroke-width:1.00001085px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="m 12.000227,1030.8621 c -1.003337,0 -10.5025068,17.63 -10.0002212,18.5 0.5022856,0.87 19.5001042,0.8666 20.0004422,0 0.500338,-0.8666 -8.996884,-18.5 -10.000221,-18.5 z"
+       id="path2985"
+       inkscape:connector-curvature="0"
+       sodipodi:nodetypes="zzzz" />
+    <g
+       style="font-size:12px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       id="text3781"
+       transform="matrix(1.0000221,0,0,0.99999946,-3.8416352e-5,4.1124988e-4)">
+      <path
+         d="m 11,1045.8622 2,0 0,1.5 -2,0 0,-1.5 m 0,-8.5 2,0 0,5 -0.25,2 -1.5,0 -0.25,-2"
+         style="font-size:14px"
+         id="path3786"
+         inkscape:connector-curvature="0"
+         sodipodi:nodetypes="ccccccccccc" />
+    </g>
+  </g>
+</svg>
index 7ed79c77c0eaaa2c5a45ba5da5e8341bde1e96a2..35ac79742260e7dd81fa6a8b6e9be7e02fb36c63 100644 (file)
@@ -1,7 +1,8 @@
 ---
+title: Home
 ---
 
-# Home
+# {{ page.title }}
 
 ## Introduction