blob: b60240e3ccc86c32692b3e7cc5621d97a9f7b32d [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Building · Eclipse Kapua™ Developer Guide</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.2">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-hints/plugin-hints.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="building.html" />
<link rel="prev" href="./" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
Introduction
</a>
</li>
<li class="chapter active" data-level="1.2" data-path="building.html">
<a href="building.html">
Building
</a>
<ul class="articles">
<li class="chapter " data-level="1.2.1" data-path="building.html">
<a href="building.html#kapua">
Kapua
</a>
</li>
<li class="chapter " data-level="1.2.2" data-path="building.html">
<a href="building.html#documentation">
Documentation
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.3" data-path="running.html">
<a href="running.html">
Running
</a>
<ul class="articles">
<li class="chapter " data-level="1.3.1" data-path="running.html">
<a href="running.html#docker-containers">
Docker
</a>
</li>
<li class="chapter " data-level="1.3.2" data-path="running.html">
<a href="running.html#openshift">
OpenShift
</a>
</li>
<li class="chapter " data-level="1.3.3" data-path="running.html">
<a href="running.html#vagrant">
Vagrant
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.4" data-path="ide.html">
<a href="ide.html">
Setting up an IDE
</a>
<ul class="articles">
<li class="chapter " data-level="1.4.1" data-path="ide.html">
<a href="ide.html#eclipse">
Eclipse IDE
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.5" >
<span>
Configuration
</span>
<ul class="articles">
<li class="chapter " data-level="1.5.1" data-path="sso.html">
<a href="sso.html">
Single sign-on
</a>
</li>
</ul>
</li>
<li class="chapter " data-level="1.6" data-path="database.html">
<a href="database.html">
Working with database
</a>
</li>
<li class="chapter " data-level="1.7" data-path="client.html">
<a href="client.html">
Client generation
</a>
</li>
<li class="chapter " data-level="1.8" data-path="qa.html">
<a href="qa.html">
QA process
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >Building</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="building">Building</h1>
<p>We use Apache Maven as the build tool of choice.</p>
<p>We use <code>gitbook</code> to build the documentation.</p>
<h2 id="kapua">Kapua</h2>
<p>Kapua is being compiled with Maven. </p>
<p>In order to perform a full build of Kapua first you have to build the external
resources of Kapua with the following command in the root of the Git repository:</p>
<pre><code>mvn clean install -f external/pom.xml
</code></pre><p>Than you can run the Kapua full build issuing the command:</p>
<pre><code>mvn clean install
</code></pre><p>Don&apos;t forget to also add the <code>console</code> Maven profile if you are interested in building the Web Console as well:</p>
<pre><code>mvn clean install -Pconsole
</code></pre><p>If you only want to run Kapua locally for testing you can speed up the build
by using:</p>
<pre><code>mvn clean install -Pdev -DskipTests=true
</code></pre><p>Again, add the <code>console</code> profile as well if needed:</p>
<pre><code>mvn clean install -Pdev,console -DskipTests=true
</code></pre><h2 id="documentation">Documentation</h2>
<p>Before you can build documentation, you need to install <code>gitbook</code></p>
<h3 id="gitbook">gitbook</h3>
<p>To install gitbook run</p>
<pre><code>$ npm install -g gitbook-cli
</code></pre><p>If you don&apos;t have <code>npm</code> installed then you would need to install it first.</p>
<h4 id="install-npm-on-fedora">Install npm On Fedora</h4>
<pre><code>$ yum install npm
</code></pre><h4 id="install-npm-on-fedora-24">Install npm On Fedora 24</h4>
<p>This is what you should do if you are using Fedora 24+.</p>
<pre><code>$ dnf install nodejs
</code></pre><h4 id="install-npm-on-mac-os">Install npm On Mac-OS</h4>
<p>The easiest way would be through brew <a href="http://brew.sh" target="_blank">brew</a></p>
<p>You first install brew using the instructions on the <a href="http://brew.sh" target="_blank">Brew</a> website.</p>
<p>After you installed brew you can install npm by:</p>
<pre><code>brew install npm
</code></pre><h2 id="building-the-docs">Building the docs</h2>
<p>To build documentation, run <code>gitbook build</code> from either <code>docs/developer-guide/en</code> or <code>docs/user-manual/en</code></p>
<h2 id="continuous-integration">Continuous integration</h2>
<p>Kapua is running CI builds against two public environments:</p>
<ul>
<li>Travis CI <a href="https://travis-ci.org/eclipse/kapua/" target="_blank"><img src="https://api.travis-ci.org/eclipse/kapua.svg" alt="Build"></a> </li>
<li>Eclipse Hudson <a href="https://hudson.eclipse.org/kapua/" target="_blank"><img src="https://img.shields.io/jenkins/s/https/hudson.eclipse.org/kapua/job/Develop.svg" alt="Hudson"></a></li>
</ul>
<p>Please be sure that both environments are &quot;green&quot; (i.e. all tests pass) after you commit any changes into <code>develop</code> branch.</p>
<p>We also use CI server sponsored by <a href="https://www.redhat.com/en" target="_blank">Red Hat</a> to automatically push latest Docker images to
<a href="https://hub.docker.com/r/kapua/" target="_blank">Kapua DockerHub account</a>. Red Hat CI server checks for code changes every 15 minutes and pushes updated version
of images if needed.</p>
<h2 id="docker-images">Docker images</h2>
<p>Kapua Docker images are hosted under <a href="https://hub.docker.com/r/kapua/" target="_blank">Kapua DockerHub account</a>. The latest snapshots of images are updated every 15 minutes.</p>
<p>In order to build Kapua Docker images yourself, execute Maven build with <code>docker</code> profile enabled:</p>
<pre><code>mvn clean install -Pdocker
</code></pre><p>Just like building Kapua from the source code, also add the <code>console</code> profile to generate the Web Console docker image:</p>
<pre><code>mvn clean install -Pdocker,console
</code></pre><p>If you want to speed up the build process you can ask Maven to ignore <code>-SNAPSHOT</code> updates
force it to use only locally present artifacts with the <code>dev</code> profile. You can also skip unit tests to speed things even more.</p>
<pre><code>mvn clean install -Pdocker,dev -DskipTests
</code></pre><p>Again, don&apos;t forget the <code>console</code> profile if the Web Console image is needed:</p>
<pre><code>mvn clean install -Pdocker,dev,console -DskipTests
</code></pre><h3 id="pushing">Pushing</h3>
<p>Pushing with default settings:</p>
<pre><code>mvn -Pdocker deploy
</code></pre><p>Pushing to a specific docker registry:</p>
<pre><code>mvn -Pdocker deploy -Ddocker.push.registry=registry.hub.docker.com
</code></pre><p>Pushing to a specific docker registry under a specific account:</p>
<pre><code>mvn -Pdocker deploy -Ddocker.push.registry=registry.hub.docker.com -Ddocker.account=eclipse
</code></pre><p>Don&apos;t forget to add the <code>console</code> Maven profile to the console above if you&apos;re interested in pushing the Web Console image as well.</p>
<p>By default Kapua applies the following tags to the published images:</p>
<ul>
<li><code>latest</code></li>
<li>daily timestamp in format <code>YYYY-MM-DD</code></li>
<li>current project version (for example <code>0.0.1</code> or <code>0.1.2-SNAPSHOT</code>)</li>
</ul>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="./" class="navigation navigation-prev " aria-label="Previous page: Introduction">
<i class="fa fa-angle-left"></i>
</a>
<a href="building.html#kapua" class="navigation navigation-next " aria-label="Next page: Kapua">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Building","level":"1.2","depth":1,"next":{"title":"Kapua","level":"1.2.1","depth":2,"anchor":"#kapua","path":"building.md","ref":"building.md#kapua","articles":[]},"previous":{"title":"Introduction","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["hints"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"hints":{"danger":"fa fa-exclamation-circle","info":"fa fa-info-circle","tip":"fa fa-mortar-board","working":"fa fa-wrench"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"eclipse/kapua","theme":"default","githubHost":"https://github.com/","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Eclipse Kapua™ Developer Guide","links":{"home":"http://eclipse.org/kapua"},"gitbook":"3.x.x","description":"Eclipse Kapua™ Developer Guide"},"file":{"path":"building.md","mtime":"2020-11-26T08:22:34.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2020-11-26T08:23:27.237Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>