├── wrk ├── module.py ├── usr.manifest ├── wrk-fix-uninit-connection.patch └── Makefile ├── fio ├── .gitignore ├── usr.manifest ├── module.py ├── README.md ├── example.fio └── Makefile ├── rogue ├── bootfs.manifest ├── module.py ├── Makefile └── usr.manifest ├── specjvm ├── bootfs.manifest ├── README.md ├── mpm │ └── package.yaml ├── GET ├── Makefile ├── test.sh ├── usr.manifest └── module.py ├── cassandra ├── bootfs.manifest ├── usr.manifest └── README ├── erjang ├── .gitignore ├── Capstanfile └── GET ├── jython ├── .gitignore ├── usr.manifest ├── Makefile ├── module.py ├── GET └── Capstanfile ├── onos ├── assets │ └── etc │ │ └── .gitkeep └── Makefile ├── twemproxy ├── bootfs.manifest ├── usr.manifest ├── Capstanfile ├── Makefile ├── nutcracker.yml └── strndup.c ├── Xapps ├── .gitignore ├── usr.manifest.skel ├── README.md ├── module.py └── Makefile ├── apache-spark ├── assets │ └── conf │ │ └── .gitkeep ├── README ├── module.py ├── Capstanfile └── Makefile ├── elixir ├── .gitignore ├── usr.manifest ├── module.py └── default │ └── vm.args ├── fonts ├── .gitignore ├── module.py ├── usr.manifest.skel └── Makefile ├── minecraft-server ├── bootfs.manifest ├── module.py ├── GET ├── README └── usr.manifest ├── opendaylight ├── assets │ └── etc │ │ └── .gitkeep └── README.md ├── apache-activemq ├── assets │ ├── conf │ │ └── .gitkeep │ └── webapps │ │ └── .gitkeep ├── Capstanfile ├── README.md └── module.py ├── graalvm-js ├── .gitignore ├── module.py └── Makefile ├── java-example ├── .gitignore ├── usr.manifest ├── Makefile ├── module.py └── Hello.java ├── java-httpserver ├── .gitignore ├── README.md ├── Makefile ├── module.py ├── usr.manifest └── test.sh ├── node-express-example ├── bootfs.manifest ├── usr.manifest ├── Capstanfile ├── module.py ├── README ├── test.sh └── Makefile ├── node-socketio-example ├── bootfs.manifest ├── usr.manifest ├── Capstanfile ├── module.py ├── test.sh └── Makefile ├── seaweedfs ├── .gitignore ├── GET ├── module.py └── Makefile ├── dacapo ├── .gitignore ├── GET └── Capstanfile ├── java-from-host ├── .gitignore ├── module.py └── Makefile ├── lfe ├── .gitignore ├── default │ └── vm.args └── module.py ├── mono-example ├── .gitignore ├── Makefile ├── module.py ├── hello.cs └── Makefile.FromHost ├── node ├── .gitignore ├── GET ├── README └── Makefile ├── openjdk-zulu-9-and-above ├── .gitignore └── latest.sh ├── ratpack-example ├── .gitignore ├── module.py └── README.md ├── stream ├── mpm │ └── package.yaml ├── usr.manifest ├── module.py ├── README └── test.sh ├── yaws ├── .gitignore ├── default │ └── vm.args └── module.py ├── erlang ├── .gitignore ├── default │ ├── resolv.conf │ ├── erlang.config │ ├── vm.args │ └── inetrc ├── Capstanfile ├── usr.manifest ├── module.py └── README ├── keydb ├── .gitignore ├── module.py ├── README ├── proctitle.patch ├── test.sh ├── tester.py └── Makefile ├── node-from-host ├── module.py └── Makefile ├── spring-boot-example ├── .gitignore ├── mpm │ └── package.yaml ├── module.py ├── test.sh └── README.md ├── busybox ├── .gitignore ├── patches │ └── busybox-main.c ├── Makefile └── README ├── cado ├── usr.manifest ├── .gitignore ├── module.py ├── Capstanfile └── build.sh ├── ffmpeg ├── usr.manifest ├── mpm │ └── package.yaml ├── fftools_makefile.patch ├── fftools_ffmpeg.patch └── module.py ├── iperf ├── usr.manifest ├── Capstanfile ├── module.py └── Makefile ├── nginx ├── .gitignore ├── mpm │ └── package.yaml ├── test.sh └── module.py ├── perl ├── usr.manifest ├── module.py ├── .gitignore ├── Capstanfile └── build.sh ├── python-from-host ├── .gitignore ├── module.py └── test.sh ├── ringojs ├── usr.manifest ├── Makefile ├── GET ├── module.py ├── README └── Capstanfile ├── rust-example ├── .gitignore ├── module.py ├── test.sh ├── Cargo.toml ├── README ├── Makefile └── src │ └── lib.rs ├── solr ├── usr.manifest ├── README ├── Capstanfile ├── Makefile ├── module.py └── GET ├── sqlite ├── README ├── usr.manifest ├── module.py ├── Capstanfile ├── Makefile └── GET ├── vertx ├── .gitignore ├── mpm │ └── package.yaml ├── module.py ├── test.sh ├── vertx-default-jul-logging.properties └── README.md ├── httpserver-html5-cli ├── .gitignore ├── mpm │ └── package.yaml ├── httpserver.conf └── Makefile ├── mruby ├── README ├── module.py ├── usr.manifest ├── Makefile └── GET ├── openjdk8-zulu-compact1 ├── .gitignore ├── mpm │ └── title.yaml ├── latest.sh └── Makefile ├── openjdk8-zulu-compact2 ├── .gitignore ├── mpm │ └── title.yaml ├── latest.sh └── Makefile ├── openjdk8-zulu-compact3 ├── .gitignore ├── mpm │ └── title.yaml ├── latest.sh └── Makefile ├── redis-memonly ├── .gitignore ├── mpm │ └── package.yaml ├── module.py ├── tests │ ├── test-config.json │ ├── test_1_redis_benchmark │ │ ├── test-config.json │ │ └── tester │ │ │ └── step_1_run.template.sh │ └── install.sh ├── Makefile ├── Capstanfile ├── test.sh ├── tester.py ├── patch └── GET ├── rust-httpserver ├── .gitignore ├── module.py ├── Cargo.toml ├── test.sh ├── Makefile └── README ├── rust-pie-example ├── .gitignore ├── module.py ├── src │ └── main.rs ├── Cargo.toml ├── README └── Makefile ├── rust-pie-httpserver ├── .gitignore ├── module.py ├── Cargo.toml ├── Makefile └── README ├── golang-example ├── mpm │ └── package.yaml ├── .gitignore ├── module.py ├── test.sh ├── Makefile └── hello.go ├── graalvm-example ├── usr.manifest ├── .gitignore ├── module.py ├── test.sh ├── README.md └── Makefile ├── graalvm-httpserver ├── .gitignore ├── usr.manifest ├── module.py ├── README.md ├── test.sh └── Makefile ├── iperf3 ├── mpm │ └── package.yaml ├── usr.manifest ├── README ├── module.py ├── test.sh └── tester.py ├── mysql ├── mpm │ └── package.yaml ├── Makefile ├── module.py ├── README ├── tester.py ├── sysbench.sh └── osv.patch ├── netperf ├── mpm │ └── package.yaml ├── module.py ├── Capstanfile ├── Makefile └── jenkins │ └── netperf-ec2-cleanup.sh ├── perl-hello ├── usr.manifest ├── hello.pl ├── module.py ├── Capstanfile ├── README.md └── build.sh ├── rhino ├── usr.manifest ├── GET ├── Makefile └── module.py ├── ruby-example ├── sample_codes │ ├── hello.rb │ ├── twitter │ │ ├── Gemfile │ │ └── twitter.rb │ ├── webrick.rb │ ├── webrickssl.rb │ ├── resolv.rb │ ├── httpservlet.rb │ ├── ssl_client.rb │ └── echoserver.rb ├── module.py └── Makefile ├── fpc-example ├── usr.manifest ├── README ├── module.py ├── Makefile └── fpc-hello.pas ├── golang-httpserver ├── mpm │ └── package.yaml ├── .gitignore ├── module.py ├── Makefile ├── test.sh ├── README └── httpserver.go ├── golang-pie-httpserver ├── .gitignore ├── module.py ├── test.sh └── httpserver.go ├── iperf-zcopy ├── usr.manifest ├── Capstanfile ├── module.py └── so.patch ├── lighttpd ├── mpm │ └── package.yaml ├── module.py ├── www-data │ └── index.html ├── test.sh └── lighttpd.conf ├── memcached ├── mpm │ └── package.yaml ├── tests │ ├── install.sh │ ├── test_2_memcapable │ │ └── tester │ │ │ └── step_1_run.template.sh │ ├── test-config.json │ └── test_1_memaslap │ │ ├── test-config.json │ │ └── tester │ │ └── step_1_run.template.sh ├── module.py ├── Capstanfile └── patch ├── tomcat ├── mpm │ └── package.yaml ├── usr.manifest ├── Makefile ├── test.sh └── Capstanfile ├── apache-kafka ├── mpm │ └── package.yaml ├── README └── Makefile ├── golang-pie-example ├── .gitignore ├── module.py ├── test.sh └── hello.go ├── graalvm-netty-plot ├── usr.manifest ├── module.py ├── README.md └── test.sh ├── jetty ├── mpm │ └── package.yaml ├── Makefile ├── module.py ├── test.sh ├── usr.manifest ├── README └── GET ├── lua-hello ├── usr.manifest ├── hello.lua ├── module.py └── test.sh ├── openjdk8-zulu-compact3-with-java-beans ├── .gitignore ├── latest.sh ├── mpm │ └── title.yaml └── Makefile ├── uperf ├── usr.manifest └── module.py ├── apache-derby ├── usr.manifest ├── mpm │ └── package.yaml ├── security.policy ├── tester.py ├── test.sh ├── Makefile └── module.py ├── groonga ├── README.md ├── .gitignore ├── module.py └── Makefile ├── lua-hello-from-host ├── mpm │ └── package.yaml ├── module.py ├── hello.lua ├── test.sh └── Makefile ├── native-example ├── README ├── module.py ├── hello.c ├── usr.manifest └── Makefile ├── ruby ├── module.py ├── Capstanfile ├── disable-fstat.patch ├── no-use-sleepy-thread-timer-ruby.patch └── README.md ├── oracle-nosql-db ├── usr.manifest ├── Makefile ├── module.py ├── GET └── README ├── ruby-sinatra-example ├── usr.manifest ├── example.rb ├── Capstanfile ├── module.py └── Makefile ├── ruby-test ├── module.py └── usr.manifest ├── elasticsearch ├── usr.manifest ├── mpm │ └── package.yaml ├── tests │ └── load_data.sh ├── test.sh └── patch_no_root_check.sh ├── leveldb ├── Capstanfile ├── module.py ├── Makefile └── GET ├── rapidjson └── module.py ├── java-newrelic ├── Makefile ├── usr.manifest ├── module.py └── GET ├── openjdk8-zulu-full ├── latest.sh └── module.py ├── unknown-term ├── usr.manifest └── Makefile ├── httpserver-html5-gui-and-cli ├── usr.manifest └── module.py ├── gccgo-example ├── module.py ├── hello.go ├── Makefile └── go-main.c ├── osv-memcached ├── usr.manifest └── module.py ├── rt_tests ├── module.py ├── Makefile ├── usr.manifest └── GET ├── scala-example ├── HelloWorld.scala ├── usr.manifest ├── Makefile └── module.py ├── ImageMagick ├── module.py ├── README ├── Makefile └── convert.c ├── python3x ├── usr.manifest ├── Makefile ├── test.sh └── module.py ├── golang-httpclient ├── module.py └── Makefile ├── nginx-from-host ├── module.py ├── test.sh └── Makefile ├── ImageMagick-source ├── module.py ├── Makefile └── README ├── golang-net-iterate ├── module.py ├── README.md └── Makefile ├── python2x ├── Makefile ├── module.py ├── usr.manifest ├── test.sh └── python.c ├── tomcat-benchmark ├── Makefile ├── usr.manifest ├── module.py ├── GET ├── META-INF │ └── context.xml └── Capstanfile ├── tomcat-gitblit ├── usr.manifest ├── Makefile ├── GET └── Capstanfile ├── tomcat-quercus ├── usr.manifest ├── Makefile ├── GET └── Capstanfile ├── dpdk-example ├── module.py ├── Capstanfile └── Makefile ├── fsmark ├── module.py ├── GET └── Makefile ├── lighttpd-from-host ├── module.py ├── www-data │ └── index.html └── lighttpd.conf ├── embulk-example ├── Makefile ├── Capstanfile ├── usr.manifest ├── module.py ├── README.md └── GET ├── java8 └── module.py ├── jruby-sinatra-example ├── example.rb ├── Makefile ├── usr.manifest ├── module.py └── GET ├── dropwizard-example ├── Makefile ├── module.py ├── GET ├── README └── usr.manifest ├── ffmpeg-from-host ├── module.py └── Makefile ├── ruby-rails-example ├── Capstanfile ├── module.py └── README.md ├── akka-example ├── usr.manifest ├── module.py ├── README.md └── Makefile ├── haproxy ├── module.py ├── GET ├── README ├── Makefile └── haproxy.cfg ├── webassembly ├── nginx │ └── html │ │ └── wasmer-logo.png ├── usr.manifest ├── module.py └── README.md ├── ruby-publify ├── module.py ├── Capstanfile ├── database.yml ├── rails └── README.md ├── deno ├── module.py ├── examples │ └── httpserver.ts └── README.md ├── flask-example ├── Makefile ├── module.py └── app.patch ├── apache-zookeeper ├── README ├── Capstanfile └── module.py ├── httpserver-plugin-example └── api-doc │ └── api-docs.json ├── perl-debugger ├── README.md ├── build.sh └── Capstanfile ├── cmdline.sh ├── openjdk12-jre-from-docker └── module.py ├── openjdk8-fedora ├── latest.sh └── module.py ├── java_cmdline.sh ├── .gitignore ├── openjdk8-zulu-compact-common └── latest.sh ├── rpm ├── nomakedev.patch └── Makefile └── scala └── usr.manifest /wrk/module.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fio/.gitignore: -------------------------------------------------------------------------------- 1 | fio/ 2 | -------------------------------------------------------------------------------- /rogue/bootfs.manifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /specjvm/bootfs.manifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cassandra/bootfs.manifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /erjang/.gitignore: -------------------------------------------------------------------------------- 1 | *.jar 2 | -------------------------------------------------------------------------------- /jython/.gitignore: -------------------------------------------------------------------------------- 1 | *.jar 2 | -------------------------------------------------------------------------------- /onos/assets/etc/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /twemproxy/bootfs.manifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Xapps/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | -------------------------------------------------------------------------------- /apache-spark/assets/conf/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /elixir/.gitignore: -------------------------------------------------------------------------------- 1 | elixir-* 2 | -------------------------------------------------------------------------------- /fonts/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | -------------------------------------------------------------------------------- /minecraft-server/bootfs.manifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /opendaylight/assets/etc/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apache-activemq/assets/conf/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /graalvm-js/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | -------------------------------------------------------------------------------- /java-example/.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | -------------------------------------------------------------------------------- /java-httpserver/.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | -------------------------------------------------------------------------------- /node-express-example/bootfs.manifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /node-socketio-example/bootfs.manifest: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /seaweedfs/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | -------------------------------------------------------------------------------- /apache-activemq/assets/webapps/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dacapo/.gitignore: -------------------------------------------------------------------------------- 1 | dacapo-9.12-back.jar 2 | -------------------------------------------------------------------------------- /java-from-host/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | -------------------------------------------------------------------------------- /lfe/.gitignore: -------------------------------------------------------------------------------- 1 | lfe-* 2 | usr.manifest 3 | -------------------------------------------------------------------------------- /mono-example/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | -------------------------------------------------------------------------------- /mono-example/Makefile: -------------------------------------------------------------------------------- 1 | Makefile.WithWrapper -------------------------------------------------------------------------------- /node/.gitignore: -------------------------------------------------------------------------------- 1 | libnode-*.so 2 | node-* 3 | -------------------------------------------------------------------------------- /openjdk-zulu-9-and-above/.gitignore: -------------------------------------------------------------------------------- 1 | mpm 2 | -------------------------------------------------------------------------------- /ratpack-example/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | -------------------------------------------------------------------------------- /stream/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Stream 2 | -------------------------------------------------------------------------------- /yaws/.gitignore: -------------------------------------------------------------------------------- 1 | yaws-* 2 | usr.manifest 3 | -------------------------------------------------------------------------------- /erlang/.gitignore: -------------------------------------------------------------------------------- 1 | otp_src_* 2 | erlang.so 3 | -------------------------------------------------------------------------------- /keydb/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | dump.rdb 3 | -------------------------------------------------------------------------------- /node-from-host/module.py: -------------------------------------------------------------------------------- 1 | provides = ['node'] 2 | -------------------------------------------------------------------------------- /spring-boot-example/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | -------------------------------------------------------------------------------- /busybox/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | usr.manifest 3 | 4 | -------------------------------------------------------------------------------- /cado/usr.manifest: -------------------------------------------------------------------------------- 1 | /**: ${MODULE_DIR}/ROOTFS/** 2 | -------------------------------------------------------------------------------- /ffmpeg/usr.manifest: -------------------------------------------------------------------------------- 1 | /**: ${MODULE_DIR}/ROOTFS/** 2 | -------------------------------------------------------------------------------- /iperf/usr.manifest: -------------------------------------------------------------------------------- 1 | /tools/iperf: ${MODULE_DIR}/iperf -------------------------------------------------------------------------------- /nginx/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | upstream.tar 3 | -------------------------------------------------------------------------------- /perl/usr.manifest: -------------------------------------------------------------------------------- 1 | /**: ${MODULE_DIR}/ROOTFS/** 2 | -------------------------------------------------------------------------------- /python-from-host/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | mpm 3 | -------------------------------------------------------------------------------- /ringojs/usr.manifest: -------------------------------------------------------------------------------- 1 | /**: ${MODULE_DIR}/ROOTFS/** 2 | -------------------------------------------------------------------------------- /rust-example/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | usr.manifest 3 | -------------------------------------------------------------------------------- /solr/usr.manifest: -------------------------------------------------------------------------------- 1 | /**: ${MODULE_DIR}/ROOTFS/** 2 | -------------------------------------------------------------------------------- /sqlite/README: -------------------------------------------------------------------------------- 1 | See SQLite http://www.sqlite.org/ 2 | -------------------------------------------------------------------------------- /vertx/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | vertx-examples/ 3 | -------------------------------------------------------------------------------- /yaws/default/vm.args: -------------------------------------------------------------------------------- 1 | -yaws debug 2 | -run yaws 3 | -------------------------------------------------------------------------------- /httpserver-html5-cli/.gitignore: -------------------------------------------------------------------------------- 1 | osv-html5-terminal 2 | -------------------------------------------------------------------------------- /java-from-host/module.py: -------------------------------------------------------------------------------- 1 | provides = ['java','java8'] 2 | -------------------------------------------------------------------------------- /mruby/README: -------------------------------------------------------------------------------- 1 | From mruby https://github.com/mruby/mruby 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact1/.gitignore: -------------------------------------------------------------------------------- 1 | mpm/package.yaml 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact2/.gitignore: -------------------------------------------------------------------------------- 1 | mpm/package.yaml 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact3/.gitignore: -------------------------------------------------------------------------------- 1 | mpm/package.yaml 2 | -------------------------------------------------------------------------------- /redis-memonly/.gitignore: -------------------------------------------------------------------------------- 1 | redis-server 2 | usr.manifest 3 | -------------------------------------------------------------------------------- /rust-httpserver/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | usr.manifest 3 | -------------------------------------------------------------------------------- /rust-pie-example/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | usr.manifest 3 | -------------------------------------------------------------------------------- /rust-pie-httpserver/.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | usr.manifest 3 | -------------------------------------------------------------------------------- /solr/README: -------------------------------------------------------------------------------- 1 | See more http://lucene.apache.org/solr/ 2 | -------------------------------------------------------------------------------- /golang-example/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | require: 2 | - osv.run-go 3 | -------------------------------------------------------------------------------- /graalvm-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /hello: ${MODULE_DIR}/hello 2 | -------------------------------------------------------------------------------- /graalvm-httpserver/.gitignore: -------------------------------------------------------------------------------- 1 | httpserverapp 2 | *.class 3 | -------------------------------------------------------------------------------- /iperf3/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Iperf 3 2 | version: 3.6 3 | -------------------------------------------------------------------------------- /jython/usr.manifest: -------------------------------------------------------------------------------- 1 | /jython.jar: ${MODULE_DIR}/jython.jar 2 | -------------------------------------------------------------------------------- /mysql/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: MySQL 2 | version: 5.6.45 3 | -------------------------------------------------------------------------------- /netperf/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Netperf 2 | version: 2.7.0 3 | -------------------------------------------------------------------------------- /nginx/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Nginx 2 | version: 1.2.12 3 | -------------------------------------------------------------------------------- /perl-hello/usr.manifest: -------------------------------------------------------------------------------- 1 | /hello.pl: ${MODULE_DIR}/hello.pl 2 | -------------------------------------------------------------------------------- /rhino/usr.manifest: -------------------------------------------------------------------------------- 1 | /js.jar: ${MODULE_DIR}/rhino1_7R2/js.jar 2 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/hello.rb: -------------------------------------------------------------------------------- 1 | puts "Hello, World!" 2 | -------------------------------------------------------------------------------- /fpc-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /fpc-hello: ${MODULE_DIR}/fpc-hello 2 | -------------------------------------------------------------------------------- /golang-example/.gitignore: -------------------------------------------------------------------------------- 1 | hello*.so 2 | hello.h 3 | usr.manifest 4 | -------------------------------------------------------------------------------- /golang-httpserver/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | require: 2 | - osv.run-go 3 | -------------------------------------------------------------------------------- /golang-pie-httpserver/.gitignore: -------------------------------------------------------------------------------- 1 | httpserver*.so 2 | usr.manifest 3 | -------------------------------------------------------------------------------- /graalvm-example/.gitignore: -------------------------------------------------------------------------------- 1 | *.h 2 | *.class 3 | *.so 4 | hello 5 | -------------------------------------------------------------------------------- /iperf-zcopy/usr.manifest: -------------------------------------------------------------------------------- 1 | /tools/iperf-zcopy: ${MODULE_DIR}/iperf 2 | -------------------------------------------------------------------------------- /lfe/default/vm.args: -------------------------------------------------------------------------------- 1 | -pa 2 | /usr/lib/lfe/ebin 3 | -user lfe_init 4 | -------------------------------------------------------------------------------- /lighttpd/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Lighttpd 2 | version: 1.4.54 3 | -------------------------------------------------------------------------------- /memcached/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Memcached 2 | version: 1.4.21 3 | -------------------------------------------------------------------------------- /redis-memonly/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Redis 2 | version: 3.2.8 3 | -------------------------------------------------------------------------------- /tomcat/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Apache Tomcat 2 | version: 9.0.16 3 | -------------------------------------------------------------------------------- /apache-kafka/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Apache Kafka 2 | version: 2.3.0 3 | -------------------------------------------------------------------------------- /erlang/default/resolv.conf: -------------------------------------------------------------------------------- 1 | nameserver 8.8.8.8 2 | nameserver 8.8.4.4 3 | -------------------------------------------------------------------------------- /golang-pie-example/.gitignore: -------------------------------------------------------------------------------- 1 | hello*.so 2 | hello.h 3 | usr.manifest 4 | -------------------------------------------------------------------------------- /graalvm-netty-plot/usr.manifest: -------------------------------------------------------------------------------- 1 | /netty-plot: ${MODULE_DIR}/netty-plot 2 | -------------------------------------------------------------------------------- /jetty/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Jetty 2 | version: 9.4.19.v20190610 3 | -------------------------------------------------------------------------------- /lua-hello/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/lib/hello.lua: ${MODULE_DIR}/hello.lua 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact3-with-java-beans/.gitignore: -------------------------------------------------------------------------------- 1 | mpm/package.yaml 2 | -------------------------------------------------------------------------------- /perl-hello/hello.pl: -------------------------------------------------------------------------------- 1 | print "hello world from perl on OSv!\n"; 2 | 1; 3 | -------------------------------------------------------------------------------- /uperf/usr.manifest: -------------------------------------------------------------------------------- 1 | /tools/uperf.so: ${MODULE_DIR}/uperf/src/uperf 2 | -------------------------------------------------------------------------------- /vertx/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Vertx.io example 2 | version: 3.8.1 3 | -------------------------------------------------------------------------------- /apache-derby/usr.manifest: -------------------------------------------------------------------------------- 1 | /db-derby/**: ${MODULE_DIR}/ROOTFS/db-derby/** 2 | -------------------------------------------------------------------------------- /groonga/README.md: -------------------------------------------------------------------------------- 1 | This module is an example building Groonga OSv image. 2 | -------------------------------------------------------------------------------- /lua-hello-from-host/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Lua Hello 2 | version: 5.3.3 3 | -------------------------------------------------------------------------------- /native-example/README: -------------------------------------------------------------------------------- 1 | This is a minimal sample of porting native code. 2 | -------------------------------------------------------------------------------- /ruby/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('openssl') 4 | -------------------------------------------------------------------------------- /stream/usr.manifest: -------------------------------------------------------------------------------- 1 | /stream.so: ${MODULE_DIR}/upstream/STREAM/stream.so 2 | -------------------------------------------------------------------------------- /tomcat/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/tomcat/**: ${MODULE_DIR}/ROOTFS/usr/tomcat/** 2 | -------------------------------------------------------------------------------- /apache-derby/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Apache Derby DB 2 | version: 10.14.1.0 3 | -------------------------------------------------------------------------------- /golang-httpserver/.gitignore: -------------------------------------------------------------------------------- 1 | httpserver*.so 2 | httpserver.h 3 | usr.manifest 4 | -------------------------------------------------------------------------------- /graalvm-httpserver/usr.manifest: -------------------------------------------------------------------------------- 1 | /httpserverapp: ${MODULE_DIR}/httpserverapp 2 | -------------------------------------------------------------------------------- /groonga/.gitignore: -------------------------------------------------------------------------------- 1 | usr.manifest 2 | *.tar.gz 3 | build 4 | groonga-* 5 | install -------------------------------------------------------------------------------- /java-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /java-example/Hello.class: ${MODULE_DIR}/Hello.class 2 | -------------------------------------------------------------------------------- /node-express-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /express/**: ${MODULE_DIR}/ROOTFS/express/** 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact1/mpm/title.yaml: -------------------------------------------------------------------------------- 1 | title: Zulu Open JDK 8 compact profile 1 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact2/mpm/title.yaml: -------------------------------------------------------------------------------- 1 | title: Zulu Open JDK 8 compact profile 2 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact3/mpm/title.yaml: -------------------------------------------------------------------------------- 1 | title: Zulu Open JDK 8 compact profile 3 2 | -------------------------------------------------------------------------------- /oracle-nosql-db/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/oracle/kv-3.0.5/**: ${MODULE_DIR}/kv-3.0.5/** 2 | -------------------------------------------------------------------------------- /ruby-sinatra-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /sinatra/**: ${MODULE_DIR}/ROOTFS/sinatra/** 2 | -------------------------------------------------------------------------------- /ruby-test/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('ruby') 4 | -------------------------------------------------------------------------------- /ruby-test/usr.manifest: -------------------------------------------------------------------------------- 1 | /tests/**: ${MODULE_DIR}/../ruby/upstream/ruby/test/** 2 | -------------------------------------------------------------------------------- /sqlite/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/lib/libsqlite3.so.0: ${MODULE_DIR}/libsqlite3.so.0 2 | -------------------------------------------------------------------------------- /elasticsearch/usr.manifest: -------------------------------------------------------------------------------- 1 | /elasticsearch/**: ${MODULE_DIR}/ROOTFS/elasticsearch/** 2 | -------------------------------------------------------------------------------- /erlang/default/erlang.config: -------------------------------------------------------------------------------- 1 | [{kernel, [{inetrc,"/etc/default/erlang/inetrc"}]}]. 2 | -------------------------------------------------------------------------------- /ffmpeg/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Ffmpeg 2 | version: 4.2 3 | require: 4 | - osv.libz 5 | -------------------------------------------------------------------------------- /graalvm-js/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/js") 4 | -------------------------------------------------------------------------------- /leveldb/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: db_bench.so 3 | build: make 4 | -------------------------------------------------------------------------------- /rapidjson/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | default = api.run('/unittest') 3 | -------------------------------------------------------------------------------- /fio/usr.manifest: -------------------------------------------------------------------------------- 1 | /fio: ${MODULE_DIR}/fio/fio 2 | /example.fio: ${MODULE_DIR}/example.fio 3 | -------------------------------------------------------------------------------- /java-newrelic/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | -------------------------------------------------------------------------------- /jython/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: 3 | ./GET 4 | 5 | clean: 6 | rm -f jython.jar -------------------------------------------------------------------------------- /leveldb/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("db_bench.so") 4 | -------------------------------------------------------------------------------- /memcached/tests/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | sudo yum install -y libmemcached 4 | -------------------------------------------------------------------------------- /native-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/hello") 4 | -------------------------------------------------------------------------------- /node-socketio-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /chat-example/**: ${MODULE_DIR}/ROOTFS/chat-example/** 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-full/latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . ../openjdk8-zulu-compact-common/latest.sh 3 | -------------------------------------------------------------------------------- /spring-boot-example/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Spring Boot Demo 2 | version: 2.1.8.RELEASE 3 | -------------------------------------------------------------------------------- /stream/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run('/stream.so') 4 | -------------------------------------------------------------------------------- /unknown-term/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/share/terminfo/u/unknown: ${MODULE_DIR}/terminfo/u/unknown 2 | -------------------------------------------------------------------------------- /apache-derby/security.policy: -------------------------------------------------------------------------------- 1 | grant { 2 | permission java.security.AllPermission; 3 | }; 4 | -------------------------------------------------------------------------------- /fpc-example/README: -------------------------------------------------------------------------------- 1 | Doesn't work - check out https://github.com/cloudius-systems/osv/issues/590 2 | -------------------------------------------------------------------------------- /fpc-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/fpc-hello") 4 | -------------------------------------------------------------------------------- /graalvm-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/hello") 4 | -------------------------------------------------------------------------------- /httpserver-html5-gui-and-cli/usr.manifest: -------------------------------------------------------------------------------- 1 | /etc/httpserver.conf: ${MODULE_DIR}/httpserver.conf 2 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact1/latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . ../openjdk8-zulu-compact-common/latest.sh 3 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact2/latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . ../openjdk8-zulu-compact-common/latest.sh 3 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact3/latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . ../openjdk8-zulu-compact-common/latest.sh 3 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/twitter/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem "twitter" 4 | -------------------------------------------------------------------------------- /elasticsearch/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: Elasticsearch 2 | version: 7.3.1 3 | require: 4 | - osv.libz 5 | -------------------------------------------------------------------------------- /gccgo-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/hello.so") 4 | -------------------------------------------------------------------------------- /graalvm-netty-plot/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/netty-plot") 4 | -------------------------------------------------------------------------------- /lua-hello-from-host/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | default = api.run("/lua /hello.lua") 3 | -------------------------------------------------------------------------------- /osv-memcached/usr.manifest: -------------------------------------------------------------------------------- 1 | /tools/osv-memcached.so: ${MODULE_DIR}/osv-memcached/osv-memcached.so 2 | -------------------------------------------------------------------------------- /perl/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/osv/bin/perl -V") 4 | -------------------------------------------------------------------------------- /rogue/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/usr/games/rogue") 4 | -------------------------------------------------------------------------------- /rt_tests/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run('/tools/cyclictest.so'); 4 | -------------------------------------------------------------------------------- /ruby/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | 3 | cmdline: ruby.so /irb 4 | 5 | build: make ROOTFS 6 | -------------------------------------------------------------------------------- /rust-pie-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/hello") 4 | -------------------------------------------------------------------------------- /scala-example/HelloWorld.scala: -------------------------------------------------------------------------------- 1 | object HelloWorld extends App { 2 | println("Hello, world!") 3 | } 4 | -------------------------------------------------------------------------------- /ImageMagick/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/usr/bin/convert --help") 4 | -------------------------------------------------------------------------------- /erlang/default/vm.args: -------------------------------------------------------------------------------- 1 | +K true 2 | -name foo@osv.local 3 | -config /etc/default/erlang/erlang.config 4 | -------------------------------------------------------------------------------- /golang-pie-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/hello.so") 4 | -------------------------------------------------------------------------------- /graalvm-httpserver/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/httpserverapp") 4 | -------------------------------------------------------------------------------- /mruby/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/tools/mruby.so -e EShell.run") 4 | -------------------------------------------------------------------------------- /mruby/usr.manifest: -------------------------------------------------------------------------------- 1 | /tools/mruby.so: ${MODULE_DIR}/mruby.so 2 | /tools/mirb.so: ${MODULE_DIR}/mirb.so 3 | -------------------------------------------------------------------------------- /netperf/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run('/tools/netserver.so -D -4 -f') 4 | -------------------------------------------------------------------------------- /python3x/usr.manifest: -------------------------------------------------------------------------------- 1 | /python3: ->/python.so 2 | /lib64: ->/lib 3 | 4 | /**: ${MODULE_DIR}/ROOTFS/** 5 | -------------------------------------------------------------------------------- /rust-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/libhello.so") 4 | -------------------------------------------------------------------------------- /stream/README: -------------------------------------------------------------------------------- 1 | STREAM memory benchmark 2 | 3 | Read more at http://www.cs.virginia.edu/stream/ref.html 4 | -------------------------------------------------------------------------------- /apache-derby/tester.py: -------------------------------------------------------------------------------- 1 | print("TODO: Add test to verify DB can be created and manipulated") 2 | success = True 3 | -------------------------------------------------------------------------------- /golang-httpclient/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/httpclient.so") 4 | -------------------------------------------------------------------------------- /keydb/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/keydb-server --protected-mode no") 4 | -------------------------------------------------------------------------------- /nginx-from-host/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run('/nginx -c /nginx.conf') 4 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact3-with-java-beans/latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . ../openjdk8-zulu-compact-common/latest.sh 3 | -------------------------------------------------------------------------------- /redis-memonly/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/redis-server redis.conf") 4 | -------------------------------------------------------------------------------- /rust-httpserver/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/libhttpserver.so") 4 | -------------------------------------------------------------------------------- /rust-pie-httpserver/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/httpserver") 4 | -------------------------------------------------------------------------------- /sqlite/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/usr/lib/libsqlite3.so.0 test.db") 4 | -------------------------------------------------------------------------------- /ImageMagick-source/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/usr/bin/convert --help") 4 | -------------------------------------------------------------------------------- /fio/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('libz') 4 | default = api.run('/fio /example.fio') 5 | -------------------------------------------------------------------------------- /golang-net-iterate/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/net_iterate.so") 4 | -------------------------------------------------------------------------------- /golang-pie-httpserver/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/httpserver.so") 4 | -------------------------------------------------------------------------------- /groonga/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/usr/bin/groonga -n test.db") 4 | -------------------------------------------------------------------------------- /httpserver-html5-cli/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: OSv HTML5 Terminal (frontend) 2 | require: 3 | - osv.httpserver-api 4 | -------------------------------------------------------------------------------- /iperf/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: /iperf -s 3 | build: make 4 | files: 5 | /iperf: iperf 6 | -------------------------------------------------------------------------------- /iperf3/usr.manifest: -------------------------------------------------------------------------------- 1 | /tools/iperf3: ${MODULE_DIR}/iperf3 2 | /usr/lib/libiperf.so.0: ${MODULE_DIR}/libiperf.so.0 3 | -------------------------------------------------------------------------------- /memcached/tests/test_2_memcapable/tester/step_1_run.template.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | set -e 3 | memcapable -h $$sut.ip 4 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact3-with-java-beans/mpm/title.yaml: -------------------------------------------------------------------------------- 1 | title: Zulu Open JDK 8 compact profile 3 with java.beans 2 | -------------------------------------------------------------------------------- /python2x/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: module clean 3 | 4 | module: 5 | ./GET 6 | 7 | clean: 8 | rm -fr ROOTFS build 9 | -------------------------------------------------------------------------------- /python3x/Makefile: -------------------------------------------------------------------------------- 1 | 2 | .PHONY: module clean 3 | 4 | module: 5 | ./GET 6 | 7 | clean: 8 | rm -fr ROOTFS build 9 | -------------------------------------------------------------------------------- /rhino/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | wget ftp://ftp.mozilla.org/pub/mozilla.org/js/rhino1_7R2.zip 3 | unzip -x rhino1_7R2.zip 4 | -------------------------------------------------------------------------------- /specjvm/README.md: -------------------------------------------------------------------------------- 1 | For more info read https://www.spec.org/jvm2008/. 2 | Also here http://osv.io/specjvm-benchmarks 3 | -------------------------------------------------------------------------------- /tomcat-benchmark/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: 3 | ./GET 4 | 5 | clean: 6 | rm -rf ROOTFS servlet.war 7 | -------------------------------------------------------------------------------- /tomcat-benchmark/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/tomcat/webapps/servlet.war: ${MODULE_DIR}/ROOTFS/usr/tomcat/webapps/servlet.war 2 | -------------------------------------------------------------------------------- /tomcat-gitblit/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/tomcat/webapps/gitblit.war: ${MODULE_DIR}/ROOTFS/usr/tomcat/webapps/gitblit.war 2 | -------------------------------------------------------------------------------- /tomcat-quercus/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/tomcat/webapps/quercus.war: ${MODULE_DIR}/ROOTFS/usr/tomcat/webapps/quercus.war 2 | -------------------------------------------------------------------------------- /dacapo/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | wget -c http://sourceforge.net/projects/dacapobench/files/9.12-bach/dacapo-9.12-bach.jar 4 | -------------------------------------------------------------------------------- /dpdk-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("--maxnic=0 /test -c f -n 1 --no-shconf") 4 | -------------------------------------------------------------------------------- /fsmark/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("fsmark.so -d /fsmark_test -s 10240 -n 1000") 4 | -------------------------------------------------------------------------------- /lighttpd-from-host/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run('/lighttpd -D -f /lighttpd.conf') 4 | -------------------------------------------------------------------------------- /lighttpd/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run('/lighttpd.so -D -f /lighttpd/lighttpd.conf') 4 | -------------------------------------------------------------------------------- /memcached/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/memcached -t $OSV_CPUS -u root") 4 | -------------------------------------------------------------------------------- /native-example/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main(){ 4 | printf("Hello from C code\n"); 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /rogue/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | clean: 8 | rm -rf upstream 9 | -------------------------------------------------------------------------------- /rust-pie-example/src/main.rs: -------------------------------------------------------------------------------- 1 | // This is the main function 2 | pub fn main() { 3 | println!("Hello World!"); 4 | } 5 | -------------------------------------------------------------------------------- /specjvm/mpm/package.yaml: -------------------------------------------------------------------------------- 1 | title: SPECjvm2008 2 | version: 1.0.1 3 | require: 4 | - osv.openjdk8-from-host 5 | - osv.libz 6 | -------------------------------------------------------------------------------- /twemproxy/usr.manifest: -------------------------------------------------------------------------------- 1 | /nutcracker: ${MODULE_DIR}/nutcracker 2 | /conf/nutcracker.yml: ${MODULE_DIR}/nutcracker.yml 3 | -------------------------------------------------------------------------------- /embulk-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: ROOTFS 3 | 4 | ROOTFS: 5 | ./GET 6 | 7 | clean: 8 | rm -rf ROOTFS 9 | -------------------------------------------------------------------------------- /java-newrelic/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/newrelic.jar: ${MODULE_DIR}/newrelic.jar 2 | /usr/newrelic.yml: ${MODULE_DIR}/newrelic.yml 3 | -------------------------------------------------------------------------------- /java8/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java-non-isolated') 4 | api.require('openjdk8-zulu-full') 5 | -------------------------------------------------------------------------------- /jruby-sinatra-example/example.rb: -------------------------------------------------------------------------------- 1 | require 'sinatra' 2 | set :environment, :production 3 | get '/' do 4 | 'Hello!' 5 | end 6 | -------------------------------------------------------------------------------- /ruby-sinatra-example/example.rb: -------------------------------------------------------------------------------- 1 | require 'sinatra' 2 | set :environment, :production 3 | get '/' do 4 | 'Hello!' 5 | end 6 | -------------------------------------------------------------------------------- /solr/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-openjdk 2 | 3 | cmdline: > 4 | /java.so 5 | -jar start.jar 6 | 7 | build: make 8 | -------------------------------------------------------------------------------- /solr/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: src 3 | 4 | .PHONY: src 5 | src: 6 | ./GET 7 | clean: 8 | rm -rf ROOTFS solr-* 9 | -------------------------------------------------------------------------------- /dpdk-example/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | 3 | cmdline: --maxnic=0 /test -c 1 -n 1 --no-shconf 4 | 5 | build: ./GET 6 | -------------------------------------------------------------------------------- /dropwizard-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | clean: 7 | rm -rf dropwizard 8 | -------------------------------------------------------------------------------- /ffmpeg-from-host/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require("libz") 4 | default = api.run("/ffmpeg -formats") 5 | -------------------------------------------------------------------------------- /fio/README.md: -------------------------------------------------------------------------------- 1 | # [fio](https://github.com/axboe/fio) 2 | 3 | Build with 4 | 5 | ```shell 6 | ./scripts/build image=fio 7 | ``` 8 | -------------------------------------------------------------------------------- /java-newrelic/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run_java(jvm_args=['-javaagent:/usr/newrelic.jar']) 4 | -------------------------------------------------------------------------------- /ringojs/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | clean: 8 | rm -rf ROOTFS *.tar.gz 9 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/webrick.rb: -------------------------------------------------------------------------------- 1 | require 'webrick' 2 | WEBrick::HTTPServer.new(:DocumentRoot => "./",:Port => 8000).start 3 | -------------------------------------------------------------------------------- /ruby-rails-example/Capstanfile: -------------------------------------------------------------------------------- 1 | base: ruby 2 | 3 | cmdline: --cwd=/osv_test/ /ruby.so ./bin/rails server 4 | 5 | build: make 6 | -------------------------------------------------------------------------------- /tomcat-gitblit/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: ROOTFS 3 | 4 | ROOTFS: 5 | ./GET 6 | 7 | clean: 8 | rm -rf ROOTFS *.war 9 | -------------------------------------------------------------------------------- /tomcat-quercus/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: ROOTFS 3 | 4 | ROOTFS: 5 | ./GET 6 | 7 | clean: 8 | rm -rf ROOTFS *.war 9 | -------------------------------------------------------------------------------- /wrk/usr.manifest: -------------------------------------------------------------------------------- 1 | /wrk: ${MODULE_DIR}/wrk/wrk.so 2 | /usr/lib/libluajit-5.1.so.2: ${MODULE_DIR}/wrk/deps/luajit/src/libluajit.so 3 | -------------------------------------------------------------------------------- /akka-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /akka-example.jar: ${OSV_BASE}/apps/akka-example/target/akka-example-1.0-SNAPSHOT-jar-with-dependencies.jar 2 | -------------------------------------------------------------------------------- /erlang/default/inetrc: -------------------------------------------------------------------------------- 1 | {file, hosts, "/etc/hosts"}. 2 | {resolv_conf, "/etc/default/erlang/resolv.conf"}. 3 | {lookup, [file, dns]}. 4 | -------------------------------------------------------------------------------- /golang-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('golang') 4 | default = api.run(cmdline="/go.so /hello.so") 5 | -------------------------------------------------------------------------------- /haproxy/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/haproxy.so -f /haproxy.cfg -p haproxy.pid -d -V") 4 | -------------------------------------------------------------------------------- /iperf-zcopy/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: /iperf-zcopy -s 3 | build: make 4 | files: 5 | /iperf-zcopy: iperf 6 | -------------------------------------------------------------------------------- /jruby-sinatra-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | clean: 8 | rm -f jruby*.jar 9 | -------------------------------------------------------------------------------- /lua-hello/hello.lua: -------------------------------------------------------------------------------- 1 | -- prints Hello World 2 | print("Hello World") 3 | -- exit from Lua interpreter (will shutdown OSv) 4 | os.exit() 5 | -------------------------------------------------------------------------------- /lua-hello/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | api.require("lua") 3 | default = api.run("/usr/lib/liblua.so /usr/lib/hello.lua") 4 | -------------------------------------------------------------------------------- /rhino/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | clean: 8 | rm -rf rhino1_7R2 rhino1_7R2.zip 9 | -------------------------------------------------------------------------------- /rhino/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run_java(args=['-jar', '/js.jar']) 6 | -------------------------------------------------------------------------------- /solr/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run_java(args=['-jar', 'start.jar']) 6 | -------------------------------------------------------------------------------- /sqlite/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: /sqlite.so test.db 3 | build: make 4 | files: 5 | /sqlite.so: sqlite.so 6 | -------------------------------------------------------------------------------- /tomcat-benchmark/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | _tomcat = api.require('tomcat') 4 | 5 | default = _tomcat.default 6 | -------------------------------------------------------------------------------- /tomcat/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | clean: 8 | rm -rf upstream ROOTFS *.pyc 9 | -------------------------------------------------------------------------------- /webassembly/nginx/html/wasmer-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cloudius-systems/osv-apps/HEAD/webassembly/nginx/html/wasmer-logo.png -------------------------------------------------------------------------------- /busybox/patches/busybox-main.c: -------------------------------------------------------------------------------- 1 | extern int lbb_main(char **); 2 | int main(int argc, char** argv) 3 | { 4 | return lbb_main(argv); 5 | } 6 | -------------------------------------------------------------------------------- /dpdk-example/Makefile: -------------------------------------------------------------------------------- 1 | .POHNY: module 2 | module: ROOTFS 3 | 4 | ROOTFS: 5 | ./GET 6 | 7 | clean: 8 | rm -rf dpdk ROOTFS usr.manifest 9 | -------------------------------------------------------------------------------- /embulk-example/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-openjdk 2 | build: make 3 | cmdline: --env=HOME=/ /java.so -jar /embulk.jar run config.yml 4 | -------------------------------------------------------------------------------- /erlang/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: /usr/lib64/erlang.so -env HOME / /etc/erlang/vm.args /etc/default/erlang/vm.args 3 | -------------------------------------------------------------------------------- /java-example/Makefile: -------------------------------------------------------------------------------- 1 | module: Hello.class 2 | 3 | %.class: %.java 4 | javac -target 7 -source 7 $^ 5 | 6 | clean: 7 | rm -rf *.class 8 | -------------------------------------------------------------------------------- /java-httpserver/README.md: -------------------------------------------------------------------------------- 1 | This is a simple app that uses Java JVM internal httpserver. 2 | The app requires JDK compact2 profile or above. 3 | -------------------------------------------------------------------------------- /mono-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("--env=MONO_DISABLE_SHARED_AREA=true /run_mono hello.exe") 4 | -------------------------------------------------------------------------------- /node-socketio-example/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-node 2 | 3 | cmdline: --cwd=/chat-example/ /libnode.so ./index.js 4 | build: make 5 | -------------------------------------------------------------------------------- /perl-hello/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('perl') 4 | 5 | default = api.run(cmdline="/osv/bin/perl hello.pl") 6 | -------------------------------------------------------------------------------- /akka-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java8') 4 | 5 | default = api.run("/java.so -jar akka-example.jar") 6 | -------------------------------------------------------------------------------- /elixir/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/local/lib/elixir/**: ${MODULE_DIR}/ROOTFS/usr/local/lib/elixir/** 2 | /etc/default/elixir/**: ${MODULE_DIR}/default/** 3 | -------------------------------------------------------------------------------- /golang-httpserver/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('golang') 4 | default = api.run(cmdline="/go.so /httpserver.so") 5 | -------------------------------------------------------------------------------- /oracle-nosql-db/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: src 3 | 4 | .PHONY: src 5 | src: 6 | ./GET 7 | clean: 8 | rm -rf kv-* kv-ce-*.tar.gz 9 | -------------------------------------------------------------------------------- /python2x/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('unknown-term') 4 | default = api.run(cmdline="--env=TERM=unknown /python") 5 | -------------------------------------------------------------------------------- /ringojs/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | wget -c http://ringojs.org/downloads/ringojs-0.10.tar.gz 3 | tar -xpf ringojs-0.10.tar.gz 4 | mv ringojs-0.10 ROOTFS 5 | -------------------------------------------------------------------------------- /graalvm-httpserver/README.md: -------------------------------------------------------------------------------- 1 | This demonstrates running plain built-in Java httpserver as 2 | a GraalVM (https://www.graalvm.org/) native app on OSv. 3 | -------------------------------------------------------------------------------- /java-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run(cmdline='java.so -cp /java-example Hello') 6 | -------------------------------------------------------------------------------- /java-httpserver/Makefile: -------------------------------------------------------------------------------- 1 | module: HttpServerApp.class 2 | 3 | %.class: %.java 4 | javac -target 8 -source 8 $^ 5 | 6 | clean: 7 | rm -rf *.class 8 | -------------------------------------------------------------------------------- /memcached/tests/test-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "tester" : { 3 | "ip" : "$$tester.ip" 4 | }, 5 | "sut" : { 6 | "ip" : "$$sut.ip" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /node-express-example/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-node 2 | 3 | cmdline: --cwd=/express/ /libnode.so ./examples/hello-world 4 | 5 | build: make 6 | -------------------------------------------------------------------------------- /rt_tests/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | .PHONY: clean 8 | clean: 9 | rm -rf upstream 10 | -------------------------------------------------------------------------------- /ruby-sinatra-example/Capstanfile: -------------------------------------------------------------------------------- 1 | base: ruby 2 | 3 | cmdline: --cwd=/sinatra/ --env=GEM_HOME=/sinatra/gems /ruby.so ./example.rb 4 | 5 | build: make 6 | -------------------------------------------------------------------------------- /mruby/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | .PHONY: clean 8 | clean: 9 | rm -rf upstream *.so 10 | -------------------------------------------------------------------------------- /redis-memonly/tests/test-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "tester" : { 3 | "ip" : "$$tester.ip" 4 | }, 5 | "sut" : { 6 | "ip" : "$$sut.ip" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /rt_tests/usr.manifest: -------------------------------------------------------------------------------- 1 | tools/cyclictest.so: ${MODULE_DIR}/upstream/rt_tests/cyclictest 2 | tools/hackbench.so: ${MODULE_DIR}/upstream/rt_tests/hackbench 3 | -------------------------------------------------------------------------------- /cassandra/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/cassandra/lib/**: ${MODULE_DIR}/ROOTFS/usr/cassandra/lib/** 2 | /usr/cassandra/conf/**: ${MODULE_DIR}/ROOTFS/usr/cassandra/conf/** 3 | -------------------------------------------------------------------------------- /java-example/Hello.java: -------------------------------------------------------------------------------- 1 | public class Hello { 2 | public static void main(String[] args) { 3 | System.out.println("Hello, World!"); 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /mysql/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: install 3 | install: 4 | ./GET 5 | 6 | .PHONY: clean 7 | clean: 8 | rm -rf build install *.tar.gz usr.manifest 9 | -------------------------------------------------------------------------------- /rogue/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/games/rogue: ${MODULE_DIR}/upstream/rogue5.4.4/rogue 2 | /usr/share/terminfo/u/unknown: ${MODULE_DIR}/upstream/fixed-terminfo/u/unknown 3 | -------------------------------------------------------------------------------- /ruby-publify/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('ruby') 4 | default = api.run(cmdline="--cwd=/publify/ /ruby.so ./bin/rails server") 5 | -------------------------------------------------------------------------------- /specjvm/GET: -------------------------------------------------------------------------------- 1 | wget ftp://ftp.spec.org/dist/osg/java/SPECjvm2008_1_01_setup.jar 2 | java -jar SPECjvm2008_1_01_setup.jar -DUSER_INSTALL_DIR=SPECjvm2008 -i silent 3 | -------------------------------------------------------------------------------- /specjvm/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: SPECjvm2008 3 | 4 | SPECjvm2008: 5 | ./GET 6 | 7 | clean: 8 | rm -rf SPECjvm2008/ SPECjvm2008_1_01_setup.jar 9 | -------------------------------------------------------------------------------- /sqlite/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | .PHONY: clean 8 | clean: 9 | rm -rf upstream *.so *.so.0 10 | -------------------------------------------------------------------------------- /embulk-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /embulk.jar: ${MODULE_DIR}/ROOTFS/embulk.jar 2 | /config.yml: ${MODULE_DIR}/ROOTFS/config.yml 3 | /try1/**: ${MODULE_DIR}/ROOTFS/try1/** 4 | -------------------------------------------------------------------------------- /golang-net-iterate/README.md: -------------------------------------------------------------------------------- 1 | This is a simple golang app that tests if OSv correctly 2 | supports enumating network interfaces and IPs using netlink 3 | interface. 4 | -------------------------------------------------------------------------------- /keydb/README: -------------------------------------------------------------------------------- 1 | KeyDB - A Multithreaded Fork of Redis https://keydb.dev. 2 | 3 | Claims to handle twice as many queries per second as Redis, with 60% lower latency. 4 | -------------------------------------------------------------------------------- /lua-hello-from-host/hello.lua: -------------------------------------------------------------------------------- 1 | -- prints Hello World 2 | print("Hello World from Lua on OSv !") 3 | -- exit from Lua interpreter (will shutdown OSv) 4 | os.exit() 5 | -------------------------------------------------------------------------------- /ruby-publify/Capstanfile: -------------------------------------------------------------------------------- 1 | base: ruby 2 | 3 | cmdline: --cwd=/publify/ --env=GEM_HOME=/publify/vendor/bundle/ruby /ruby.so ./bin/rails server 4 | 5 | build: make 6 | -------------------------------------------------------------------------------- /ruby-rails-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('ruby') 4 | default = api.run(cmdline="--cwd=/osv_test/ /ruby.so ./bin/rails server") 5 | -------------------------------------------------------------------------------- /groonga/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: install 3 | install: 4 | ./GET 5 | 6 | .PHONY: clean 7 | clean: 8 | rm -rf build install *.tar.gz usr.manifest groonga-* 9 | -------------------------------------------------------------------------------- /jython/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run_java(args=['-jar', 'jython.jar', '-m', 'SimpleHTTPServer', '8888']) 6 | -------------------------------------------------------------------------------- /erjang/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-openjdk 2 | 3 | cmdline: > 4 | /java.so -jar erjang.jar 5 | 6 | build: ./GET 7 | 8 | files: 9 | /erjang.jar: erjang.jar 10 | -------------------------------------------------------------------------------- /java-httpserver/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run_java(classpath=['/java-httpserver'], args=['HttpServerApp']) 6 | -------------------------------------------------------------------------------- /jetty/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | touch upstream/demo-base/resources/empty 7 | 8 | clean: 9 | -rm -rf upstream 10 | -------------------------------------------------------------------------------- /native-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /hello: ${MODULE_DIR}/hello 2 | /hello-static-pie: ${MODULE_DIR}/hello-static-pie 3 | /hello-static-non-pie: ${MODULE_DIR}/hello-static-non-pie 4 | -------------------------------------------------------------------------------- /netperf/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: /netserver.so -D -4 -f 3 | build: make 4 | files: 5 | /netserver.so: netserver.so 6 | /netperf.so: netperf.so 7 | -------------------------------------------------------------------------------- /node-socketio-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('node') 4 | 5 | default = api.run(cmdline="--cwd=/chat-example/ /libnode.so ./index.js") 6 | -------------------------------------------------------------------------------- /redis-memonly/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream 3 | 4 | upstream: 5 | ./GET 6 | 7 | .PHONY: clean 8 | clean: 9 | rm -rf upstream *.so redis-server 10 | -------------------------------------------------------------------------------- /twemproxy/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: /nutcracker 3 | build: make 4 | files: 5 | /nutcracker: nutcracker 6 | /conf/nutcracker.yml: nutcracker.yml 7 | -------------------------------------------------------------------------------- /embulk-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run(cmdline="--env=HOME=/ java.so -jar /embulk.jar run config.yml") 6 | 7 | -------------------------------------------------------------------------------- /node-express-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('node') 4 | 5 | default = api.run(cmdline="--cwd=/express/ /libnode.so ./examples/hello-world") 6 | -------------------------------------------------------------------------------- /ImageMagick-source/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: install 3 | install: 4 | ./GET 5 | 6 | .PHONY: clean 7 | clean: 8 | rm -rf build install *.tar.gz usr.manifest ImageMagick-* 9 | -------------------------------------------------------------------------------- /apache-spark/README: -------------------------------------------------------------------------------- 1 | Apache Spark OSv 2 | ================ 3 | 4 | Apache Spark™ is a fast and general engine for large-scale data processing. See more at https://spark.apache.org/ 5 | -------------------------------------------------------------------------------- /dropwizard-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run_java(args=['-jar', 'dropwizard-example.jar', 'server', 'example.yml']) 6 | -------------------------------------------------------------------------------- /java-httpserver/usr.manifest: -------------------------------------------------------------------------------- 1 | /java-httpserver/HttpServerApp.class: ${MODULE_DIR}/HttpServerApp.class 2 | /java-httpserver/HttpServerApp$1.class: ${MODULE_DIR}/HttpServerApp$1.class 3 | -------------------------------------------------------------------------------- /lfe/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('erlang') 4 | default = api.run(cmdline="/usr/lib64/erlang.so -env HOME / /etc/lfe/vm.args /etc/default/lfe/vm.args") 5 | -------------------------------------------------------------------------------- /minecraft-server/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run('java.so -Xms1024M -Xmx1024M -jar minecraft_server.1.7.10.jar nogui') 6 | -------------------------------------------------------------------------------- /ratpack-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java8') 4 | 5 | default = api.run('/java.so -cp /ratpack-app org.springframework.boot.loader.JarLauncher') 6 | -------------------------------------------------------------------------------- /redis-memonly/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: /redis-server redis.conf 3 | build: make 4 | files: 5 | /redis-server: redis-server 6 | /redis.conf: redis.conf 7 | -------------------------------------------------------------------------------- /yaws/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('erlang') 4 | default = api.run(cmdline="/usr/lib64/erlang.so -env HOME / /etc/yaws/vm.args /etc/default/yaws/vm.args") 5 | -------------------------------------------------------------------------------- /elixir/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('erlang') 4 | default = api.run(cmdline="/usr/lib64/erlang.so -env HOME / /etc/elixir/vm.args /etc/default/elixir/vm.args") 5 | -------------------------------------------------------------------------------- /erlang/usr.manifest: -------------------------------------------------------------------------------- 1 | /usr/lib64/erlang/**: ${MODULE_DIR}/ROOTFS/usr/lib64/erlang/** 2 | /usr/lib64/erlang.so: ${MODULE_DIR}/erlang.so 3 | /etc/default/erlang/**: ${MODULE_DIR}/default/** 4 | -------------------------------------------------------------------------------- /jython/GET: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | wget -c http://search.maven.org/remotecontent?filepath=org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar -O jython.jar 4 | 5 | exit 0 6 | -------------------------------------------------------------------------------- /ringojs/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run_java(classpath=['/lib/js.jar'], args=['-jar', '/run.jar', '/examples/httpserver.js']) 6 | -------------------------------------------------------------------------------- /ruby-sinatra-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('ruby') 4 | default = api.run(cmdline="--cwd=/sinatra/ --env=GEM_HOME=/sinatra/gems /ruby.so ./example.rb") 5 | -------------------------------------------------------------------------------- /deno/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run('/deno_linux_x64') 4 | httpserver = api.run('--env=DENO_DIR=/tmp/deno /deno_linux_x64 --allow-net /examples/httpserver.ts') 5 | -------------------------------------------------------------------------------- /flask-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream/flask-restful-apis/cashman 3 | 4 | upstream/flask-restful-apis/cashman: 5 | ./GET 6 | 7 | clean: 8 | rm -rf ./upstream usr.manifest 9 | -------------------------------------------------------------------------------- /netperf/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: usr.manifest 3 | 4 | usr.manifest: 5 | ./GET 6 | 7 | .PHONY: clean 8 | clean: 9 | rm -rf upstream netperf.so netserver.so usr.manifest 10 | -------------------------------------------------------------------------------- /perl-hello/Capstanfile: -------------------------------------------------------------------------------- 1 | base: perl-base 2 | 3 | cmdline: /osv/bin/perl hello.pl 4 | 5 | #no build - just uploading hello.pl 6 | build: true 7 | 8 | files: 9 | /hello.pl: hello.pl 10 | -------------------------------------------------------------------------------- /ruby-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('ruby') 4 | default = api.run(cmdline="--env=RUBYLIB=/usr/share/ruby:/usr/lib64/ruby /ruby.so /ruby-example/hello.rb") 5 | -------------------------------------------------------------------------------- /iperf3/README: -------------------------------------------------------------------------------- 1 | This is a newer version of iperf version 3. 2 | 3 | Please note that this app does not work with ROFS until 4 | the issue https://github.com/cloudius-systems/osv/issues/1035 is fixed. 5 | -------------------------------------------------------------------------------- /jruby-sinatra-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /jruby-complete.jar: ${MODULE_DIR}/jruby-complete.jar 2 | /jruby-extensions.jar: ${MODULE_DIR}/jruby-extensions.jar 3 | /example.rb: ${MODULE_DIR}/example.rb 4 | 5 | -------------------------------------------------------------------------------- /minecraft-server/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | wget https://s3.amazonaws.com/Minecraft.Download/versions/1.7.10/minecraft_server.1.7.10.jar 3 | java -Xms1024M -Xmx1024M -jar minecraft_server.1.7.10.jar nogui 4 | -------------------------------------------------------------------------------- /rust-pie-example/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hello" 3 | version = "0.1.0" 4 | authors = ["Waldemar Kozaczuk "] 5 | 6 | [dependencies] 7 | rustc_version_runtime = "0.1.*" 8 | -------------------------------------------------------------------------------- /twemproxy/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: nutcracker 3 | : > bootfs.manifest 4 | 5 | .PHONY: nutcracker clean 6 | nutcracker: 7 | ./GET 8 | 9 | clean: 10 | rm -f nutcracker 11 | 12 | -------------------------------------------------------------------------------- /jython/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-openjdk 2 | 3 | cmdline: > 4 | /java.so -jar jython.jar -m SimpleHTTPServer 8888 5 | 6 | build: make module 7 | 8 | files: 9 | /jython.jar: jython.jar 10 | -------------------------------------------------------------------------------- /memcached/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | cmdline: /memcached -t 1 -u root 3 | build: make 4 | files: 5 | /memcached: memcached 6 | /usr/lib/libevent-2.0.so.5: /lib64/libevent-2.0.so.5 7 | -------------------------------------------------------------------------------- /perl/.gitignore: -------------------------------------------------------------------------------- 1 | ROOTFS* 2 | .vimlist 3 | perl 4 | experiments 5 | osvbuild.sh 6 | /xx* 7 | /yy* 8 | /zz* 9 | /foo* 10 | /junk* 11 | ~* 12 | *.swp 13 | *.tar.bz2 14 | /toc.* 15 | /tmp 16 | *.out 17 | -------------------------------------------------------------------------------- /jruby-sinatra-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run_java(args=['-jar', 'jruby-complete.jar', '-I./', '-rjruby-extensions.jar', 'example.rb']) 6 | -------------------------------------------------------------------------------- /lighttpd/www-data/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | lighttpd test 5 | 6 | 7 | Hello, world! 8 | 9 | 10 | -------------------------------------------------------------------------------- /mysql/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run("/usr/bin/mysqld --datadir=/usr/data --user=root --innodb-use-native-aio=OFF --explicit_defaults_for_timestamp --innodb-strict-mode=OFF") 4 | -------------------------------------------------------------------------------- /oracle-nosql-db/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run_java(args=['-jar', '/usr/oracle/kv-3.0.5/lib/kvstore.jar', 'kvlite', '-host', '192.168.122.89']) 6 | -------------------------------------------------------------------------------- /specjvm/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app.py -e "$CMDLINE" --line 'Valid run' 7 | -------------------------------------------------------------------------------- /mysql/README: -------------------------------------------------------------------------------- 1 | ### prerequisites 2 | 3 | ```sudo yum install cmake``` 4 | 5 | ### build 6 | from osv root dir 7 | 8 | ```make -j 4 image=mysql56``` 9 | 10 | ### run 11 | 12 | ```sudo scripts/run.py -nv``` -------------------------------------------------------------------------------- /rust-pie-httpserver/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "httpserver" 3 | version = "0.1.0" 4 | authors = ["Waldemar Kozaczuk "] 5 | 6 | [dependencies] 7 | futures = "0.1.14" 8 | hyper = "0.11.2" 9 | -------------------------------------------------------------------------------- /unknown-term/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: 3 | infocmp xterm | sed 's/cud1=\(^J\|\\n\),/cud1=\\E[B,/; s/ind=\(^J\|\\n\),/ind=\\E[S,/; s/xterm/unknown/' | tic -o terminfo - 4 | clean: 5 | rm -rf terminfo 6 | -------------------------------------------------------------------------------- /cado/.gitignore: -------------------------------------------------------------------------------- 1 | ROOTFS* 2 | TODO.txt 3 | .vimlist 4 | perl 5 | experiments 6 | osvbuild.sh 7 | /xx* 8 | /yy* 9 | /zz* 10 | /foo* 11 | /junk* 12 | ~* 13 | *.swp 14 | *.tar.bz2 15 | *.tgz 16 | /toc.* 17 | /tmp 18 | -------------------------------------------------------------------------------- /golang-example/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app.py -e "$CMDLINE" --line 'Go version:' 7 | -------------------------------------------------------------------------------- /graalvm-example/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app.py -e "$CMDLINE" --line 'Memory usage:' 7 | -------------------------------------------------------------------------------- /lighttpd-from-host/www-data/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | lighttpd test 5 | 6 | 7 | Hello, world! 8 | 9 | 10 | -------------------------------------------------------------------------------- /stream/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app.py -e "$CMDLINE" --line 'Solution Validates' 7 | -------------------------------------------------------------------------------- /gccgo-example/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "runtime" 5 | "fmt" 6 | ) 7 | 8 | func main() { 9 | fmt.Println("Hello, 世界"); 10 | fmt.Println("Go version:", runtime.Version()); 11 | } 12 | -------------------------------------------------------------------------------- /golang-pie-example/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app.py -e "$CMDLINE" --line 'Go version:' 7 | -------------------------------------------------------------------------------- /memcached/tests/test_1_memaslap/test-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "tester" : { 3 | "memaslap" : { 4 | "threads" : "3", 5 | "concurrency" : "120", 6 | "duration" : "60s" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /python2x/usr.manifest: -------------------------------------------------------------------------------- 1 | /python: ->/python.so 2 | # to remove need for --env=PYTHONPATH=/lib/python2.7/, as _my_ build system has python .py files in /lib64/python2.7/ 3 | /lib64: ->/lib 4 | 5 | /**: ${MODULE_DIR}/ROOTFS/** 6 | -------------------------------------------------------------------------------- /seaweedfs/GET: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | VERSION=2.96 5 | 6 | rm -rf upstream 7 | 8 | mkdir upstream 9 | cd upstream 10 | git clone -b $VERSION --depth 1 https://github.com/chrislusf/seaweedfs.git 11 | -------------------------------------------------------------------------------- /tomcat-quercus/GET: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=4.0.39 4 | 5 | wget -c -O quercus.war http://caucho.com/download/quercus-${VERSION}.war 6 | mkdir -p ROOTFS/usr/tomcat/webapps/ 7 | cp quercus.war ROOTFS/usr/tomcat/webapps/ 8 | -------------------------------------------------------------------------------- /golang-pie-example/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "runtime" 5 | "fmt" 6 | ) 7 | 8 | func main() { 9 | fmt.Println("Hello, 世界"); 10 | fmt.Println("Go version:", runtime.Version()); 11 | } 12 | -------------------------------------------------------------------------------- /lua-hello/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app.py -e "$CMDLINE" --line 'Hello World from Lua on OSv' 7 | -------------------------------------------------------------------------------- /memcached/tests/test_1_memaslap/tester/step_1_run.template.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | memaslap -s $$sut.ip:11211 --threads=$$tester.memaslap.threads --concurrency=$$tester.memaslap.concurrency --time=$$tester.memaslap.duration 4 | -------------------------------------------------------------------------------- /perl/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-base 2 | 3 | cmdline: /osv/bin/perl -V 4 | 5 | #this will build the installation image under ./ROOTFS, which is automatically copied to the VM disk image by capstan: 6 | build: make install 7 | -------------------------------------------------------------------------------- /rust-example/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app.py -e "$CMDLINE" --line 'Hello World from Rust Version' 7 | -------------------------------------------------------------------------------- /seaweedfs/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run(cmdline="/weed master -port 9333") 4 | server = api.run(cmdline="/weed server -dir=/tmp -volume.max=5") 5 | volume = api.run(cmdline="/weed volume -dir=/tmp") 6 | -------------------------------------------------------------------------------- /tomcat-gitblit/GET: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VERSION=1.5.1 4 | 5 | wget -c -O gitblit.war http://dl.bintray.com/gitblit/releases/gitblit-${VERSION}.war 6 | mkdir -p ROOTFS/usr/tomcat/webapps/ 7 | cp gitblit.war ROOTFS/usr/tomcat/webapps/ 8 | -------------------------------------------------------------------------------- /lua-hello-from-host/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app.py -e "$CMDLINE" --line 'Hello World from Lua on OSv' 7 | -------------------------------------------------------------------------------- /redis-memonly/tests/test_1_redis_benchmark/test-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "tester" : { 3 | "redis" : { 4 | "requests" : "100000", 5 | "clients" : "1 50", 6 | "pipelines": "1 16" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /erlang/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require("openssl") 4 | api.require("libz") 5 | api.require("ncurses") 6 | default = api.run(cmdline="/usr/lib64/erlang.so -env HOME / /etc/erlang/vm.args /etc/default/erlang/vm.args") 7 | -------------------------------------------------------------------------------- /minecraft-server/README: -------------------------------------------------------------------------------- 1 | How to run Minecraft Server: 2 | $ ./GET 3 | Check EULA 4 | 5 | $ java -Xmx1024M -Xmx1024M -jar minecraft_server.1.7.10.jar nogui 6 | stop 7 | 8 | $ make image=minecraft-server 9 | $ sudo ./scripts/run.py -n -v 10 | -------------------------------------------------------------------------------- /python2x/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | 5 | $THIS_DIR/../../scripts/tests/test_app.py -e \ 6 | "--env=TERM=unknown /python -c \"print('Hello from Python 2 on OSv')\"" --line 'Hello from Python 2 on OSv' 7 | -------------------------------------------------------------------------------- /python3x/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | 5 | $THIS_DIR/../../scripts/tests/test_app.py -e \ 6 | "--env=TERM=unknown /python3 -c \"print('Hello from Python 3 on OSv')\"" --line 'Hello from Python 3 on OSv' 7 | -------------------------------------------------------------------------------- /rust-example/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hello" 3 | version = "0.1.0" 4 | authors = ["Waldemar Kozaczuk "] 5 | 6 | [dependencies] 7 | rustc_version_runtime = "0.1.*" 8 | 9 | [lib] 10 | crate-type = ["cdylib"] 11 | -------------------------------------------------------------------------------- /apache-zookeeper/README: -------------------------------------------------------------------------------- 1 | Apache Zookeeper OSv 2 | ==================== 3 | 4 | Apache Zookeeper is an effort to develop and maintain an open-source server which enables highly reliable distributed coordination. See more at https://zookeeper.apache.org/. 5 | -------------------------------------------------------------------------------- /haproxy/GET: -------------------------------------------------------------------------------- 1 | # Build an src/ directory from the upstream memcached. 2 | set -e 3 | VERSION=1.5.8 4 | 5 | wget -c http://www.haproxy.org/download/1.5/src/haproxy-${VERSION}.tar.gz 6 | tar zxvf haproxy-${VERSION}.tar.gz 7 | ln -sf haproxy-$VERSION haproxy 8 | -------------------------------------------------------------------------------- /oracle-nosql-db/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | VERSION=3.0.5 4 | SRC_DIR=kv-ce-$VERSION 5 | TARBALL=$SRC_DIR.tar.gz 6 | 7 | wget -c http://download.oracle.com/otn-pub/otn_software/nosql-database/$TARBALL 8 | rm -rf $SRC_DIR 9 | tar zxf $TARBALL 10 | -------------------------------------------------------------------------------- /erjang/GET: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ERJANG_JAR_URL=https://dl.dropboxusercontent.com/u/1360473/erjang-R16B01.jar 4 | ERJANG_JAR=erjang.jar 5 | 6 | if [ ! -e $ERJANG_JAR ];then 7 | wget $ERJANG_JAR_URL -O $ERJANG_JAR 8 | fi 9 | 10 | exit 0 11 | -------------------------------------------------------------------------------- /python-from-host/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | #For a proper interactive python terminal 4 | api.require('unknown-term') 5 | repl = api.run(cmdline="--env=TERM=unknown --env=PYTHONPATH=/ --env=PYTHONHOME=/ --env=PYTHONPLATLIBDIR=lib /python") 6 | -------------------------------------------------------------------------------- /vertx/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | java_cmd = '-Xms64m -Xmx64m -Dvertx.disableDnsResolver=true -jar HelloWorld.jar' 6 | default = api.run('/java.so ' + java_cmd) 7 | native = api.run('/usr/bin/java ' + java_cmd) 8 | -------------------------------------------------------------------------------- /webassembly/usr.manifest: -------------------------------------------------------------------------------- 1 | /wasmer: ${MODULE_DIR}/install/wasmer 2 | /lua.wasm: ${MODULE_DIR}/upstream/lua.wasm 3 | /sqlite.wasm: ${MODULE_DIR}/upstream/sqlite.wasm 4 | /nginx/**: ${MODULE_DIR}/nginx/** 5 | /nginx/nginx.wasm: ${MODULE_DIR}/upstream/nginx.wasm 6 | -------------------------------------------------------------------------------- /jetty/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | java_cmd = "-Djetty.base=/jetty/demo-base -jar /jetty/start.jar" 6 | 7 | default = api.run(cmdline="java.so " + java_cmd) 8 | native = api.run(cmdline="/usr/bin/java " + java_cmd) 9 | -------------------------------------------------------------------------------- /python3x/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | #For a proper interactive python terminal 4 | api.require('unknown-term') 5 | 6 | #For sqlite3 and help() 7 | api.require('sqlite') 8 | 9 | default = api.run(cmdline="--env=TERM=unknown /python3") 10 | -------------------------------------------------------------------------------- /rt_tests/GET: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | mkdir -p upstream 5 | cd upstream 6 | 7 | git clone git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git rt_tests 8 | 9 | cd rt_tests 10 | make NUMA=0 CFLAGS="-fPIC -shared -UNUMA" 11 | -------------------------------------------------------------------------------- /rust-httpserver/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "httpserver" 3 | version = "0.1.0" 4 | authors = ["Waldemar Kozaczuk "] 5 | 6 | [dependencies] 7 | futures = "0.1.14" 8 | hyper = "0.11.2" 9 | 10 | [lib] 11 | crate-type = ["cdylib"] 12 | -------------------------------------------------------------------------------- /spring-boot-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | java_cmd = "-Xms128m -Xmx128m -jar spring-boot-2-rest-service-basic.jar" 6 | default = api.run('/java.so ' + java_cmd) 7 | native = api.run('/usr/bin/java ' + java_cmd) 8 | -------------------------------------------------------------------------------- /httpserver-plugin-example/api-doc/api-docs.json: -------------------------------------------------------------------------------- 1 | { 2 | "apiVersion": "0.0.1", 3 | "swaggerVersion": "1.2", 4 | "apis": [ 5 | { 6 | "path": "/../listings/plugin.json", 7 | "description": "Test API" 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /golang-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: hello.so 3 | echo '/hello.so: $${MODULE_DIR}/hello.so' > usr.manifest 4 | 5 | hello.so: hello.go 6 | go build -buildmode=c-shared -o hello.so hello.go 7 | 8 | clean: 9 | rm -f hello*.so hello.h usr.manifest 10 | -------------------------------------------------------------------------------- /rust-example/README: -------------------------------------------------------------------------------- 1 | In order to build this simple "Hello World!" app you need to install 2 | Rust tool chain (compiler + cargo) by following instructions here: 3 | https://www.rust-lang.org/en-US/install.html. 4 | 5 | ./scripts/build image=rust-example 6 | ./scripts/run.py 7 | -------------------------------------------------------------------------------- /webassembly/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run('/wasmer --help') 4 | 5 | lua = api.run('/wasmer run /lua.wasm') 6 | sqlite = api.run('/wasmer run /sqlite.wasm') 7 | nginx = api.run('/wasmer run /nginx/nginx.wasm -- -p /nginx -c /nginx/nginx.conf') 8 | -------------------------------------------------------------------------------- /flask-example/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | #For a proper interactive python terminal 4 | api.require('unknown-term') 5 | 6 | default = api.run(cmdline="--env=TERM=unknown --env=PYTHONPATH=/ --env=PYTHONHOME=/ --env=PYTHONPLATLIBDIR=lib /python /cashman/index.py") 7 | -------------------------------------------------------------------------------- /fonts/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | from osv.modules import api 9 | 10 | -------------------------------------------------------------------------------- /perl-debugger/README.md: -------------------------------------------------------------------------------- 1 | # Perl on OSv 2 | 3 | This is a simple example that runs the perl debugger (perl5db.pl) in a loop. 4 | 5 | ## Prerequisites 6 | 7 | You must build the perl-base image before you build this example. 8 | 9 | See osv-apps/perl for more information. 10 | -------------------------------------------------------------------------------- /rust-pie-example/README: -------------------------------------------------------------------------------- 1 | In order to build this simple "Hello World!" app you need to install 2 | Rust tool chain (compiler + cargo) by following instructions here: 3 | https://www.rust-lang.org/en-US/install.html. 4 | 5 | ./scripts/build image=rust-pie-example 6 | ./scripts/run.py 7 | -------------------------------------------------------------------------------- /cado/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('perl') 4 | 5 | default = api.run( 6 | '--cwd=/cado ' 7 | '--env=PATH=/osv/bin:/cado/bin/cmn ' 8 | '--env=PERL_LIBPATH=/cado/lib/cmn ' 9 | '/osv/bin/perl ' 10 | '/cado/bin/cmn/cado -V' 11 | ) 12 | -------------------------------------------------------------------------------- /ffmpeg-from-host/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module clean 2 | 3 | SRC = $(shell readlink -f ../..) 4 | 5 | ffmpeg_path = $(shell realpath $$(which ffmpeg)) 6 | 7 | module: 8 | $(SRC)/scripts/manifest_from_host.sh $(ffmpeg_path) > usr.manifest 9 | 10 | clean: 11 | rm -rf usr.manifest 12 | -------------------------------------------------------------------------------- /golang-example/hello.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "runtime" 5 | "fmt" 6 | "C" 7 | ) 8 | 9 | func main() { 10 | } 11 | 12 | //export GoMain 13 | func GoMain() { 14 | fmt.Println("Hello, 世界"); 15 | fmt.Println("Go version:", runtime.Version()); 16 | } 17 | -------------------------------------------------------------------------------- /node/GET: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | cd "$(dirname "$0")" 6 | 7 | if test $# -ne 1 8 | then 9 | echo "usage: $0 " 1>&2 10 | exit 1 11 | fi 12 | 13 | wget "https://github.com/nodejs/node/archive/v${1}.tar.gz" -O - | tar zxf - 14 | 15 | ./dopatch "$1" 16 | -------------------------------------------------------------------------------- /perl-hello/README.md: -------------------------------------------------------------------------------- 1 | # Hello world from Perl on OSv! 2 | 3 | This is a simple example that will run a simple perl script on OSv 4 | 5 | ## Prerequisites 6 | 7 | You must build the perl-base image before you build this example. 8 | 9 | See osv-apps/perl for more information. 10 | -------------------------------------------------------------------------------- /tomcat-benchmark/GET: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | VER=osv-v1 4 | 5 | wget -c https://github.com/cloudius-systems/FrameworkBenchmarks/releases/download/${VER}/servlet.war 6 | mkdir -p ROOTFS/usr/tomcat/webapps/ 7 | zip servlet.war META-INF/context.xml 8 | cp -av servlet.war ROOTFS/usr/tomcat/webapps 9 | -------------------------------------------------------------------------------- /deno/examples/httpserver.ts: -------------------------------------------------------------------------------- 1 | import { serve } from "https://deno.land/std@v0.24.0/http/server.ts"; 2 | const body = new TextEncoder().encode("Hello World\n"); 3 | const s = serve(":8000"); 4 | console.log("http://localhost:8000/"); 5 | for await (const req of s) { 6 | req.respond({ body }); 7 | } 8 | -------------------------------------------------------------------------------- /embulk-example/README.md: -------------------------------------------------------------------------------- 1 | ### embulk-example 2 | Embulk is a plugin-based parallel bulk data loader that helps data transfer between various storages, databases, NoSQL and cloud services. 3 | 4 | This sample module transfers data from csv to stdout, you can choose other I/O plugins based on it. 5 | -------------------------------------------------------------------------------- /node-express-example/README: -------------------------------------------------------------------------------- 1 | A demo of how to use the "node" module providing node.js. 2 | 3 | The demo opens a Web server on port 3000, printing a silly "Hello World" message. 4 | 5 | To build this demo, you need "npm" to be installed on your host (e.g., 6 | on Fedora, just do "yum install npm"). 7 | -------------------------------------------------------------------------------- /akka-example/README.md: -------------------------------------------------------------------------------- 1 | This example is a demo of Akka actor framework in Scala (https://akka.io/) 2 | that implements simple TCP server serving list of directories and allowing 3 | to fetch individual files. Each TCP connection is served by an actor. 4 | The app requires JDK compact1 profile or above. 5 | -------------------------------------------------------------------------------- /solr/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | VERSION=4.8.1 5 | SRC_DIR=solr-$VERSION 6 | TARBALL=$SRC_DIR.tgz 7 | 8 | wget -c http://archive.apache.org/dist/lucene/solr/$VERSION/$TARBALL 9 | rm -rf $SRC_DIR ROOTFS 10 | tar zxf $TARBALL 11 | 12 | mkdir -p ROOTFS 13 | mv $SRC_DIR/example/* ROOTFS 14 | -------------------------------------------------------------------------------- /dropwizard-example/GET: -------------------------------------------------------------------------------- 1 | # Build a ... directory from the upstream dropwizard source code 2 | git clone https://github.com/dropwizard/dropwizard.git 3 | cd dropwizard 4 | mvn package -DskipTests=true 5 | cd dropwizard-example 6 | java -jar target/dropwizard-example-0.8.0-rc3-SNAPSHOT.jar db migrate example.yml 7 | -------------------------------------------------------------------------------- /fio/example.fio: -------------------------------------------------------------------------------- 1 | [global] 2 | kb_base=1000 # give proper semantics to units 3 | thread # use threads, not processes 4 | 5 | [job1] 6 | rw=read 7 | filename=fio # use the fio executable itself as the test file (avoid creating 8 | # the file at runtime to work on read-only fs) 9 | -------------------------------------------------------------------------------- /flask-example/app.patch: -------------------------------------------------------------------------------- 1 | diff --git a/cashman/index.py b/cashman/index.py 2 | index 7868b9f..6e9b1a8 100644 3 | --- a/cashman/index.py 4 | +++ b/cashman/index.py 5 | @@ -47,4 +47,4 @@ def add_expense(): 6 | 7 | 8 | if __name__ == "__main__": 9 | - app.run() 10 | + app.run(host="0.0.0.0") 11 | -------------------------------------------------------------------------------- /busybox/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017 XLAB d.o.o. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | .PHONY: module 9 | module: 10 | ./GET 11 | 12 | clean: 13 | rm -rf build 14 | -------------------------------------------------------------------------------- /golang-httpclient/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: httpclient 3 | echo '/httpclient: $${MODULE_DIR}/httpclient' > usr.manifest 4 | 5 | httpclient: httpclient.go 6 | go build -buildmode=pie -ldflags "-linkmode external" -o httpclient httpclient.go 7 | 8 | clean: 9 | rm -f httpclient usr.manifest 10 | -------------------------------------------------------------------------------- /Xapps/usr.manifest.skel: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2020 Waldemar Kozaczuk 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | [manifest] 9 | /usr/share/X11/locale/**: /usr/share/X11/locale/** 10 | -------------------------------------------------------------------------------- /specjvm/usr.manifest: -------------------------------------------------------------------------------- 1 | /specjvm.jar: ${MODULE_DIR}/SPECjvm2008/SPECjvm2008.jar 2 | /lib/**: ${MODULE_DIR}/SPECjvm2008/lib/** 3 | /resources/**: ${MODULE_DIR}/SPECjvm2008/resources/** 4 | /props/**: ${MODULE_DIR}/SPECjvm2008/props/** 5 | /redistributable_sources/**: ${MODULE_DIR}/SPECjvm2008/redistributable_sources/** 6 | -------------------------------------------------------------------------------- /twemproxy/nutcracker.yml: -------------------------------------------------------------------------------- 1 | gamma: 2 | listen: 127.0.0.1:22123 3 | hash: fnv1a_64 4 | distribution: ketama 5 | timeout: 400 6 | backlog: 1024 7 | preconnect: true 8 | auto_eject_hosts: true 9 | server_retry_timeout: 2000 10 | server_failure_limit: 3 11 | servers: 12 | - 127.0.0.1:11212:1 13 | -------------------------------------------------------------------------------- /cmdline.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | APP_DIR=$1 4 | CMD=${2:-'default'} 5 | 6 | THIS_DIR=$(readlink -f $(dirname $0)) 7 | export OSV_BASE=$THIS_DIR/.. 8 | export PYTHONPATH=$OSV_BASE/scripts 9 | 10 | python -c "import runpy; m = runpy.run_path('$APP_DIR/module.py'); print(m['$CMD'].get_launcher_args())" | tail -1 11 | -------------------------------------------------------------------------------- /golang-httpserver/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: httpserver.so 3 | echo '/httpserver.so: $${MODULE_DIR}/httpserver.so' > usr.manifest 4 | 5 | httpserver.so: httpserver.go 6 | go build -a -buildmode=c-shared -o httpserver.so httpserver.go 7 | 8 | clean: 9 | rm -f httpserver*.so httpserver.h usr.manifest 10 | -------------------------------------------------------------------------------- /haproxy/README: -------------------------------------------------------------------------------- 1 | Start OSv by: 2 | 3 | $ sudo ./scripts/run.py -nv 4 | 5 | On Host: 6 | 7 | $ ssh 192.168.122.89 8 | $ links http://192.168.122.89 9 | 10 | Note: 11 | By default, traffic to guest(192.168.122.89) port 80(http) and 22(ssh) are 12 | routed to host(192.168.122.1) port 80 and 22. See haproxy.cfg. 13 | -------------------------------------------------------------------------------- /iperf/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | from osv.modules import api 9 | 10 | default = api.run('/tools/iperf -s') 11 | -------------------------------------------------------------------------------- /openjdk12-jre-from-docker/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | provides = ['java','java8','java9','java10','java11','java12'] 9 | -------------------------------------------------------------------------------- /jetty/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 8080 \ 9 | --host_port 8080 \ 10 | --line 'Started @' \ 11 | --http_line 'The Jetty project' 12 | -------------------------------------------------------------------------------- /nginx/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 80 \ 9 | --host_port 8000 \ 10 | --line 'initgroups' \ 11 | --http_line 'Welcome to nginx' 12 | -------------------------------------------------------------------------------- /uperf/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | from osv.modules import api 9 | 10 | default = api.run('/tools/uperf.so -s') 11 | -------------------------------------------------------------------------------- /java-newrelic/GET: -------------------------------------------------------------------------------- 1 | # Build a ... directory from the upstream cassandra. 2 | set -e 3 | VERSION=3.10.0 4 | 5 | wget -c http://download.newrelic.com/newrelic/java-agent/newrelic-agent/$VERSION/newrelic-agent-$VERSION.jar -O newrelic.jar 6 | wget -c http://download.newrelic.com/newrelic/java-agent/newrelic-agent/$VERSION/newrelic.yml 7 | -------------------------------------------------------------------------------- /lighttpd/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 80 \ 9 | --host_port 8000 \ 10 | --line 'server started' \ 11 | --http_line 'lighttpd test' 12 | -------------------------------------------------------------------------------- /openjdk8-fedora/latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | package=$1 4 | 5 | arch=$2 6 | 7 | letter=${package:0:1} 8 | 9 | wget -t 1 -qO- http://mirrors.kernel.org/fedora/development/rawhide/Everything/x86_64/os/Packages/$letter/ | grep "$package-[0-9].*$arch" | sed -e "s/ usr.manifest 4 | 5 | net_iterate.so: net_iterate.go 6 | go build -buildmode=pie -ldflags "-linkmode external" -o net_iterate.so net_iterate.go 7 | 8 | clean: 9 | rm -f net_iterate*.so usr.manifest 10 | -------------------------------------------------------------------------------- /golang-pie-httpserver/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 8000 \ 9 | --host_port 8000 \ 10 | --line 'Go version:' \ 11 | --http_line 'Hello world' 12 | -------------------------------------------------------------------------------- /graalvm-js/Makefile: -------------------------------------------------------------------------------- 1 | include ../graalvm-example/common.gmk 2 | 3 | module: $(app-dir)/upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/js 4 | strip $(app-dir)/upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/js 5 | echo "/js: $(app-dir)/upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/js" > usr.manifest 6 | 7 | clean: 8 | rm -f usr.manifest 9 | -------------------------------------------------------------------------------- /lighttpd/lighttpd.conf: -------------------------------------------------------------------------------- 1 | server.document-root = "/lighttpd/www-data/" 2 | 3 | server.port = 80 4 | 5 | mimetype.assign = ( 6 | ".html" => "text/html", 7 | ".txt" => "text/plain", 8 | ".jpg" => "image/jpeg", 9 | ".png" => "image/png" 10 | ) 11 | 12 | index-file.names = ( "index.html" ) 13 | dir-listing.activate = "enable" 14 | -------------------------------------------------------------------------------- /node-socketio-example/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 3000 \ 9 | --host_port 3000 \ 10 | --line 'listening on' \ 11 | --http_line 'Socket.IO chat' 12 | -------------------------------------------------------------------------------- /cado/Capstanfile: -------------------------------------------------------------------------------- 1 | base: perl-base 2 | 3 | cmdline: > 4 | --env=PATH=/osv/bin:/cado/bin/cmn 5 | --env=PERL_LIBPATH=/cado/lib/cmn 6 | /osv/bin/perl 7 | /cado/bin/cmn/cado -V 8 | 9 | #this will build the installation image under ./ROOTFS, which is automatically copied to the VM disk image by capstan: 10 | build: make install 11 | -------------------------------------------------------------------------------- /graalvm-httpserver/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 8000 \ 9 | --host_port 8000 \ 10 | --line 'Listening on port' \ 11 | --http_line 'This is the response' 12 | -------------------------------------------------------------------------------- /lighttpd-from-host/lighttpd.conf: -------------------------------------------------------------------------------- 1 | server.document-root = "/www-data/" 2 | 3 | server.port = 80 4 | 5 | mimetype.assign = ( 6 | ".html" => "text/html", 7 | ".txt" => "text/plain", 8 | ".jpg" => "image/jpeg", 9 | ".png" => "image/png" 10 | ) 11 | 12 | index-file.names = ( "index.html" ) 13 | dir-listing.activate = "enable" 14 | -------------------------------------------------------------------------------- /node-express-example/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 3000 \ 9 | --host_port 3000 \ 10 | --line 'Express started on port' \ 11 | --http_line 'Hello World' 12 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/twitter/twitter.rb: -------------------------------------------------------------------------------- 1 | require 'twitter' 2 | 3 | #set your twitter api key 4 | client = Twitter::REST::Client.new do |config| 5 | config.consumer_key = '' 6 | config.consumer_secret = '' 7 | config.access_token = '' 8 | config.access_token_secret = '' 9 | end 10 | 11 | client.update( "post form CRuby on OSv" ) 12 | -------------------------------------------------------------------------------- /rust-pie-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: target/release/hello 3 | echo '/hello: $${MODULE_DIR}/target/release/hello' > usr.manifest 4 | 5 | target/release/hello: src/main.rs 6 | cargo --version && cargo build --release || echo "Please install Rust to build this app" 7 | 8 | clean: 9 | -cargo clean 10 | rm -f usr.manifest 11 | -------------------------------------------------------------------------------- /sqlite/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | YEAR=2019 4 | VERSION=3270200 5 | 6 | mkdir upstream 7 | cd upstream 8 | wget -c http://www.sqlite.org/$YEAR/sqlite-amalgamation-$VERSION.zip 9 | unzip -x sqlite-amalgamation-$VERSION.zip 10 | cd - 11 | 12 | cc -O2 -fPIC -Wall -shared -DHAVE_MREMAP=0 -o libsqlite3.so.0 upstream/sqlite-amalgamation-$VERSION/*.c 13 | -------------------------------------------------------------------------------- /tomcat/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../java_cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "/usr/bin/java $CMDLINE" \ 8 | --guest_port 8081 \ 9 | --host_port 8081 \ 10 | --line 'Server startup' \ 11 | --http_line 'Apache Tomcat' 12 | -------------------------------------------------------------------------------- /perl-hello/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #build.sh - build images for various hypervisor targets. 4 | # 5 | 6 | imagename=perlhello 7 | hypervisors="qemu vbox vmw gce" 8 | hypervisors="vmw" 9 | 10 | for target in $hypervisors 11 | do 12 | echo capstan build -p $target -v $imagename 13 | capstan build -p $target -v $imagename 14 | done 15 | -------------------------------------------------------------------------------- /elixir/default/vm.args: -------------------------------------------------------------------------------- 1 | -pa 2 | /usr/local/lib/elixir/lib/eex/ebin 3 | /usr/local/lib/elixir/lib/elixir/ebin 4 | /usr/local/lib/elixir/lib/ex_unit/ebin 5 | /usr/local/lib/elixir/lib/iex/ebin 6 | /usr/local/lib/elixir/lib/logger/ebin 7 | /usr/local/lib/elixir/lib/mix/ebin 8 | -elixir ansi_enabled true 9 | -user Elixir.IEx.CLI 10 | -extra 11 | --no-halt 12 | -------------------------------------------------------------------------------- /iperf3/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | from osv.modules import api 9 | 10 | #api.require('openssl') 11 | 12 | default = api.run('/tools/iperf3 -s') 13 | -------------------------------------------------------------------------------- /perl-debugger/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #build.sh - build images for various hypervisor targets. 4 | # 5 | 6 | imagename=perl-debugger 7 | hypervisors="qemu vbox vmw gce" 8 | hypervisors="vmw" 9 | 10 | for target in $hypervisors 11 | do 12 | echo capstan build -p $target -v $imagename 13 | capstan build -p $target -v $imagename 14 | done 15 | -------------------------------------------------------------------------------- /vertx/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR 'native') 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 8080 \ 9 | --host_port 8080 \ 10 | --line 'io.netty.maxThreadLocalCharBufferSize' \ 11 | --http_line 'Hello World' 12 | -------------------------------------------------------------------------------- /dropwizard-example/README: -------------------------------------------------------------------------------- 1 | How to test dropwizard example: 2 | 3 | Build 4 | $ make image=dropwizard-example 5 | 6 | Run the server 7 | $ sudo scripts/run.py -nv 8 | or 9 | $ cd apps/dropwizard-example/ 10 | $ capstan run -n bridge 11 | 12 | Test the server 13 | $ ab -n 100000 -c 10 -k http://192.168.122.194:8080/hello-world 14 | [use the proper OSv IP] 15 | -------------------------------------------------------------------------------- /graalvm-example/README.md: -------------------------------------------------------------------------------- 1 | This demonstrates running Java native apps on GraalVM (https://www.graalvm.org/) 2 | on OSv. 3 | GraalVM is a new polyglot virtual machine from Oracle that 4 | allows compiling and running applications written in JavaScript, Python 3, 5 | Ruby, R, JVM-based languages like Java, Scala, Kotlin, and LLVM-based 6 | languages such as C and C++. 7 | -------------------------------------------------------------------------------- /java-httpserver/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../java_cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "/usr/bin/java $CMDLINE" \ 8 | --guest_port 8000 \ 9 | --host_port 8000 \ 10 | --line 'Listening on port' \ 11 | --http_line 'This is the response' 12 | -------------------------------------------------------------------------------- /jruby-sinatra-example/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | VERSION=9.1.15.0 3 | wget https://s3.amazonaws.com/jruby.org/downloads/$VERSION/jruby-complete-$VERSION.jar 4 | mv jruby-complete-$VERSION.jar jruby-complete.jar 5 | mkdir gemjar 6 | java -jar jruby-complete.jar -S gem install -i ./gemjar sinatra --no-rdoc --no-ri 7 | jar cf jruby-extensions.jar -C ./gemjar . 8 | rm -rf gemjar 9 | -------------------------------------------------------------------------------- /ruby-publify/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | File.unlink '/publify/tmp/pids/server.pid' if File.exist? '/publify/tmp/pids/server.pid' 3 | begin 4 | load File.expand_path("../spring", __FILE__) 5 | rescue LoadError 6 | end 7 | APP_PATH = File.expand_path('../../config/application', __FILE__) 8 | require_relative '../config/boot' 9 | require 'rails/commands' 10 | -------------------------------------------------------------------------------- /rust-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: target/release/libhello.so 3 | echo '/libhello.so: $${MODULE_DIR}/target/release/libhello.so' > usr.manifest 4 | 5 | target/release/libhello.so: src/lib.rs 6 | cargo --version && cargo build --release || echo "Please install Rust to build this app" 7 | 8 | clean: 9 | -cargo clean 10 | rm -f usr.manifest 11 | -------------------------------------------------------------------------------- /twemproxy/strndup.c: -------------------------------------------------------------------------------- 1 | 2 | static inline char* _nc_strndup (const char *s, size_t n) 3 | { 4 | char *result; 5 | size_t len = strlen (s); 6 | 7 | if (n < len) 8 | len = n; 9 | 10 | result = (char *) malloc (len + 1); 11 | if (!result) 12 | return 0; 13 | 14 | result[len] = '\0'; 15 | return (char *) memcpy (result, s, len); 16 | } 17 | -------------------------------------------------------------------------------- /rust-httpserver/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 3000 \ 9 | --host_port 3000 \ 10 | --line 'Starting http server to listen' \ 11 | --http_line 'Hello, World from Rust on OSv' 12 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/webrickssl.rb: -------------------------------------------------------------------------------- 1 | require 'webrick' 2 | require 'webrick/https' 3 | 4 | server = WEBrick::HTTPServer.new( 5 | :BindAddress => '127.0.0.1', 6 | :Port => 8000, 7 | :DocumentRoot => './', 8 | :SSLEnable => true, 9 | :SSLCertName => [ [ 'CN', WEBrick::Utils::getservername ] ]) 10 | Signal.trap('INT') { server.shutdown } 11 | server.start 12 | -------------------------------------------------------------------------------- /apache-derby/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR 'native') 5 | 6 | $THIS_DIR/../../scripts/tests/test_app_with_test_script.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 1527 \ 9 | --host_port 1527 \ 10 | --start_line "Apache Derby Network Server" \ 11 | --script_path $THIS_DIR/tester.py 12 | -------------------------------------------------------------------------------- /graalvm-netty-plot/README.md: -------------------------------------------------------------------------------- 1 | This demonstrates running GraalVM [native-netty-plot app](https://github.com/graalvm/graalvm-demos/tree/master/native-netty-plot) using isolates on OSv. For more information about the isolates please read 2 | [this article](https://medium.com/graalvm/isolates-and-compressed-references-more-flexible-and-efficient-memory-management-for-graalvm-a044cc50b67e). 3 | -------------------------------------------------------------------------------- /ratpack-example/README.md: -------------------------------------------------------------------------------- 1 | # Ratpack on OSv 2 | 3 | Ratpack is a lean powerfull framework based on Netty 4 | intended to build http applications in Java. 5 | You can read more here https://ratpack.io/ 6 | 7 | ## Building 8 | Ratpack requires at least Java 8. 9 | 10 | Here is how you can build it 11 | ``` 12 | ./scripts/build image=openjdk8-zulu-full,ratpack-example 13 | ``` 14 | -------------------------------------------------------------------------------- /dropwizard-example/usr.manifest: -------------------------------------------------------------------------------- 1 | /dropwizard-example.jar: ${MODULE_DIR}/dropwizard/dropwizard-example/target/dropwizard-example-0.8.0-rc3-SNAPSHOT.jar 2 | /example.mv.db: ${MODULE_DIR}/dropwizard/dropwizard-example/target/example.mv.db 3 | /example.yml: ${MODULE_DIR}/dropwizard/dropwizard-example/example.yml 4 | /example.keystore: ${MODULE_DIR}/dropwizard/dropwizard-example/example.keystore 5 | -------------------------------------------------------------------------------- /fonts/usr.manifest.skel: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | [manifest] 9 | /etc/fonts/fonts.conf: /etc/fonts/fonts.conf 10 | /usr/share/fontconfig/conf.avail/**: /usr/share/fontconfig/conf.avail/** 11 | -------------------------------------------------------------------------------- /jetty/usr.manifest: -------------------------------------------------------------------------------- 1 | /jetty/start.jar: ${MODULE_DIR}/upstream/start.jar 2 | /jetty/start.ini: ${MODULE_DIR}/upstream/start.ini 3 | /jetty/demo-base/**: ${MODULE_DIR}/upstream/demo-base/** 4 | /jetty/lib/**: ${MODULE_DIR}/upstream/lib/** 5 | /jetty/etc/**: ${MODULE_DIR}/upstream/etc/** 6 | /jetty/modules/**: ${MODULE_DIR}/upstream/modules/** 7 | /etc/**: ${MODULE_DIR}/upstream/demo-base/etc/** 8 | -------------------------------------------------------------------------------- /rust-example/src/lib.rs: -------------------------------------------------------------------------------- 1 | extern crate rustc_version_runtime; 2 | use rustc_version_runtime::version; 3 | 4 | // This is the main function 5 | #[no_mangle] 6 | pub extern fn main() { 7 | // The statements here will be executed when the compiled binary is called 8 | 9 | // Print text to the console 10 | println!("Hello World from Rust {:?} on OSv!", version()); 11 | } 12 | -------------------------------------------------------------------------------- /cado/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #build.sh - build images for various hypervisor targets. 4 | # 5 | 6 | verbose=-v 7 | verbose= 8 | 9 | imagename=cado-base 10 | hypervisors="qemu vbox vmw gce" 11 | hypervisors="vmw" 12 | 13 | for target in $hypervisors 14 | do 15 | echo capstan build -p $target $verbose $imagename 16 | capstan build -p $target $verbose $imagename 17 | done 18 | -------------------------------------------------------------------------------- /fonts/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module clean 2 | 3 | module: usr.manifest 4 | 5 | usr.manifest: 6 | cp usr.manifest.skel usr.manifest 7 | find /usr/share/fonts -type d -name liberation\* | awk '{ printf "%s/**: %s/**\n", $$0, $$0 }' >> usr.manifest 8 | grep -il liberation /etc/fonts/conf.d/* | awk '{ printf "%s: %s\n", $$0, $$0 }' >> usr.manifest 9 | 10 | clean: 11 | rm -f usr.manifest 12 | -------------------------------------------------------------------------------- /iperf3/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_app_with_test_script.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 5201 \ 9 | --host_port 5201 \ 10 | --start_line 'Server listening' \ 11 | --end_line 'Server listening' \ 12 | --script_path $THIS_DIR/tester.py 13 | -------------------------------------------------------------------------------- /nginx-from-host/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --http_path "/nginx.conf" \ 9 | --guest_port 8000 \ 10 | --host_port 8000 \ 11 | --line 'epoll_wait' \ 12 | --http_line 'worker_connections' \ 13 | --count 10000 14 | -------------------------------------------------------------------------------- /perl/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | #build.sh - build images for various hypervisor targets. 4 | # 5 | 6 | imagename=perl-base 7 | verbose=-v 8 | verbose= 9 | 10 | hypervisors="qemu vbox vmw gce" 11 | hypervisors="vmw" 12 | 13 | for target in $hypervisors 14 | do 15 | echo capstan build -p $target $verbose $imagename 16 | capstan build -p $target $verbose $imagename 17 | done 18 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/resolv.rb: -------------------------------------------------------------------------------- 1 | require 'resolv' 2 | 3 | puts Resolv.getaddress("www.ruby-lang.org") 4 | puts Resolv.getname("210.251.121.214").to_s 5 | puts Resolv::DNS.new.getresources("www.ruby-lang.org", Resolv::DNS::Resource::IN::A).collect {|r| r.address} 6 | puts Resolv::DNS.new.getresources("ruby-lang.org", Resolv::DNS::Resource::IN::MX).collect {|r| [r.exchange.to_s, r.preference]} 7 | -------------------------------------------------------------------------------- /fsmark/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Build a directory from the upstream fsmark. 4 | set -e 5 | VERSION=3.3 6 | 7 | mkdir upstream 8 | cd upstream 9 | wget -c http://sourceforge.net/projects/fsmark/files/fsmark/$VERSION/fs_mark-$VERSION.tar.gz 10 | tar zxvf fs_mark-$VERSION.tar.gz 11 | mv ./fs_mark-$VERSION ./fs_mark 12 | 13 | cd fs_mark 14 | patch -p1 < ../../fsmark-osv.patch 15 | cd .. 16 | cd .. 17 | -------------------------------------------------------------------------------- /Xapps/README.md: -------------------------------------------------------------------------------- 1 | Couple of XWindow apps like xclock, etc to demonstrate it works on OSv. 2 | 3 | Please make sure that XWindows manager on your host is configured to accept TCP 4 | based communication (should see '-listen tcp' when listing Xorg process). 5 | 6 | It also needs to be able to accept cookie based authentication (aka xauth). 7 | Please see https://zweije.home.xs4all.nl/xauth-6.html for details. 8 | -------------------------------------------------------------------------------- /spring-boot-example/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR 'native') 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 8080 \ 9 | --host_port 8080 \ 10 | --line 'Started SpringBoot2RestServiceApplication' \ 11 | --http_line 'passportNumber' \ 12 | --http_path '/students' 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Directories storing files downloaded or collected from the OS 2 | upstream 3 | src 4 | ROOTFS 5 | install 6 | 7 | # Downloaded compressed archives 8 | *.tar 9 | *.tar.gz 10 | 11 | # Terminal settings from the host 12 | unknown-term/terminfo 13 | 14 | # Unpacked mysql releases 15 | mysql/mysql-* 16 | 17 | # Stripped shared objects 18 | *-stripped.so 19 | 20 | # Build directories 21 | build 22 | -------------------------------------------------------------------------------- /rust-pie-httpserver/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: target/release/httpserver 3 | echo '/httpserver: $${MODULE_DIR}/target/release/httpserver' > usr.manifest 4 | 5 | target/release/httpserver: src/main.rs 6 | (command -v cargo && cargo build --release) || echo "Please install Rust to build this app" 7 | 8 | clean: 9 | (command -v cargo && cargo clean) || echo > /dev/null 10 | rm -f usr.manifest 11 | -------------------------------------------------------------------------------- /spring-boot-example/README.md: -------------------------------------------------------------------------------- 1 | # Spring Boot on OSv 2 | 3 | Spring Boot is a Java framework designed to build container-less 4 | web applications based on Spring. 5 | You can read more here http://spring.io/projects/spring-boot. 6 | 7 | ## Building 8 | Spring Boot requires at least Java 8. 9 | 10 | Here is how you can build it 11 | ``` 12 | ./scripts/build image=openjdk8-zulu-full,spring-boot-example 13 | ``` 14 | -------------------------------------------------------------------------------- /mono-example/hello.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2018 Waldek Kozaczuk 3 | // 4 | // This work is open source software, licensed under the terms of the 5 | // BSD license as described in the LICENSE file in the top-level directory. 6 | // 7 | using System; 8 | 9 | public class HelloWorld 10 | { 11 | static public void Main () 12 | { 13 | Console.WriteLine ("Hello Mono World on OSv!"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact-common/latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | #DOWNLOAD_URL_SUFFIX=`wget -c -qO- https://cdn.azul.com/zulu/bin/ | grep -o ' usr.manifest 4 | : > bootfs.manifest 5 | 6 | fsmark.so: upstream 7 | make -C upstream/fs_mark CFLAGS="-fPIC -shared" CPPFLAGS="-fPIC -shared" 8 | cp -vf upstream/fs_mark/fs_mark fsmark.so 9 | 10 | upstream: 11 | ./GET 12 | 13 | .PHONY: clean 14 | clean: 15 | rm -rf upstream *.so usr.manifest bootfs.manifest *~ 16 | -------------------------------------------------------------------------------- /httpserver-html5-cli/httpserver.conf: -------------------------------------------------------------------------------- 1 | { 2 | "port": "8000", 3 | "redirects": [ 4 | { 5 | "path": "/", 6 | "target_path": "/cli/" 7 | } 8 | ], 9 | "file_mappings": [ 10 | { 11 | "path": "/cli", 12 | "file": "/usr/mgmt/cli/index.html", 13 | "exact_match": true 14 | }, 15 | { 16 | "path": "/cli", 17 | "directory": "/usr/mgmt/cli" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /httpserver-html5-gui-and-cli/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('httpserver-html5-gui') 4 | api.require('httpserver-html5-cli') 5 | 6 | _exe = '/libhttpserver-api.so --config-file=/etc/httpserver.conf' 7 | daemon = api.run_on_init(_exe + ' &!') 8 | 9 | fg = api.run(_exe) 10 | 11 | fg_ssl = api.run(_exe + ' --ssl') 12 | fg_cors = api.run(_exe + ' --access-allow=true') 13 | 14 | default = daemon 15 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact1/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 Waldemar Kozaczuk 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | PROFILE_NUMBER=1 9 | COMPACT_PROFILE_IMAGE_DIR=j2re-compact$(PROFILE_NUMBER)-image 10 | include ../openjdk8-zulu-compact-common/common.gmk 11 | 12 | .PHONY: module clean 13 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact2/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 Waldemar Kozaczuk 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | PROFILE_NUMBER=2 9 | COMPACT_PROFILE_IMAGE_DIR=j2re-compact$(PROFILE_NUMBER)-image 10 | include ../openjdk8-zulu-compact-common/common.gmk 11 | 12 | .PHONY: module clean 13 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact3/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 Waldemar Kozaczuk 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | PROFILE_NUMBER=3 9 | COMPACT_PROFILE_IMAGE_DIR=j2re-compact$(PROFILE_NUMBER)-image 10 | include ../openjdk8-zulu-compact-common/common.gmk 11 | 12 | .PHONY: module clean 13 | -------------------------------------------------------------------------------- /apache-spark/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run("--cwd=/spark /java.so -Xms512m -Xmx512m -cp /spark/conf:/spark/lib/spark-assembly-1.4.0-hadoop2.6.0.jar:/spark/lib/datanucleus-core-3.2.10.jar:/spark/lib/datanucleus-rdbms-3.2.9.jar:/spark/lib/datanucleus-api-jdo-3.2.6.jar -Dscala.usejavacp=true org.apache.spark.deploy.SparkSubmit --class org.apache.spark.repl.Main spark-shell") 6 | -------------------------------------------------------------------------------- /graalvm-netty-plot/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 8080 \ 9 | --host_port 8080 \ 10 | --line 'Open your web browser' \ 11 | --http_path '/?function=abs((x-31.4)sin(x-pi/2))&xmin=0&xmax=31.4' \ 12 | --concurrency 10 \ 13 | --count 100 14 | -------------------------------------------------------------------------------- /jetty/README: -------------------------------------------------------------------------------- 1 | This is an example of running Jetty on OSv. 2 | 3 | The default command line (set in module.py) runs Jetty's demo app, 4 | which listens on port 8080 and provides all sorts of silly examples and 5 | tests. Clearly, a real user of jetty will want to run a different 6 | servlet, and might not need all the stuff we put (see usr.manifest) 7 | in the image - which currently includes the demo, a gazillion libraries, 8 | etc. 9 | -------------------------------------------------------------------------------- /rust-httpserver/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: target/release/libhttpserver.so 3 | echo '/libhttpserver.so: $${MODULE_DIR}/target/release/libhttpserver.so' > usr.manifest 4 | 5 | target/release/libhttpserver.so: src/lib.rs 6 | (command -v cargo && cargo build --release) || echo "Please install Rust to build this app" 7 | 8 | clean: 9 | (command -v cargo && cargo clean) || echo > /dev/null 10 | rm -f usr.manifest 11 | -------------------------------------------------------------------------------- /keydb/proctitle.patch: -------------------------------------------------------------------------------- 1 | --- a/upstream/KeyDB/src/server.cpp 2 | +++ b/upstream/KeyDB/src/server.cpp 3 | @@ -5232,7 +5232,7 @@ int main(int argc, char **argv) { 4 | initNetworking(cserver.cthreads > 1 /* fReusePort */); 5 | 6 | if (background || cserver.pidfile) createPidFile(); 7 | - redisSetProcTitle(argv[0]); 8 | + //redisSetProcTitle(argv[0]); 9 | redisAsciiArt(); 10 | checkTcpBacklogSettings(); 11 | 12 | -------------------------------------------------------------------------------- /ruby-sinatra-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: ROOTFS 3 | 4 | SINATRA_VER=1.4.5 5 | 6 | ROOTFS/sinatra/gems: 7 | mkdir -p ROOTFS/sinatra/gems 8 | GEM_HOME=ROOTFS/sinatra/gems gem install sinatra -v ${SINATRA_VER} 9 | 10 | ROOTFS/sinatra/example.rb: 11 | mkdir -p ROOTFS/sinatra 12 | cp example.rb ROOTFS/sinatra/ 13 | 14 | ROOTFS: ROOTFS/sinatra/gems ROOTFS/sinatra/example.rb 15 | 16 | clean: 17 | rm -rf ROOTFS 18 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/httpservlet.rb: -------------------------------------------------------------------------------- 1 | require 'webrick' 2 | 3 | include WEBrick 4 | 5 | s = HTTPServer.new( :Port => 8000 ) 6 | 7 | class HelloServlet < HTTPServlet::AbstractServlet 8 | def do_GET(req, res) 9 | res['Content-Type'] = "text/html" 10 | res.body = "Hello, World!." 11 | end 12 | end 13 | 14 | s.mount("/hello", HelloServlet) 15 | 16 | trap(:INT){ s.shutdown } 17 | 18 | s.start 19 | -------------------------------------------------------------------------------- /leveldb/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: src 3 | echo '/db_bench.so: $${MODULE_DIR}/db_bench.so' > usr.manifest 4 | echo '/usr/lib/libleveldb.so.1.15: $${MODULE_DIR}/libleveldb.so.1.15' >> usr.manifest 5 | echo '/usr/lib/libsnappy.so.1: /lib64/libsnappy.so.1' >> usr.manifest 6 | : > bootfs.manifest 7 | 8 | .PHONY: src 9 | src: 10 | ./GET 11 | 12 | clean: 13 | rm -rf leveldb-* *.tar.gz *.so leveldb *.manifest libleveldb.* ROOTFS 14 | -------------------------------------------------------------------------------- /vertx/vertx-default-jul-logging.properties: -------------------------------------------------------------------------------- 1 | handlers=java.util.logging.ConsoleHandler 2 | java.util.logging.SimpleFormatter.format=%5$s %6$s\n 3 | java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter 4 | java.util.logging.ConsoleHandler.level=FINEST 5 | 6 | .level=FINEST 7 | io.vertx.ext.web.level=FINEST 8 | io.vertx.level=FINEST 9 | com.hazelcast.level=INFO 10 | io.netty.util.internal.PlatformDependent.level=FINEST 11 | -------------------------------------------------------------------------------- /golang-httpserver/README: -------------------------------------------------------------------------------- 1 | This is an example of simple HTTP server implemented in Golang. 2 | The app listens on port 8000. 3 | 4 | In order to build the app you need to install Golang. 5 | 6 | ./scripts/build image=golang-httpserver 7 | ./scripts/run.py --forward tcp:8000::8000 8 | 9 | You can open it in a browser by typing this URL: 10 | http://localhost:8000/ 11 | 12 | or hit from command line using curl: 13 | curl http://localhost:8000/ 14 | -------------------------------------------------------------------------------- /node-express-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module test clean 2 | 3 | module: ROOTFS 4 | 5 | ROOTFS: ROOTFS/express 6 | 7 | ROOTFS/express: 8 | mkdir -p ROOTFS 9 | git clone git://github.com/strongloop/express.git --depth 1 ROOTFS/express 10 | cd ROOTFS/express && npm install 11 | rm -rf ROOTFS/express/test ROOTFS/express/.git ROOTFS/express/examples/downloads/files/ 12 | test: 13 | python test.py 14 | clean: 15 | rm -rf ROOTFS npm-debug.log 16 | -------------------------------------------------------------------------------- /tomcat-benchmark/META-INF/context.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | WEB-INF/web.xml 4 | 8 | 9 | -------------------------------------------------------------------------------- /redis-memonly/tests/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | tests_dir=${0%/*} 5 | 6 | cd $tests_dir/.. 7 | 8 | VERSION=3.0.0-beta3 9 | rm -Rf upstream 10 | mkdir upstream 11 | cd upstream 12 | wget https://github.com/antirez/redis/archive/$VERSION.tar.gz 13 | tar zxvf $VERSION.tar.gz 14 | mv redis-$VERSION redis 15 | cd redis 16 | make 17 | cd ../.. 18 | 19 | echo export REDIS_BENCHMARK="`pwd`/upstream/redis/src/redis-benchmark" > tests/setenv.sh 20 | -------------------------------------------------------------------------------- /nginx-from-host/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module clean 2 | 3 | SRC = $(shell readlink -f ../..) 4 | 5 | nginx_exe_path = $(shell realpath $$(which nginx)) 6 | 7 | module: 8 | $(SRC)/scripts/manifest_from_host.sh $(nginx_exe_path) > usr.manifest 9 | echo '/nginx.conf: $${MODULE_DIR}/nginx.conf' >> usr.manifest 10 | echo '/var/log/nginx: ->/tmp' >> usr.manifest 11 | echo '/var/lib/nginx: ->/tmp' >> usr.manifest 12 | 13 | clean: 14 | rm -rf usr.manifest 15 | -------------------------------------------------------------------------------- /redis-memonly/tests/test_1_redis_benchmark/tester/step_1_run.template.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | for clients in $$tester.redis.clients ; do 5 | for pipelines in $$tester.redis.pipelines ; do 6 | echo "start test" 7 | echo "clients : $clients" 8 | echo "pipeline : $pipelines" 9 | $REDIS_BENCHMARK -h $$sut.ip -n $$tester.redis.requests -c $clients -P $pipelines 10 | echo "end test" 11 | done 12 | done 13 | -------------------------------------------------------------------------------- /Xapps/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('fonts') 4 | 5 | common_prefix = '--env=XAUTHORITY=/.Xauthority --env=DISPLAY=192.168.122.1:0.0' 6 | 7 | default = api.run(cmdline='%s /xclock -digital -fg red -bg black -update 1 -face "Arial Black-25:bold"' % common_prefix) 8 | logo = api.run(cmdline='%s /xlogo' % common_prefix) 9 | calc = api.run(cmdline='%s /xcalc' % common_prefix) 10 | eyes = api.run(cmdline='%s /xeyes' % common_prefix) 11 | -------------------------------------------------------------------------------- /ruby-publify/README.md: -------------------------------------------------------------------------------- 1 | # Publify on OSv 2 | 3 | This is a porting of Publify. 4 | 5 | ## Prerequires 6 | 7 | **Fedora** 8 | 9 | ``` 10 | yum install sqlite-devel 11 | gem install bundler 12 | ``` 13 | 14 | **Arch Linux** 15 | ``` 16 | pacman -S sqlite 17 | gem install bundler 18 | ``` 19 | 20 | ## Browser test prerequires 21 | 22 | **Fedora** 23 | 24 | ``` 25 | yum install firefox python-pip xorg-x11-server-Xvfb 26 | pip install selenium 27 | ``` 28 | 29 | -------------------------------------------------------------------------------- /scala-example/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | .PHONY: module 9 | 10 | module: HelloWorld.jar 11 | 12 | HelloWorld.jar: HelloWorld.scala 13 | rm -rf classes 14 | mkdir -p classes 15 | scalac -d classes HelloWorld.scala 16 | jar cf HelloWorld.jar -C classes . 17 | -------------------------------------------------------------------------------- /graalvm-example/Makefile: -------------------------------------------------------------------------------- 1 | module: hello 2 | 3 | include common.gmk 4 | 5 | Hello.class: Hello.java $(app-dir)/upstream/graalvm-ce-java11-$(GRAAL_VERSION) 6 | upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/javac -d . Hello.java 7 | 8 | hello: Hello.class $(app-dir)/upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/native-image 9 | upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/native-image --no-server Hello 10 | 11 | clean: 12 | rm -rf *.class hello upstream 13 | -------------------------------------------------------------------------------- /iperf3/tester.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import subprocess 3 | import os 4 | 5 | success = False 6 | 7 | print("Started iperf3 test ...") 8 | try: 9 | server_host = os.getenv('OSV_HOSTNAME') 10 | output = subprocess.check_output(["iperf3", "-t", "5", "-c", server_host], stderr=subprocess.STDOUT).decode() 11 | print(output) 12 | 13 | if 'iperf Done' in output: 14 | success = True 15 | except subprocess.CalledProcessError as err: 16 | print(err.output) 17 | -------------------------------------------------------------------------------- /nginx/module.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from osv.modules import api 4 | 5 | 6 | ROFS = ['rofs', 'virtiofs'] # List of read-only filesystems 7 | 8 | 9 | api.require('libz') 10 | 11 | # NOTE: This is necessary to avoid the warning about the default error log 12 | # location. See https://trac.nginx.org/nginx/ticket/147. 13 | error_log = ' -e stderr' if os.environ.get('fs_type') in ROFS else '' 14 | default = api.run('/nginx.so -c /nginx/conf/nginx.conf' + error_log) 15 | -------------------------------------------------------------------------------- /native-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: hello hello-static-pie hello-static-non-pie 3 | 4 | CFLAGS = -std=gnu99 -fpie -rdynamic 5 | 6 | hello: hello.c 7 | $(CC) -pie -o $@ $(CFLAGS) $(LDFLAGS) hello.c 8 | 9 | hello-static-pie: hello.c 10 | $(CC) -fPIE -static-pie -o hello-static-pie hello.c 11 | 12 | hello-static-non-pie: hello.c 13 | $(CC) -static -o hello-static-non-pie hello.c 14 | 15 | clean: 16 | rm -f hello hello-static-pie hello-static-non-pie 17 | -------------------------------------------------------------------------------- /apache-spark/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-openjdk 2 | 3 | cmdline: > 4 | --cwd=/spark 5 | /java.so 6 | -Xms512m 7 | -Xmx512m 8 | -cp /spark/conf:/spark/lib/spark-assembly-1.3.0-hadoop2.4.0.jar:/spark/lib/datanucleus-core-3.2.10.jar:/spark/lib/datanucleus-rdbms-3.2.9.jar:/spark/lib/datanucleus-api-jdo-3.2.6.jar 9 | -Dscala.usejavacp=true 10 | org.apache.spark.deploy.SparkSubmit 11 | --class org.apache.spark.repl.Main 12 | spark-shell 13 | build: make 14 | -------------------------------------------------------------------------------- /embulk-example/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | VERSION=0.6.17 3 | 4 | rm -rf ROOTFS 5 | mkdir -p ROOTFS 6 | cd ROOTFS 7 | wget --no-iri https://bintray.com/artifact/download/embulk/maven/embulk-${VERSION}.jar -O embulk.jar 8 | java -jar embulk.jar example ./try1 9 | mv try1/example.yml try1/example.yml.orig 10 | sed -e 's/^.*path_prefix.*$/ path_prefix: ".\/try1\/csv\/sample_"/g' try1/example.yml.orig > try1/example.yml 11 | java -jar embulk.jar guess ./try1/example.yml -o config.yml 12 | cd - 13 | -------------------------------------------------------------------------------- /jetty/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -ex 3 | mkdir upstream 4 | cd upstream 5 | JETTY_VERSION="9.4.19.v20190610" 6 | wget -c "https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${JETTY_VERSION}/jetty-distribution-${JETTY_VERSION}.tar.gz" -O jetty.tgz 7 | tar zxvf jetty.tgz --strip-components=1 8 | sed '/$/d' demo-base/webapps/test.d/override-web.xml >/tmp/$$.xml 9 | mv /tmp/$$.xml demo-base/webapps/test.d/override-web.xml 10 | rm -f lib/setuid/libsetuid-osx.so 11 | -------------------------------------------------------------------------------- /node-from-host/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module clean 2 | 3 | SRC = $(shell readlink -f ../..) 4 | 5 | node_exe_path = $(shell realpath $$(which node)) 6 | 7 | module: 8 | echo "/libnode.so: ->/node" > usr.manifest 9 | $(SRC)/scripts/manifest_from_host.sh $(node_exe_path) >> usr.manifest 10 | mkdir -p mpm 11 | echo "title: Node JS" > mpm/package.yaml 12 | printf "version: " >> mpm/package.yaml 13 | node --version >> mpm/package.yaml 14 | 15 | clean: 16 | rm -rf usr.manifest mpm 17 | -------------------------------------------------------------------------------- /openjdk8-zulu-compact3-with-java-beans/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2016 Waldemar Kozaczuk 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | PROFILE_NUMBER=3 9 | COMPACT_PROFILE_IMAGE_DIR=j2re-compact$(PROFILE_NUMBER)-with-java-beans-image 10 | ADD_JAVA_BEANS=add_java_beans 11 | include ../openjdk8-zulu-compact-common/common.gmk 12 | 13 | .PHONY: module clean 14 | -------------------------------------------------------------------------------- /tomcat/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-openjdk 2 | 3 | cmdline: > 4 | /java.so 5 | -cp /usr/tomcat/bin/bootstrap.jar:/usr/tomcat/bin/tomcat-juli.jar 6 | -Djava.util.logging.config.file=/usr/tomcat/conf/logging.properties 7 | -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 8 | -Dcatalina.base=/usr/tomcat 9 | -Dcatalina.home=/usr/tomcat 10 | -Djava.io.tmpdir=/usr/tomcat/temp 11 | org.apache.catalina.startup.Bootstrap 12 | start 13 | 14 | build: make 15 | -------------------------------------------------------------------------------- /akka-example/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2018 Waldek Kozaczuk 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | .PHONY: module 9 | 10 | module: target/akka-example-1.0-SNAPSHOT-jar-with-dependencies.jar 11 | 12 | target/akka-example-1.0-SNAPSHOT-jar-with-dependencies.jar: src/main/scala/demo/FileService.scala 13 | mvn package 14 | 15 | clean: 16 | mvn clean 17 | -------------------------------------------------------------------------------- /ffmpeg/fftools_makefile.patch: -------------------------------------------------------------------------------- 1 | --- upstream/ffmpeg-4.0.2/fftools/Makefile 2018-07-18 09:51:59.000000000 -0400 2 | +++ ffmpeg/ffmpeg-4.0.2/fftools/Makefile 2018-10-12 16:16:44.415952735 -0400 3 | @@ -4,6 +4,8 @@ 4 | 5 | AVPROGS := $(AVPROGS-yes:%=%$(PROGSSUF)$(EXESUF)) 6 | PROGS += $(AVPROGS) 7 | +CFLAGS += $(CFLAGS-$(1)) -fpie -rdynamic 8 | +LDFLAGS += $(LDFLAGS) -pie 9 | 10 | AVBASENAMES = ffmpeg ffplay ffprobe 11 | ALLAVPROGS = $(AVBASENAMES:%=%$(PROGSSUF)$(EXESUF)) 12 | -------------------------------------------------------------------------------- /haproxy/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: haproxy.so 3 | echo '/haproxy.so: $${MODULE_DIR}/haproxy.so' > usr.manifest 4 | echo '/haproxy.cfg: $${MODULE_DIR}/haproxy.cfg' >> usr.manifest 5 | : > bootfs.manifest 6 | 7 | haproxy.so: haproxy 8 | make -C haproxy TARGET=linux26 CFLAGS="-fPIC -shared" LDFLAGS="-fPIC -shared" -j4 9 | cp -vf haproxy/haproxy haproxy.so 10 | 11 | haproxy: 12 | ./GET 13 | 14 | clean: 15 | rm -rf haproxy-* *.tar.gz haproxy.so haproxy *.manifest *.pyc 16 | 17 | -------------------------------------------------------------------------------- /tomcat-benchmark/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-tomcat 2 | 3 | cmdline: > 4 | /java.so 5 | -cp /usr/tomcat/bin/bootstrap.jar:/usr/tomcat/bin/tomcat-juli.jar 6 | -Djava.util.logging.config.file=/usr/tomcat/conf/logging.properties 7 | -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 8 | -Dcatalina.base=/usr/tomcat 9 | -Dcatalina.home=/usr/tomcat 10 | -Djava.io.tmpdir=/usr/tomcat/temp 11 | org.apache.catalina.startup.Bootstrap 12 | start 13 | 14 | build: make 15 | -------------------------------------------------------------------------------- /tomcat-gitblit/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-tomcat 2 | 3 | cmdline: > 4 | /java.so 5 | -cp /usr/tomcat/bin/bootstrap.jar:/usr/tomcat/bin/tomcat-juli.jar 6 | -Djava.util.logging.config.file=/usr/tomcat/conf/logging.properties 7 | -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 8 | -Dcatalina.base=/usr/tomcat 9 | -Dcatalina.home=/usr/tomcat 10 | -Djava.io.tmpdir=/usr/tomcat/temp 11 | org.apache.catalina.startup.Bootstrap 12 | start 13 | 14 | build: make 15 | -------------------------------------------------------------------------------- /tomcat-quercus/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-tomcat 2 | 3 | cmdline: > 4 | /java.so 5 | -cp /usr/tomcat/bin/bootstrap.jar:/usr/tomcat/bin/tomcat-juli.jar 6 | -Djava.util.logging.config.file=/usr/tomcat/conf/logging.properties 7 | -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager 8 | -Dcatalina.base=/usr/tomcat 9 | -Dcatalina.home=/usr/tomcat 10 | -Djava.io.tmpdir=/usr/tomcat/temp 11 | org.apache.catalina.startup.Bootstrap 12 | start 13 | 14 | build: make 15 | -------------------------------------------------------------------------------- /ffmpeg/fftools_ffmpeg.patch: -------------------------------------------------------------------------------- 1 | --- upstream/ffmpeg-4.0.2/fftools/ffmpeg.c 2018-07-18 13:52:07.000000000 +0000 2 | +++ ffmpeg.c 2018-11-19 18:56:28.434006165 +0000 3 | @@ -4849,6 +4849,6 @@ 4 | if ((decode_error_stat[0] + decode_error_stat[1]) * max_error_rate < decode_error_stat[1]) 5 | exit_program(69); 6 | 7 | - exit_program(received_nb_signals ? 255 : main_return_code); 8 | + ffmpeg_cleanup(received_nb_signals ? 255 : main_return_code); 9 | return main_return_code; 10 | } 11 | -------------------------------------------------------------------------------- /lua-hello-from-host/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module clean 2 | 3 | SRC = $(shell readlink -f ../..) 4 | 5 | lua_path := $(shell which lua) 6 | ifndef lua_path 7 | lua_path := $(shell which lua5.3) 8 | endif 9 | lua_full_path = $(shell realpath $(lua_path)) 10 | 11 | module: 12 | echo "/lua: ${lua_full_path}" > usr.manifest 13 | echo '/hello.lua: $${MODULE_DIR}/hello.lua' >> usr.manifest 14 | $(SRC)/scripts/manifest_from_host.sh $(lua_full_path) >> usr.manifest 15 | 16 | clean: 17 | rm -rf usr.manifest 18 | -------------------------------------------------------------------------------- /mysql/tester.py: -------------------------------------------------------------------------------- 1 | import os 2 | import sys 3 | import subprocess 4 | 5 | success = False 6 | 7 | print("Started mysql test ...") 8 | try: 9 | sysbench_script_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'sysbench.sh') 10 | output = subprocess.check_output([sysbench_script_path], stderr=subprocess.STDOUT).decode() 11 | print(output) 12 | 13 | if 'execution time' in output: 14 | success = True 15 | except subprocess.CalledProcessError as err: 16 | print(err.output) 17 | -------------------------------------------------------------------------------- /node-socketio-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module test browser_test clean 2 | module: ROOTFS 3 | 4 | ROOTFS: ROOTFS/chat-example 5 | 6 | ROOTFS/chat-example: 7 | mkdir -p ROOTFS 8 | git clone https://github.com/guille/chat-example.git --depth 1 ROOTFS/chat-example 9 | cd ROOTFS/chat-example && npm install 10 | 11 | test: 12 | python test.py 13 | 14 | browser_test: 15 | Xvfb :1 -screen 0 1024x768x24 & 16 | env DISPLAY=:1 python browser_test.py 17 | killall Xvfb 18 | 19 | clean: 20 | rm -rf ROOTFS 21 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/ssl_client.rb: -------------------------------------------------------------------------------- 1 | require 'socket' 2 | require 'openssl' 3 | 4 | port = 443 5 | host = 'www.google.com' 6 | 7 | msg = "GET / HTTP/1.1\r\n" \ 8 | + "Host: www.google.co.jp\r\n" \ 9 | + "Connection: close\r\n" \ 10 | + "\r\n" 11 | 12 | context = OpenSSL::SSL::SSLContext.new 13 | socket = TCPSocket.new host, port 14 | ssl_client = OpenSSL::SSL::SSLSocket.new socket, context 15 | ssl_client.connect 16 | ssl_client.puts msg 17 | ret = ssl_client.read 18 | 19 | puts ret 20 | -------------------------------------------------------------------------------- /keydb/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | TEST_TYPE=${1:-'benchmark'} 6 | 7 | case $TEST_TYPE in 8 | benchmark) 9 | TESTER=tester.py;; 10 | ycsb) 11 | TESTER=tester_with_ycsb.py;; 12 | esac 13 | 14 | $THIS_DIR/../../scripts/tests/test_app_with_test_script.py \ 15 | -e "$CMDLINE" \ 16 | --guest_port 6379 \ 17 | --host_port 6379 \ 18 | --start_line 'Not listening to IPv6' \ 19 | --script_path $THIS_DIR/$TESTER 20 | -------------------------------------------------------------------------------- /mysql/sysbench.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sysbench /usr/share/sysbench/oltp_read_write.lua --mysql-host=$OSV_HOSTNAME --mysql-port=3306 --mysql-user=admin --mysql-password=osv --mysql-db=test --db-driver=mysql --tables=3 --table-size=100000 prepare 3 | 4 | sleep 1 5 | 6 | sysbench /usr/share/sysbench/oltp_read_write.lua --mysql-host=$OSV_HOSTNAME --mysql-port=3306 --mysql-user=admin --mysql-password='osv' --mysql-db=test --db-driver=mysql --tables=3 --table-size=100000 --report-interval=10 --threads=12 --time=60 run 2>&1 7 | -------------------------------------------------------------------------------- /wrk/wrk-fix-uninit-connection.patch: -------------------------------------------------------------------------------- 1 | --- wrk/src/wrk.c.before 2014-08-04 16:31:31.613095608 +0300 2 | +++ wrk/src/wrk.c 2014-08-04 16:32:31.248547350 +0300 3 | @@ -231,7 +231,7 @@ 4 | thread *thread = arg; 5 | aeEventLoop *loop = thread->loop; 6 | 7 | - thread->cs = zmalloc(thread->connections * sizeof(connection)); 8 | + thread->cs = zcalloc(thread->connections * sizeof(connection)); 9 | tinymt64_init(&thread->rand, time_us()); 10 | thread->latency = stats_alloc(100000); 11 | 12 | -------------------------------------------------------------------------------- /fpc-example/fpc-hello.pas: -------------------------------------------------------------------------------- 1 | library hello; 2 | 3 | uses 4 | unixtype; 5 | 6 | // use the C function 'write' 7 | function CWrite(fd : cInt; buf:pChar; nbytes : unixtype.TSize): TSsize; external name 'write'; 8 | 9 | // start function for OSv 10 | function main: longint; cdecl; 11 | const 12 | MyText: PChar = 'It works!'; 13 | begin 14 | CWrite(StdOutputHandle,MyText,strlen(MyText)); 15 | main:=0; 16 | end; 17 | 18 | exports main name 'main'; // OSv searches for 'main' in the library 19 | 20 | end. 21 | -------------------------------------------------------------------------------- /mruby/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir upstream 4 | cd upstream 5 | git clone https://github.com/mruby/mruby.git 6 | cd mruby 7 | 8 | cp ../../build_config.rb . 9 | make 10 | cd ../.. 11 | 12 | cc -fPIC -Wall -shared -o mruby.so upstream/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c upstream/mruby/build/host/lib/libmruby.a -Iupstream/mruby/include 13 | cc -fPIC -Wall -shared -o mirb.so upstream/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c upstream/mruby/build/host/lib/libmruby.a -Iupstream/mruby/include 14 | 15 | -------------------------------------------------------------------------------- /openjdk-zulu-9-and-above/latest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | JAVA_VERSION=$1 3 | 4 | DOWNLOAD_URL_SUFFIX=`wget -c -qO- https://cdn.azul.com/zulu/bin/ | grep -o '$(java_exe_path)" > usr.manifest 11 | echo "/usr/bin/java: ->$(java_exe_path)" > usr.manifest 12 | $(SRC)/scripts/manifest_from_host.sh -rR $(java_jre_path) | grep -vi libX >> usr.manifest 13 | 14 | clean: 15 | rm -rf usr.manifest 16 | -------------------------------------------------------------------------------- /keydb/tester.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import subprocess 4 | 5 | success = False 6 | 7 | print("Started keydb test ...") 8 | try: 9 | server_host = os.getenv('OSV_HOSTNAME') 10 | output = subprocess.check_output(["redis-benchmark", "-h", server_host, "-t", "set,lpush", "-n", "100000", "-q"], 11 | stderr=subprocess.STDOUT).decode() 12 | print(output) 13 | 14 | if 'requests per second' in output: 15 | success = True 16 | except subprocess.CalledProcessError as err: 17 | print(err.output) 18 | -------------------------------------------------------------------------------- /ImageMagick/README: -------------------------------------------------------------------------------- 1 | This module is an example of using the unmodified ImageMagick libraries 2 | taken from the build machine. 3 | 4 | We compile a trivial "convert" main using the host's ImageMagick libraries, 5 | and run "convert --help". 6 | 7 | On Fedora 21, this seems to work. But on other systems we have seen problems 8 | with the libgomp (gcc's OpenMP) shared library used by ImageMagick - which 9 | ends up calling the system call instruction (see OSv issue #590) and is 10 | compiled with stack protection (see OSv issue #589). 11 | -------------------------------------------------------------------------------- /node/README: -------------------------------------------------------------------------------- 1 | Support for building Node.js in OSV 2 | 3 | For example, to build Node 4.1.1: 4 | 5 | ./GET 4.1.1 6 | make NODE_VERSION=4.1.1 7 | 8 | 9 | An example Capstanfile: 10 | 11 | --- 12 | base: cloudius/osv-base 13 | 14 | cmdline: /tools/libnode.so /express/examples/hello-world 15 | 16 | files: 17 | /tools/libnode.so: libnode.so 18 | --- 19 | 20 | - assuming you've put express in ROOTFS/express 21 | 22 | Then do: 23 | 24 | capstan build 25 | capstan run -f 3000:3000 26 | 27 | And visit localhost:3000 in a browser. 28 | -------------------------------------------------------------------------------- /redis-memonly/tester.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import subprocess 4 | 5 | success = False 6 | 7 | print("Started redis test ...") 8 | try: 9 | server_host = os.getenv('OSV_HOSTNAME') 10 | output = subprocess.check_output(["redis-benchmark", "-h", server_host, "-t", "set,lpush", "-n", "100000", "-q"], 11 | stderr=subprocess.STDOUT).decode() 12 | print(output) 13 | 14 | if 'requests per second' in output: 15 | success = True 16 | except subprocess.CalledProcessError as err: 17 | print(err.output) 18 | -------------------------------------------------------------------------------- /wrk/Makefile: -------------------------------------------------------------------------------- 1 | version = 3.1.0 2 | tarball = $(version).tar.gz 3 | 4 | .PHONY: module 5 | module: wrk 6 | $(MAKE) -C wrk 7 | 8 | $(tarball): 9 | wget https://github.com/wg/wrk/archive/$(version).tar.gz 10 | 11 | wrk: $(tarball) 12 | tar xvzf $(tarball) 13 | mv wrk-$(version) wrk 14 | cd wrk && patch -p1 < ../0001-make-build-as-DSO.patch 15 | cd wrk && patch -p1 < ../wrk-fix-uninit-connection.patch 16 | cd wrk && patch -p1 < ../0003-wrk-allow-larger-file-descriptor-values.patch 17 | 18 | clean: 19 | rm -rf wrk $(tarball) 20 | -------------------------------------------------------------------------------- /apache-kafka/README: -------------------------------------------------------------------------------- 1 | Apache Kafka OSv 2 | ================ 3 | 4 | Apache Kafka: A high-throughput distributed messaging system. See more at http://kafka.apache.org/. 5 | 6 | Curent version of this module is Kafka 2.12-2.1.1, which is based on Scala 2.12 and needs Java 8 at minimum. 7 | 8 | Notice that in order for Kafka to work you also need to run Zookeeper and configure its IP and port in Kafka's config file (assets/config/server.properties). If you are willing to run a local OSv instance of Zookeeper, keep in mind to run it in network bridge mode. 9 | -------------------------------------------------------------------------------- /leveldb/GET: -------------------------------------------------------------------------------- 1 | set -e 2 | VERSION=1.15.0 3 | TARBALL=leveldb-$VERSION.tar.gz 4 | SRCDIR=leveldb-$VERSION 5 | if [ ! -e $TARBALL ];then 6 | wget https://leveldb.googlecode.com/files/$TARBALL 7 | fi 8 | rm -rf $SRCDIR leveldb 9 | tar zxf $TARBALL 10 | mv $SRCDIR leveldb 11 | 12 | cd leveldb 13 | patch -p1 < ../patch.diff 14 | make 15 | make db_bench 16 | cp -vf db_bench ../db_bench.so 17 | cp -vf libleveldb.so.1.15 .. 18 | cd .. 19 | 20 | mkdir -p ROOTFS/usr/lib 21 | cp libleveldb.so.1.15 /lib64/libsnappy.so.1 ROOTFS/usr/lib 22 | cp db_bench.so ROOTFS 23 | -------------------------------------------------------------------------------- /oracle-nosql-db/README: -------------------------------------------------------------------------------- 1 | *) Start the database instace 2 | $ make image=oracle-nosql-db 3 | $ sudo sudo scripts/run.py -nv 4 | 5 | *) Test it on host 6 | $ cd kv-3.0.5 7 | $ javac -cp examples:lib/kvclient.jar examples/hello/HelloBigDataWorld.java 8 | $ java -cp examples:lib/kvclient.jar hello.HelloBigDataWorld -host 192.168.122.89 9 | Hello Big Data World! 10 | 11 | *) Note 12 | The -host ip addres can be changed in module.py. 13 | 14 | *) For more info 15 | http://www.oracle.com/technetwork/database/database-technologies/nosqldb/overview/index.html 16 | -------------------------------------------------------------------------------- /ringojs/README: -------------------------------------------------------------------------------- 1 | RingoJS is a JavaScript runtime written in Java based on Mozilla Rhino. 2 | It adds a number of features to Rhino that make it suitable for real-world, large-scale application development: 3 | - A fast, auto-reloading, and CommonJS-compliant module loader. 4 | - A rich set of modules covering I/O, logging, development tools and much more. 5 | - Scalable HTTP server based on the Jetty project. 6 | - Support for CommonJS packages to install or write additional software components. 7 | For more information, visit the RingoJS web site: http://ringojs.org/ 8 | -------------------------------------------------------------------------------- /rpm/nomakedev.patch: -------------------------------------------------------------------------------- 1 | --- rpm-4.11.2.orig/lib/cpio.c 2013-11-22 14:31:31.000000000 +0400 2 | +++ rpm-4.11.2/lib/cpio.c 2014-07-17 17:47:54.648819908 +0400 3 | @@ -289,11 +289,9 @@ int rpmcpioHeaderRead(rpmcpio_t cpio, ch 4 | 5 | GET_NUM_FIELD(hdr.devMajor, major); 6 | GET_NUM_FIELD(hdr.devMinor, minor); 7 | - st->st_dev = makedev(major, minor); 8 | 9 | GET_NUM_FIELD(hdr.rdevMajor, major); 10 | GET_NUM_FIELD(hdr.rdevMinor, minor); 11 | - st->st_rdev = makedev(major, minor); 12 | 13 | GET_NUM_FIELD(hdr.namesize, nameSize); 14 | 15 | -------------------------------------------------------------------------------- /ImageMagick-source/README: -------------------------------------------------------------------------------- 1 | This module is similar to ../ImageMagick, except that instead of taking 2 | the pre-compiled ImageMagick libraries from the build machine and only 3 | compiling convert.c, here we fetch the ImageMagick source code and compile 4 | it especially for OSv. 5 | 6 | We compile "convert" as a PIE (trying to compile it as a shared object was 7 | very difficult because of the convoluted buildtools layers used to build 8 | ImageMagick), and we disable OpenMP in the build because of the yet-unfixed 9 | problems in using it in OSv (see OSv issue #590). 10 | -------------------------------------------------------------------------------- /elasticsearch/tests/load_data.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | curl -X PUT "$OSV_HOSTNAME:9200/library/book/_bulk?refresh&pretty" -H 'Content-Type: application/json' -d' 3 | {"index":{"_id": "Leviathan Wakes"}} 4 | {"name": "Leviathan Wakes", "author": "James S.A. Corey", "release_date": "2011-06-02", "page_count": 561} 5 | {"index":{"_id": "Hyperion"}} 6 | {"name": "Hyperion", "author": "Dan Simmons", "release_date": "1989-05-26", "page_count": 482} 7 | {"index":{"_id": "Dune"}} 8 | {"name": "Dune", "author": "Frank Herbert", "release_date": "1965-06-01", "page_count": 604} 9 | ' 10 | -------------------------------------------------------------------------------- /golang-pie-httpserver/httpserver.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "runtime" 7 | "fmt" 8 | "os" 9 | ) 10 | 11 | func hello(w http.ResponseWriter, r *http.Request) { 12 | hostname, err := os.Hostname() 13 | if( err == nil ) { 14 | io.WriteString(w, "Hello world from " + runtime.Version() + " at " + hostname) 15 | } 16 | } 17 | 18 | func main() { 19 | fmt.Printf("Go version: %s, listening on port 8000 ...\n", runtime.Version()); 20 | http.HandleFunc("/", hello) 21 | http.ListenAndServe(":8000", nil) 22 | } 23 | -------------------------------------------------------------------------------- /iperf-zcopy/so.patch: -------------------------------------------------------------------------------- 1 | diff -ur iperf-2.0.5.orig/src/Makefile.in iperf-2.0.5/src/Makefile.in 2 | --- iperf-2.0.5.orig/src/Makefile.in 2014-02-06 15:14:55.013564388 +0200 3 | +++ iperf-2.0.5/src/Makefile.in 2014-02-06 15:19:17.260466699 +0200 4 | @@ -193,7 +193,7 @@ 5 | 6 | AM_CXXFLAGS = -Wall 7 | AM_CFLAGS = -Wall 8 | -iperf_LDFLAGS = @CFLAGS@ @PTHREAD_CFLAGS@ @WEB100_CFLAGS@ @DEFS@ 9 | +iperf_LDFLAGS = @CFLAGS@ @PTHREAD_CFLAGS@ @WEB100_CFLAGS@ @DEFS@ -shared 10 | iperf_SOURCES = \ 11 | Client.cpp \ 12 | Extractor.c \ 13 | Only in iperf-2.0.5/src: Makefile.in~ 14 | -------------------------------------------------------------------------------- /vertx/README.md: -------------------------------------------------------------------------------- 1 | # Vert.x on OSv 2 | 3 | Vertx.io is a polyglot (Java, JavaScript, Groovy, Ruby, Ceylon, Scala and Kotlin) 4 | toolkit based on netty and intended to build minimalistic reactive apps on JVM. Its design 5 | is based on the non-blocking event loop model and in this way is similar to node.js. 6 | You can read more here http://vertx.io/. 7 | 8 | ## Building 9 | Vert.x requires at least Java 8. It can be run on compact 1 JRE. 10 | 11 | Here is how you can build it 12 | ``` 13 | ./scripts/build image=openjdk8-zulu-compact3-with-java-beans,vertx 14 | ``` 15 | -------------------------------------------------------------------------------- /elasticsearch/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | THIS_DIR=$(readlink -f $(dirname $0)) 4 | CMDLINE=$($THIS_DIR/../cmdline.sh $THIS_DIR) 5 | 6 | $THIS_DIR/../../scripts/tests/test_http_app.py \ 7 | -e "$CMDLINE" \ 8 | --guest_port 9200 \ 9 | --host_port 9200 \ 10 | --line 'LicenseService' \ 11 | --http_line 'Frank Herbert' \ 12 | --pre_script "$THIS_DIR/tests/load_data.sh" \ 13 | --http_path '/library/_search?q=author:frank' \ 14 | --concurrency 50 \ 15 | --count 1000 \ 16 | --no_keep_alive \ 17 | --error_line_to_ignore_on_kill "mainWithoutErrorHandling" 18 | -------------------------------------------------------------------------------- /scala/usr.manifest: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | [manifest] 9 | /&/usr/share/scala/lib/jansi.jar: /& 10 | /&/usr/share/scala/lib/jline2.jar: /& 11 | /&/usr/share/scala/lib/scala-compiler.jar: /& 12 | /&/usr/share/scala/lib/scala-library.jar: /& 13 | /&/usr/share/scala/lib/scala-reflect.jar: /& 14 | /&/usr/share/scala/lib/scala-swing.jar: /& 15 | /&/usr/share/scala/lib/scalap.jar: /& 16 | -------------------------------------------------------------------------------- /busybox/README: -------------------------------------------------------------------------------- 1 | Busybox ash shell is more powerful than OSv --runscript option. 2 | Use ash when fancy shell is required. 3 | 4 | While busybox config file includes default options (e.g. nearly all 5 | options are enabled), the usr.manifest doesn't try to create all 6 | valid symlinks to busybox binary. Instead, only a few are included. 7 | 8 | A small test script is provided (commented out in usr.manifest). 9 | It can be run as: 10 | scripts/run.py -e "sleep 1.2; ash /cmd0.sh; echo Done" 11 | 12 | You can also start an interactive shell with: 13 | scripts/run.py -e ash 14 | -------------------------------------------------------------------------------- /cassandra/README: -------------------------------------------------------------------------------- 1 | + How to test cassandra 2 | 3 | $ sudo scripts/run.py -nv 4 | $ cd osv/apps/cassandra/upstream/apache-cassandra-*/bin 5 | $ ./cassandra-stress -d 192.168.122.89 -o INSERT 6 | $ ./cassandra-stress -d 192.168.122.89 -o READ 7 | 8 | + See more about the test results and options: 9 | http://www.datastax.com/documentation/cassandra/1.2/cassandra/tools/toolsCStress_t.html 10 | http://www.datastax.com/documentation/cassandra/1.2/cassandra/tools/toolsCStressOptions_r.html 11 | http://www.datastax.com/documentation/cassandra/1.2/cassandra/tools/toolsCStressOutput_c.html 12 | -------------------------------------------------------------------------------- /dacapo/Capstanfile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2014 Cloudius Systems, Ltd. 2 | # 3 | # This work is open source software, licensed under the terms of the 4 | # BSD license as described in the LICENSE file in the top-level directory. 5 | 6 | base: cloudius/osv-openjdk 7 | 8 | cmdline: > 9 | /java.so -jar /dacapo.jar 10 | avrora 11 | batik 12 | eclipse 13 | fop 14 | h2 15 | jython 16 | luindex 17 | lusearch 18 | pmd 19 | sunflow 20 | tomcat 21 | tradebeans 22 | tradesoap 23 | xalan 24 | 25 | build: ./GET 26 | 27 | files: 28 | /dacapo.jar: dacapo-9.12-bach.jar 29 | -------------------------------------------------------------------------------- /scala-example/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | from osv.modules import api 9 | 10 | api.require('scala') 11 | 12 | classpath = ['/usr/share/scala/lib/scala-library.jar', 'HelloWorld.jar'] 13 | 14 | default = api.run_java(classpath = classpath, 15 | args = [ 16 | "HelloWorld", 17 | ], 18 | ) 19 | -------------------------------------------------------------------------------- /minecraft-server/usr.manifest: -------------------------------------------------------------------------------- 1 | /banned-ips.json: ${MODULE_DIR}/banned-ips.json 2 | /banned-players.json: ${MODULE_DIR}/banned-players.json 3 | /eula.txt: ${MODULE_DIR}/eula.txt 4 | /logs/**: ${MODULE_DIR}/logs/** 5 | /minecraft_server.1.7.10.jar: ${MODULE_DIR}/minecraft_server.1.7.10.jar 6 | /ops.json: ${MODULE_DIR}/ops.json 7 | /server.properties: ${MODULE_DIR}/server.properties 8 | /usercache.json: ${MODULE_DIR}/usercache.json 9 | /whitelist.json: ${MODULE_DIR}/whitelist.json 10 | /world/**: ${MODULE_DIR}/world/** 11 | /usr/lib/jvm/java/jre/lib/security/cacerts: /etc/ssl/certs/java/cacerts 12 | -------------------------------------------------------------------------------- /seaweedfs/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: upstream/seaweedfs/weed/weed 3 | echo '/weed: $${MODULE_DIR}/upstream/seaweedfs/weed/weed' > usr.manifest 4 | 5 | go_version=$(shell go version | grep -o 1.[0-9][0-9]) 6 | go_version_new_enough=$(shell echo "$(go_version) >= 1.18" | bc) 7 | 8 | ifneq (1,$(go_version_new_enough)) 9 | $(error "Golang version needs to be at least 1.18") 10 | endif 11 | 12 | upstream/seaweedfs/weed/weed: 13 | ./GET 14 | cd upstream/seaweedfs/weed && go build -buildmode=pie -ldflags "-linkmode external" 15 | 16 | clean: 17 | rm -rf ./upstream usr.manifest 18 | -------------------------------------------------------------------------------- /gccgo-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: hello.so 3 | echo '/hello.so: $${MODULE_DIR}/hello.so' > usr.manifest 4 | ldd hello.so | grep libgo.so | \ 5 | sed 's/ *[^ ] *\(.*\) => \(.*\) .*/\/\1: \2/' \ 6 | >> usr.manifest 7 | 8 | CFLAGS = -g -fPIC 9 | LDFLAGS = -lgo -lgobegin 10 | 11 | %.o: %.go 12 | gccgo -c $(CFLAGS) -o $@ $< 13 | 14 | hello.so: hello.o go-main.o 15 | $(CC) -shared -o $@ $^ $(LDFLAGS) 16 | 17 | clean: 18 | rm -f hello.so *.o hello usr.manifest 19 | 20 | # Test pie (works on Linux, but not yet on OSv) 21 | hello: hello.o 22 | $(CC) -pie -o $@ $^ $(LDFLAGS) 23 | -------------------------------------------------------------------------------- /keydb/Makefile: -------------------------------------------------------------------------------- 1 | SRC = $(shell readlink -f ../..) 2 | 3 | upstream/KeyDB/.git: 4 | mkdir -p upstream 5 | cd upstream && git clone -b v5.3.1 --depth 1 https://github.com/JohnSully/KeyDB.git 6 | cd $(SRC)/apps/keydb && patch upstream/KeyDB/src/server.cpp proctitle.patch 7 | 8 | upstream/KeyDB/src/keydb-server: upstream/KeyDB/.git 9 | cd upstream/KeyDB && make MALLOC=libc 10 | 11 | module: upstream/KeyDB/src/keydb-server 12 | $(SRC)/scripts/manifest_from_host.sh upstream/KeyDB/src/keydb-server > usr.manifest 13 | strip upstream/KeyDB/src/keydb-server 14 | 15 | clean: 16 | rm -rf upstream usr.manifest 17 | -------------------------------------------------------------------------------- /ruby-example/sample_codes/echoserver.rb: -------------------------------------------------------------------------------- 1 | require 'socket' 2 | 3 | gs = TCPServer.open(8000) 4 | socks = [gs] 5 | addr = gs.addr 6 | addr.shift 7 | printf("server is on %s\n", addr.join(":")) 8 | 9 | while true 10 | nsock = select(socks) 11 | next if nsock == nil 12 | for s in nsock[0] 13 | if s == gs 14 | socks.push(s.accept) 15 | print(s, " is accepted\n") 16 | else 17 | if s.eof? 18 | print(s, " is gone\n") 19 | s.close 20 | socks.delete(s) 21 | else 22 | str = s.gets 23 | s.write(str) 24 | end 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /apache-activemq/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-openjdk 2 | 3 | cmdline: > 4 | /java.so 5 | -Xms1G 6 | -Xmx1G 7 | -Djava.util.logging.config.file=/activemq/conf/logging.properties 8 | -Djava.security.auth.login.config=/activemq/conf/login.config 9 | -Dcom.sun.management.jmxremote 10 | -Djava.awt.headless=true 11 | -Djava.io.tmpdir=/activemq/tmp 12 | -Dactivemq.classpath=/activemq/conf 13 | -Dactivemq.home=/activemq 14 | -Dactivemq.base=/activemq 15 | -Dactivemq.conf=/activemq/conf 16 | -Dactivemq.data=/activemq/data 17 | -jar /activemq/bin/activemq.jar 18 | start 19 | 20 | build: make 21 | -------------------------------------------------------------------------------- /deno/README.md: -------------------------------------------------------------------------------- 1 | Deno (No-de reversed, I guess;-) is a new Typescript/Javascript runtime 2 | implemented in Rust and using V8 as Javascript language. 3 | 4 | For more info look at https://deno.land/. 5 | 6 | Please note that like all apps written in Rust, deno uses pretty large TLS 7 | so in order to run it on OSv you nead to link loader.elf with big enough 8 | local TLS reservation using proper value of `app_local_exec_tls_size` parameter 9 | when passing it to the `./scripts/build'. Currently the values is `5608`. 10 | 11 | Example to run httpserver: 12 | ``` 13 | wrk -d 10 -c 100 http://localhost:8000/ 14 | ``` 15 | -------------------------------------------------------------------------------- /ffmpeg/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require("libz") 4 | 5 | default = api.run("/ffmpeg.so -formats") 6 | video_details = api.run('/ffmpeg.so -i http://clips.vorwaerts-gmbh.de/VfE_html5.mp4') 7 | video_subclip = api.run('/ffmpeg.so -i http://clips.vorwaerts-gmbh.de/VfE_html5.mp4 -ss 00:00:10 -codec copy -t 10 /tmp/output.mp4') 8 | video_extract_png = api.run('/ffmpeg.so -i http://clips.vorwaerts-gmbh.de/VfE_html5.mp4 -r 1 -f image2 /tmp/image-%2d.png') 9 | video_transcode = api.run('/ffmpeg.so -i http://clips.vorwaerts-gmbh.de/VfE_html5.mp4 -c:v libx265 -crf 28 -an -f mpegts tcp://192.168.122.1:12345') 10 | -------------------------------------------------------------------------------- /golang-httpserver/httpserver.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "io" 5 | "net/http" 6 | "runtime" 7 | "fmt" 8 | "C" 9 | "os" 10 | ) 11 | 12 | func hello(w http.ResponseWriter, r *http.Request) { 13 | hostname, err := os.Hostname() 14 | if( err == nil ) { 15 | io.WriteString(w, "Hello world from " + runtime.Version() + " at " + hostname) 16 | } 17 | } 18 | 19 | func main() { 20 | } 21 | 22 | //export GoMain 23 | func GoMain() { 24 | fmt.Printf("Go version: %s, listening on port 8000 ...\n", runtime.Version()); 25 | http.HandleFunc("/", hello) 26 | http.ListenAndServe(":8000", nil) 27 | } 28 | -------------------------------------------------------------------------------- /ruby/no-use-sleepy-thread-timer-ruby.patch: -------------------------------------------------------------------------------- 1 | diff -Nur ruby.orig/thread_pthread.c ruby/thread_pthread.c 2 | --- ruby.orig/thread_pthread.c 2014-06-20 07:44:27.131259578 +0900 3 | +++ ruby/thread_pthread.c 2014-06-20 07:44:43.612250114 +0900 4 | @@ -59,7 +59,7 @@ 5 | 6 | #if defined(HAVE_POLL) && defined(HAVE_FCNTL) && defined(F_GETFL) && defined(F_SETFL) && defined(O_NONBLOCK) && !defined(__native_client__) 7 | /* The timer thread sleeps while only one Ruby thread is running. */ 8 | -# define USE_SLEEPY_TIMER_THREAD 1 9 | +# define USE_SLEEPY_TIMER_THREAD 0 10 | #else 11 | # define USE_SLEEPY_TIMER_THREAD 0 12 | #endif 13 | -------------------------------------------------------------------------------- /webassembly/README.md: -------------------------------------------------------------------------------- 1 | Wasmer is a Universal WebAssembly Runtime that allows running `*.was` 2 | binaries as well as `*.wat` text files on Linux. Wasmer is implemented in Rust. 3 | 4 | This apps contains examples of 3 WASM apps - lua, sqlite and nginx. 5 | 6 | For more info look at https://wasmer.io/. 7 | 8 | Please note that like all apps written in Rust, wasmer uses pretty large TLS 9 | so in order to run it on OSv you nead to link loader.elf with big enough 10 | local TLS reservation using proper value of `app_local_exec_tls_size` parameter 11 | when passing it to the `./scripts/build'. Currently the values is `2408`. 12 | -------------------------------------------------------------------------------- /ImageMagick/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: usr.manifest convert.so 3 | 4 | convert.so: 5 | cc -shared -o convert.so -fPIC `pkg-config --cflags ImageMagick` convert.c `pkg-config --libs MagickWand` 6 | 7 | genlib = ldd convert.so | grep "lib$1.so" | sed 's/ *[^ ] *\(.*\) => \(.*\) .*/\/\1: \2/' 8 | 9 | usr.manifest: convert.so 10 | : > usr.manifest 11 | echo '/usr/bin/convert:$${MODULE_DIR}/convert.so' >> usr.manifest 12 | $(call genlib,Magick.*) >> usr.manifest 13 | $(call genlib,gomp.*) >> usr.manifest 14 | $(call genlib,ltdl.*) >> usr.manifest 15 | 16 | .PHONY: clean 17 | clean: 18 | rm -f convert.so usr.manifest 19 | -------------------------------------------------------------------------------- /apache-zookeeper/Capstanfile: -------------------------------------------------------------------------------- 1 | base: cloudius/osv-openjdk 2 | 3 | cmdline: > 4 | --cwd=/zookeeper 5 | /java.so 6 | -Dzookeeper.log.dir="." 7 | -Dzookeeper.root.logger="INFO,CONSOLE" 8 | -Dcom.sun.management.jmxremote 9 | -Dcom.sun.management.jmxremote.local.only=false 10 | -cp /zookeeper/zookeeper-3.4.6.jar:/zookeeper/lib/slf4j-log4j12-1.6.1.jar:/zookeeper/lib/slf4j-api-1.6.1.jar:/zookeeper/lib/netty-3.7.0.Final.jar:/zookeeper/lib/log4j-1.2.16.jar:/zookeeper/lib/jline-0.9.94.jar:/zookeeper/conf/log4j.properties 11 | org.apache.zookeeper.server.quorum.QuorumPeerMain "/zookeeper/conf/zoo.cfg" 12 | 13 | build: make 14 | -------------------------------------------------------------------------------- /opendaylight/README.md: -------------------------------------------------------------------------------- 1 | # OpenDaylight OSv 2 | 3 | [OpenDaylight](http://www.opendaylight.org/) is an open platform for network programmability to enable SDN and create a solid foundation for NFV for networks at any size and scale. 4 | 5 | ## Using assets directory 6 | If not using as part of an appliance that provides cloud-init, you can inject configuration and/or webapps by placing them in one of the following directories during build time. 7 | 8 | | Host Directory | OSv Directory | Description | 9 | | -------------- | ------------- | ----------- | 10 | | ./assets/etc | /opendaylight/etc| OpenDaylight configuration files. | 11 | -------------------------------------------------------------------------------- /ruby-example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: usr.manifest 3 | 4 | sample_codes/twitter/Gemfile.lock: 5 | cd sample_codes/twitter && bundle install --path vendor/bundle 6 | 7 | usr.manifest: 8 | echo '/ruby-example/**: $${MODULE_DIR}/sample_codes/**' >> usr.manifest 9 | find sample_codes/twitter -name '*.so' -exec ldd {} \;|awk '{print $$1,":",$$3}'|grep "/lib"|grep -v "ld-linux"|grep -v "libc.so"|grep -v "libpthread.so"|grep -v "libdl.so"|grep -v "libm.so"|grep -v "libruby"|grep -v "libstdc++"|grep -v "libgcc_s"|grep -v "librt"|sort|uniq|sed -e "s/ //" \ 10 | >> usr.manifest 11 | 12 | clean: 13 | rm -f usr.manifest 14 | -------------------------------------------------------------------------------- /haproxy/haproxy.cfg: -------------------------------------------------------------------------------- 1 | global 2 | maxconn 100 3 | user root 4 | 5 | defaults 6 | mode tcp 7 | timeout client 1m 8 | timeout connect 10s 9 | timeout server 1m 10 | 11 | # http 12 | frontend f1 *:80 13 | default_backend b1 14 | backend b1 15 | balance roundrobin 16 | server s1 ipv4@192.168.122.1:80 check inter 3s 17 | 18 | # ssh 19 | frontend f2 *:22 20 | default_backend b2 21 | backend b2 22 | balance roundrobin 23 | server s2 ipv4@192.168.122.1:22 check inter 3s 24 | -------------------------------------------------------------------------------- /openjdk8-fedora/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | from osv.modules.filemap import FileMap 8 | from osv.modules import api 9 | 10 | api.require('java-cmd') 11 | provides = ['java','java8'] 12 | 13 | usr_files = FileMap() 14 | usr_files.add('${OSV_BASE}/apps/openjdk8-fedora/install').to('/').allow_symlink() 15 | usr_files.link('/usr/lib/jvm/jre').to('/usr/lib/jvm/java/jre') 16 | usr_files.link('/usr/bin/java').to('/usr/lib/jvm/java/jre/bin/java') 17 | -------------------------------------------------------------------------------- /Xapps/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module clean 2 | 3 | SRC = $(shell readlink -f ../..) 4 | 5 | xauthority_path := $(shell echo $$XAUTHORITY) 6 | 7 | xclock_path := $(shell which xclock) 8 | xeyes_path := $(shell which xeyes) 9 | xlogo_path := $(shell which xlogo) 10 | 11 | module: 12 | cp usr.manifest.skel usr.manifest 13 | echo '/.Xauthority: $(xauthority_path)' >> usr.manifest 14 | $(SRC)/scripts/manifest_from_host.sh $(xclock_path) >> usr.manifest 15 | echo '/xclock: $(xclock_path)' >> usr.manifest 16 | echo '/xeyes: $(xeyes_path)' >> usr.manifest 17 | echo '/xlogo: $(xlogo_path)' >> usr.manifest 18 | 19 | clean: 20 | rm -f usr.manifest 21 | -------------------------------------------------------------------------------- /ImageMagick/convert.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(int argc,char **argv) { 5 | ExceptionInfo *exception; 6 | ImageInfo *image_info; 7 | MagickBooleanType status; 8 | 9 | MagickCoreGenesis(*argv, MagickTrue); 10 | exception = AcquireExceptionInfo(); 11 | image_info = AcquireImageInfo(); 12 | status = MagickCommandGenesis(image_info, 13 | ConvertImageCommand, 14 | argc, argv, 15 | (char **) NULL, exception); 16 | image_info = DestroyImageInfo(image_info); 17 | exception = DestroyExceptionInfo(exception); 18 | MagickCoreTerminus(); 19 | return(status != MagickFalse ? 0 : 1); 20 | } 21 | -------------------------------------------------------------------------------- /openjdk8-zulu-full/module.py: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2017 Waldemar Kozaczuk 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | from osv.modules.filemap import FileMap 9 | from osv.modules import api 10 | 11 | api.require('java-cmd') 12 | provides = ['java','java8'] 13 | 14 | usr_files = FileMap() 15 | usr_files.add('${OSV_BASE}/apps/openjdk8-zulu-full/install').to('/').allow_symlink() 16 | usr_files.link('/usr/lib/jvm/jre').to('/usr/lib/jvm/java/jre') 17 | usr_files.link('/usr/bin/java').to('/usr/lib/jvm/java/jre/bin/java') 18 | -------------------------------------------------------------------------------- /redis-memonly/patch: -------------------------------------------------------------------------------- 1 | --- src/config.h 2014-10-09 12:06:02.000000000 +0300 2 | +++ /tmp/config.h 2014-12-25 10:16:27.400712871 +0200 3 | @@ -119,6 +119,13 @@ 4 | void setproctitle(const char *fmt, ...); 5 | #endif 6 | 7 | +/* Redis's implementation of setproctitle() makes Linux-specific assumptions 8 | + * on the layout of argv and environ, which don't hold on OSv. Anyway, there 9 | + * is no need for this function on a one-process system like OSv. 10 | + */ 11 | +#undef USE_SETPROCTITLE 12 | +#undef INIT_SETPROCTITLE_REPLACEMENT 13 | + 14 | /* Byte ordering detection */ 15 | #include /* This will likely define BYTE_ORDER */ 16 | -------------------------------------------------------------------------------- /specjvm/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | #Run with --help to see what all options mean 6 | #Warmup 30s, 1 iteration of 30s with 2 benchmark threads 7 | common_cmd = '/usr/bin/java -Xms1400m -Xmx1400m -jar specjvm.jar -wt 30s -it 30s -bt 2 -i 1 -ikv -ict -ctf false -chf false -crf false' 8 | 9 | all = api.run(cmdline='%s compress crypto serial sunflow scimark!' % common_cmd) 10 | 11 | derby = api.run(cmdline='%s derby!' % common_cmd) #Need ZFS image with 1GB space at least 12 | xml = api.run(cmdline='%s xml!' % common_cmd) #Need ZFS image 13 | 14 | default = api.run(cmdline='%s sunflow!' % common_cmd) 15 | -------------------------------------------------------------------------------- /apache-derby/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | 3 | VERSION := 10.14.1.0 4 | 5 | module: ROOTFS 6 | 7 | db-derby-$(VERSION)-bin.tar.gz: 8 | wget -c http://archive.apache.org/dist/db/derby/db-derby-$(VERSION)/db-derby-$(VERSION)-bin.tar.gz 9 | 10 | ROOTFS/db-derby: db-derby-$(VERSION)-bin.tar.gz 11 | mkdir -p ROOTFS/db-derby 12 | tar xvf db-derby-$(VERSION)-bin.tar.gz 13 | cp -a db-derby-$(VERSION)-bin/lib ROOTFS/db-derby 14 | 15 | ROOTFS/db-derby/security.policy: 16 | mkdir -p ROOTFS/db-derby 17 | cp security.policy ROOTFS/db-derby 18 | 19 | ROOTFS: ROOTFS/db-derby ROOTFS/db-derby/security.policy 20 | 21 | clean: 22 | rm -rf ROOTFS db-derby-* 23 | -------------------------------------------------------------------------------- /fio/Makefile: -------------------------------------------------------------------------------- 1 | VERSION=3.29 2 | configure_flags = --disable-numa --disable-rdma --disable-rados --disable-rbd \ 3 | --disable-http --disable-gfapi --disable-pmem --disable-shm \ 4 | --disable-tcmalloc 5 | 6 | 7 | .PHONY: module clean distclean 8 | 9 | module: fio/fio 10 | 11 | fio: 12 | git clone --depth 1 --single-branch -b fio-$(VERSION) http://git.kernel.dk/fio.git 13 | cd fio; patch -p1 < ../patches/0001-configure-disable-POSIX-pshared-attribute.patch 14 | 15 | fio/fio: fio 16 | cd fio; ./configure $(configure_flags); $(MAKE) 17 | 18 | 19 | clean: 20 | if [ -d fio ]; then cd fio && $(MAKE) clean; fi 21 | 22 | distclean: 23 | rm -rf fio 24 | -------------------------------------------------------------------------------- /mono-example/Makefile.FromHost: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | module: usr.manifest 3 | 4 | SRC = $(shell readlink -f ../..) 5 | mono_exe_path = $(shell realpath $$(which mono)) 6 | 7 | ROOTFS/hello.exe: hello.cs 8 | mkdir -p ROOTFS 9 | csc hello.cs /out:ROOTFS/hello.exe 10 | 11 | usr.manifest: ROOTFS/hello.exe 12 | echo '/**: $${MODULE_DIR}/ROOTFS/**' > usr.manifest 13 | echo "/usr/lib/mono/4.5/mscorlib.dll: /usr/lib/mono/4.5/mscorlib.dll" >> usr.manifest 14 | $(SRC)/scripts/manifest_from_host.sh $(mono_exe_path) >> usr.manifest 15 | $(SRC)/scripts/manifest_from_host.sh -l libmonosgen-2.0.so.1 >> usr.manifest 16 | 17 | clean: 18 | rm -rf ROOTFS usr.manifest 19 | -------------------------------------------------------------------------------- /rust-httpserver/README: -------------------------------------------------------------------------------- 1 | This is an example of simple HTTP server implemented in Rust using futures. The code is 2 | based on the example found here - https://hyper.rs/guides/server/hello-world/. 3 | The app listens on port 3000. 4 | 5 | In order to build the app you need to install Rust tool chain (compiler + cargo) 6 | by following instructions here: https://www.rust-lang.org/en-US/install.html. 7 | 8 | ./scripts/build image=rust-httpserver 9 | ./scripts/run.py --forward tcp:3000::3000 10 | 11 | You can open it in a browser by typing this URL: 12 | http://localhost:8000/cli/ 13 | 14 | or hit from command line using curl: 15 | curl http://localhost:3000/ 16 | -------------------------------------------------------------------------------- /apache-derby/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java8') 4 | 5 | _classpath = ["/db-derby/lib/derby.jar", "/db-derby/lib/derbynet.jar", "/db-derby/lib/derbytools.jar", "/db-derby/lib/derbyclient.jar"] 6 | _args = ["-Djava.security.policy=/db-derby/security.policy", "org.apache.derby.drda.NetworkServerControl", "start"] 7 | 8 | default = api.run_java(classpath = _classpath, args = _args) 9 | native = api.run(cmdline="/usr/bin/java -cp /db-derby/lib/derby.jar:/db-derby/lib/derbynet.jar:/db-derby/lib/derbytools.jar:/db-derby/lib/derbyclient.jar -Djava.security.policy=/db-derby/security.policy org.apache.derby.drda.NetworkServerControl start") 10 | -------------------------------------------------------------------------------- /rust-pie-httpserver/README: -------------------------------------------------------------------------------- 1 | This is an example of simple HTTP server implemented in Rust using futures. The code is 2 | based on the example found here - https://hyper.rs/guides/server/hello-world/. 3 | The app listens on port 3000. 4 | 5 | In order to build the app you need to install Rust tool chain (compiler + cargo) 6 | by following instructions here: https://www.rust-lang.org/en-US/install.html. 7 | 8 | ./scripts/build image=rust-pie-httpserver 9 | ./scripts/run.py --forward tcp:3000::3000 10 | 11 | You can open it in a browser by typing this URL: 12 | http://localhost:8000/cli/ 13 | 14 | or hit from command line using curl: 15 | curl http://localhost:3000/ 16 | -------------------------------------------------------------------------------- /graalvm-httpserver/Makefile: -------------------------------------------------------------------------------- 1 | module: httpserverapp 2 | 3 | include ../graalvm-example/common.gmk 4 | 5 | HttpServerApp.class: ../java-httpserver/HttpServerApp.java ../graalvm-example/upstream/graalvm-ce-java11-$(GRAAL_VERSION) 6 | ../graalvm-example/upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/javac -d . ../java-httpserver/HttpServerApp.java 7 | 8 | httpserverapp: HttpServerApp.class ../graalvm-example/upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/native-image 9 | ../graalvm-example/upstream/graalvm-ce-java11-$(GRAAL_VERSION)/bin/native-image --no-server -Djava.net.preferIPv4Stack=true HttpServerApp 10 | 11 | clean: 12 | rm -rf *.class httpserverapp upstream 13 | -------------------------------------------------------------------------------- /python2x/python.c: -------------------------------------------------------------------------------- 1 | /* Minimal main program -- everything is loaded from the library */ 2 | 3 | //#include "Python.h" 4 | extern int Py_Main(int argc, char **argv); 5 | 6 | #ifdef __FreeBSD__ 7 | #include 8 | #endif 9 | 10 | int 11 | main(int argc, char **argv) 12 | { 13 | /* 754 requires that FP exceptions run in "no stop" mode by default, 14 | * and until C vendors implement C99's ways to control FP exceptions, 15 | * Python requires non-stop mode. Alas, some platforms enable FP 16 | * exceptions by default. Here we disable them. 17 | */ 18 | #ifdef __FreeBSD__ 19 | fedisableexcept(FE_OVERFLOW); 20 | #endif 21 | return Py_Main(argc, argv); 22 | } 23 | -------------------------------------------------------------------------------- /ringojs/Capstanfile: -------------------------------------------------------------------------------- 1 | # Copyright (C) 2014 Cloudius Systems, Ltd. 2 | # 3 | # This work is open source software, licensed under the terms of the 4 | # BSD license as described in the LICENSE file in the top-level directory. 5 | 6 | # 7 | # Name of the base image. Capstan will download this automatically from 8 | # Cloudius S3 repository. 9 | # 10 | base: cloudius/osv-openjdk 11 | 12 | # 13 | # The command line passed to OSv to start up the application. 14 | # 15 | cmdline: /java.so -cp /lib/js.jar -jar /run.jar /examples/httpserver.js 16 | 17 | # 18 | # The command to use to build the application. In this example, we just use 19 | # "mvn package". 20 | # 21 | build: make 22 | -------------------------------------------------------------------------------- /gccgo-example/go-main.c: -------------------------------------------------------------------------------- 1 | /* 2 | * When compiling a Go program with gccgo, the main() is normally picked up 3 | * from libgobegin.a. In the past this library was compiled without -fPIC 4 | * so we couldn't use it in OSv, but in more recent gccgo this was fixed 5 | * (see https://patchwork.ozlabs.org/patch/464423/) and now we can use it. 6 | * 7 | * Still, we need to make sure the linker picks up main() from that library. 8 | * When compiling an executable, it knows it should. But when compiling a 9 | * a shared object, it doesn't know. We need to refer to main() to force it 10 | * being included. 11 | */ 12 | extern int main(); 13 | void *force_main_to_be_included = main; 14 | -------------------------------------------------------------------------------- /apache-zookeeper/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | api.require('java') 4 | 5 | default = api.run( 6 | '--cwd=/zookeeper ' 7 | '/java.so ' 8 | '-Dzookeeper.log.dir="." ' 9 | '-Dzookeeper.root.logger="INFO,CONSOLE" ' 10 | '-Dcom.sun.management.jmxremote ' 11 | '-Dcom.sun.management.jmxremote.local.only=false ' 12 | '-cp /zookeeper/zookeeper-3.4.6.jar:/zookeeper/lib/slf4j-log4j12-1.6.1.jar:/zookeeper/lib/slf4j-api-1.6.1.jar:/zookeeper/lib/netty-3.7.0.Final.jar:/zookeeper/lib/log4j-1.2.16.jar:/zookeeper/lib/jline-0.9.94.jar:/zookeeper/conf/log4j.properties ' 13 | 'org.apache.zookeeper.server.quorum.QuorumPeerMain "/zookeeper/conf/zoo.cfg"' 14 | ) 15 | -------------------------------------------------------------------------------- /perl-debugger/Capstanfile: -------------------------------------------------------------------------------- 1 | base: perl-base 2 | 3 | # 4 | #this will create interactive session with debugger, but we are not getting 5 | #the debugger prompt or commands, and input is echoed twice. 6 | # 7 | #It will, however, execute perl statements interactively. 8 | #try: 9 | # printf "(%s)\n", join(',', keys %ENV); 10 | # printf "(%s)\n", join(',', values %ENV); 11 | # exit; 12 | # exit; 13 | #I.e., type "exit;" twice to end session. RT 8/6/15 14 | #Use -W to show all warnings. 15 | #cmdline: /osv/bin/perl -W -de 1 16 | cmdline: /osv/bin/perl -de 1 17 | 18 | #note - tried this but it hangs because cannot send EOF: 19 | #cmdline: /osv/bin/perl 20 | 21 | build: true 22 | 23 | -------------------------------------------------------------------------------- /ruby-rails-example/README.md: -------------------------------------------------------------------------------- 1 | # Ruby on Rails on OSv 2 | 3 | This is a porting Ruby on Rails. 4 | 5 | ## Building 6 | 7 | You need to install some packages before installed. 8 | 9 | **Fedora** 10 | 11 | ``` 12 | yum install sqlite-devel 13 | ``` 14 | 15 | **Arch Linux** 16 | ``` 17 | pacman -S sqlite 18 | ``` 19 | 20 | And you also need suggest image when you build OSv 21 | 22 | ``` 23 | make image=ruby-rails-example 24 | ``` 25 | 26 | ## Running OSv 27 | 28 | This module has irb 29 | 30 | You can launch this command: 31 | ``` 32 | ./scripts/run.py -n 33 | ``` 34 | 35 | And you access this URL to try sample application: 36 | ``` 37 | http://:3000/items/ 38 | ``` 39 | -------------------------------------------------------------------------------- /rpm/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: module 2 | 3 | INCLUDES=-I$(OSV_BASE)/include 4 | CFLAGS=--std=c++11 -shared -fPIC -lrpm $(INCLUDES) 5 | CXX=g++ 6 | OVERSION=$(shell $(OSV_BASE)/scripts/osv-version.sh | tr - .) 7 | 8 | module: upstream rpm.so noarch/osv-$(OVERSION)-1.noarch.rpm 9 | 10 | rpm.so: rpm.cc 11 | $(CXX) $(CFLAGS) $< -o $@ 12 | 13 | upstream: 14 | ./GET 15 | 16 | .PHONY: osvrpm 17 | noarch/osv-$(OVERSION)-1.noarch.rpm: osv.spec 18 | rpmbuild -bb osv.spec -D"osversion $(OVERSION)" -D"_rpmdir ."; \ 19 | echo "/rpms/osv-$(OVERSION)-1.noarch.rpm: $$PWD/noarch/osv-$(OVERSION)-1.noarch.rpm" >> usr.manifest 20 | 21 | .PHONY: clean 22 | clean: 23 | rm -rf upstream usr.manifest noarch rpm.so *~ 24 | -------------------------------------------------------------------------------- /node/Makefile: -------------------------------------------------------------------------------- 1 | 2 | LIB_NODE = node-$(NODE_VERSION)/out/Release/lib.target/libnode.so 3 | 4 | libnode-$(NODE_VERSION).so: $(LIB_NODE) 5 | cp $^ $@ 6 | 7 | $(LIB_NODE): 8 | cd node-$(NODE_VERSION); ./configure 9 | $(MAKE) -C node-$(NODE_VERSION) 10 | 11 | # Support for OSv's combined kernel+module build system ('make modules=node' 12 | # and 'make clean') 13 | VERSION=8.11.2 14 | #VERSION=6.10.3 15 | module: 16 | if test ! -d node-$(VERSION); then ./GET $(VERSION); $(MAKE) NODE_VERSION=$(VERSION); fi 17 | echo '/libnode.so: $${MODULE_DIR}/libnode-$(VERSION).so' > usr.manifest 18 | : > bootfs.manifest 19 | clean: 20 | rm -rf node-$(VERSION) usr.manifest bootfs.manifest libnode-$(VERSION).so 21 | -------------------------------------------------------------------------------- /apache-kafka/Makefile: -------------------------------------------------------------------------------- 1 | SCALA:=2.12 2 | VERSION:=2.3.0 3 | NAME:=kafka 4 | DIR:=kafka_$(SCALA)-$(VERSION) 5 | TARBALL:=$(DIR).tgz 6 | URL:=http://archive.apache.org/dist/$(NAME)/$(VERSION)/$(TARBALL) 7 | 8 | 9 | module: ROOTFS usr.manifest 10 | 11 | $(TARBALL): 12 | wget $(URL) 13 | 14 | ROOTFS/$(NAME): $(TARBALL) 15 | tar xvf $(TARBALL) 16 | mkdir -p ROOTFS 17 | mv $(DIR) ROOTFS/$(NAME) 18 | touch ROOTFS/$(NAME) 19 | find ./assets/config -type f -exec cp {} ROOTFS/$(NAME)/config/. \; 20 | 21 | usr.manifest: 22 | echo "/$(NAME)/**: \$${MODULE_DIR}/ROOTFS/$(NAME)/**" > usr.manifest 23 | 24 | clean: 25 | rm -rf ROOTFS $(DIR) 26 | rm -f usr.manifest $(TARBALL) 27 | 28 | ROOTFS: ROOTFS/$(NAME) 29 | -------------------------------------------------------------------------------- /apache-activemq/README.md: -------------------------------------------------------------------------------- 1 | # Apache ActiveMQ OSv 2 | 3 | Apache ActiveMQ is a high performance Apache 2.0 licensed 4 | Message Broker and JMS 1.1 implementation. 5 | 6 | Refer to http://activemq.apache.org/ for more information. 7 | 8 | ## Using assets directory 9 | If not using as part of an appliance that provides cloud-init, you can inject configuration and/or webapps by placing them in one of the following directories during build time. 10 | 11 | | Host Directory | OSv Directory | Description | 12 | | -------------- | ------------- | ----------- | 13 | | ./assets/conf | /activemq/conf| ActiveMQ configuration files. | 14 | | ./assets/webapps | /activemq/webapps | ActiveMQ web-applications to deploy. | 15 | -------------------------------------------------------------------------------- /elasticsearch/patch_no_root_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | VERSION=$1 3 | 4 | # Download original source file and patch it return false for the check 5 | wget https://raw.githubusercontent.com/elastic/elasticsearch/v${VERSION}/server/src/main/java/org/elasticsearch/bootstrap/Natives.java -O /tmp/Natives.java 6 | sed -i 's/return JNANatives.definitelyRunningAsRoot()/return false/g' /tmp/Natives.java 7 | 8 | ES_PATH=ROOTFS/elasticsearch 9 | ES_JARS=$(ls $ES_PATH/lib/*jar) 10 | ES_CLASSPATH=$(echo $ES_JARS | sed 's/ /:/g') 11 | $ES_PATH/jdk/bin/javac -d /tmp -cp $ES_CLASSPATH /tmp/Natives.java 12 | $ES_PATH/jdk/bin/jar -uf $ES_PATH/lib/elasticsearch-${VERSION}.jar -C /tmp org/elasticsearch/bootstrap/Natives.class 13 | -------------------------------------------------------------------------------- /ruby/README.md: -------------------------------------------------------------------------------- 1 | # CRuby on OSv 2 | 3 | This is a porting CRuby for OSv. 4 | 5 | ## Prerequires 6 | 7 | You need to install same version of Ruby on host side, before building CRuby for OSv. 8 | This is mandatory to keep C extension compatibility. 9 | You can use version management tool like rvm. 10 | 11 | Example: 12 | ``` 13 | \curl -sSL https://get.rvm.io | bash -s stable 14 | source ~/.profile 15 | 16 | rvm install ruby-2.2.4 17 | ``` 18 | 19 | ## Try irb on OSv 20 | 21 | You can try irb by following command: 22 | ``` 23 | ./scripts/run.py -e '--env=RUBYLIB=/usr/share/ruby:/usr/lib64/ruby /ruby.so /irb' 24 | ``` 25 | 26 | ## Sample scripts 27 | 28 | You can find more sample scripts on ruby-example module. 29 | -------------------------------------------------------------------------------- /apache-spark/Makefile: -------------------------------------------------------------------------------- 1 | HADOOP_VERSION:=2.6 2 | VERSION:=1.4.0 3 | NAME:=spark 4 | DIR:=$(NAME)-$(VERSION)-bin-hadoop$(HADOOP_VERSION) 5 | TARBALL:=$(DIR).tgz 6 | URL:=http://d3kbcqa49mib13.cloudfront.net/$(TARBALL) 7 | 8 | 9 | module: ROOTFS usr.manifest 10 | 11 | $(TARBALL): 12 | wget -c $(URL) 13 | 14 | ROOTFS/$(NAME): $(TARBALL) 15 | tar xvf $(TARBALL) 16 | mkdir -p ROOTFS 17 | mv $(DIR) ROOTFS/$(NAME) 18 | touch ROOTFS/$(NAME) 19 | find ./assets/conf -type f -exec cp {} ROOTFS/$(NAME)/conf/. \; 20 | 21 | usr.manifest: 22 | echo "/$(NAME)/**: \$${MODULE_DIR}/ROOTFS/$(NAME)/**" > usr.manifest 23 | 24 | clean: 25 | rm -rf ROOTFS $(DIR) 26 | rm -f usr.manifest $(TARBALL) 27 | 28 | ROOTFS: ROOTFS/$(NAME) 29 | -------------------------------------------------------------------------------- /memcached/patch: -------------------------------------------------------------------------------- 1 | --- src/assoc.c 2013-11-18 13:00:26.080026394 +0200 2 | +++ src-save/assoc.c 2013-07-03 11:27:41.113465014 +0300 3 | @@ -203,6 +203,7 @@ 4 | 5 | static void *assoc_maintenance_thread(void *arg) { 6 | 7 | + slabs_rebalancer_pause(); // Added by NYH - see memcached issue #331 8 | while (do_run_maintenance_thread) { 9 | int ii = 0; 10 | 11 | 12 | --- src/memcached.c 2013-11-18 13:04:54.087316443 +0200 13 | +++ src-save/memcached.c 2013-06-30 12:05:09.286145086 +0300 14 | @@ -4732,6 +4732,8 @@ 15 | NULL 16 | }; 17 | 18 | + printf("Memcached for OSV, based on Memcached %s\n", VERSION); 19 | + 20 | if (!sanitycheck()) { 21 | return EX_OSERR; 22 | } 23 | 24 | -------------------------------------------------------------------------------- /erlang/README: -------------------------------------------------------------------------------- 1 | Erlang running on OSv. still a work in progress. 2 | 3 | build image with Capstan 4 | 5 | $ make 6 | $ capstan build -v 7 | $ capstan run 8 | 9 | 10 | erlexec wrapper 11 | 12 | usage: /usr/lib64/erlang.so [-env NAME VALUE] ARGS_FILE FALLBACK_ARGS_FILE 13 | 14 | is equivalent to 15 | 16 | $ export NAME=VALUE 17 | $ rm /etc/beam.args 18 | $ mv ARGS_FILE /etc/beam.args 19 | $ ln FALLBACK_ARGS_FILE /etc/beam.args 20 | $ erlexec -args_file /etc/beam.args 21 | 22 | ARGS_FILE: path to args_file provided by cloud-init. 23 | 24 | FALLBACK_ARGS_FILE: path to args_file existed in the image. 25 | 26 | some environment variables, e.g. HOME, must be set before running 27 | erlexec. you may set them with -env option. 28 | -------------------------------------------------------------------------------- /httpserver-html5-cli/Makefile: -------------------------------------------------------------------------------- 1 | src = $(shell readlink -f ../..) 2 | app-dir = $(src)/apps/httpserver-html5-cli 3 | 4 | all: module 5 | module: html5-cli 6 | 7 | html5-cli: osv-html5-terminal/.git 8 | cd $(app-dir) && \ 9 | (command -v node > /dev/null 2>&1 || (echo "Node not installed. Install node (https://nodejs.org/en/download/package-manager/) and try again" && exit 1)) && \ 10 | cd osv-html5-terminal && \ 11 | npm install && \ 12 | node_modules/grunt-cli/bin/grunt 13 | 14 | .PHONY: html5-cli 15 | 16 | osv-html5-terminal/.git: 17 | cd $(app-dir) && \ 18 | git clone --depth 1 https://github.com/wkozaczuk/osv-html5-terminal.git 19 | 20 | clean: 21 | cd $(app-dir) && rm -rf osv-html5-terminal 22 | 23 | .SECONDARY: 24 | -------------------------------------------------------------------------------- /iperf/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (C) 2014 Cloudius Systems, Ltd. 3 | # 4 | # This work is open source software, licensed under the terms of the 5 | # BSD license as described in the LICENSE file in the top-level directory. 6 | # 7 | 8 | iperfv = iperf-2.0.5 9 | tarball = $(iperfv).tar.gz 10 | url = http://sourceforge.net/projects/iperf/files/$(tarball)/download 11 | 12 | module: iperf 13 | 14 | iperf: $(iperfv)/src/iperf 15 | cp $^ $@ 16 | 17 | $(iperfv)/src/iperf: $(tarball) 18 | tar xzf $^ 19 | patch -p0 < so.patch 20 | cd $(iperfv) && CFLAGS='-fPIC -g' CXXFLAGS='-fPIC -g' ./configure 21 | +$(MAKE) -C $(iperfv) 22 | 23 | $(tarball): 24 | wget -c -O $@ $(url) 25 | 26 | clean: 27 | rm -rf $(tarball) $(iperfv) iperf 28 | -------------------------------------------------------------------------------- /netperf/jenkins/netperf-ec2-cleanup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (C) 2013 Cloudius Systems, Ltd. 4 | # 5 | # This work is open source software, licensed under the terms of the 6 | # BSD license as described in the LICENSE file in the top-level directory. 7 | # 8 | 9 | SRC_ROOT=$1 10 | 11 | SCRIPTS_ROOT="`pwd`/scripts" 12 | . $SCRIPTS_ROOT/ec2-utils.sh 13 | 14 | TEST_INSTANCE_ID=`cat /tmp/test_instance_id` 15 | 16 | post_test_cleanup() { 17 | if test x"$TEST_INSTANCE_ID" != x""; then 18 | stop_instance_forcibly $TEST_INSTANCE_ID 19 | wait_for_instance_shutdown $TEST_INSTANCE_ID 20 | delete_instance $TEST_INSTANCE_ID 21 | fi 22 | } 23 | 24 | echo "=== Cleaning up ===" 25 | post_test_cleanup 26 | exit 0 27 | -------------------------------------------------------------------------------- /onos/Makefile: -------------------------------------------------------------------------------- 1 | VERSION:=1.2.1 2 | KARAF_VERSION:=3.0.3 3 | NAME:=onos 4 | DIR:=$(NAME)-$(VERSION) 5 | TARBALL:=$(DIR).tar.gz 6 | URL:=http://downloads.onosproject.org/release/$(TARBALL) 7 | 8 | module: ROOTFS usr.manifest 9 | 10 | $(TARBALL): 11 | wget -c $(URL) 12 | 13 | ROOTFS/$(NAME): $(TARBALL) 14 | tar xf $(TARBALL) 15 | mkdir -p ROOTFS 16 | mv $(DIR) ROOTFS/$(NAME) 17 | touch ROOTFS/$(NAME) 18 | find ./assets/etc -maxdepth 1 -type f \ 19 | -exec cp {} ROOTFS/$(NAME)/apache-karaf-$(KARAF_VERSION)/etc/. \; 20 | 21 | usr.manifest: 22 | echo "/$(NAME)/**: \$${MODULE_DIR}/ROOTFS/$(NAME)/**" > usr.manifest 23 | 24 | clean: 25 | rm -rf ROOTFS $(DIR) 26 | rm -f usr.manifest $(TARBALL) 27 | 28 | ROOTFS: ROOTFS/$(NAME) 29 | -------------------------------------------------------------------------------- /redis-memonly/GET: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Build a directory from the upstream redis 4 | set -e 5 | 6 | VERSION=3.2.8 7 | mkdir upstream 8 | cd upstream 9 | wget -c https://github.com/antirez/redis/archive/$VERSION.tar.gz 10 | tar xf $VERSION.tar.gz 11 | cd redis-$VERSION 12 | patch -p0 -N < ../../patch 13 | # TODO: The top-level make's "-r" option breaks redis's inner makefiles. 14 | # MAKEFLAGS should probably have been unset before calling us, not here. 15 | unset MAKEFLAGS ARCH 16 | make CFLAGS="-fPIC" LDFLAGS="-shared" MALLOC=libc 17 | cp src/redis-server ../.. 18 | cd ../.. 19 | pwd 20 | echo "/redis-server: ${PWD}/upstream/redis-$VERSION/src/redis-server" > usr.manifest 21 | echo "/redis.conf: ${PWD}/redis.conf" >> usr.manifest 22 | -------------------------------------------------------------------------------- /apache-activemq/module.py: -------------------------------------------------------------------------------- 1 | from osv.modules import api 2 | 3 | default = api.run_java( 4 | jvm_args=[ 5 | '-Xms1G', 6 | '-Xmx1G', 7 | '-Djava.util.logging.config.file=/activemq/conf/logging.properties', 8 | '-Djava.security.auth.login.config=/activemq/conf/login.config', 9 | '-Dcom.sun.management.jmxremote', 10 | '-Djava.awt.headless=true', 11 | '-Djava.io.tmpdir=/activemq/tmp', 12 | '-Dactivemq.classpath=/activemq/conf', 13 | '-Dactivemq.home=/activemq', 14 | '-Dactivemq.base=/activemq', 15 | '-Dactivemq.conf=/activemq/conf', 16 | '-Dactivemq.data=/activemq/data', 17 | ], 18 | args=['-jar /activemq/bin/activemq.jar start'] 19 | ) 20 | -------------------------------------------------------------------------------- /mysql/osv.patch: -------------------------------------------------------------------------------- 1 | Both items in this patch are due to currently unsupported facilities for OSv. 2 | When we gain support for them, we should drop this. 3 | 4 | In particular the socket one, it is possible to override that with a -D switch 5 | during cmake configure. But overriding it with an empty string make the 6 | conditional resolve to true. 7 | --- a/cmake/mysql_version.cmake 2014-07-18 19:48:39.000000000 +0400 8 | +++ b/cmake/mysql_version.cmake 2014-09-03 14:31:31.580182813 +0400 9 | @@ -83,7 +83,7 @@ ENDIF() 10 | 11 | 12 | IF(NOT MYSQL_UNIX_ADDR) 13 | - SET(MYSQL_UNIX_ADDR "/tmp/mysql.sock") 14 | + SET(MYSQL_UNIX_ADDR "") 15 | ENDIF() 16 | IF(NOT COMPILATION_COMMENT) 17 | SET(COMPILATION_COMMENT "Source distribution") 18 | --------------------------------------------------------------------------------