Skip to content

Commit

Permalink
Refined elasticsearch app to run properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Waldek Kozaczuk committed Jun 16, 2018
1 parent 8a4f369 commit 6b0f4fc
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 12 deletions.
4 changes: 4 additions & 0 deletions apps/elasticsearch/.capstanignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
README.md
assets
work
fetch.sh
2 changes: 2 additions & 0 deletions apps/elasticsearch/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
elasticsearch
work
21 changes: 21 additions & 0 deletions apps/elasticsearch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This is an example of simple java 'Hello World' app running on OSv.

Here are the steps to build the image:

Init the package
```
capstan package init --name "elasticsearch" --title "Elasticsearch OSS 6.3" --author "Anonymous" --version "6.3" --require "openjdk8-zulu-compact3-with-java-beans" --require "osv.run-java"
```
Fetch elasticsearch binaries.
```
./fetch.sh
```
Add run init to specify how to execute the app (please look at meta/run.yaml)
Compose the package
```
capstan package compose -p elasticsearch
```
Run the app
```
capstan run elasticsearch -p qemu --boot default
```
2 changes: 2 additions & 0 deletions apps/elasticsearch/fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ done

javac -d ./work -cp $CLASSPATH work/*.java
jar uf ./work/elasticsearch/lib/elasticsearch-${VERSION}.jar -C ./work org

mv ./work/elasticsearch .
8 changes: 8 additions & 0 deletions apps/elasticsearch/meta/package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: elasticsearch
title: Elasticsearch OSS 6.3
author: Anonymous
version: "6.3"
require:
- openjdk8-zulu-compact3-with-java-beans
- osv.run-java
created: "2018-06-16T10:27:15-04:00"
15 changes: 15 additions & 0 deletions apps/elasticsearch/meta/run.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
runtime: native
config_set:
default:
bootcmd: "/java.so
-Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m
-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow
-Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0
-Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -XX:+HeapDumpOnOutOfMemoryError
-Des.enforce.bootstrap.checks=true
-Des.path.home=/elasticsearch
-Des.path.conf=/elasticsearch/config
-Des.distribution.flavor=oss -Des.distribution.type=tar
-cp /elasticsearch/lib/*
org.elasticsearch.bootstrap.Elasticsearch"
config_set_default: default
12 changes: 0 additions & 12 deletions apps/elasticsearch/module.py

This file was deleted.

0 comments on commit 6b0f4fc

Please sign in to comment.