<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2011-04-09:771050</id>
  <title>Amber</title>
  <subtitle>gemelen</subtitle>
  <author>
    <name>gemelen</name>
  </author>
  <link rel="alternate" type="text/html" href="https://gemelen.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://gemelen.dreamwidth.org/data/atom"/>
  <updated>2015-02-21T22:34:46Z</updated>
  <dw:journal username="gemelen" type="personal"/>
  <entry>
    <id>tag:dreamwidth.org,2011-04-09:771050:137761</id>
    <link rel="alternate" type="text/html" href="https://gemelen.dreamwidth.org/137761.html"/>
    <link rel="self" type="text/xml" href="https://gemelen.dreamwidth.org/data/atom/?itemid=137761"/>
    <title>Development cycle around Apache Felix OSGI-container</title>
    <published>2015-02-21T22:34:46Z</published>
    <updated>2015-02-21T22:34:46Z</updated>
    <category term="smartos"/>
    <category term="programming"/>
    <category term="java"/>
    <dw:music>Hol Baumann - Human | Live Nuit Hypnotique #4 (Full Set)</dw:music>
    <dw:mood>exhausted</dw:mood>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">With job change comes project change and some bizarre technologies like old-n-hairy OSGI.&lt;br /&gt;There are some steps to get comprehensive environment.&lt;br /&gt;&lt;br /&gt;All done with a lot of virtualization magic under SmartOS, thanks to Joyent and other guys whom deliver this amazing stuff.&lt;br /&gt;&lt;br /&gt;0. Create project with Maven and its maven-bundle-plugin to produce bundle jar.&lt;br /&gt;1. Make necessary changes to sources to start with. &lt;br /&gt;For example, simple Activator class only with start() and stop() methods like&lt;br /&gt;&lt;code&gt;&lt;br /&gt;import org.osgi.framework._&lt;br /&gt;&lt;br /&gt;class Activator extends BundleActivator {&lt;br /&gt;    def start(bc: BundleContext):Unit = { Console.println("started") }&lt;br /&gt;    def stop(bc: BundleContext):Unit = { Console.println("stopped") }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;At this point you should be able to successfully package it locally.&lt;br /&gt;2. Add sources under VCS control (or do it from start). I use git and bitbucket service for this time.&lt;br /&gt;3. Here comes SmartOS:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;[root@saule ~]# vmadm list&lt;br /&gt;UUID                                  TYPE  RAM      STATE             ALIAS&lt;br /&gt;...&lt;br /&gt;e810ea3c-ac05-48e5-9a80-0c42bca99a6e  OS    512      running           postgres&lt;br /&gt;3eb5876f-4577-4791-99d0-4b16b4cbe3d1  OS    800      running           nexus&lt;br /&gt;bea2edbb-443c-4291-8007-5d67cd038acf  OS    2048     running           teamcity&lt;br /&gt;e8bec698-0cdd-45f1-a039-dfbd591864e9  OS    4096     running           hq&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;I have rented dedicated server to do dirty work at, and there are already all vm-instances for software production cycle. &lt;br /&gt;Everybody else can do the same with idea "one vm for one service" in mind.&lt;br /&gt;"hq" hosts working shell+vim, is ready to edit code and run Felix container.&lt;br /&gt;All used software is free and OSS (majority of them). &lt;br /&gt;I use Nexus OSS version and Teamcity free version (up to 10 users, 20 build configurations and 3 build agents).&lt;br /&gt;4. In Teamcity: create project, add vcs-root from bitbucket (with access via "deployment" key from "teamcity" vm), use auto-created or create by hand build configuration (which simply runs maven deploy).&lt;br /&gt;5. In Nexus: &lt;br /&gt;since OSS version shipped without some features, we should download and install plugin to be able create proxy repository from maven to OBR which will be used later in Felix.&lt;br /&gt;Read and repeat instructions from &lt;a href="http://books.sonatype.com/nexus-book/reference/osgi-sect-intro.html"&gt;Nexus OBR Plugin install&lt;/a&gt;&lt;br /&gt;Then login into Nexus and create proxy-repo. Again, instruction is already done by some good guys &lt;a href="http://books.sonatype.com/mcookbook/reference/ch01s09.html"&gt;Transforming a Maven Repository into an OSGi Bundle Repository&lt;/a&gt;&lt;br /&gt;6. Download and unpack Felix dustribution in your working place ("hq" in my case).&lt;br /&gt;7. Run Felix and add proxy repo from previous step via command&lt;br /&gt;&lt;code&gt;&lt;br /&gt;obr:repo add &amp;lt;repo-url/.meta/obr.xml&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;8. Push sources to remote repo, which will trigger build in Teamcity and deploy to some repo in Nexus (snapshots for example).&lt;br /&gt;9. In Felix&lt;br /&gt;&lt;code&gt;&lt;br /&gt;obr:list // to list all artifacts from proxy-repo added in step 7&lt;br /&gt;obr:deploy &amp;lt;artifact&amp;gt;&lt;br /&gt;felix:start &amp;lt;its id&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;With some other things under the hood (maven deployment configuration and settings) and a bit of luck, you will get continuous delivery infrastructure.&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gemelen&amp;ditemid=137761" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2011-04-09:771050:75030</id>
    <link rel="alternate" type="text/html" href="https://gemelen.dreamwidth.org/75030.html"/>
    <link rel="self" type="text/xml" href="https://gemelen.dreamwidth.org/data/atom/?itemid=75030"/>
    <title>Scala PaaS/SaaS</title>
    <published>2012-04-15T20:30:31Z</published>
    <updated>2012-05-15T10:47:22Z</updated>
    <category term="programming"/>
    <category term="java"/>
    <category term="scala"/>
    <dw:music>B! Machine - Two paths</dw:music>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">Free PaaS/SaaS for Scala apps via stackoverflow:&lt;br /&gt;&lt;strike&gt;&lt;a href="http://jelastic.com/"&gt;Jelastic&lt;/a&gt; - has interesting deployment and run options&lt;/strike&gt;&lt;br /&gt;&lt;a href="http://heroku.com/"&gt;Heroku&lt;/a&gt; - has less options then Jelastic and becomes expensive more faster while picking some upgrades.&lt;br /&gt;UPD&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gemelen&amp;ditemid=75030" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2011-04-09:771050:72251</id>
    <link rel="alternate" type="text/html" href="https://gemelen.dreamwidth.org/72251.html"/>
    <link rel="self" type="text/xml" href="https://gemelen.dreamwidth.org/data/atom/?itemid=72251"/>
    <title>Make me unsee it</title>
    <published>2012-03-29T07:17:54Z</published>
    <updated>2012-04-15T17:46:22Z</updated>
    <category term="java"/>
    <category term="феерия"/>
    <category term="office"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">&lt;i&gt;некий разработчик, профиль на мойкруг&lt;/i&gt;&lt;br /&gt;&lt;cite&gt;&lt;br /&gt;Некоторые выполненные работы: &lt;br /&gt;...&lt;br /&gt; - Реализация на Java языка описания условий и его компилятора в SQL на основе маппинга Hibernate;&lt;br /&gt;&lt;/cite&gt;&lt;br /&gt;&lt;pre&gt;
/* ...
 * @ created 07.07.2008
 * @ $Author$
 * @ $Revision$
 */
package ru.&amp;lt;кроваый энтерпрайз&amp;gt;.core.yaopus.interpreter.variables;
&lt;span class="cut-wrapper"&gt;&lt;span style="display: none;" id="span-cuttag___1" class="cuttag"&gt;&lt;/span&gt;&lt;b class="cut-open"&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class="cut-text"&gt;&lt;a href="https://gemelen.dreamwidth.org/72251.html#cutid1"&gt;Read more...&lt;/a&gt;&lt;/b&gt;&lt;b class="cut-close"&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style="display: none;" id="div-cuttag___1" aria-live="assertive"&gt;&lt;/div&gt;
/me пошел дальше искать способ сообщить об ошибке пользователю без выбрасывания exception'а.

UPD: &lt;i&gt;fixed for teh great justice&lt;/i&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=gemelen&amp;ditemid=72251" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
