gemelen: (Default)
With job change comes project change and some bizarre technologies like old-n-hairy OSGI.
There are some steps to get comprehensive environment.

All done with a lot of virtualization magic under SmartOS, thanks to Joyent and other guys whom deliver this amazing stuff.

0. Create project with Maven and its maven-bundle-plugin to produce bundle jar.
1. Make necessary changes to sources to start with.
For example, simple Activator class only with start() and stop() methods like

import org.osgi.framework._

class Activator extends BundleActivator {
def start(bc: BundleContext):Unit = { Console.println("started") }
def stop(bc: BundleContext):Unit = { Console.println("stopped") }
}

At this point you should be able to successfully package it locally.
2. Add sources under VCS control (or do it from start). I use git and bitbucket service for this time.
3. Here comes SmartOS:

[root@saule ~]# vmadm list
UUID TYPE RAM STATE ALIAS
...
e810ea3c-ac05-48e5-9a80-0c42bca99a6e OS 512 running postgres
3eb5876f-4577-4791-99d0-4b16b4cbe3d1 OS 800 running nexus
bea2edbb-443c-4291-8007-5d67cd038acf OS 2048 running teamcity
e8bec698-0cdd-45f1-a039-dfbd591864e9 OS 4096 running hq

I have rented dedicated server to do dirty work at, and there are already all vm-instances for software production cycle.
Everybody else can do the same with idea "one vm for one service" in mind.
"hq" hosts working shell+vim, is ready to edit code and run Felix container.
All used software is free and OSS (majority of them).
I use Nexus OSS version and Teamcity free version (up to 10 users, 20 build configurations and 3 build agents).
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).
5. In Nexus:
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.
Read and repeat instructions from Nexus OBR Plugin install
Then login into Nexus and create proxy-repo. Again, instruction is already done by some good guys Transforming a Maven Repository into an OSGi Bundle Repository
6. Download and unpack Felix dustribution in your working place ("hq" in my case).
7. Run Felix and add proxy repo from previous step via command

obr:repo add <repo-url/.meta/obr.xml>

8. Push sources to remote repo, which will trigger build in Teamcity and deploy to some repo in Nexus (snapshots for example).
9. In Felix

obr:list // to list all artifacts from proxy-repo added in step 7
obr:deploy <artifact>
felix:start <its id>


With some other things under the hood (maven deployment configuration and settings) and a bit of luck, you will get continuous delivery infrastructure.
gemelen: (Default)
Free PaaS/SaaS for Scala apps via stackoverflow:
Jelastic - has interesting deployment and run options
Heroku - has less options then Jelastic and becomes expensive more faster while picking some upgrades.
UPD
gemelen: (Default)
некий разработчик, профиль на мойкруг

Некоторые выполненные работы:
...
- Реализация на Java языка описания условий и его компилятора в SQL на основе маппинга Hibernate;

/* ...
 * @ created 07.07.2008
 * @ $Author$
 * @ $Revision$
 */
package ru.<кроваый энтерпрайз>.core.yaopus.interpreter.variables;
Read more... )
/me пошел дальше искать способ сообщить об ошибке пользователю без выбрасывания exception'а.

UPD: fixed for teh great justice

Profile

gemelen: (Default)
gemelen

October 2017

M T W T F S S
      1
2345 678
9101112131415
16171819202122
23242526272829
3031     

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 21st, 2017 19:32
Powered by Dreamwidth Studios