-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
completed the build & install from source code
- Loading branch information
1 parent
f1b3501
commit b9b3138
Showing
16 changed files
with
733 additions
and
84 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
169 changes: 169 additions & 0 deletions
169
Writerside/topics/installing-nape-build-source-code.topic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,169 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE topic | ||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd"> | ||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd" | ||
title="2nd - Build Source Code" id="installing-nape-build-source-code" > | ||
|
||
<p> | ||
Now that you have <b>nape</b> and <b>nape-evaluator</b> source code, we are going to build each software. | ||
</p> | ||
|
||
<chapter title="NAPE-Evaluator CLI" id="first-build-nape-evaluator-cli"> | ||
|
||
<p> | ||
The <a href="https://github.com/nape-not-another-policy-engine/nape-evaluator">NAPE-Evaluator</a> is a Python application. The goal of this build process is to create a <a href="https://pypi.org/project/whl/">WHL file (pronounced 'wheel')</a>. This WHL file is the <a href="https://packaging.python.org/en/latest/specifications/binary-distribution-format/">binary distribution format</a> we will use to install the NAPE-Evaluator CLI. | ||
</p> | ||
|
||
<procedure id="first-build-nape-evaluator-whl-file"> | ||
|
||
<step> | ||
<p> | ||
Navigate your way into the <b>nape-evaluator</b> directory from your nape project directory. For example: | ||
</p> | ||
|
||
<code-block lang="bash"> | ||
nape-not-another-policy-engine % cd nape-evaluator | ||
nape-evaluator % | ||
</code-block> | ||
|
||
</step> | ||
|
||
<step> | ||
<p> | ||
Once inside the <b>nape-evaluator</b> directory, run the command: | ||
</p> | ||
|
||
<code-block lang="bash"> | ||
make build-release | ||
</code-block> | ||
|
||
<p> | ||
This command will kick off the full build process and create the WHL file, and other *.tar.gz file. All the build system and runtime dependencies will be downloaded, and the nape-evaluator project will be compiled into two specific outputs. | ||
</p> | ||
|
||
<p> | ||
The build ran successfully, you'll see a not like the one below pop up in your terminal: | ||
</p> | ||
|
||
<code-block lang="bash"> | ||
NAPE Evaluator - Release Build COMPLETE! | ||
</code-block> | ||
</step> | ||
|
||
<step> | ||
<p> | ||
You should now see couple new directories appear in your <b>nape-evaluator</b> source code directory. The one we are interested in is the <b>build-output</b> directory. | ||
</p> | ||
|
||
<img src="nape-evaluator-build-output.png" alt="New NAPE Evaluator directories created from the build" width="352"/> | ||
|
||
<p> | ||
Navigate into that directory, like below: | ||
</p> | ||
|
||
<code-block lang="bash"> | ||
nape-evaluator % cd build-output | ||
build-output % | ||
</code-block> | ||
|
||
</step> | ||
|
||
<step> | ||
<p> | ||
Inside the <b>build-directory</b>, you'll see another directory called <b>dist</b>, navigate into that directory. | ||
</p> | ||
|
||
<img src="nape-evaluator-dist-directory.png" alt="The inside of the build-output/dist directory created from the 'make build-release' command" width="318"/> | ||
|
||
<p> | ||
Inside the <b>dist</b> directory, you will see two files. A <b>*.tar.gz</b> file, and a <b>*.whl</b> file. The names of these files will start with <b>nape-</b> and be followed by a version number that follows the <a href="https://semver.org/">SemVer Versioning Specification</a> such as <b>1.0.0</b>. | ||
</p> | ||
</step> | ||
|
||
<step> | ||
The NAPE-Evaluator build is complete if the <b>nape-X.X.X-py3-none-any.whl</b> file is in the <b>nape-evaluator/build-output/dist</b> directory. | ||
</step> | ||
|
||
|
||
</procedure> | ||
|
||
</chapter> | ||
|
||
<chapter title="NAPE CLI" id="second-build-nape-cli"> | ||
|
||
<p> | ||
The <a href="https://github.com/nape-not-another-policy-engine/nape">NAPE CLI</a> is main program that you, or a machine, will use to import and execute a <a href="nape-glossary.topic#nape-assurance-procedure" />. | ||
</p> | ||
|
||
<procedure id="second-build-nape-cli-binary"> | ||
|
||
<step> | ||
<p> | ||
Navigate your way into the <b>nape</b> directory from your nape project directory. For example: | ||
</p> | ||
|
||
<code-block lang="bash"> | ||
nape-not-another-policy-engine % cd nape | ||
nape % | ||
</code-block> | ||
|
||
</step> | ||
|
||
<step> | ||
|
||
<p> | ||
Once inside the <b>nape</b> directory, run the command: | ||
</p> | ||
|
||
<code-block lang="bash"> | ||
make build-release | ||
</code-block> | ||
|
||
<p> | ||
If all goes well, you'll see the following message in your terminal: | ||
</p> | ||
|
||
<code-block lang="bash"> | ||
Release Build COMPLETE! | ||
</code-block> | ||
|
||
<p> | ||
This command will kick off the full build process and create a new directory in your nape project directory called <b>builds</b>. To access this, you'll need to navigate up one directory level from the current <b>nape</b> directory back to the project directory, and then you'll see the <b>builds</b> directory which was created. | ||
</p> | ||
|
||
<code-block lang="bash"> | ||
nape % cd .. | ||
nape-not-another-policy-engine % ls -a | ||
. builds nape (possibly other directories) .. | ||
</code-block> | ||
|
||
|
||
</step> | ||
|
||
<step> | ||
<p> | ||
Navigate to the <b>builds</b> directory, and inside it you'll see a subdirectory called <b>release</b>. Inside the <b>release</b> directory you'll see many other directories and files. | ||
</p> | ||
|
||
<img src="nape-cli-build-output.png" alt="The 'builds' directory which is the output of the nape cli build." width="282"/> | ||
|
||
<p> | ||
Towards the bottom, you'll see the <b>nape</b> executable. This is the software program will install in the next steps. | ||
</p> | ||
</step> | ||
|
||
|
||
|
||
</procedure> | ||
|
||
</chapter> | ||
|
||
<chapter title="Next, Installing the NAPE Software" id="next-install-nape-software"> | ||
<p> | ||
Now that we have installable binaries for the NAPE-Evaluator CLI and NAPE CLI, let's install them! | ||
</p> | ||
|
||
</chapter> | ||
|
||
</topic> |
161 changes: 161 additions & 0 deletions
161
Writerside/topics/installing-nape-download-source-code.topic
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE topic | ||
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd"> | ||
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd" | ||
title="1st - Download Source Code" id="installing-nape-download-source-code" | ||
help-id="installing-nape-from-source-code-build-and-install-download-nape-evaluator;installing-nape-from-source-code-build-and-install-build-source-code;installing-nape-from-source-code-build-and-install-download-source-code"> | ||
|
||
<p> | ||
Let's get started by cloning the <a href="https://github.com/nape-not-another-policy-engine/nape">NAPE</a> and <a href="https://github.com/nape-not-another-policy-engine/nape-evaluator">NAPE-Evaluator</a> source code repositories. | ||
</p> | ||
|
||
<chapter title="First, the NAPE-Evaluator" id="first-download-source-code-nape-evaluator-cli"> | ||
<p> | ||
The <a href="https://github.com/nape-not-another-policy-engine/nape-evaluator">NAPE-Evaluator</a> is responsible for applying a <a href="nape-glossary.topic#nape-test-of-detail" /> to a piece of <a href="nape-glossary.topic#evidence"/>. | ||
</p> | ||
|
||
<procedure id="build-and-install-nape-evaluator"> | ||
<step> | ||
<p>Either clone or download the <a href="https://github.com/nape-not-another-policy-engine/nape-evaluator">NAPE-Evaluator</a> source code into your nape project directory </p> | ||
|
||
<p>If you are using <a href="https://git-scm.com/">git</a>, then simple clone the project using the following commands. We always prefer the SSH approach for security reasons, although using an https clone works well if all you prefer to do is use the NAPE software.</p> | ||
|
||
SSH | ||
<code-block lang="bash"> | ||
git clone [email protected]:nape-not-another-policy-engine/nape-evaluator.git | ||
</code-block> | ||
|
||
HTTPS | ||
<code-block lang="bash"> | ||
git clone https://github.com/nape-not-another-policy-engine/nape-evaluator.git | ||
</code-block> | ||
|
||
<p> | ||
<b>Not using Git?</b> | ||
</p> | ||
|
||
<p> | ||
You can download the software by clicking on the "Code" button near the top right of the screen, and then selecting the "Download Zip" option. | ||
</p> | ||
|
||
|
||
<img src="nape-evaluator-download-zip.png" width="244" alt="How to Download ZIP File for NAPE Evaluator Source Code"/> | ||
|
||
|
||
<p> | ||
Ensure you unzip the download into your nape project directory, and double check that the directory name of all the unzipped contents is called <i>nape-evaluator</i>. | ||
</p> | ||
|
||
</step> | ||
|
||
<step> | ||
Double check that you have a directory called <b>nape-evaluator</b> in your project directory. | ||
|
||
<p>Here is an example of what your directory may look like:</p> | ||
|
||
<code-block lang="bash"> | ||
nape-not-another-policy-engine % ls -a | ||
. nape-evaluator .. | ||
</code-block> | ||
|
||
<p>If you navigate into the <b>nape-evaluator</b> directory, you should see the <i>Makefile</i> we will use in the following steps to build and install the cli.</p> | ||
|
||
<code-block lang="bash"> | ||
nape-not-another-policy-engine % cd nape-evaluator | ||
nape-evaluator % ls -a | ||
. (many other files will be listed) Makefile ... | ||
</code-block> | ||
|
||
</step> | ||
|
||
<step> | ||
You are now done with downloading, or cloning, the NAPE-Evaluator source code. | ||
</step> | ||
|
||
|
||
</procedure> | ||
|
||
</chapter> | ||
|
||
<chapter title="Second, the NAPE CLI" id="second-download-source-code-nape-cli"> | ||
<p> | ||
The <a href="https://github.com/nape-not-another-policy-engine/nape">NAPE CLI</a> is main program that you, or a machine, will use to import <a href="nape-glossary.topic#nape-assurance-procedure" /> and execute them. | ||
</p> | ||
|
||
<procedure id="build-and-install-nape-cli"> | ||
<step> | ||
<p>Either clone or download the <a href="https://github.com/nape-not-another-policy-engine/nape">NAPE</a> source code into your nape project directory </p> | ||
|
||
<p>If you are using <a href="https://git-scm.com/">git</a>, then simple clone the project using the following commands. We always prefer the SSH approach for security reasons, although using an https clone works well if all you prefer to do is use the NAPE software.</p> | ||
|
||
SSH | ||
<code-block lang="bash"> | ||
git clone [email protected]:nape-not-another-policy-engine/nape.git | ||
</code-block> | ||
|
||
HTTPS | ||
<code-block lang="bash"> | ||
git clone https://github.com/nape-not-another-policy-engine/nape.git | ||
</code-block> | ||
|
||
<p> | ||
<b>Not using Git?</b> | ||
</p> | ||
|
||
<p> | ||
You can download the software by clicking on the "Code" button near the top right of the screen, and then selecting the "Download Zip" option. | ||
</p> | ||
|
||
|
||
<img src="nape-cli-download-zip.png" width="244" alt="How to Download ZIP File for NAPE CLI Source Code"/> | ||
|
||
|
||
<p> | ||
Ensure you unzip the download into your nape project directory, and double check that the directory name of all the unzipped contents is called <i>nape</i>. | ||
</p> | ||
|
||
</step> | ||
|
||
<step> | ||
Double check that you have a directory called <b>nape</b> in your project directory. | ||
|
||
<p>Here is an example of what your directory may look like:</p> | ||
|
||
<code-block lang="bash"> | ||
nape-not-another-policy-engine % ls -a | ||
. nape nape-evaluator .. | ||
</code-block> | ||
|
||
<p>If you navigate into the <b>nape</b> directory, you should see the <i>Makefile</i> we will use in the following steps to build and install the cli.</p> | ||
|
||
<code-block lang="bash"> | ||
nape-not-another-policy-engine % cd nape | ||
nape % ls -a | ||
. (many other files will be listed) Makefile ... | ||
</code-block> | ||
|
||
</step> | ||
|
||
<step> | ||
We are done with downloading the source code, let's build and install each cli. | ||
</step> | ||
|
||
|
||
</procedure> | ||
|
||
</chapter> | ||
|
||
<chapter title="Next, Build the Source Code" id="next-build-source-code"> | ||
<p> | ||
By now, you should have both the <b>nape-evaluator</b> and <b>nape</b> directories within your nape project directory, and all the source code in each directory. | ||
</p> | ||
|
||
<p> | ||
Let's move onto <a href="installing-nape-build-source-code.topic" /> | ||
</p> | ||
|
||
</chapter> | ||
|
||
|
||
</topic> |
Oops, something went wrong.